:root {
  color-scheme: dark;
  --bg: #050816;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --blue: #38bdf8;
  --purple: #a78bfa;
  --pink: #fb7185;
  --green: #34d399;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 5%, rgba(167, 139, 250, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
  box-shadow: 0 12px 36px rgba(56, 189, 248, 0.28);
}

.brand-text {
  font-size: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.main-nav a,
.mobile-panel a {
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: white;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.wide-search input,
.search-panel input,
.search-panel select {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
  border-radius: 999px;
  outline: none;
}

.top-search input {
  width: 210px;
  padding: 10px 15px;
}

.top-search button,
.wide-search button,
.primary-btn,
.ghost-btn,
.search-panel button {
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.top-search button,
.wide-search button,
.primary-btn {
  padding: 11px 18px;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  width: min(1320px, calc(100% - 24px));
  min-height: 640px;
  margin: 20px auto 0;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid var(--line);
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 44px;
  padding: clamp(28px, 5vw, 76px);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-backdrop,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-backdrop {
  object-fit: cover;
  filter: blur(12px) saturate(1.28);
  transform: scale(1.1);
  opacity: 0.44;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(15, 23, 42, 0.36) 100%),
    radial-gradient(circle at 20% 28%, rgba(56, 189, 248, 0.32), transparent 28rem),
    radial-gradient(circle at 80% 18%, rgba(251, 113, 133, 0.22), transparent 25rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 900;
}

.hero h2,
.page-hero h1,
.intro-panel h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h2 {
  max-width: 760px;
  font-size: clamp(42px, 6vw, 82px);
}

.hero-summary {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-tags,
.card-tags,
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.card-tags span,
.filter-pills button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 11px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.52);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: clamp(28px, 5vw, 76px);
  bottom: 30px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.active {
  background: white;
}

.section-shell,
.page-hero,
.detail-head {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto;
}

.section-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  padding: clamp(20px, 3vw, 32px);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 28px;
}

.intro-panel h1,
.page-hero h1 {
  font-size: clamp(34px, 4vw, 58px);
}

.intro-panel p,
.page-hero p,
.article-section p,
.overview-card p,
.detail-info .lead-text {
  color: #cbd5e1;
}

.wide-search {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
}

.wide-search input {
  min-width: 0;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  background: transparent;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2,
.article-section h2,
.footer-grid h2 {
  margin: 0;
  line-height: 1.2;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile span,
.category-tile strong {
  position: absolute;
  left: 18px;
  z-index: 2;
}

.category-tile span {
  bottom: 48px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  bottom: 18px;
  color: #bae6fd;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.62;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.compact-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: 0 20px 58px rgba(8, 47, 73, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-tags {
  gap: 6px;
  margin-bottom: 10px;
}

.card-tags span {
  padding: 4px 8px;
  font-size: 12px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.compact h3 {
  font-size: 16px;
}

.movie-card.compact p {
  min-height: 45px;
  font-size: 13px;
}

.page-hero {
  min-height: 280px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.58)),
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.24), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(167, 139, 250, 0.22), transparent 26rem);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 64px);
}

.filter-pills {
  margin-top: 22px;
}

.filter-pills button {
  cursor: pointer;
}

.filter-pills button.active {
  border-color: rgba(56, 189, 248, 0.72);
  color: white;
  background: rgba(56, 189, 248, 0.24);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.overview-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
}

.overview-card img {
  width: 170px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.overview-card h2 {
  margin: 0;
}

.small-line {
  font-size: 14px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-top: 26px;
}

.search-panel input,
.search-panel select {
  min-width: 0;
  padding: 13px 16px;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-num {
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-cover img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-row p {
  margin: 0 0 8px;
  color: #cbd5e1;
}

.detail-head {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.56)),
    radial-gradient(circle at 26% 12%, rgba(56, 189, 248, 0.24), transparent 28rem);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 42px);
}

.detail-poster {
  width: 300px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 68px);
}

.lead-text {
  max-width: 820px;
  font-size: 20px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.meta-list div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  padding: 14px;
}

.meta-list dt {
  color: var(--muted);
  font-size: 13px;
}

.meta-list dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.watch-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #020617;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: white;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.26), transparent 22rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.74));
}

.play-layer span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
  box-shadow: 0 20px 58px rgba(37, 99, 235, 0.34);
  font-size: 30px;
}

.play-layer strong {
  font-size: 22px;
}

.watch-box.playing .play-layer {
  display: none;
}

.article-section {
  font-size: 18px;
}

.article-section h2 {
  margin-top: 12px;
  font-size: 28px;
}

.article-section p {
  margin: 12px 0 22px;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
  color: #cbd5e1;
}

.footer-grid ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.footer-grid li + li {
  margin-top: 8px;
}

.hidden-card {
  display: none;
}

@media (max-width: 1080px) {
  .top-search,
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
  }

  .hero-poster {
    display: none;
  }

  .category-grid,
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .intro-panel,
  .overview-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(100%, 320px);
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 26px;
  }

  .hero h2 {
    font-size: 38px;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .search-panel,
  .meta-list {
    grid-template-columns: 1fr;
  }

  .overview-card,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .overview-card img,
  .rank-cover img {
    width: 100%;
  }

  .wide-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
