:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --sky-soft: #e0f2fe;
  --amber: #f59e0b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
  font-size: 16px;
}

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

.nav-link,
.nav-drop-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-drop-button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), #2563eb);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.nav-drop-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 230px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

.nav-drop-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
}

.nav-drop-panel a:hover {
  background: var(--sky-soft);
  color: var(--sky-dark);
}

.nav-toggle {
  display: none;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

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

.hero {
  position: relative;
  height: 600px;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-track,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.24) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(650px, 100%);
  padding-top: 40px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: #7dd3fc;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-title {
  margin: 20px 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.hero-text {
  max-width: 620px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions,
.section-actions,
.card-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.42);
}

.btn-light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-soft {
  color: var(--sky-dark);
  background: var(--sky-soft);
  border-color: #bae6fd;
}

.hero-panel {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 42px;
  width: min(460px, calc(100% - 48px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.hero-panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

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

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

.hero-dot.is-active {
  background: #38bdf8;
}

.main-section {
  padding: 72px 0;
}

.main-section.alt {
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

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

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

.section-head h1,
.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.section-head p,
.page-lead {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.scroller-wrap {
  position: relative;
}

.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 2px 22px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.card-row::-webkit-scrollbar {
  display: none;
}

.scroll-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  font-weight: 900;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  scroll-snap-align: start;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.15);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 56%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.76));
}

.year-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.year-pill {
  right: 12px;
  padding: 4px 10px;
  background: rgba(2, 132, 199, 0.92);
}

.rank-badge {
  left: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-info {
  padding: 18px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-meta a {
  color: var(--sky-dark);
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.28;
  font-weight: 950;
  letter-spacing: -0.02em;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag-row span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-large {
  grid-column: span 2;
  grid-row: span 2;
}

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 9;
}

.movie-card-large .movie-info h3 {
  font-size: 28px;
}

.category-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.14);
}

.category-card h3 {
  margin: 0;
  font-size: 24px;
}

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

.category-card .arrow {
  color: var(--sky-dark);
  font-weight: 900;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 12px;
  padding: 16px;
  margin-bottom: 28px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 18px;
  color: #64748b;
  font-weight: 800;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--sky-dark);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 2;
}

.player-overlay.is-hidden {
  display: none;
}

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 22px 50px rgba(14, 165, 233, 0.38);
  font-size: 30px;
}

.player-caption {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 3;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.detail-card p {
  color: #334155;
  font-size: 17px;
}

.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.cover-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.cover-panel .side-content,
.side-card .side-content {
  padding: 18px;
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: #f1f5f9;
}

.related-item img {
  width: 92px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.related-item strong {
  display: block;
  line-height: 1.3;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 160px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
  font-weight: 950;
}

.rank-row img {
  width: 160px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  display: none;
  padding: 44px;
  text-align: center;
  border-radius: 22px;
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--line);
}

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

.site-footer {
  margin-top: 30px;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.78);
}

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

.footer-logo {
  color: #ffffff;
  margin-bottom: 10px;
}

.footer-inner p {
  max-width: 680px;
  margin: 0;
}

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

.footer-links a {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.footer-links a:hover {
  background: rgba(14, 165, 233, 0.28);
  color: #ffffff;
}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .hero {
    height: auto;
    min-height: 640px;
  }

  .hero-content {
    min-height: 640px;
    align-items: flex-start;
    padding-top: 96px;
  }

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

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

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .rank-row .btn {
    grid-column: 2 / -1;
  }
}

@media (max-width: 640px) {
  .site-logo {
    font-size: 20px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-actions,
  .section-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .section-head {
    display: block;
  }

  .grid,
  .grid.three,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .movie-card-large {
    grid-column: auto;
    grid-row: auto;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .card-row {
    grid-auto-columns: minmax(260px, 86vw);
  }

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

  .rank-row {
    grid-template-columns: 44px 1fr;
  }

  .rank-row img {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .rank-row .btn {
    grid-column: 1 / -1;
  }
}
