:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --gold: #f59e0b;
  --gold-2: #fbbf24;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.12), transparent 34rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: #0f172a;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: color 0.22s ease, background 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--gold-2);
  background: rgba(245, 158, 11, 0.12);
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
  padding: 5px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
}

.nav-search input,
.filter-panel input,
.filter-panel select,
.rank-filter input {
  width: 100%;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.nav-search input {
  padding: 7px 12px;
}

.nav-search button,
.primary-btn,
.ghost-btn,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.nav-search button,
.primary-btn,
.filter-panel button {
  color: #111827;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
}

.nav-search button {
  padding: 7px 14px;
  white-space: nowrap;
}

.primary-btn,
.ghost-btn {
  min-height: 44px;
  padding: 0 20px;
  gap: 8px;
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.45);
}

.primary-btn:hover,
.ghost-btn:hover,
.nav-search button:hover,
.filter-panel button:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  border: 0;
  background: transparent;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

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

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 42px;
  padding: 88px 22px 74px;
}

.hero-kicker,
.card-meta,
.detail-kicker {
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 14px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-copy p {
  max-width: 720px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-side-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-side-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
}

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

.hero-mini-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
  transition: transform 0.22s ease, background 0.22s ease;
}

.hero-mini-item:hover {
  transform: translateX(-4px);
  background: rgba(245, 158, 11, 0.12);
}

.hero-mini-item img {
  position: static;
  height: 55px;
  border-radius: 12px;
  transform: none;
  filter: none;
}

.hero-mini-item strong {
  display: block;
  color: #fff;
  font-size: 14px;
}

.hero-mini-item span {
  color: var(--muted);
  font-size: 12px;
}

.hero-controls {
  position: absolute;
  right: 22px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.68);
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 7px;
  padding: 0 8px;
}

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

.hero-dot.is-active {
  width: 26px;
  background: var(--gold-2);
}

.section-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 22px;
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 950;
  letter-spacing: -0.035em;
}

.section-title p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--gold-2);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.94));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 24px 65px rgba(245, 158, 11, 0.12);
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.card-cover img {
  transition: transform 0.45s ease;
}

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

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 17px;
}

.card-body h3 {
  margin: 7px 0 9px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.tag-list,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.tag-list span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background: var(--panel);
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.26));
}

.category-card:hover img {
  opacity: 0.52;
  transform: scale(1.08);
}

.category-card h3,
.category-card p,
.category-card span {
  position: relative;
  z-index: 2;
}

.category-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
}

.category-card p {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.7;
}

.category-card span {
  margin-top: 12px;
  color: var(--gold-2);
  font-weight: 800;
}

.filter-panel,
.rank-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
}

.filter-panel label,
.rank-filter label {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.5);
}

.filter-panel button {
  min-height: 46px;
  padding: 0 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 62px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-row:hover {
  transform: translateX(5px);
  border-color: rgba(245, 158, 11, 0.5);
}

.rank-num {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  font-weight: 950;
}

.rank-poster {
  height: 58px;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.rank-row h3 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

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

.page-hero {
  padding: 74px 22px 20px;
}

.page-hero-card,
.detail-hero-card,
.content-card {
  max-width: 1280px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.page-hero-card {
  padding: 38px;
}

.page-hero h1 {
  max-width: 780px;
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin-top: 16px;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.8;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--gold-2);
}

.detail-hero-card {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  padding: 28px;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.detail-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-intro h1 {
  margin: 12px 0 16px;
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.detail-intro p {
  color: var(--soft);
  font-size: 17px;
  line-height: 1.85;
}

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

.player-section,
.detail-content,
.related-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 22px 0;
}

.player-section h2,
.detail-content h2,
.related-section h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 28px;
  font-weight: 950;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.74));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.movie-player.is-ready .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-pulse {
  display: inline-flex;
  width: 82px;
  height: 82px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 0 0 16px rgba(245, 158, 11, 0.14);
  font-size: 30px;
}

.content-card {
  padding: 30px;
}

.content-card p {
  color: var(--soft);
  font-size: 16px;
  line-height: 1.9;
}

.content-card p + h2 {
  margin-top: 28px;
}

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

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 28px;
  padding-bottom: 28px;
  color: var(--muted);
}

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

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

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

  .hero-side-card {
    max-width: 620px;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav,
  .nav-search {
    display: none;
    width: 100%;
    min-width: 0;
  }

  .site-nav.is-open,
  .nav-search.is-open {
    display: flex;
  }

  .site-nav.is-open {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 68px;
  }

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

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

  .rank-poster {
    height: 160px;
  }

  .detail-hero-card,
  .page-hero-card,
  .content-card {
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-controls {
    right: 14px;
    bottom: 16px;
  }
}
