
:root {
  --bg: #050816;
  --bg-soft: #0b1220;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(17, 24, 39, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --accent-3: #fb7185;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 22%),
    radial-gradient(circle at top right, rgba(167, 139, 250, 0.12), transparent 18%),
    linear-gradient(180deg, #050816 0%, #09111f 45%, #030712 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
}
.skip-link:focus {
  left: 16px;
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: 10px 14px;
  border-radius: 999px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.7);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
  display: grid;
  place-items: center;
  color: #020617;
  font-weight: 900;
}
.brand-title {
  font-size: 1.06rem;
  line-height: 1.2;
}
.brand-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  transition: 0.2s ease;
}
.nav a:hover, .nav a.active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--line);
}
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
}

.hero {
  padding: 28px 0 14px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}
.hero-main, .hero-side, .panel, .content-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-main {
  position: relative;
  padding: 30px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}
.hero-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.17), transparent 25%),
    radial-gradient(circle at 78% 18%, rgba(167, 139, 250, 0.18), transparent 24%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0.95));
  z-index: -2;
}
.hero-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.05), transparent 32%, transparent 60%, rgba(255,255,255,0.03));
  z-index: -1;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
  color: #a5f3fc;
  font-size: 0.86rem;
  font-weight: 700;
}
.hero-title {
  margin: 16px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.hero-title span {
  display: block;
  background: linear-gradient(90deg, #f8fafc, #93c5fd 45%, #c4b5fd 75%, #fda4af);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy {
  max-width: 52ch;
  color: var(--muted);
  font-size: 1rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
  transition: 0.2s ease;
  font-weight: 700;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(34, 211, 238, 0.42); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #020617;
  border-color: transparent;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-size: 1.15rem;
}
.stat span {
  color: var(--muted);
  font-size: 0.88rem;
}
.hero-side {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 4px 0;
}
.side-title h2, .section-title, .panel-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}
.side-title p, .section-subtitle, .panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.hero-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.hero-strip::-webkit-scrollbar, .cards-grid::-webkit-scrollbar { height: 8px; width: 8px; }
.hero-strip::-webkit-scrollbar-thumb, .cards-grid::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.35); border-radius: 999px; }
.hero-feature {
  border-radius: 22px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  scroll-snap-align: start;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  position: relative;
}
.poster {
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  background: linear-gradient(145deg, var(--g1, #0ea5e9), var(--g2, #8b5cf6), var(--g3, #f97316));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.poster.hero-poster {
  min-height: 220px;
  padding: 16px;
}
.poster .meta-top, .poster .meta-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.poster .poster-id {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.86;
}
.poster .poster-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.25);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 0.75rem;
  white-space: nowrap;
}
.poster .poster-title {
  margin-top: auto;
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.03em;
}
.poster .poster-desc {
  font-size: 0.92rem;
  opacity: 0.9;
  max-width: 30ch;
}
.poster .poster-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.82rem;
}

.section {
  padding: 18px 0 30px;
}
.section-head, .panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 1.55rem;
}
.panel-head {
  padding: 18px 18px 0;
}
.panel-body { padding: 18px; }
.content-panel { padding: 18px; }
.searchbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.searchbar input,
.searchbar select {
  min-height: 48px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  padding: 0 14px;
  outline: none;
}
.searchbar input { flex: 1 1 260px; }
.searchbar select { flex: 0 0 auto; }
.searchbar input::placeholder { color: #64748b; }
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.filter-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  cursor: pointer;
}
.filter-btn.active,
.filter-btn:hover {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(34, 211, 238, 0.1);
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.28);
}
.movie-card .poster {
  min-height: 230px;
  border-radius: 0;
}
.movie-body {
  padding: 14px;
}
.movie-title {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.28;
  font-weight: 800;
}
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}
.movie-excerpt {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.category-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line);
}
.category-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.category-card p { margin: 0; color: var(--muted); }
.category-card strong { display: block; margin-top: 14px; font-size: 1.4rem; }

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
}
.detail-shell {
  padding: 18px;
}
.detail-poster {
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}
.detail-title {
  margin: 14px 0 10px;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.03;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-meta .chip { color: #fff; }
.detail-info p {
  margin: 0 0 12px;
  color: #dbeafe;
}
.detail-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.kv {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}
.kv span { display: block; color: var(--muted); font-size: 0.84rem; }
.kv strong { display: block; margin-top: 4px; }
.player-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #020617;
  box-shadow: var(--shadow);
}
.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
}
.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.3));
  pointer-events: none;
}
.play-overlay button {
  pointer-events: auto;
  border: 0;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #020617;
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
}
.play-overlay.hidden { display: none; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.crumbs a { color: #cbd5e1; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.related-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}
.related-card .poster { min-height: 180px; }
.related-body { padding: 12px; }
.related-body h4 { margin: 0 0 6px; font-size: 0.96rem; line-height: 1.25; }
.related-body p { margin: 0; color: var(--muted); font-size: 0.82rem; }

.footer {
  padding: 30px 0 48px;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  padding-top: 10px;
}
.footer-note {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.65);
  border-radius: 22px;
}
.small { font-size: 0.92rem; color: var(--muted); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

@media (max-width: 1024px) {
  .hero-grid, .detail-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-main { min-height: 380px; }
}
@media (max-width: 768px) {
  .topbar-inner { align-items: flex-start; }
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    width: 100%;
    justify-content: flex-start;
    padding-top: 10px;
  }
  .nav.open { display: flex; }
  .hero { padding-top: 18px; }
  .hero-main { padding: 20px; }
  .hero-stats { grid-template-columns: 1fr; }
  .detail-kv { grid-template-columns: 1fr; }
}
