:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(34, 211, 238, 0.23);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --accent: #06b6d4;
  --shadow: 0 24px 70px rgba(8, 47, 73, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 36rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(23, 37, 84, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  overflow: visible;
}

.grid-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.18) 1px, transparent 1px);
  background-size: 40px 40px;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), #60a5fa, var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #00111a;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.45);
}

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

.nav-link,
.mobile-links a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-links a:hover {
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.06);
}

.search-wrap {
  position: relative;
  width: 240px;
}

.global-search,
.page-filter,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.28);
  outline: none;
  color: var(--text);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  transition: border 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.global-search:focus,
.page-filter:focus,
.filter-bar select:focus {
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: var(--shadow);
  padding: 10px;
}

.search-item {
  display: block;
  padding: 12px;
  border-radius: 14px;
  color: #e2e8f0;
}

.search-item:hover {
  background: rgba(34, 211, 238, 0.10);
}

.search-item strong {
  display: block;
  color: white;
}

.search-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px 12px;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  position: relative;
  border-top: 1px solid var(--line-soft);
}

.mobile-links {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 0 18px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 690px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.72));
}

.hero-bg {
  position: absolute;
  inset: -20% -10% auto;
  height: 620px;
  background:
    radial-gradient(circle at 24% 24%, rgba(34, 211, 238, 0.20), transparent 28rem),
    radial-gradient(circle at 72% 30%, rgba(59, 130, 246, 0.18), transparent 30rem);
  filter: blur(2px);
}

.hero-container {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
  padding: 64px 0 90px;
}

.hero-carousel {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.74)),
    linear-gradient(90deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.10));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 47% 53%;
  gap: 20px;
  align-items: center;
  padding: 42px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-art {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 430px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.20), rgba(59, 130, 246, 0.16));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.hero-art::after,
.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.82));
}

.hero-art img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  margin-bottom: 18px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.10);
  font-weight: 700;
  font-size: 14px;
}

.hero-copy h1,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--cyan), #93c5fd, var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 610px;
  color: #cbd5e1;
  font-size: 18px;
  margin: 22px 0;
}

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

.primary-btn,
.ghost-btn,
.play-layer button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn,
.play-layer button {
  border: 0;
  color: #00111a;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.26);
  cursor: pointer;
}

.ghost-btn,
.section-more {
  border: 1px solid rgba(34, 211, 238, 0.32);
  color: #dffbff;
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.ghost-btn:hover,
.play-layer button:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(34, 211, 238, 0.34);
}

.hero-dots {
  position: absolute;
  left: 28px;
  bottom: 32px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.hero-rank {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.hero-rank-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 16px;
}

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

.wave-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.main-content {
  padding: 36px 0 80px;
}

.content-section {
  margin: 0 0 58px;
}

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

.section-head h2,
.panel h2,
.detail-block h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-head p,
.page-title p,
.panel p,
.detail-block p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
  transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 98px 1fr;
  align-items: stretch;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.12));
}

.compact .poster-frame {
  height: 138px;
  aspect-ratio: auto;
}

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

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

.image-blank {
  opacity: 0;
}

.play-badge,
.rank-num {
  position: absolute;
  z-index: 2;
  color: white;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.88);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.28);
}

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  font-size: 12px;
}

.rank-num {
  left: 10px;
  top: 10px;
  min-width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.meta-line {
  margin: 8px 0 0;
  color: #93a4ba;
  font-size: 13px;
}

.one-line {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.08);
  padding: 4px 9px;
  font-size: 12px;
}

.page-title {
  padding: 58px 0 28px;
}

.page-title h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

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

.category-card,
.panel,
.detail-block,
.player-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.20);
}

.category-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -70px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.20), transparent 70%);
}

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

.category-card p {
  color: var(--muted);
}

.detail-hero {
  padding: 54px 0 32px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 32px;
  align-items: start;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.12));
  box-shadow: var(--shadow);
}

.detail-cover img {
  aspect-ratio: 3 / 4.2;
  height: auto;
  object-fit: cover;
}

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

.detail-title .intro {
  color: #dbeafe;
  font-size: 18px;
  margin-top: 18px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

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

.info-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.player-wrap {
  overflow: hidden;
  margin: 18px 0 34px;
  background: #020617;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.24), rgba(0, 0, 0, 0.56));
  cursor: pointer;
  z-index: 4;
}

.play-layer.is-hidden {
  display: none;
}

.play-layer button {
  font-size: 18px;
}

.detail-block {
  padding: 26px;
  margin-bottom: 22px;
}

.detail-block p {
  color: #d5e1f0;
  white-space: pre-line;
}

.site-footer {
  padding: 46px 0;
  border-top: 1px solid var(--line-soft);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 26px;
}

.site-footer p {
  color: var(--muted);
}

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

.footer-links a {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 13px;
  color: #cbd5e1;
}

.hidden-card {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  body.menu-open .mobile-nav {
    display: block;
  }

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

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .hero-art {
    min-height: 360px;
  }

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

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

  .brand {
    font-size: 20px;
  }

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

  .hero-container {
    padding-top: 28px;
  }

  .hero-carousel {
    min-height: 690px;
    border-radius: 22px;
  }

  .hero-art {
    min-height: 310px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .movie-grid,
  .category-grid,
  .info-list,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    grid-template-columns: 94px 1fr;
  }

  .section-head {
    display: block;
  }

  .section-more {
    margin-top: 12px;
  }
}

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .one-line,
  .tag-row {
    display: none;
  }
}
