:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: rgba(15, 23, 42, 0.88);
  --card-strong: rgba(30, 41, 59, 0.94);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --orange: #fb923c;
  --radius: 22px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.18), transparent 32%), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.nav-wrap {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.main-nav,
.main-nav a,
.nav-dropdown button {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  font-size: 15px;
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

.main-nav {
  gap: 24px;
  font-weight: 700;
  color: #dbeafe;
}

.main-nav a,
.nav-dropdown button {
  min-height: 42px;
  color: inherit;
  background: transparent;
  border: 0;
  font-size: 15px;
}

.main-nav a:hover,
.nav-dropdown button:hover,
.main-nav .is-active {
  color: var(--amber);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  font-size: 22px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  right: 0;
  top: 44px;
  width: 180px;
  padding: 10px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.nav-dropdown:hover .nav-dropdown-panel {
  display: grid;
  gap: 4px;
}

.nav-dropdown-panel a {
  justify-content: flex-start;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
}

.nav-dropdown-panel a:hover {
  background: rgba(245, 158, 11, 0.1);
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(2, 6, 23, 0.72) 47%, rgba(2, 6, 23, 0.16)), linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 74vh;
  margin: 0 auto;
  padding: 92px 22px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 34px;
  align-items: center;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 22px 0 0;
  max-width: 670px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.82;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #fb923c);
  color: #111827;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(10px);
}

.hero-tags,
.card-tags,
.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 28px;
}

.hero-tags span,
.card-tags span,
.meta-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 13px;
  font-style: normal;
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(100%, 430px);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), transparent 54%);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 24px;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dots button {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 200ms ease, background 200ms ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: #f59e0b;
}

.section,
.page-hero,
.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 22px;
}

.section-alt {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0));
}

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

.section-head h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-more {
  color: #fbbf24;
  font-weight: 900;
}

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

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

.movie-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 26px 74px rgba(245, 158, 11, 0.12);
}

.poster-box {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-box img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 320ms ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 52%);
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #111827;
  font-weight: 900;
  font-size: 13px;
}

.card-body {
  display: grid;
  gap: 9px;
  padding: 16px;
}

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

.card-body em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.card-desc {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.68;
}

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

.category-tile {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 42%), var(--card);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.2);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-tile p,
.page-hero p,
.detail-title p {
  color: #cbd5e1;
  line-height: 1.75;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr 220px 220px;
  gap: 14px;
  margin: 0 0 30px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 60px 96px minmax(0, 1fr) 140px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #fb923c);
  color: #111827;
  font-weight: 1000;
}

.rank-row img {
  width: 96px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.62;
}

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

.breadcrumb a {
  color: #fbbf24;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: start;
}

.detail-title h1 {
  margin-bottom: 18px;
}

.detail-title p {
  margin: 0 0 20px;
  font-size: 17px;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111827;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 36px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 88px rgba(0, 0, 0, 0.5);
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.12));
  color: #fff;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #fb923c);
  color: #111827;
  font-size: 36px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.38);
}

.player-wrap.is-playing .play-overlay {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

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

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

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 22px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fbbf24;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 9px;
  color: var(--muted);
  line-height: 1.7;
}

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

.site-footer a:hover {
  color: #fbbf24;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 34px;
  color: #64748b;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

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

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

  .hero-poster,
  .detail-poster {
    justify-self: start;
    max-width: 340px;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    padding: 10px 0 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

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

  .main-nav a,
  .nav-dropdown button {
    min-height: 42px;
    justify-content: flex-start;
  }

  .nav-dropdown-panel {
    position: static;
    display: grid;
    width: 100%;
    margin-top: 4px;
  }

  .hero {
    min-height: 88vh;
  }

  .hero-inner {
    min-height: 88vh;
    padding-top: 78px;
    padding-bottom: 74px;
  }

  .hero-poster {
    display: none;
  }

  .hero-control {
    display: none;
  }

  .section,
  .page-hero,
  .detail-wrap {
    padding: 44px 16px;
  }

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

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

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

  .rank-row .btn {
    grid-column: 1 / -1;
  }

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

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

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 38px;
  }
}
