:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --orange: #fb923c;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 34%), radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 30%);
  z-index: -1;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(37, 99, 235, 0.32));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.22);
}

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

.nav-link,
.dropdown-button {
  color: #cbd5e1;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-button:hover {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 160px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.mobile-link,
.mobile-sub-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
}

.dropdown-menu a:hover,
.mobile-link:hover,
.mobile-sub-link:hover,
.mobile-link.active {
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-sub-title {
  padding: 10px 12px 4px;
  color: var(--muted);
  font-size: 13px;
}

.hero-section {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

.hero-visual-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero-visual-grid figure {
  position: relative;
  margin: 0;
  min-height: 640px;
  overflow: hidden;
}

.hero-visual-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.05);
  transform: scale(1.04);
}

.hero-visual-grid figcaption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.34) 100%), linear-gradient(0deg, #020617 0%, transparent 32%);
  z-index: 1;
}

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

.hero-content {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: 44px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.sub-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-text,
.sub-hero p,
.detail-copy p {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

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

.primary-button,
.secondary-button,
.hero-slide a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button,
.hero-slide a {
  background: var(--cyan-strong);
  color: white;
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.28);
}

.secondary-button {
  background: rgba(30, 41, 59, 0.82);
  color: white;
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.hero-slide a:hover {
  background: #0891b2;
  transform: translateY(-2px);
}

.secondary-button:hover {
  background: rgba(51, 65, 85, 0.9);
  transform: translateY(-2px);
}

.hero-reel {
  position: relative;
  min-height: 320px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.hero-reel::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.18);
  filter: blur(30px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transform: translateX(24px);
  transition: 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0);
}

.hero-slide span {
  color: var(--cyan);
  font-weight: 800;
}

.hero-slide h2 {
  margin: 14px 0;
  font-size: 32px;
}

.hero-slide p {
  color: #cbd5e1;
  line-height: 1.7;
}

.hero-slide a {
  width: fit-content;
  margin-top: 12px;
}

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

.page-shell > section {
  margin-bottom: 62px;
}

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

.section-heading div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading span {
  color: var(--cyan);
  font-size: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 180px;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.28), rgba(30, 41, 59, 0.72));
}

.movie-card .poster-frame {
  aspect-ratio: 4 / 3;
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.86));
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.88);
  color: white;
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  transition: 0.25s ease;
  box-shadow: 0 0 34px rgba(6, 182, 212, 0.48);
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.region-badge,
.type-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.region-badge {
  right: 12px;
  background: rgba(2, 6, 23, 0.66);
}

.type-badge {
  left: 12px;
  background: rgba(249, 115, 22, 0.88);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  font-size: 18px;
  line-height: 1.35;
}

.card-body span {
  color: var(--muted);
  line-height: 1.55;
  min-height: 44px;
}

.card-body em,
.card-body small {
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.card-body small {
  color: var(--cyan);
}

.filter-panel {
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.search-box input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.62);
  color: white;
  outline: none;
}

.search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.78);
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: rgba(34, 211, 238, 0.72);
  color: white;
  background: rgba(8, 145, 178, 0.78);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.ranking-box,
.detail-main-card,
.detail-side-card,
.player-section {
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ranking-box {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ranking-head h2 {
  margin: 0;
}

.ranking-head a,
.rank-row:hover strong,
.genre-cloud a:hover,
.footer-links a:hover,
.genre-links a:hover,
.prev-next a:hover {
  color: var(--cyan);
}

.rank-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-row span {
  color: var(--orange);
  font-weight: 900;
}

.rank-row strong {
  display: block;
  transition: 0.2s ease;
}

.rank-row em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.category-card,
.pill-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 142px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(37, 99, 235, 0.14));
  border: 1px solid rgba(34, 211, 238, 0.22);
  transition: 0.25s ease;
}

.category-card:hover,
.pill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.72);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(37, 99, 235, 0.22));
}

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

.category-card span {
  color: #cbd5e1;
  line-height: 1.65;
}

.genre-cloud,
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.genre-cloud a,
.pill-card {
  min-height: auto;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
  color: #cbd5e1;
}

.sub-hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 18px;
}

.compact-hero > div {
  padding: 46px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.78), rgba(15, 23, 42, 0.86));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.pagination a {
  min-width: 42px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  color: #cbd5e1;
}

.pagination a:hover,
.pagination a.current {
  color: white;
  border-color: var(--cyan);
  background: rgba(8, 145, 178, 0.82);
}

.big-pages {
  justify-content: flex-start;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
}

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.82) 52%, rgba(2, 6, 23, 0.42) 100%), linear-gradient(0deg, #020617 0%, transparent 28%);
}

.detail-hero-content {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster {
  min-height: 390px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.detail-tags,
.genre-links,
.prev-next {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-tags span,
.genre-links a,
.genre-links span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.player-section {
  padding: 22px;
}

.player-section h2 {
  margin: 0 0 18px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: black;
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: white;
  font-size: 30px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: 0.2s ease;
  box-shadow: 0 0 48px rgba(6, 182, 212, 0.38);
}

.player-start:hover {
  background: #0891b2;
  transform: translate(-50%, -50%) scale(1.06);
}

.player-box.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

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

.detail-main-card,
.detail-side-card {
  padding: 28px;
}

.detail-main-card h2,
.detail-side-card h2 {
  margin: 0 0 16px;
}

.detail-main-card p {
  margin: 0 0 28px;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 17px;
}

.detail-main-card p:last-child {
  margin-bottom: 0;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 16px;
  margin: 0;
}

.detail-side-card dt {
  color: var(--muted);
}

.detail-side-card dd {
  margin: 0;
  color: white;
}

.prev-next {
  flex-direction: column;
}

.prev-next a {
  color: #cbd5e1;
  line-height: 1.55;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-list-row {
  display: grid;
  grid-template-columns: 58px 86px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  transition: 0.2s ease;
}

.ranking-list-row:hover {
  border-color: rgba(34, 211, 238, 0.66);
  transform: translateX(4px);
}

.rank-number {
  color: var(--orange);
  font-size: 24px;
  font-weight: 900;
}

.rank-poster {
  display: block;
  overflow: hidden;
  width: 86px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-main strong {
  display: block;
  font-size: 18px;
}

.rank-main em,
.rank-meta {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

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

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

.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

.footer-links a {
  color: #cbd5e1;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

.poster-frame.image-missing img,
.rank-poster.image-missing img {
  display: none;
}

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

  .nav-toggle {
    display: block;
  }

  .hero-content,
  .split-section,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-reel,
  .ranking-box {
    position: relative;
    top: auto;
  }

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

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

  .detail-hero-content {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .detail-poster {
    min-height: 260px;
  }

  .ranking-list-row {
    grid-template-columns: 46px 72px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 3;
  }
}

@media (max-width: 640px) {
  .nav-shell {
    height: 64px;
  }

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

  .hero-section,
  .hero-visual-grid figure,
  .hero-content {
    min-height: 760px;
  }

  .hero-visual-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual-grid figure:not(:first-child) {
    display: none;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 34px 0;
  }

  .hero-copy h1,
  .sub-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-text,
  .sub-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .movie-grid,
  .category-grid,
  .footer-grid,
  .detail-hero-content {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .detail-hero-content {
    padding: 40px 0;
  }

  .detail-poster {
    max-width: 220px;
    min-height: 300px;
  }

  .compact-hero > div {
    padding: 30px 22px;
  }

  .ranking-list-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .rank-poster,
  .rank-meta {
    display: none;
  }
}
