:root {
  color-scheme: dark;
  --bg: #06111f;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5f4ff;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --gold: #fbbf24;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 4%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 16%, rgba(59, 130, 246, 0.18), transparent 30rem),
    linear-gradient(180deg, #08111f 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(20px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 14px;
  background: linear-gradient(135deg, #0891b2, #22d3ee);
  color: #00111a;
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.28);
  font-size: 15px;
}

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

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

.nav-link:hover,
.nav-link.is-active {
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.94);
}

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

.hero-cinema {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 680px;
  margin: 28px auto 0;
}

.hero-stage {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.48) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.1);
}

.hero-backdrop::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 24% 28%, rgba(34, 211, 238, 0.24), transparent 28rem);
  content: "";
}

.hero-content {
  max-width: 720px;
}

.hero-kicker,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 640px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #cffafe;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
}

.tag-row span {
  padding: 5px 9px;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, #06b6d4, #67e8f9);
  color: #022c35;
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.26);
}

.ghost-button {
  border: 1px solid rgba(226, 232, 240, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: #e0f2fe;
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.5);
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.5);
}

.hero-poster::after {
  position: absolute;
  inset: auto 18px 18px 18px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #fbbf24);
  content: "";
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.18;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #e0f2fe;
  font-size: 30px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}

.hero-dot.is-active {
  width: 32px;
  background: #22d3ee;
}

.content-section,
.search-panel,
.page-hero,
.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 36px auto 0;
}

.search-panel,
.page-hero {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(2, 8, 23, 0.24);
  backdrop-filter: blur(18px);
}

.page-hero {
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.86);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 62px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 42px);
  letter-spacing: -0.04em;
}

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

.section-heading.with-link a,
.text-link {
  color: #67e8f9;
  font-weight: 900;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(740px, 100%);
  padding: 14px 18px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
}

.search-box span {
  color: #67e8f9;
  font-size: 24px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 16px;
}

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

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

.category-card,
.category-overview-card,
.movie-card,
.text-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(2, 8, 23, 0.18);
}

.category-card {
  padding: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
  transform: translateY(-4px);
}

.category-thumbs,
.overview-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-thumbs img,
.overview-images img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.category-card span {
  display: block;
  margin-top: 14px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p,
.movie-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

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

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

.full-grid {
  margin-top: 22px;
}

.movie-card {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

.poster-year,
.rank-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(10px);
}

.poster-year {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: var(--gold);
  font-size: 13px;
}

.poster-play {
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #022c35;
  background: rgba(103, 232, 249, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-meta-line {
  margin-bottom: 8px;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #67e8f9;
}

.movie-card p {
  min-height: 54px;
  margin: 0 0 14px;
  font-size: 14px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.overview-body h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 62px minmax(180px, 1fr) minmax(180px, 0.9fr);
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(30, 41, 59, 0.92);
  transform: translateX(4px);
}

.rank-row img {
  width: 48px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-num {
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
}

.rank-title {
  color: #ffffff;
  font-weight: 900;
}

.rank-info {
  color: #94a3b8;
  font-size: 14px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.92)),
    var(--hero-image) center / cover no-repeat;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.04);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  min-height: 560px;
  padding: clamp(24px, 5vw, 62px);
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.48);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4.18;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #67e8f9;
}

.detail-info h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta div {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-meta span {
  display: block;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 12px;
}

.detail-meta strong {
  color: #ffffff;
  font-size: 15px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.36);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0.36);
  color: #ffffff;
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42) saturate(1.12);
}

.play-circle,
.play-copy {
  position: relative;
  z-index: 2;
}

.play-circle {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.92);
  color: #022c35;
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.35);
}

.play-copy {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  font-weight: 900;
}

.player-shell.is-playing .player-cover {
  display: none;
}

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

.text-card {
  padding: clamp(22px, 4vw, 34px);
}

.text-card h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 26px;
}

.text-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  margin-top: 58px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.96));
}

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

.footer-brand {
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .movie-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;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero-stage,
  .hero-cinema {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
  }

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

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

  .overview-grid,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .category-overview-card,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 300px;
  }

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

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

@media (max-width: 640px) {
  .header-inner,
  .hero-cinema,
  .content-section,
  .search-panel,
  .page-hero,
  .detail-hero,
  .mobile-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 20px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-stage,
  .hero-cinema {
    min-height: 690px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

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

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

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

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

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

  .rank-row {
    grid-template-columns: 42px 52px minmax(0, 1fr);
  }

  .rank-info {
    grid-column: 3;
  }

  .detail-layout {
    padding: 22px;
  }

  .detail-info h1 {
    font-size: 38px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
