
:root {
  color-scheme: dark;
  --deep-950: #111821;
  --deep-900: #1b222b;
  --deep-850: #222b35;
  --deep-800: #29323c;
  --deep-700: #313a45;
  --night-900: #142565;
  --night-700: #273b81;
  --night-600: #2e448c;
  --glow-500: #ffcf33;
  --glow-400: #ffd651;
  --text-main: #f3f4f6;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --shadow-deep: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 28px rgba(255, 207, 51, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% 0%, rgba(46, 68, 140, 0.32), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(255, 207, 51, 0.12), transparent 24rem),
    var(--deep-900);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(27, 34, 43, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--deep-700);
}

.header-inner {
  height: 68px;
  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-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--deep-900);
  background: var(--glow-500);
  border-radius: 12px;
  box-shadow: var(--shadow-glow);
}

.brand-text {
  color: var(--glow-500);
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--text-soft);
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--glow-500);
  background: var(--deep-800);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--deep-800);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text-main);
  margin: 5px 0;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--deep-700);
  padding: 10px 16px 16px;
  background: rgba(27, 34, 43, 0.98);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: var(--deep-950);
}

.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-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.15);
}

.hero-shade,
.detail-bg-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 33, 0.96) 0%, rgba(27, 34, 43, 0.74) 45%, rgba(20, 37, 101, 0.38) 100%),
    linear-gradient(0deg, var(--deep-900) 0%, transparent 35%);
}

.hero-content {
  position: relative;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 110px 0 80px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--glow-500);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-copy h1,
.compact-hero h1,
.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p,
.compact-hero p,
.detail-info p {
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  color: var(--deep-900);
  background: var(--glow-500);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--glow-400);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-main);
  background: rgba(41, 50, 60, 0.78);
  border-color: var(--deep-700);
}

.btn-ghost:hover {
  color: var(--glow-500);
  border-color: var(--glow-500);
  transform: translateY(-1px);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 207, 51, 0.38);
  box-shadow: var(--shadow-deep), var(--shadow-glow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--text-main);
  background: rgba(27, 34, 43, 0.78);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--glow-500);
}

.page-stack {
  display: grid;
  gap: 56px;
  padding: 58px 0;
}

.section-block,
.featured-panel,
.filter-panel,
.story-panel,
.info-panel,
.player-section,
.category-overview-card {
  border: 1px solid var(--deep-700);
  background: rgba(41, 50, 60, 0.56);
  border-radius: 24px;
  box-shadow: var(--shadow-deep);
}

.section-block {
  padding: 28px;
}

.featured-panel {
  padding: 34px;
  background: linear-gradient(135deg, rgba(20, 37, 101, 0.52), rgba(41, 50, 60, 0.56));
  border-color: rgba(39, 59, 129, 0.58);
}

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

.section-heading h2,
.filter-panel h2,
.story-panel h2,
.info-panel h2,
.player-section h2,
.category-overview-card h2 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-heading a {
  color: var(--glow-500);
  font-weight: 800;
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--deep-700);
  border-radius: 20px;
  background: rgba(27, 34, 43, 0.9);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: var(--glow-500);
  box-shadow: var(--shadow-glow);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--deep-950);
}

.card-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.card-play,
.card-year {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-play {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 50%;
  color: var(--deep-900);
  background: rgba(255, 207, 51, 0.92);
  opacity: 0;
  transition: 0.22s ease;
}

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

.card-year {
  right: 12px;
  bottom: 12px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--deep-900);
  background: var(--glow-500);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.compact-card h2 a:hover {
  color: var(--glow-500);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--glow-500);
  background: rgba(255, 207, 51, 0.09);
  border: 1px solid rgba(255, 207, 51, 0.18);
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  display: grid;
  gap: 8px;
  min-height: 124px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--deep-700);
  background: linear-gradient(135deg, rgba(20, 37, 101, 0.45), rgba(27, 34, 43, 0.8));
  transition: 0.2s ease;
}

.category-tile:hover {
  border-color: var(--glow-500);
  transform: translateY(-2px);
}

.category-tile strong {
  color: var(--glow-500);
  font-size: 22px;
}

.category-tile span,
.category-overview-card p,
.filter-panel p {
  color: var(--text-muted);
  line-height: 1.7;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 37, 101, 0.72), rgba(27, 34, 43, 1));
  border-bottom: 1px solid var(--deep-700);
}

.compact-hero .container {
  padding: 78px 0 64px;
}

.compact-hero h1 {
  max-width: 900px;
}

.compact-hero p {
  max-width: 820px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  color: var(--text-main);
  background: var(--deep-900);
  border: 1px solid var(--deep-700);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--glow-500);
}

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.category-mini-list a {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

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

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

.rank-podium-card {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 24px;
  border: 1px solid rgba(255, 207, 51, 0.28);
  background: var(--deep-950);
  box-shadow: var(--shadow-deep);
}

.rank-podium-card img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  opacity: 0.74;
}

.rank-podium-card strong,
.rank-podium-card span:not(.rank-badge) {
  position: absolute;
  left: 22px;
  right: 22px;
  z-index: 2;
}

.rank-podium-card strong {
  bottom: 54px;
  font-size: 24px;
}

.rank-podium-card span:not(.rank-badge) {
  bottom: 26px;
  color: var(--text-soft);
}

.rank-badge,
.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--deep-900);
  background: var(--glow-500);
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--deep-700);
  background: rgba(41, 50, 60, 0.58);
}

.compact-cover {
  position: relative;
}

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

.rank-number {
  position: absolute;
  left: -7px;
  top: -7px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 12px;
}

.compact-card h2 {
  margin: 3px 0 8px;
  font-size: 18px;
}

.compact-card p {
  margin: 0 0 8px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 14px;
}

.detail-hero {
  min-height: 560px;
}

.detail-hero-inner {
  position: relative;
  padding: 56px 0 70px;
}

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

.breadcrumb a:hover {
  color: var(--glow-500);
}

.detail-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 207, 51, 0.34);
  box-shadow: var(--shadow-deep), var(--shadow-glow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.player-section {
  padding: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  border: 1px solid var(--deep-700);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
  border: 0;
}

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

.player-play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--deep-900);
  background: var(--glow-500);
  box-shadow: var(--shadow-glow);
  font-size: 26px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 24px;
}

.story-panel,
.info-panel {
  padding: 28px;
}

.story-panel p {
  color: var(--text-soft);
  line-height: 1.9;
  margin: 12px 0 26px;
}

.info-panel dl {
  display: grid;
  gap: 16px;
  margin: 20px 0 0;
}

.info-panel dl div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--deep-700);
}

.info-panel dt {
  color: var(--text-muted);
}

.info-panel dd {
  margin: 0;
  color: var(--text-main);
}

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

.site-footer {
  border-top: 1px solid var(--deep-700);
  background: rgba(17, 24, 33, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  gap: 34px;
  padding: 42px 0;
}

.site-footer p,
.site-footer a {
  color: var(--text-muted);
  line-height: 1.7;
}

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

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.footer-links a:hover {
  color: var(--glow-500);
}

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--deep-800);
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 86px 0 88px;
  }

  .hero-poster {
    display: none;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid-5,
  .movie-grid-4,
  .movie-grid-3,
  .movie-grid-2,
  .category-grid,
  .category-overview-grid,
  .rank-list,
  .rank-podium,
  .filter-panel,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-grid {
    grid-template-columns: 150px 1fr;
    gap: 22px;
  }

  .detail-info h1 {
    font-size: 34px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-copy h1,
  .compact-hero h1 {
    font-size: 36px;
  }

  .section-block,
  .featured-panel,
  .filter-panel,
  .story-panel,
  .info-panel,
  .player-section,
  .category-overview-card {
    padding: 18px;
    border-radius: 18px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h2 {
    font-size: 15px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

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

  .detail-poster {
    width: 170px;
  }

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