:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --green: #22c55e;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.15), transparent 30%),
    radial-gradient(circle at 80% 15%, rgba(59, 130, 246, 0.13), transparent 28%),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand {
  font-size: 24px;
  white-space: nowrap;
}

.brand:hover,
.footer-brand:hover,
.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: var(--amber-light);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
  font-size: 16px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.desktop-nav a.active,
.mobile-nav a.active {
  color: var(--amber-light);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 250px;
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: var(--text);
  outline: none;
  padding: 11px 14px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.top-search button,
.mobile-search button,
.filter-panel button,
.btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 11px 18px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.filter-panel button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  box-shadow: none;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav nav,
.mobile-search {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.mobile-nav nav {
  display: grid;
  gap: 8px;
  padding: 14px 0 8px;
}

.mobile-nav a {
  display: block;
  border-radius: 14px;
  padding: 11px 12px;
}

.mobile-nav a:hover {
  background: rgba(51, 65, 85, 0.9);
}

.mobile-search {
  display: flex;
  gap: 10px;
  padding: 8px 0 16px;
}

.page-shell,
.hero-inner,
.section-shell,
.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide.is-active img {
  animation: heroZoom 7s ease forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1.02); }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.28)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 42%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 64px 0 84px;
}

.hero-copy {
  width: min(760px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-light);
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 700px;
  margin: 0 0 26px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  color: #d1d5db;
  padding: 7px 12px;
  font-size: 14px;
}

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

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--amber);
}

.main-content {
  padding: 64px 0 32px;
}

.section-block {
  margin-bottom: 76px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.detail-panel,
.player-panel,
.info-panel,
.compact-card,
.rank-item a,
.filter-panel {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.movie-card {
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover,
.compact-card:hover,
.category-card:hover,
.rank-item a:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 24px 64px rgba(245, 158, 11, 0.11);
}

.card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg-soft);
}

.movie-card-wide .card-poster {
  aspect-ratio: 16 / 10;
}

.card-poster img,
.compact-card img,
.rank-item img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.card-score {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  border-radius: 999px;
  background: var(--amber);
  color: white;
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 900;
}

.card-play {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.85);
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.94);
  color: white;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.card-content {
  padding: 15px;
}

.card-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.card-tags span,
.tag-list span {
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-light);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.card-content h3,
.compact-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  color: white;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.card-meta {
  gap: 6px;
}

.card-meta span {
  padding: 3px 8px;
  font-size: 12px;
}

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

.category-card {
  display: block;
  min-height: 218px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent 38%),
    rgba(15, 23, 42, 0.75);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  color: white;
  font-size: 22px;
}

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

.category-card span {
  color: var(--amber-light);
  font-weight: 800;
}

.sample-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.sample-links a {
  color: #cbd5e1;
  font-size: 14px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 52px 60px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-num {
  color: var(--amber-light);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  height: 80px;
  border-radius: 12px;
}

.rank-main strong {
  display: block;
  margin-bottom: 7px;
  color: white;
}

.rank-main small {
  color: var(--muted);
}

.rank-score {
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.13);
  color: var(--amber-light);
  padding: 7px 10px;
  font-weight: 900;
}

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

.compact-card {
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.compact-card a {
  display: block;
  padding: 10px;
}

.compact-card img {
  aspect-ratio: 16 / 10;
  border-radius: 15px;
  margin-bottom: 12px;
}

.compact-card span {
  display: inline-block;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  padding: 4px 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.page-hero {
  padding: 72px 0 34px;
}

.page-hero h1 {
  max-width: 920px;
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px 170px auto;
  gap: 12px;
  padding: 16px;
  margin-bottom: 28px;
}

.empty-state {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  padding: 34px;
  text-align: center;
}

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

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

.breadcrumb a {
  color: #cbd5e1;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: stretch;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
}

.detail-panel {
  padding: clamp(26px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.11), transparent 34%),
    rgba(15, 23, 42, 0.76);
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-lead {
  margin: 18px 0 22px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.detail-section {
  margin-top: 38px;
}

.info-panel,
.player-panel {
  padding: clamp(20px, 3vw, 30px);
}

.detail-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.detail-section p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.9;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), rgba(0, 0, 0, 0.62));
  color: white;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 22px 60px rgba(245, 158, 11, 0.35);
  font-size: 34px;
  padding-left: 5px;
}

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

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

.site-footer {
  margin-top: 72px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 16px;
  font-size: 24px;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--muted);
}

.site-footer p {
  max-width: 560px;
  line-height: 1.8;
}

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

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  padding: 18px 16px;
  text-align: center;
}

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .top-search {
    margin-left: auto;
  }

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

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

@media (max-width: 900px) {
  .top-search {
    display: none;
  }

  .hero {
    min-height: 620px;
  }

  .hero-nav {
    display: none;
  }

  .grid-posters,
  .grid-four,
  .compact-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-three,
  .ranking-layout,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 340px;
  }

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

@media (max-width: 620px) {
  .nav-shell,
  .page-shell,
  .hero-inner,
  .section-shell,
  .footer-grid,
  .mobile-nav nav,
  .mobile-search {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .hero {
    min-height: 560px;
    height: 76vh;
  }

  .hero-inner {
    padding: 42px 0 74px;
  }

  .hero h1 {
    font-size: 40px;
  }

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

  .section-head {
    display: block;
  }

  .grid-posters,
  .grid-four,
  .grid-three,
  .category-grid,
  .compact-grid,
  .related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-content {
    padding: 12px;
  }

  .card-content p {
    display: none;
  }

  .rank-item a {
    grid-template-columns: 38px 54px 1fr;
  }

  .rank-score {
    grid-column: 3;
    width: fit-content;
  }

  .detail-panel,
  .info-panel,
  .player-panel {
    border-radius: 18px;
  }
}
