:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: #111827;
  --card-2: #1e293b;
  --line: #1f2a44;
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.16);
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link.compact {
  font-size: 14px;
  color: #94a3b8;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: var(--blue-soft);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: white;
  background: var(--card-2);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav.open {
  display: grid;
}

.hero-wrap {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.3) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 64px 0 92px;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: #60a5fa;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.hero-desc,
.page-hero p,
.lead-text {
  max-width: 760px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

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

.primary-btn,
.ghost-btn,
.search-bar button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
  cursor: pointer;
}

.ghost-btn {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(96, 165, 250, 0.25);
  box-shadow: none;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  transform: rotate(2deg);
}

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

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

.hero-poster span,
.play-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.92);
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.32);
}

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

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  background: #60a5fa;
}

.container-narrow,
.content-section,
.page-main,
.detail-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search {
  position: relative;
  z-index: 5;
  margin-top: -36px;
  padding: 24px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-bar {
  display: flex;
  gap: 12px;
}

.search-bar input,
.site-search {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #0f172a;
  outline: none;
}

.search-bar input:focus,
.site-search:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.quick-links,
.filter-strip,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links {
  margin-top: 16px;
}

.quick-links a,
.filter-chip,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.72);
}

.filter-chip {
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active,
.quick-links a:hover {
  color: white;
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.2);
}

.content-section {
  padding: 72px 0 0;
}

.section-heading,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2,
.panel-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading a,
.panel-title a {
  color: #60a5fa;
  font-weight: 700;
}

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

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

.catalog-grid {
  margin-top: 24px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

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

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

.year-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.76);
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #f97316, #eab308);
}

.play-mark {
  z-index: 3;
  width: 50px;
  height: 50px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.movie-card-body {
  padding: 16px;
}

.movie-title {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #64748b;
  font-size: 13px;
}

.tag-row span {
  min-height: 26px;
  padding: 0 9px;
  color: #bfdbfe;
  font-size: 12px;
  background: rgba(59, 130, 246, 0.12);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.rank-panel,
.info-card {
  position: sticky;
  top: 96px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: rgba(59, 130, 246, 0.12);
}

.rank-row img {
  width: 56px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-num {
  color: #60a5fa;
  font-weight: 900;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info strong {
  color: white;
  font-size: 14px;
}

.rank-info em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.9);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  opacity: 0.38;
  transform: scale(1.06);
}

.category-tile span,
.category-tile em {
  position: relative;
  display: block;
}

.category-tile span,
.category-card h2 {
  margin: 0 0 10px;
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.category-tile em,
.category-card p {
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.65;
}

.category-card {
  min-height: auto;
  display: grid;
  gap: 16px;
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.page-main {
  padding: 48px 0 80px;
}

.page-hero {
  padding: 72px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.22), transparent 28rem),
    rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

.page-hero .search-bar {
  max-width: 780px;
  margin-top: 26px;
}

.filter-strip {
  margin-bottom: 12px;
}

.empty-state {
  display: none;
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state.show {
  display: block;
}

.large-rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-main {
  padding: 34px 0 80px;
}

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

.breadcrumb a {
  color: #93c5fd;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 20px 52px rgba(37, 99, 235, 0.45);
  font-size: 32px;
}

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

.detail-copy {
  padding: 34px 0 0;
}

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

.detail-copy h2,
.info-card h2 {
  margin: 34px 0 12px;
  font-size: 24px;
}

.detail-copy p {
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-tags {
  margin-top: 22px;
}

.detail-poster {
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.info-card {
  position: static;
  margin-top: 18px;
}

.info-card h2 {
  margin-top: 0;
}

.info-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.info-card dt {
  color: #64748b;
}

.info-card dd {
  margin: 0;
  color: #e2e8f0;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.86);
}

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

.footer-grid p,
.footer-links a,
.footer-bottom {
  color: var(--muted);
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
  font-size: 14px;
}

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

  .menu-button {
    display: block;
  }

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

  .hero-poster,
  .detail-side {
    display: none;
  }

  .rank-panel {
    position: static;
  }

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

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

@media (max-width: 820px) {
  .hero-wrap,
  .hero-content {
    min-height: 600px;
  }

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

  .hero-desc,
  .page-hero p,
  .lead-text {
    font-size: 16px;
  }

  .home-search,
  .page-hero {
    padding: 22px;
    border-radius: 24px;
  }

  .search-bar {
    flex-direction: column;
  }

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

  .category-grid,
  .category-card-grid,
  .large-rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .detail-main {
    padding-top: 18px;
  }

  .player-shell {
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    width: min(100% - 20px, 1280px);
  }

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

  .container-narrow,
  .content-section,
  .page-main,
  .detail-main,
  .mobile-nav {
    width: min(100% - 20px, 1280px);
  }

  .hero-content {
    width: min(100% - 20px, 1280px);
    padding-top: 42px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

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

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