:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.12));
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(2, 6, 23, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.35);
  font-size: 17px;
}

.brand-copy strong,
.brand-copy em {
  display: block;
  font-style: normal;
  line-height: 1.12;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #e0faff;
  background: var(--cyan-soft);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

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

.mobile-nav .nav-link {
  display: block;
}

.mobile-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.mobile-category-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.68);
  color: #cbd5e1;
  font-size: 13px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 580px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.32) 45%, rgba(2, 6, 23, 0.68) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 78px;
  max-width: 790px;
}

.hero-eyebrow,
.section-heading span,
.page-hero span,
.detail-channel {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-main-title,
.hero-movie-title {
  margin: 0;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-main-title {
  max-width: 820px;
  font-size: clamp(40px, 7vw, 72px);
}

.hero-movie-title {
  margin-top: 12px;
  font-size: clamp(26px, 4vw, 46px);
  color: #cffafe;
}

.hero-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

.hero-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  border: 1px solid var(--line);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.watch-link,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-button {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.22);
}

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

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.54);
  backdrop-filter: blur(10px);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.top-page {
  padding-top: 108px;
}

.content-section,
.search-panel,
.page-hero,
.detail-hero,
.player-section,
.detail-layout {
  margin: 48px 0;
}

.search-panel,
.slate-panel,
.page-hero,
.detail-hero,
.player-section,
.detail-layout,
.category-overview-card,
.category-tile {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel,
.slate-panel,
.page-hero,
.detail-hero,
.player-section,
.detail-layout {
  padding: clamp(22px, 4vw, 36px);
}

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

.section-heading.compact {
  display: block;
  margin-bottom: 20px;
}

.section-heading h2,
.page-hero h1,
.detail-intro h1,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(28px, 5vw, 46px);
}

.section-heading p,
.page-hero p,
.category-tile p,
.category-overview-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-controls,
.local-filter {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
}

.local-filter {
  margin: 28px 0;
  grid-template-columns: 1fr 180px;
}

.search-controls input,
.search-controls select,
.local-filter input,
.local-filter select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.88);
  padding: 0 15px;
  outline: none;
}

.search-controls input:focus,
.search-controls select:focus,
.local-filter input:focus,
.local-filter select:focus {
  border-color: rgba(34, 211, 238, 0.66);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.global-search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
}

.search-result-card img {
  width: 78px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.search-result-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.search-result-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.movie-card.wide .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
  font-weight: 900;
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  color: var(--cyan);
  font-size: 12px;
  line-height: 1.5;
}

.movie-card h3 {
  margin: 8px 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.movie-card.compact p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.88);
  font-size: 12px;
}

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

.category-tile,
.category-overview-card {
  padding: 22px;
}

.category-tile > a,
.category-overview-main {
  display: block;
}

.category-tile span,
.category-overview-card span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.category-tile h3,
.category-overview-card h2 {
  margin: 10px 0;
  color: var(--text);
  font-size: 22px;
}

.tile-links,
.category-sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tile-links a,
.category-sample-links a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  font-size: 12px;
  background: rgba(2, 6, 23, 0.32);
}

.ranking-list {
  display: grid;
  gap: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 78px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.36);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
  font-weight: 900;
}

.rank-cover img {
  width: 78px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.rank-content h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.rank-content p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.watch-link {
  min-height: 38px;
  padding: 0 14px;
  color: #001018;
  background: var(--cyan);
}

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

.breadcrumb a {
  color: #cffafe;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(34, 211, 238, 0.2), transparent 20rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.76));
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-intro h1 {
  font-size: clamp(30px, 5vw, 54px);
}

.detail-one-line,
.detail-meta-line {
  margin: 18px 0 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.detail-meta-line {
  color: var(--cyan);
  font-weight: 700;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #001018;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.45);
  font-size: 34px;
  padding-left: 5px;
}

.player-frame.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.detail-article h2,
.detail-side h2 {
  font-size: 26px;
  margin-bottom: 16px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #cbd5e1;
  line-height: 2;
  font-size: 16px;
}

.detail-side dl {
  margin: 0;
}

.detail-side dl div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

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

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

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

.footer-inner strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.76);
}

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

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

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .featured-grid,
  .global-search-results,
  .home-ranking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .header-inner {
    height: 66px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy em {
    display: none;
  }

  .hero-carousel {
    min-height: 640px;
    height: 82vh;
  }

  .hero-copy {
    padding-bottom: 86px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-meta span {
    font-size: 12px;
  }

  .search-controls,
  .local-filter,
  .category-grid,
  .category-overview-grid,
  .featured-grid,
  .global-search-results,
  .home-ranking {
    grid-template-columns: 1fr;
  }

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

  .movie-card-body {
    padding: 13px;
  }

  .movie-card h3,
  .movie-card.compact h3,
  .movie-card.normal h3 {
    font-size: 15px;
  }

  .movie-card p {
    font-size: 13px;
  }

  .section-heading,
  .page-hero {
    display: block;
  }

  .section-link,
  .page-hero .primary-button,
  .page-hero .ghost-button {
    margin-top: 16px;
  }

  .rank-row {
    grid-template-columns: 42px 68px 1fr;
  }

  .rank-content p,
  .rank-row .watch-link {
    display: none;
  }

  .rank-number {
    width: 36px;
    height: 36px;
  }

  .rank-cover img {
    width: 68px;
  }

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

  .play-cover span {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
