:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c33;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefb;
  --muted: #93a4bb;
  --blue: #38bdf8;
  --blue-strong: #2563eb;
  --cyan: #67e8f9;
  --gold: #facc15;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 34rem),
    radial-gradient(circle at 80% 0%, rgba(8, 145, 178, 0.2), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark,
.footer-logo span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-strong), var(--cyan));
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.32);
  font-size: 14px;
}

.brand-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: #dbeafe;
  font-weight: 650;
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: var(--blue);
}

.top-search,
.inline-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.inline-search input,
.mobile-search input {
  width: 220px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  padding: 10px 14px;
  outline: none;
}

.top-search input:focus,
.inline-search input:focus,
.mobile-search input:focus {
  border-color: rgba(56, 189, 248, 0.78);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.top-search button,
.inline-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  padding: 10px 15px;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #e5eefb;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

main {
  min-height: 70vh;
}

.hero-shell {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

.hero-track {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.52);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.38)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 44%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 56px;
  padding: 64px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 720px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
  margin: 24px 0 22px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #bfdbfe;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
}

.btn-ghost {
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(15, 23, 42, 0.48);
  color: #dbeafe;
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  background: #0f172a;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.poster-play,
.play-dot {
  position: absolute;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #67e8f9);
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  transform: translate(-50%, -50%);
  font-size: 24px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
}

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

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

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.24));
  padding: 28px;
  box-shadow: var(--shadow);
}

.intro-copy h2,
.section-head h2,
.story-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.intro-copy p:last-child,
.section-head p,
.page-hero p,
.category-panel p,
.footer-grid p,
.story-card p {
  color: var(--muted);
  line-height: 1.82;
}

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

.section-link {
  color: var(--blue);
  font-weight: 800;
}

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

.wide-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.25);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 22px 54px rgba(14, 165, 233, 0.18);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.movie-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-cover img,
.category-tile:hover img,
.feature-card:hover img,
.category-panel:hover img {
  transform: scale(1.08);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 44%);
  opacity: 0.7;
}

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff7ed;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
  backdrop-filter: blur(8px);
}

.score {
  right: 10px;
  color: var(--gold);
}

.rank-badge {
  left: 10px;
  color: #e0f2fe;
}

.play-dot {
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.feature-copy h3 a:hover {
  color: var(--blue);
}

.movie-meta,
.movie-desc {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.category-grid,
.category-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.category-tile,
.category-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  min-height: 220px;
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.5s ease;
}

.category-tile span,
.category-tile p {
  position: absolute;
  left: 20px;
  right: 20px;
}

.category-tile span {
  bottom: 76px;
  font-size: 28px;
  font-weight: 900;
}

.category-tile p {
  bottom: 18px;
  color: #bfdbfe;
  line-height: 1.65;
  margin: 0;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 46px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at right top, rgba(103, 232, 249, 0.22), transparent 28rem);
  padding: clamp(28px, 6vw, 64px);
  box-shadow: var(--shadow);
}

.slim-hero h1 {
  font-size: clamp(36px, 6vw, 66px);
}

.category-panel {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 22px;
  min-height: 190px;
  padding: 18px;
}

.panel-image {
  border-radius: 18px;
  overflow: hidden;
}

.panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.full-ranking {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) brightness(0.36) saturate(1.2);
  transform: scale(1.08);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.92));
}

.detail-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 520px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 52px 0;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
}

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

.detail-one {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-stats span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 8px 12px;
  color: #e0f2fe;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  align-items: start;
  gap: 26px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #67e8f9);
  color: white;
  font-size: 28px;
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.36);
}

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

.story-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.88);
  padding: 26px;
  box-shadow: var(--shadow);
}

.story-card h2 + p {
  margin-bottom: 24px;
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.empty-state {
  display: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  color: #bfdbfe;
  padding: 28px;
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

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

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  color: var(--muted);
}

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

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

  .mobile-toggle {
    display: block;
  }

  .hero-inner,
  .detail-wrap,
  .detail-content,
  .page-hero,
  .intro-band {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .hero-shell,
  .hero-track,
  .hero-inner {
    min-height: 580px;
  }

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

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

@media (max-width: 640px) {
  .nav-wrap {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 20px;
  }

  .hero-shell,
  .hero-track,
  .hero-inner {
    min-height: 620px;
  }

  .hero-copy h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero-summary,
  .detail-one {
    font-size: 16px;
  }

  .content-section,
  .page-hero,
  .detail-wrap {
    width: min(100% - 24px, 1180px);
  }

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

  .category-panel {
    grid-template-columns: 1fr;
  }

  .panel-image {
    height: 220px;
  }

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