:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --bg-card: rgba(30, 41, 59, 0.72);
  --bg-card-solid: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #34d399;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.45);
  --radius: 22px;
  --radius-sm: 14px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(52, 211, 153, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.13), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 36%, #111827 100%);
}

body.menu-open,
body.search-open {
  overflow-x: hidden;
}

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

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

img.is-hidden {
  opacity: 0;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(52, 211, 153, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 1.4rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--soft);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.icon-button,
.rail-buttons button,
.filter-chip {
  border: 1px solid var(--line);
  color: var(--soft);
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.22rem;
}

.icon-button:hover,
.rail-buttons button:hover,
.filter-chip:hover,
.filter-chip.is-active {
  color: #052e2b;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

.search-panel {
  display: grid;
  grid-template-rows: 0fr;
  border-top: 1px solid transparent;
  transition: grid-template-rows 0.24s ease, border-color 0.24s ease;
}

.search-form {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-form input,
.page-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.88);
  padding: 14px 16px;
  outline: none;
}

.search-form button,
.page-search button,
.primary-button,
.ghost-button,
.section-link,
.tile-link {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 750;
}

.search-form button,
.page-search button,
.primary-button {
  color: #052e2b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px rgba(52, 211, 153, 0.24);
}

.search-form button,
.page-search button {
  padding: 0 22px;
}

.search-open .search-panel {
  grid-template-rows: 1fr;
  border-color: var(--line);
}

.search-open .search-form {
  padding-block: 14px;
}

.mobile-nav {
  display: none;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-inner {
  height: 72vh;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, 100%);
  padding-block: 96px;
  animation: fade-up 0.7s ease both;
}

.eyebrow,
.section-kicker,
.category-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(52, 211, 153, 0.12);
  padding: 7px 14px;
  font-size: 0.86rem;
  font-weight: 750;
}

.hero-copy h1,
.hero-copy h2,
.sub-hero h1,
.detail-copy h1,
.wide-cta h2 {
  margin: 18px 0 16px;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(2.7rem, 7vw, 5.8rem);
}

.hero-copy p,
.sub-hero p,
.detail-copy p,
.wide-cta p {
  color: var(--soft);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.58);
  padding: 8px 12px;
  font-size: 0.9rem;
}

.hero-actions,
.wide-cta-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-button,
.ghost-button,
.section-link,
.tile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.ghost-button,
.section-link,
.tile-link {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.48);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.66);
  cursor: pointer;
  transition: width 0.24s ease, background 0.24s ease;
}

.hero-dot.is-active {
  width: 38px;
  background: var(--accent);
}

.section-block {
  padding-block: 64px;
}

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.02em;
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.82));
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  border-color: rgba(52, 211, 153, 0.44);
  box-shadow: var(--shadow);
  transform: translateY(-6px) scale(1.01);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(52, 211, 153, 0.18), transparent 48%),
    linear-gradient(135deg, #1e293b, #020617);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.08);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.88));
}

.card-year {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052e2b;
  background: rgba(52, 211, 153, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 17px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent);
  font-size: 0.78rem;
}

.card-meta span:last-child {
  color: var(--muted);
}

.card-body strong {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.62;
}

.rail-section {
  background: rgba(2, 6, 23, 0.28);
  border-block: 1px solid rgba(148, 163, 184, 0.08);
}

.rail-buttons {
  display: flex;
  gap: 10px;
}

.rail-buttons button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.6rem;
}

.movie-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.compact-card {
  min-width: 300px;
  scroll-snap-align: start;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  padding: 14px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ranking-list a:hover {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(30, 41, 59, 0.88);
  transform: translateY(-2px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.rank-tag {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.9rem;
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(52, 211, 153, 0.18), transparent 12rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.88));
  padding: 22px;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-tile h2 {
  margin: 18px 0 10px;
  font-size: 1.35rem;
}

.category-tile p {
  color: var(--muted);
  line-height: 1.7;
}

.tile-link {
  align-self: flex-start;
  min-height: 40px;
  padding-inline: 16px;
}

.accent-02 {
  --accent: #38bdf8;
  --accent-2: #818cf8;
}

.accent-03 {
  --accent: #f472b6;
  --accent-2: #c084fc;
}

.accent-04 {
  --accent: #fb923c;
  --accent-2: #facc15;
}

.accent-05 {
  --accent: #fb7185;
  --accent-2: #f0abfc;
}

.accent-06 {
  --accent: #a78bfa;
  --accent-2: #22d3ee;
}

.accent-07 {
  --accent: #2dd4bf;
  --accent-2: #60a5fa;
}

.accent-08 {
  --accent: #84cc16;
  --accent-2: #34d399;
}

.accent-09 {
  --accent: #facc15;
  --accent-2: #fb7185;
}

.accent-10 {
  --accent: #67e8f9;
  --accent-2: #34d399;
}

.wide-cta {
  margin-top: 24px;
  padding-block: 72px;
  background:
    linear-gradient(90deg, rgba(52, 211, 153, 0.14), rgba(34, 211, 238, 0.1)),
    rgba(2, 6, 23, 0.36);
  border-block: 1px solid var(--line);
}

.wide-cta-inner {
  justify-content: space-between;
}

.wide-cta h2 {
  font-size: clamp(1.8rem, 4vw, 3.6rem);
}

.sub-hero {
  padding: 86px 0 60px;
  background:
    radial-gradient(circle at top left, rgba(52, 211, 153, 0.16), transparent 24rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.32));
  border-bottom: 1px solid var(--line);
}

.sub-hero h1 {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
}

.page-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: min(760px, 100%);
  margin-top: 28px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-chip {
  border-radius: 999px;
  padding: 10px 16px;
}

.detail-hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--line);
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: center;
  padding-block: 70px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at center, rgba(52, 211, 153, 0.18), transparent 55%),
    linear-gradient(135deg, #1e293b, #020617);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.detail-copy h1 {
  font-size: clamp(2.3rem, 5vw, 4.8rem);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(52, 211, 153, 0.14), transparent 28rem),
    #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #052e2b;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 50px rgba(52, 211, 153, 0.34);
  font-size: 2rem;
}

.player-shell.is-ready .player-start {
  opacity: 0;
  pointer-events: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.content-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.64);
  padding: 28px;
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
}

.content-panel p {
  color: var(--soft);
  line-height: 1.95;
  margin: 0 0 28px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
  margin: 0 0 22px;
}

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

.side-panel dd {
  margin: 0;
  color: var(--text);
}

.side-tags {
  margin-bottom: 0;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-block: 46px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-block: 18px;
  font-size: 0.92rem;
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-grid,
  .featured-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-hero-grid,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

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

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

  .menu-toggle {
    display: grid;
  }

  .mobile-nav {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    border-top: 1px solid transparent;
    transition: grid-template-rows 0.24s ease, border-color 0.24s ease;
  }

  .mobile-nav .nav-link {
    padding: 14px 16px;
  }

  .menu-open .mobile-nav {
    grid-template-rows: 1fr;
    border-color: var(--line);
  }

  .menu-open .mobile-nav::before {
    content: "";
    display: none;
  }

  .hero-slider,
  .hero-inner {
    min-height: 78vh;
    height: 78vh;
  }

  .section-heading,
  .wide-cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .large-category-grid,
  .featured-grid,
  .related-grid,
  .ranking-grid,
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-list a {
    grid-template-columns: 48px 1fr;
  }

  .rank-tag {
    grid-column: 2;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-search,
  .search-form {
    grid-template-columns: 1fr;
  }

  .page-search button,
  .search-form button {
    min-height: 46px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 62px;
  }

  .brand-text {
    font-size: 1.08rem;
  }

  .hero-copy {
    padding-block: 76px;
  }

  .hero-meta,
  .detail-meta {
    gap: 8px;
  }

  .movie-grid,
  .category-grid,
  .large-category-grid,
  .featured-grid,
  .related-grid,
  .ranking-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    min-width: 78vw;
  }

  .section-block {
    padding-block: 46px;
  }

  .detail-hero-grid {
    gap: 28px;
    padding-block: 46px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .player-start span {
    width: 68px;
    height: 68px;
  }
}
