:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, .18);
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --danger: #f97316;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, .22), transparent 30%), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, .86);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 12px 34px rgba(56, 189, 248, .28);
  font-size: 18px;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: .03em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #cbd5e1;
}

.desktop-nav a,
.nav-dropdown > button {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font: inherit;
  transition: color .2s ease;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover {
  color: #fff;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  width: 260px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, .98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: .2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}

.nav-dropdown-panel a:hover {
  background: rgba(56, 189, 248, .18);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 320px;
}

.header-search input,
.filter-panel input,
.hero-search-panel input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, .88);
  color: #fff;
  padding: 12px 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
}

.header-search input:focus,
.filter-panel input:focus,
.hero-search-panel input:focus {
  border-color: rgba(56, 189, 248, .68);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .12);
}

.header-search button,
.hero-search-panel button {
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-weight: 700;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, .95);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav a {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: #dbeafe;
}

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

.hero-carousel {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  min-height: 680px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  display: none;
  min-height: 680px;
  padding: 86px clamp(24px, 6vw, 82px);
  background-size: cover;
  background-position: center;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .55fr);
  gap: 52px;
}

.hero-slide.active {
  display: grid;
}

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

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(56, 189, 248, .35);
  border-radius: 999px;
  background: rgba(56, 189, 248, .12);
  color: #bae6fd;
  font-size: 14px;
}

.hero-content h1,
.detail-info h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.hero-content p,
.detail-info p,
.page-hero p {
  color: #cbd5e1;
  line-height: 1.85;
  font-size: 17px;
  max-width: 760px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #dbeafe;
  font-size: 12px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 42px rgba(37, 99, 235, .32);
}

.ghost-button {
  color: #e0f2fe;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
}

.hero-cover {
  position: relative;
  min-height: 500px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .48);
}

.hero-cover:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, .72));
}

.hero-cover span,
.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .28);
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 82px);
  bottom: 32px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  cursor: pointer;
}

.hero-dots button.active {
  background: #38bdf8;
}

.hero-search-panel {
  position: absolute;
  right: 28px;
  bottom: 24px;
  width: min(520px, calc(100% - 56px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(18px);
}

.hero-search-panel form {
  display: flex;
  gap: 10px;
}

.quick-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.quick-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #dbeafe;
  font-size: 13px;
}

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

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

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

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

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

.category-card {
  position: relative;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
  transition: .2s ease;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.category-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, .1), rgba(2, 6, 23, .92));
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 22px;
  margin-bottom: 10px;
}

.category-card em {
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.6;
  font-size: 13px;
}

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, .92), rgba(15, 23, 42, .62));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
  transition: .2s ease;
}

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

.movie-poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, .76));
  opacity: .84;
}

.movie-poster .play-mark {
  width: 48px;
  height: 48px;
  opacity: 0;
  transition: .2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

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

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

.movie-card h3 a:hover {
  color: #7dd3fc;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: #94a3b8;
  line-height: 1.65;
  font-size: 13px;
}

.movie-meta {
  margin-bottom: 12px;
}

.tag-row span {
  background: rgba(56, 189, 248, .1);
  color: #bae6fd;
}

.page-hero,
.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  border: 1px solid var(--line);
  border-radius: 32px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-hero {
  min-height: 360px;
  padding: 60px;
  display: flex;
  align-items: end;
  background: radial-gradient(circle at top left, rgba(99, 102, 241, .52), transparent 36%), linear-gradient(135deg, rgba(14, 165, 233, .24), rgba(15, 23, 42, .96));
}

.compact-hero h1 {
  max-width: 780px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 26px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-hero {
  padding: 40px;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

.detail-info h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.detail-meta {
  margin: 20px 0;
}

.video-shell {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle, rgba(2, 6, 23, .1), rgba(2, 6, 23, .52));
}

.player-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(16px);
  font-size: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .36);
}

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

.prose-card {
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, .76);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .2);
}

.prose-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.prose-card h2:not(:first-child) {
  margin-top: 34px;
}

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

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, .76);
}

.search-panel-page input,
.filter-panel input {
  max-width: 720px;
}

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

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

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

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

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

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-cover {
    display: none;
  }

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

  .detail-hero-inner {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .nav-shell,
  .mobile-nav,
  .hero-carousel,
  .content-section,
  .player-section,
  .page-hero,
  .detail-hero,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 20px, 1280px);
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel,
  .hero-slide {
    min-height: 600px;
  }

  .hero-slide {
    padding: 48px 22px 220px;
  }

  .hero-search-panel {
    left: 14px;
    right: 14px;
    bottom: 16px;
    width: auto;
  }

  .hero-search-panel form {
    flex-direction: column;
  }

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

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

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

  .page-hero,
  .detail-hero {
    padding: 28px;
  }

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

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

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

@media (max-width: 460px) {
  .category-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }
}
