
:root {
  --bg: #070b19;
  --bg-soft: #0d1327;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #10182d;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #14b8a6;
  --accent-2: #22d3ee;
  --accent-3: #60a5fa;
  --shadow: 0 20px 60px rgba(2, 8, 23, 0.46);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 28%),
    linear-gradient(180deg, #060916 0%, #0a1020 50%, #070b19 100%);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 25, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}
.brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px rgba(20, 184, 166, .28);
}
.brand__text { font-size: 1.05rem; }
.nav { display: flex; align-items: center; gap: 10px; }
.nav a,
.nav-mobile a {
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--muted);
  transition: .2s ease;
}
.nav a:hover,
.nav-mobile a:hover,
.nav a.is-active {
  color: white;
  background: rgba(20, 184, 166, 0.14);
}
.nav-toggle {
  display: none;
  border: 0;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.nav-mobile {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 12px 16px 16px;
  gap: 8px;
}
.nav-mobile.is-open { display: grid; }

.hero {
  padding: 26px 0 8px;
}
.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.65);
  box-shadow: var(--shadow);
}
.hero-track {
  position: relative;
  min-height: inherit;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s ease;
}
.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.hero-slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.06);
  transform: scale(1.04);
}
.hero-slide__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 11, 25, 0.96) 0%, rgba(7, 11, 25, 0.72) 50%, rgba(7, 11, 25, 0.22) 100%);
}
.hero-slide__content {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 56px));
  padding: 74px 0 74px 56px;
  display: grid;
  align-content: center;
  min-height: 560px;
}
.hero-kicker,
.section-kicker,
.page-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
  color: #a7f3d0;
  border: 1px solid rgba(20, 184, 166, 0.18);
  font-size: .88rem;
}
.hero-slide h2 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  margin: 18px 0 16px;
  letter-spacing: -.03em;
}
.hero-slide p {
  color: #cbd5e1;
  font-size: 1.02rem;
  max-width: 56ch;
}
.hero-slide__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.hero-slide__meta span,
.movie-card__badge,
.badge {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #dbeafe;
  font-size: .86rem;
}
.hero-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: .2s ease;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 28px rgba(20, 184, 166, .24);
}
.btn--ghost {
  background: rgba(15, 23, 42, 0.68);
  color: white;
  border-color: rgba(148, 163, 184, 0.16);
}
.btn:hover { transform: translateY(-1px); }

.carousel-controls {
  position: absolute;
  inset: auto 24px 24px auto;
  z-index: 2;
  display: flex;
  gap: 10px;
}
.carousel-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  color: white;
  background: rgba(7, 11, 25, 0.66);
  backdrop-filter: blur(10px);
}
.carousel-dots {
  position: absolute;
  inset: auto auto 24px 56px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.carousel-dots button {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.34);
}
.carousel-dots button.is-active { width: 28px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.section {
  padding: 28px 0;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-head h2,
.page-title {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  margin: 8px 0 0;
  line-height: 1.15;
}
.section-head p,
.page-lead,
.section-intro {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}
.search-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.search-bar input {
  min-width: min(360px, 100%);
  flex: 1;
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.86);
  padding: 0 16px;
  color: white;
  outline: none;
}
.search-bar input:focus { border-color: rgba(34, 211, 238, 0.5); box-shadow: 0 0 0 4px rgba(34, 211, 238, .12); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.chip:hover { color: white; border-color: rgba(20, 184, 166, 0.34); }

.grid {
  display: grid;
  gap: 18px;
}
.grid--featured {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid--three {
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, .86fr);
  align-items: start;
}
.grid--movie-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  display: grid;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 18px 38px rgba(2, 8, 23, 0.22);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.2);
  background: rgba(15, 23, 42, 0.92);
}
.movie-card__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #10182d;
}
.movie-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 11, 25, .14) 52%, rgba(7, 11, 25, .82) 100%);
}
.movie-card__badge {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
}
.movie-card__body {
  padding: 16px;
  display: grid;
  gap: 10px;
}
.movie-card__body h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
}
.movie-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: .84rem;
}
.movie-card__meta span,
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(7, 11, 25, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.movie-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.movie-card--small .movie-card__body { padding: 14px; }
.movie-card--small .movie-card__body p { min-height: 0; }

.panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.panel__inner { padding: 18px; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel__head h3, .panel__head h2 { margin: 0; }
.rank-list { display: grid; gap: 12px; }
.rank-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(7, 11, 25, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.08);
}
.rank-item__num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 700;
}
.rank-item__meta {
  display: grid;
  gap: 4px;
}
.rank-item__meta small { color: var(--muted); }
.rank-item__tag {
  color: #cbd5e1;
  font-size: .85rem;
}

.page-hero {
  padding: 30px 0 16px;
}
.page-hero__box {
  display: grid;
  gap: 16px;
  padding: 26px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(7, 11, 25, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow);
}
.page-title { margin: 8px 0 0; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .92rem;
}
.breadcrumb a { color: #cbd5e1; }

.detail {
  padding: 12px 0 18px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 0.84fr 1.16fr;
  gap: 22px;
  align-items: start;
}
.detail-poster {
  position: sticky;
  top: 98px;
  border-radius: 28px;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
}
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,11,25,.16), rgba(7,11,25,.82));
}
.detail-poster__content {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 22px;
}
.detail-poster__content h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.06;
}
.detail-poster__content p { color: #cbd5e1; margin: 0; }
.detail-meta {
  display: grid;
  gap: 18px;
}
.detail-meta__box {
  padding: 22px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.detail-meta__info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.info-pill {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(7, 11, 25, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: #dbeafe;
}
.detail-section {
  padding: 26px 0;
}
.detail-copy {
  padding: 22px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.detail-copy h2,
.detail-side h2 { margin: 0 0 12px; font-size: 1.35rem; }
.detail-copy p {
  color: #cbd5e1;
  margin: 0 0 14px;
}
.detail-copy p:last-child { margin-bottom: 0; }

.player-shell {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #050814;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow);
}
.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
}
.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(20,184,166,.18), transparent 42%),
    linear-gradient(180deg, rgba(7,11,25,.14), rgba(7,11,25,.72));
  cursor: pointer;
  z-index: 2;
}
.player-overlay.is-hidden { display: none; }
.player-overlay__btn {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 48px rgba(20,184,166,.34);
  font-size: 1.2rem;
}
.player-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.player-toolbar .btn { min-height: 44px; }

.site-footer {
  margin-top: 34px;
  padding: 26px 0 38px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--muted);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-inner p { margin: 4px 0 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-links a {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.empty-state {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.48);
}
.hidden { display: none !important; }

@media (max-width: 1080px) {
  .grid--featured,
  .grid--movie-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--three,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-poster { position: relative; top: 0; min-height: 460px; }
}

@media (max-width: 760px) {
  .nav--desktop { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .hero-carousel { min-height: 640px; }
  .hero-slide__content { width: calc(100% - 32px); padding: 56px 16px 84px; min-height: 640px; }
  .carousel-dots { left: 16px; bottom: 18px; }
  .carousel-controls { right: 16px; bottom: 14px; }
  .grid--featured,
  .grid--movie-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-head,
  .footer-inner,
  .panel__head {
    align-items: start;
    flex-direction: column;
  }
  .detail-meta__info { grid-template-columns: 1fr; }
  .page-hero__box { padding: 20px; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 20px, 1240px); }
  .grid--featured,
  .grid--movie-list { grid-template-columns: 1fr; }
  .movie-card__body p { min-height: 0; }
  .hero-carousel { min-height: 700px; }
  .detail-poster { min-height: 400px; }
}
