:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-deep: #94a3b8;
  --brand: #34d399;
  --brand-deep: #059669;
  --cyan: #22d3ee;
  --orange: #fb923c;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(16, 185, 129, 0.18), transparent 28rem),
    radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.16), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--panel-line);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #06281f;
  background: linear-gradient(135deg, #6ee7b7, #22d3ee);
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.36);
}

.brand-name {
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.mobile-link {
  color: var(--muted);
  font-weight: 650;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: #ffffff;
  background: rgba(52, 211, 153, 0.13);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.66);
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.78);
}

.mobile-nav.is-open {
  display: grid;
}

.mobile-link {
  padding: 12px;
  background: rgba(148, 163, 184, 0.08);
}

.hero {
  position: relative;
  height: clamp(560px, 68vh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.83) 44%, rgba(15, 23, 42, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.15) 44%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 20px;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  color: #d1fae5;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px;
  background: rgba(6, 78, 59, 0.36);
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  font-size: 0.88rem;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: #042116;
  background: linear-gradient(135deg, #6ee7b7, #22d3ee);
  box-shadow: 0 12px 34px rgba(52, 211, 153, 0.28);
}

.ghost-button,
.section-more,
.text-link {
  color: #e2e8f0;
  border: 1px solid var(--panel-line);
  background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 8;
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--panel-line);
  font-size: 1.7rem;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  padding: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.32);
}

.hero-dot.is-active {
  background: var(--brand);
}

.search-band {
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--panel-line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
}

.search-box span {
  color: var(--brand);
  font-size: 1.25rem;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.search-box input::placeholder {
  color: #64748b;
}

.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  padding: 12px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.story-card h2,
.side-card h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.6rem);
}

.section-heading.slim {
  align-items: center;
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.48);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.48s ease, filter 0.48s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
  filter: brightness(0.82);
}

.watch-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
}

.watch-chip {
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #052e1e;
  font-size: 0.76rem;
  background: linear-gradient(135deg, #6ee7b7, #22d3ee);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .watch-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(251, 146, 60, 0.94);
  box-shadow: 0 8px 20px rgba(251, 146, 60, 0.3);
}

.movie-body {
  padding: 14px;
}

.movie-body h3 {
  min-height: 2.6em;
  margin: 0 0 9px;
  font-size: 1rem;
  line-height: 1.3;
}

.movie-body h3 a:hover {
  color: var(--brand);
}

.movie-body p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted-deep);
  font-size: 0.88rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 0.76rem;
}

.movie-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
}

.movie-card-compact .movie-body p {
  display: none;
}

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

.category-tile,
.category-overview-card,
.story-card,
.side-card,
.ranking-panel {
  border: 1px solid var(--panel-line);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.category-tile {
  min-height: 230px;
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.46);
}

.category-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

.category-images img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.category-tile em,
.category-overview-card p {
  color: var(--muted-deep);
  font-style: normal;
  line-height: 1.65;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.side-card,
.story-card {
  border-radius: 24px;
  padding: 22px;
}

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

.wide-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mini-card:hover {
  transform: translateX(4px);
  border-color: rgba(52, 211, 153, 0.34);
}

.mini-card img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.mini-card-text {
  min-width: 0;
}

.mini-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card small {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted-deep);
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-rank {
  display: inline-flex;
  min-width: 28px;
  height: 24px;
  margin-right: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #052e1e;
  font-weight: 900;
  background: var(--brand);
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0 28px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.inline {
  max-width: 700px;
  margin-top: 24px;
}

.large-search {
  min-height: 60px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 26px;
}

.category-poster-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.category-poster-wall img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.22)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.18));
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 64px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-deep);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb em {
  color: #ffffff;
  font-style: normal;
}

.detail-copy h1 {
  margin-top: 18px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.85;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 16px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--panel-line);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  color: #041b13;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #6ee7b7, #22d3ee);
  box-shadow: 0 0 50px rgba(52, 211, 153, 0.46);
  font-size: 2.2rem;
  transform: translateX(3px);
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.story-card p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.9;
}

.side-card {
  position: sticky;
  top: 92px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px 16px;
  margin: 18px 0 0;
}

.side-card dt {
  color: var(--muted-deep);
}

.side-card dd {
  margin: 0;
  color: #ffffff;
}

[data-movie-card].is-hidden {
  display: none;
}

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

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

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid p,
.footer-links a {
  color: var(--muted-deep);
  line-height: 1.75;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
}

@media (max-width: 1180px) {
  .movie-grid,
  .large-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 920px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .search-band,
  .two-column-section,
  .detail-layout,
  .footer-grid,
  .category-overview-grid,
  .category-overview-card,
  .detail-inner {
    grid-template-columns: 1fr;
  }

  .quick-links {
    justify-content: stretch;
  }

  .quick-links a {
    flex: 1 1 auto;
    text-align: center;
  }

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

  .wide-list {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 260px;
  }

  .side-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .hero {
    height: 640px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 62%, rgba(2, 6, 23, 0.32) 100%);
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 110px;
  }

  .search-band {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

  .content-section {
    padding-top: 52px;
  }

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

  .movie-grid,
  .large-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-body {
    padding: 12px;
  }

  .movie-body h3 {
    font-size: 0.92rem;
  }

  .movie-body p,
  .tag-row {
    display: none;
  }

  .mini-card {
    grid-template-columns: 80px 1fr;
  }

  .mini-card img {
    width: 80px;
  }

  .category-overview-card {
    padding: 14px;
  }

  .detail-inner {
    gap: 24px;
  }

  .detail-hero {
    min-height: auto;
  }

  .play-overlay span {
    width: 70px;
    height: 70px;
  }
}
