:root {
  --bg: #0c0b10;
  --surface: #16151d;
  --surface-2: #1f1d29;
  --line: #2c2a38;
  --text: #f4f1ea;
  --muted: #9b97a8;
  --accent: #f5b301;
  --accent-2: #ffcf4d;
  --accent-ink: #1b1400;
  --radius: 14px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-tg { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.ico-eye { width: 14px; height: 14px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* Shapka */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 11, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; }
.logo-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; padding-left: 2px;
}
.search { flex: 1; max-width: 460px; margin-left: auto; position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); }
.search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); font: inherit; outline: none; transition: border-color .15s;
}
.search input:focus { border-color: var(--accent); }
.top-bot {
  display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px;
  border-radius: 999px; background: #229ed9; color: #fff; font-weight: 700; white-space: nowrap;
}
.top-bot:hover { background: #1b8cc2; }

/* Bosh banner */
.hero, .detail { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg {
  position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(40px) saturate(1.3); opacity: 0.35; transform: scale(1.1);
}
.hero::after, .detail::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,11,16,.3) 0%, var(--bg) 100%);
}
.hero-in { position: relative; z-index: 1; display: flex; align-items: center; gap: 48px; padding: 56px 16px; }
.hero-text { flex: 1; min-width: 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent-2); margin-bottom: 14px; }
.hero h1 { font-size: clamp(30px, 5vw, 54px); font-weight: 800; }
.hero-meta { color: var(--muted); margin: 12px 0 0; font-weight: 600; }
.hero-desc { max-width: 560px; color: #d6d2dd; margin: 16px 0 0; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.hero-views { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.hero-poster { width: 240px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); transform: rotate(2deg); transition: transform .3s; }
.hero-poster:hover { transform: rotate(0); }
.hero-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }

/* Tugmalar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 24px; border-radius: 999px; font-weight: 800; font-size: 15px;
  border: 0; cursor: pointer; font-family: inherit; transition: transform .12s, background .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-main:hover { background: var(--accent-2); }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn-xl { height: 56px; padding: 0 36px; font-size: 17px; }
.btn-xl .ico-tg { width: 22px; height: 22px; }
.is-off { opacity: .55; cursor: default; }

/* Ro'yxat */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 36px 0 16px; flex-wrap: wrap; }
.sec-title { font-size: 22px; font-weight: 800; margin: 36px 0 18px; }
.toolbar .sec-title { margin: 0; }
.sort { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.sort a { padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); }
.sort a.on { background: var(--surface-2); color: var(--text); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13px; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px 16px; }
.card { display: block; min-width: 0; }
.card-img { position: relative; aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.noimg {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 16px; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, #2d2838 0%, var(--surface) 70%);
  color: var(--muted); font-weight: 800; font-size: 17px;
}
.badge-views, .badge-code {
  position: absolute; display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  background: rgba(10,9,14,.72); backdrop-filter: blur(6px);
}
.badge-views { left: 8px; bottom: 8px; }
.badge-code { right: 8px; top: 8px; color: var(--accent-2); }
.card-body { padding: 10px 2px 0; }
.card-body h3 { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card:hover h3 { color: var(--accent-2); }
.card-body p { margin: 3px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pager { display: flex; justify-content: center; gap: 6px; margin: 40px 0 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; }
.pager a:hover { border-color: var(--muted); }
.pager .on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.empty { text-align: center; padding: 80px 0; color: var(--muted); }
.empty-ico { font-size: 44px; margin-bottom: 8px; }
.empty .btn { margin-top: 12px; }

/* Kino sahifasi */
.detail-in { position: relative; z-index: 1; display: flex; gap: 44px; padding: 40px 16px 56px; align-items: flex-start; }
.detail-poster { width: 300px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); aspect-ratio: 2/3; background: var(--surface); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 0; }
.back { display: inline-block; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--text); }
.detail h1 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.tag { padding: 5px 12px; border-radius: 8px; background: rgba(255,255,255,.07); font-size: 13px; font-weight: 700; }
a.tag:hover { background: rgba(255,255,255,.14); }
.stats { display: flex; gap: 32px; margin: 24px 0 26px; }
.stats strong { display: block; font-size: 24px; font-weight: 800; }
.stats span { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; max-width: 460px; margin: 12px 0 0; }
.desc { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); color: #dcd8e2; max-width: 720px; font-size: 16px; line-height: 1.7; }

.foot { margin-top: 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot-in { display: flex; justify-content: space-between; gap: 12px; padding: 22px 16px; flex-wrap: wrap; }
.foot a { color: var(--text); }

@media (max-width: 760px) {
  .top-in { gap: 10px; }
  .logo { font-size: 0; gap: 0; }
  .top-bot span { display: none; }
  .top-bot { padding: 0 13px; }
  .hero-in { padding: 36px 16px; gap: 20px; }
  .hero-poster { width: 120px; align-self: flex-start; }
  .hero-desc { display: none; }
  .detail-in { flex-direction: column; gap: 24px; padding-top: 24px; }
  .detail-poster { width: 180px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .btn-xl { width: 100%; }
  .hero h1, .detail h1 { overflow-wrap: anywhere; }
}
@media (max-width: 560px) {
  .hero-poster { display: none; }
  .hero-in { padding: 32px 16px 36px; }
}
