:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f8fafc;
  --accent-dark: #0f172a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(51, 65, 85, 0.48), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

body::-webkit-scrollbar-track {
  background: #020617;
}

body::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.72);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #e2e8f0;
  background: linear-gradient(135deg, #334155, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: #cbd5e1;
  font-size: 14px;
  white-space: nowrap;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.7);
  color: #f8fafc;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.mobile-panel a {
  display: block;
  padding: 10px 12px;
  color: #cbd5e1;
  border-radius: 10px;
}

.mobile-panel a:hover {
  background: rgba(51, 65, 85, 0.58);
  color: #ffffff;
}

.hero-slider {
  position: relative;
  height: 85vh;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease, transform 0.9s ease;
  transform: scale(1.02);
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(51, 65, 85, 0.18)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(148, 163, 184, 0.24), transparent 24rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.68), transparent 68%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 86px;
  max-width: 760px;
}

.eyebrow,
.eyebrow-text {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.eyebrow span,
.eyebrow-text {
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
}

.hero-content h1 {
  margin: 0 0 18px;
  color: #f8fafc;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 30px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

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

.btn-light {
  color: #0f172a;
  background: #f8fafc;
  box-shadow: 0 18px 42px rgba(248, 250, 252, 0.16);
}

.btn-ghost {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.22);
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 36px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.35);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #f8fafc;
}

.search-strip {
  margin-top: -34px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  align-items: center;
  gap: 22px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-strip h2,
.section-head h2,
.detail-content h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.search-strip p {
  margin: 6px 0 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.46);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #f8fafc;
  background: transparent;
}

.search-box input::placeholder {
  color: #64748b;
}

.section-block {
  padding: 70px 0 0;
}

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

.section-head a {
  color: #cbd5e1;
  font-weight: 700;
}

.section-head a:hover {
  color: #ffffff;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.26s ease, border-color 0.26s ease, background 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(226, 232, 240, 0.28);
  background: rgba(30, 41, 59, 0.82);
}

.poster,
.rank-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at top, rgba(148, 163, 184, 0.34), transparent 55%),
    linear-gradient(135deg, #334155, #0f172a);
}

.poster img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s ease, opacity 0.2s ease;
}

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

.poster::after,
.rank-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), transparent 54%);
}

.play-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #0f172a;
  background: #f8fafc;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  color: #f8fafc;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-facts,
.rank-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
}

.card-meta span,
.detail-facts span,
.rank-info div span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.5);
}

.card-body h3 {
  margin: 12px 0 8px;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.card-tags span,
.detail-tags span {
  padding: 4px 9px;
  color: #cbd5e1;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.32);
}

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

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

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58)),
    var(--tile-image),
    linear-gradient(135deg, #334155, #0f172a);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(226, 232, 240, 0.32);
}

.category-tile span,
.category-card span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: #f8fafc;
}

.category-tile strong,
.category-card p {
  display: block;
  color: #cbd5e1;
}

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

.category-card {
  min-height: 260px;
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.category-samples {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.category-samples a {
  padding: 6px 10px;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 76px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #0f172a;
  font-weight: 900;
  border-radius: 14px;
  background: #f8fafc;
}

.rank-cover {
  width: 76px;
  border-radius: 14px;
}

.rank-info h3 {
  margin: 0 0 6px;
  color: #f8fafc;
  font-size: 18px;
}

.rank-info p {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 14px;
}

.rank-score {
  color: #e2e8f0;
  font-weight: 900;
  font-size: 22px;
}

.page-hero {
  position: relative;
  padding: 144px 0 52px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(148, 163, 184, 0.24), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.inner-search {
  max-width: 520px;
  margin-top: 24px;
}

.player-section {
  padding: 96px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: #94a3b8;
  font-size: 14px;
}

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

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-node {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #f8fafc;
  text-align: center;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.36)),
    var(--poster-image),
    linear-gradient(135deg, #1e293b, #020617);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.play-ring {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  color: #0f172a;
  font-size: 28px;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.45);
}

.player-cover strong {
  max-width: 80%;
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.2;
}

.detail-panel {
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.detail-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 5px 12px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: #f8fafc;
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.detail-panel p {
  margin: 0 0 18px;
  color: #cbd5e1;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-content article {
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.detail-content p {
  margin: 14px 0 0;
  color: #cbd5e1;
}

.site-footer {
  margin-top: 80px;
  padding: 40px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.54);
}

.footer-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

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

.footer-links a {
  padding: 7px 11px;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
}

.footer-links a:hover {
  color: #ffffff;
  border-color: rgba(226, 232, 240, 0.26);
}

[data-filter-hidden="true"] {
  display: none !important;
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 14px;
    font-size: 13px;
  }

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .site-header.is-open .mobile-panel {
    display: block;
  }

  .hero-slider {
    height: 760px;
    min-height: 680px;
  }

  .hero-content {
    padding-bottom: 100px;
  }

  .search-strip,
  .footer-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-shell,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-slider {
    min-height: 620px;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

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

  .rank-score {
    display: none;
  }

  .player-section {
    padding-top: 84px;
  }

  .detail-panel,
  .detail-content article {
    padding: 20px;
  }
}
