:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(34, 211, 238, 0.45);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --indigo: #6366f1;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

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;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 8%, rgba(34, 211, 238, 0.15), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.18), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 34px rgba(34, 211, 238, 0.24);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #cbd5e1;
  font-size: 15px;
}

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

.nav-menu a:hover {
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 11px;
  background: rgba(15, 23, 42, 0.72);
}

.page-main {
  padding-top: 68px;
}

.hero-carousel {
  position: relative;
  min-height: calc(100vh - 68px);
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: calc(100vh - 68px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.46);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.94));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 390px;
  align-items: center;
  gap: 48px;
  padding: 54px 0 76px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 14px 0 18px;
  max-width: 820px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 710px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-tags,
.tag-row,
.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.info-pills span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 999px;
  padding: 6px 10px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.14);
  font-size: 12px;
}

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

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

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

.btn.primary {
  color: #03131a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.22);
}

.btn.ghost {
  color: #e0f2fe;
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.58);
}

.hero-poster {
  position: relative;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 32px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.5);
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-6deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.68));
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

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

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

.hero-control:hover {
  border-color: var(--cyan);
}

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

.hero-dot {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

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

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

.section-heading h2 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  flex: none;
  color: var(--cyan);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(120px, 1fr));
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

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

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

.category-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.58));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  border-color: rgba(34, 211, 238, 0.55);
  transform: translateY(-5px);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.category-card strong {
  font-size: 20px;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.5);
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}

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

.card-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.badge {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 999px;
  padding: 5px 9px;
  color: #cffafe;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.badge-top {
  top: 10px;
  left: 10px;
}

.badge-bottom {
  right: 10px;
  bottom: 10px;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.card-title {
  min-height: 48px;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.45;
}

.card-title:hover {
  color: var(--cyan);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 11px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 54px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-row a:hover {
  border-color: rgba(34, 211, 238, 0.5);
  transform: translateX(4px);
}

.rank-num {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.rank-row img {
  width: 56px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rank-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-year {
  color: var(--muted);
  font-size: 13px;
}

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

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

.compact-hero {
  min-height: 330px;
  display: grid;
  align-content: end;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 0 0 34px 34px;
  padding: 72px 32px 42px;
  background:
    radial-gradient(circle at 8% 10%, rgba(34, 211, 238, 0.22), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.7));
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.compact-hero p {
  max-width: 780px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

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

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

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.48), var(--bg) 100%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 70px;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  margin: 14px 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.lead {
  max-width: 820px;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.85;
}

.info-pills {
  margin: 18px 0;
}

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

.player-section h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 38px);
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #02131a;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.48));
  cursor: pointer;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-core {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #03131a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 0 16px rgba(34, 211, 238, 0.12), 0 24px 55px rgba(34, 211, 238, 0.28);
  font-size: 30px;
}

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

.story-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(15, 23, 42, 0.7);
}

.story-card h2 {
  margin: 0 0 14px;
  color: #f8fafc;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.95;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  color: var(--muted);
  text-align: center;
}

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

.is-filtered-out {
  display: none !important;
}

.site-footer {
  margin-top: 92px;
  border-top: 1px solid rgba(30, 41, 59, 0.86);
  background: rgba(2, 6, 23, 0.9);
}

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

.site-footer strong {
  display: block;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(30, 41, 59, 0.86);
  padding: 18px 0 28px;
  color: var(--muted-2);
  text-align: center;
  font-size: 14px;
}

.compact-card {
  display: grid;
  gap: 8px;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.compact-card span {
  font-weight: 800;
}

.compact-card small {
  color: var(--muted);
}

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

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

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

  .search-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-menu a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-menu a:hover {
    background: rgba(34, 211, 238, 0.08);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-content: end;
    padding-top: 70px;
  }

  .hero-poster {
    width: min(260px, 72vw);
    transform: none;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .rank-list-home,
  .full-rank-list,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .detail-poster {
    width: min(300px, 72vw);
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 18px;
  }

  .hero-copy h1,
  .hero-copy h2,
  .detail-copy h1,
  .compact-hero h1 {
    letter-spacing: -0.04em;
  }

  .filter-panel,
  .movie-grid,
  .category-grid,
  .category-grid.large,
  .rank-list-home,
  .full-rank-list,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-year {
    display: none;
  }

  .content-section {
    padding-top: 50px;
  }

  .compact-hero {
    padding: 58px 20px 32px;
  }
}
