:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --gold: #facc15;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.22), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(16px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.5);
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.mobile-nav a {
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: white;
  background: rgba(56, 189, 248, 0.14);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.8);
  color: white;
  border-radius: 12px;
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.hero-carousel {
  position: relative;
  min-height: 70vh;
  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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 34%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 76px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}

.hero-text h1,
.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-text p,
.page-hero p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  max-width: 760px;
}

.hero-meta,
.meta-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 28px;
  color: var(--dim);
}

.meta-chip,
.tag-chip,
.filter-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
}

.tag-chip {
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.12);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #fff;
  box-shadow: 0 16px 42px rgba(14, 165, 233, 0.32);
}

.btn-secondary {
  color: white;
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.68);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 52px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

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

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

.section {
  padding: 56px 0;
}

.section-alt {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.8));
  border-block: 1px solid var(--line);
}

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

.section-head h2,
.detail-content h2,
.aside-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--dim);
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: var(--shadow);
}

.poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.movie-card:hover .poster img,
.feature-card:hover img,
.rank-card:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  flex: 1;
}

.movie-card h3,
.feature-card h3,
.rank-card h3,
.related-card h3 {
  margin: 0;
  color: white;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card p,
.feature-card p,
.rank-card p,
.related-card p {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--dim);
  font-size: 13px;
}

.rating {
  color: var(--gold);
  font-weight: 800;
}

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

.feature-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.24);
  overflow: hidden;
}

.feature-card img {
  width: 132px;
  height: 186px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.5s ease;
}

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

.category-tile {
  position: relative;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.25), transparent 45%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
}

.category-tile:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: 62px 0 42px;
  background:
    radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.2), transparent 34rem),
    linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
  border-bottom: 1px solid var(--line);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 28px;
}

.search-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: white;
  padding: 0 16px;
  outline: none;
}

.search-input:focus,
.filter-select:focus {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-card {
  display: grid;
  grid-template-columns: 54px 92px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  border-color: rgba(56, 189, 248, 0.5);
}

.rank-num {
  font-size: 26px;
  font-weight: 900;
  color: var(--accent);
  text-align: center;
}

.rank-card img {
  width: 92px;
  height: 128px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.5s ease;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
  padding: 34px 0 64px;
}

.player-stage {
  grid-column: 1 / -1;
}

.video-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
  cursor: pointer;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.12));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 0 46px rgba(56, 189, 248, 0.54);
  font-size: 30px;
  padding-left: 5px;
}

.video-panel.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-content,
.aside-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.24);
}

.detail-content h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-content p {
  color: var(--muted);
}

.detail-section {
  margin-top: 28px;
}

.aside-card {
  position: sticky;
  top: 92px;
}

.aside-poster {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.related-card {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--line);
}

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

.related-card div {
  padding: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  font-size: 14px;
  margin: 22px 0 12px;
}

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

.site-footer {
  padding: 34px 0;
  color: var(--dim);
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.7);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a:hover {
  color: var(--accent);
}

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

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .aside-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .header-inner {
    height: 62px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 76vh;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 24px;
  }

  .section {
    padding: 38px 0;
  }

  .section-head {
    display: block;
  }

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

  .feature-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    grid-template-columns: 104px 1fr;
  }

  .feature-card img {
    width: 104px;
    height: 146px;
  }

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

  .rank-card {
    grid-template-columns: 38px 72px 1fr;
  }

  .rank-card img {
    width: 72px;
    height: 100px;
  }

  .rank-score {
    display: none;
  }

  .detail-content,
  .aside-card {
    padding: 18px;
    border-radius: 18px;
  }

  .play-overlay span {
    width: 66px;
    height: 66px;
    font-size: 24px;
  }
}
