* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111c31;
  --panel-strong: #17233a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-strong: #0284c7;
  --gold: #f59e0b;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #08111f 48%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner,
.footer-inner,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.35);
  color: white;
  font-size: 15px;
}

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

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

.nav-link {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(14, 165, 233, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 99px;
}

.hero-carousel {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.2);
  transform: scale(1.08);
  opacity: 0.35;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 42%, rgba(2, 6, 23, 0.58) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 48px;
  padding: 80px 0 52px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #7dd3fc;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-size: clamp(40px, 6vw, 76px);
}

.hero-copy h2 {
  margin-top: 16px;
  font-size: clamp(28px, 4vw, 54px);
}

.hero-copy p,
.page-hero p,
.detail-info p {
  color: #cbd5e1;
  line-height: 1.8;
}

.hero-copy .hero-desc {
  max-width: 620px;
  margin: 20px 0 0;
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
}

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

.primary-btn,
.secondary-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  box-shadow: 0 18px 35px rgba(14, 165, 233, 0.26);
}

.primary-btn:hover,
.secondary-btn:hover,
.text-btn:hover {
  transform: translateY(-2px);
}

.secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.text-btn {
  padding: 0;
  color: #7dd3fc;
}

.hero-poster {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-poster img {
  width: min(380px, 100%);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster-card {
  position: absolute;
  left: -20px;
  bottom: 12%;
  width: min(280px, 78%);
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-poster-card strong {
  display: block;
  margin-bottom: 8px;
}

.hero-poster-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  backdrop-filter: blur(10px);
}

.hero-control:hover {
  background: rgba(14, 165, 233, 0.8);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 30px;
  background: var(--accent);
}

.page-shell {
  padding: 54px 0 72px;
}

.page-hero {
  display: grid;
  gap: 18px;
  margin-bottom: 36px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at right top, rgba(14, 165, 233, 0.24), transparent 24rem),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

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

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

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

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

.content-section {
  margin-top: 56px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(21, 32, 52, 0.92);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(15, 23, 42, 0.95)),
    #0f172a;
}

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

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #111827;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 9px;
  font-size: 13px;
}

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

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

.card-body p {
  min-height: 48px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.large-card .card-body h3 {
  font-size: 22px;
}

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

.tag-row span,
.pill-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.16);
  font-size: 12px;
}

.horizontal-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-rail .movie-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 220px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(14, 165, 233, 0.13), rgba(15, 23, 42, 0.9)),
    rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line);
}

.category-main-link span {
  display: inline-flex;
  margin-bottom: 14px;
  color: #7dd3fc;
  font-weight: 800;
}

.category-main-link strong {
  display: block;
  color: white;
  line-height: 1.75;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  color: #cbd5e1;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.76);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  outline: none;
  color: white;
  background: rgba(2, 6, 23, 0.64);
  padding: 0 14px;
}

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

.empty-state {
  margin: 24px 0;
  padding: 18px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #020617;
  background: linear-gradient(135deg, var(--gold), #f97316);
  font-weight: 900;
}

.rank-row strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.rank-row span {
  color: var(--muted);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #7dd3fc;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at right top, rgba(14, 165, 233, 0.2), transparent 24rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.42);
  background: #0f172a;
}

.detail-info h1 {
  font-size: clamp(34px, 4.6vw, 60px);
}

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

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.player-panel {
  margin-top: 48px;
}

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: black;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, 0.28), rgba(2, 6, 23, 0.72)),
    rgba(2, 6, 23, 0.58);
  transition: opacity 0.25s ease;
}

.player-panel.is-playing .player-overlay,
.player-panel.is-ready .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-button-core {
  display: grid;
  place-items: center;
  gap: 14px;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  box-shadow: 0 20px 50px rgba(14, 165, 233, 0.38);
  font-size: 28px;
}

.play-title {
  font-size: 18px;
  font-weight: 800;
}

.player-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: #fecaca;
}

.detail-section {
  margin-top: 42px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
}

.detail-section p {
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 16px;
}

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

.footer-inner {
  display: grid;
  gap: 16px;
  padding: 34px 0;
  color: var(--muted);
}

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

.footer-links a:hover,
.footer-brand:hover {
  color: #7dd3fc;
}

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

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

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: flex;
  }

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

  .hero-poster {
    display: none;
  }

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

@media (max-width: 680px) {
  .header-inner,
  .footer-inner,
  .page-shell,
  .hero-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero-carousel,
  .hero-inner {
    min-height: 720px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .movie-grid.compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row .primary-btn {
    grid-column: 2;
    width: max-content;
  }

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