:root {
  --bg: #0f1d16;
  --bg-2: #13231b;
  --panel: #17261e;
  --panel-2: #1d2c23;
  --text: #f4f0dc;
  --muted: rgba(244, 240, 220, 0.72);
  --line: rgba(245, 245, 220, 0.12);
  --accent: #d9c06a;
  --accent-2: #8fd18b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --radius-lg: 30px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 192, 106, 0.12), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(143, 209, 139, 0.12), transparent 24%),
    linear-gradient(180deg, #102118 0%, #0d1712 45%, #09110d 100%);
  min-height: 100vh;
}
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;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(12px);
  background: rgba(9, 17, 13, 0.78);
  border-bottom: 1px solid rgba(245, 245, 220, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #102118;
  background: linear-gradient(135deg, var(--accent), #f2e3a0);
  box-shadow: 0 10px 20px rgba(217, 192, 106, 0.25);
}
.brand span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav a,
.nav button,
.chip {
  border: 1px solid rgba(245, 245, 220, 0.13);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.nav a:hover,
.nav button:hover,
.chip:hover { transform: translateY(-1px); border-color: rgba(217, 192, 106, 0.45); background: rgba(217, 192, 106, 0.08); }
.nav a.active { border-color: rgba(217, 192, 106, 0.55); background: rgba(217, 192, 106, 0.12); color: #f8efc8; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.mobile-panel {
  display: none;
  padding: 12px 0 18px;
}
.mobile-panel.open { display: block; }
.mobile-panel .nav { flex-direction: column; align-items: stretch; }
.mobile-panel .nav a { text-align: center; }
.hero {
  padding: 26px 0 14px;
}
.hero-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 245, 220, 0.12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(18, 35, 27, 0.96), rgba(12, 18, 14, 0.94)),
    radial-gradient(circle at 18% 18%, rgba(217, 192, 106, 0.16), transparent 24%),
    radial-gradient(circle at 80% 24%, rgba(143, 209, 139, 0.12), transparent 20%);
  box-shadow: var(--shadow);
}
.hero-shell::before,
.hero-shell::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  opacity: .5;
}
.hero-shell::before {
  width: 300px;
  height: 300px;
  left: -120px;
  top: -120px;
  background: radial-gradient(circle, rgba(217, 192, 106, 0.16), transparent 68%);
}
.hero-shell::after {
  width: 220px;
  height: 220px;
  right: -70px;
  bottom: -80px;
  background: radial-gradient(circle, rgba(143, 209, 139, 0.12), transparent 70%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 22px;
  padding: 34px;
}
.hero-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.03em;
}
.hero-copy {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
  margin: 18px 0 24px;
  font-size: 1.02rem;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(245, 245, 220, 0.14);
  background: rgba(255,255,255,0.03);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #f0e2a7);
  color: #142117;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(217, 192, 106, 0.2);
}
.btn:hover { transform: translateY(-1px); }
.search-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.search-bar input,
.search-bar select,
.inline-search input {
  flex: 1 1 240px;
  padding: 13px 16px;
  border-radius: 18px;
  border: 1px solid rgba(245, 245, 220, 0.12);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
}
.search-bar input::placeholder,
.inline-search input::placeholder { color: rgba(244, 240, 220, 0.48); }
.search-bar button { flex: 0 0 auto; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.stat {
  border-radius: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(245, 245, 220, 0.08);
}
.stat strong { display: block; font-size: 1.18rem; margin-bottom: 6px; }
.stat span { color: var(--muted); font-size: .92rem; }
.feature-list {
  display: grid;
  gap: 12px;
}
.feature-card,
.movie-card,
.category-card,
.panel,
.rank-item {
  background: linear-gradient(180deg, rgba(29, 44, 35, 0.98), rgba(19, 33, 25, 0.96));
  border: 1px solid rgba(245, 245, 220, 0.09);
  box-shadow: var(--shadow);
}
.feature-card {
  border-radius: 24px;
  padding: 18px;
}
.feature-card .topline { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.22rem; }
.feature-card p { margin: 0 0 12px; color: var(--muted); line-height: 1.6; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .82rem;
  color: #102117;
  background: linear-gradient(135deg, var(--accent), #f0e2a7);
}
.section { padding: 18px 0 8px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
}
.section-head h2 { margin: 0; font-size: 1.4rem; }
.section-head p { margin: 0; color: var(--muted); }
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.movie-card {
  border-radius: 22px;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.movie-card:hover { transform: translateY(-3px); border-color: rgba(217, 192, 106, 0.35); }
.poster {
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.16), transparent 22%),
    linear-gradient(135deg, rgba(217, 192, 106, 0.62), rgba(18, 35, 27, 0.95));
}
.poster::after {
  content: attr(data-id);
  position: absolute;
  inset: auto 12px 12px auto;
  font-size: 2rem;
  font-weight: 800;
  color: rgba(255,255,255,0.22);
}
.poster .poster-core {
  width: 78%;
  height: 78%;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.04));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  backdrop-filter: blur(8px);
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.poster .poster-core b { font-size: 1.2rem; line-height: 1.1; }
.poster .poster-core small { color: rgba(255,255,255,0.9); }
.movie-body { padding: 14px; }
.movie-title {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
  min-height: 2.7em;
}
.meta { color: var(--muted); font-size: .88rem; line-height: 1.7; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.meta-chip {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(245, 245, 220, 0.1);
  color: var(--muted);
  font-size: .78rem;
}
.category-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.category-card {
  border-radius: 20px;
  padding: 18px;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.category-card h3 { margin: 0 0 8px; }
.category-card p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.detail-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  position: sticky;
  top: 94px;
}
.detail-poster .poster { min-height: 510px; }
.detail-main {
  display: grid;
  gap: 16px;
}
.detail-head,
.detail-panel,
.related-panel,
.player-panel {
  border-radius: 26px;
  padding: 20px;
}
.detail-head { background: linear-gradient(180deg, rgba(29,44,35,0.98), rgba(19,33,25,0.96)); border: 1px solid rgba(245,245,220,0.09); }
.detail-head h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; }
.detail-sub { color: var(--muted); line-height: 1.8; }
.kv-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.kv { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid rgba(245,245,220,0.1); color: var(--muted); }
.player-box {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(245,245,220,0.08);
}
.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.player-overlay button {
  pointer-events: auto;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  background: rgba(217, 192, 106, 0.95);
  color: #102118;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(0,0,0,.28);
}
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.tab { cursor: pointer; }
.tab.active { background: linear-gradient(135deg, var(--accent), #f0e2a7); color: #102117; }
.prose { color: var(--text); line-height: 1.9; }
.prose p { margin: 0 0 12px; }
.breadcrumb { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.breadcrumb a { color: var(--text); }
.inline-search { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.inline-search input { flex: 1 1 260px; }
.panel { border-radius: 22px; padding: 18px; }
.panel h2, .panel h3 { margin-top: 0; }
.rank-list { display: grid; gap: 12px; }
.rank-item {
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
}
.rank-no {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(217, 192, 106, 0.95), rgba(240, 226, 167, 0.95));
  color: #102117; font-weight: 900;
}
.rank-main h4 { margin: 0 0 6px; }
.rank-main p { margin: 0; color: var(--muted); line-height: 1.55; }
.footer {
  margin-top: 30px;
  padding: 24px 0 36px;
  border-top: 1px solid rgba(245, 245, 220, 0.08);
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 16px;
}
.footer a:hover { color: var(--text); }
.hidden { display: none !important; }
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .category-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid, .detail-shell, .footer-grid { grid-template-columns: 1fr; }
  .detail-poster { position: static; }
}
@media (max-width: 780px) {
  .nav { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { padding: 20px; }
  .section-head { flex-direction: column; align-items: start; }
  .rank-item { grid-template-columns: 44px 1fr; }
  .rank-item .rank-link { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .container { width: min(100% - 22px, 1240px); }
  .grid, .category-tiles { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.1rem; }
}
