
:root {
  --bg: #060b16;
  --bg-soft: #0b1324;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-2: rgba(15, 23, 42, 0.64);
  --line: rgba(148, 163, 184, 0.16);
  --text: #e5eefc;
  --muted: #93a4c3;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f97316;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --max: 1320px;
}

* { 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(139, 92, 246, 0.20), transparent 28%),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.15), transparent 26%),
    linear-gradient(180deg, #050814 0%, #0a1020 56%, #04070f 100%);
  color: var(--text);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(5, 10, 20, 0.72);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-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: 800;
  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(139, 92, 246, 0.35);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}
.brand-title {
  font-size: 1rem;
  line-height: 1.2;
}
.brand-sub {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nav a {
  color: #d8e3f5;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(148,163,184,0.07);
  border: 1px solid rgba(148,163,184,0.12);
}
.nav a:hover, .nav a.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.28), rgba(34,211,238,0.22));
  border-color: rgba(255,255,255,0.18);
}

.hero {
  padding: 28px 0 10px;
}
.hero-shell {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(135deg, rgba(15,23,42,0.92), rgba(8,14,28,0.84)),
    radial-gradient(circle at 20% 20%, rgba(139,92,246,0.32), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(34,211,238,0.18), transparent 30%);
  box-shadow: var(--shadow);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 620px;
}
.hero-copy {
  padding: 56px 44px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kicker {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #f8fafc;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(139,92,246,0.16);
}
.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.hero p {
  color: #c7d4ee;
  max-width: 62ch;
  font-size: 1rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: #eff6ff;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.09);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: white;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 16px;
}
.stat-card b { display: block; font-size: 1.4rem; }
.stat-card span { color: var(--muted); font-size: 0.88rem; }
.hero-stage {
  position: relative;
  min-height: 620px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease;
  display: grid;
  grid-template-rows: 1fr auto;
  background-size: cover;
  background-position: center;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,10,20,0.0) 0%, rgba(5,10,20,0.38) 40%, rgba(5,10,20,0.95) 100%),
    radial-gradient(circle at 20% 20%, rgba(0,0,0,0.0), rgba(0,0,0,0.18));
}
.hero-slide-content {
  position: relative;
  z-index: 1;
  align-self: end;
  padding: 24px;
}
.hero-card {
  background: rgba(7,12,24,0.54);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 20px;
}
.hero-card h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.05;
}
.hero-card p {
  margin: 0;
  color: #d5e0f5;
  font-size: 0.95rem;
}
.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.1);
  color: #eef4ff;
  font-size: 0.82rem;
}
.hero-pager {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero-pager button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,0.28);
}
.hero-pager button.active {
  width: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.section {
  padding: 24px 0;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.section-title {
  margin: 0;
  font-size: 1.5rem;
}
.section-desc {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 72ch;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid.cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.card {
  background: linear-gradient(180deg, rgba(16,24,40,0.96), rgba(11,17,30,0.9));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.24);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 18px 50px rgba(0,0,0,0.34);
}
.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(4,8,20,0.76);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.78rem;
  color: #e5eefc;
}
.card-body {
  padding: 14px 14px 16px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.25;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}
.desc {
  margin: 10px 0 0;
  color: #d5deef;
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.2em;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 18px;
}
.search, .select {
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}
.search { flex: 1 1 260px; }
.select { min-width: 180px; }
.muted { color: var(--muted); }

.panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.layout-two {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}
.movie-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  padding: 24px;
}
.movie-hero .poster {
  border-radius: 24px;
  overflow: hidden;
}
.movie-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.1;
}
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}
.movie-meta .chip { background: rgba(255,255,255,0.08); }
.movie-synopsis {
  color: #d9e4f9;
  margin: 0 0 16px;
}
.movie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.player-wrap {
  padding: 24px;
}
.player-box {
  position: relative;
  background: #020817;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 26px;
  overflow: hidden;
}
.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}
.player-overlay {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.player-tip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(6, 11, 22, 0.76);
  border: 1px solid rgba(255,255,255,0.1);
  color: #dbe7ff;
}
.player-button {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
}
.related {
  padding: 0 24px 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.small-card .card-body { padding: 12px; }
.small-card h3 { font-size: 0.92rem; }
.small-card .desc { display: none; }

.footer {
  padding: 30px 0 48px;
  color: var(--muted);
}
.footer .panel { padding: 18px 22px; }

.page-head {
  padding: 28px 0 10px;
}
.page-head .panel {
  padding: 24px;
}
.page-head h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}
.page-head p { margin: 0; color: #c7d4ee; }
.list-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.category-tile {
  padding: 18px;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.category-tile h3 { margin: 0 0 8px; font-size: 1.15rem; }
.category-tile .count { font-size: 2rem; font-weight: 800; }
.rank-list {
  display: grid;
  gap: 12px;
}
.rank-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.rank-item .rank-no {
  font-size: 1.8rem;
  font-weight: 800;
  color: #c4d7ff;
  text-align: center;
}
.rank-item .mini {
  width: 80px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
}
.rank-item h3 { margin: 0 0 8px; }
.rank-item .score { font-size: 1.2rem; font-weight: 800; color: #f8fafc; }

.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.pagination a, .pagination span {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}
.pagination .current { background: linear-gradient(135deg, rgba(139,92,246,0.28), rgba(34,211,238,0.18)); }

@media (max-width: 1180px) {
  .grid.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .list-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .movie-hero { grid-template-columns: 280px 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { min-height: 520px; }
}

@media (max-width: 820px) {
  .header-inner { flex-direction: column; align-items: start; }
  .nav { width: 100%; }
  .hero-copy { padding: 34px 20px 14px; }
  .hero-stage { min-height: 460px; }
  .hero-card h2 { font-size: 1.6rem; }
  .grid.cards, .list-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .movie-hero { grid-template-columns: 1fr; }
  .layout-two { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 20px, var(--max)); }
  .grid.cards, .list-grid, .related-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 28px 16px 12px; }
  .hero h1 { font-size: 2.3rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .movie-hero, .player-wrap, .related, .page-head .panel { padding: 16px; }
  .rank-item { grid-template-columns: 64px 1fr; }
  .rank-item .score { grid-column: 2; }
}
