/* ==========================================================================
   KdramaTV.uz — dizayn tizimi
   ========================================================================== */

:root {
  --bg: #08080c;
  --bg-2: #0e0e14;
  --surface: #14141c;
  --surface-2: #1b1b25;
  --surface-3: #24242f;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #f5f5f8;
  --text-2: #c2c2d0;
  --muted: #84849a;
  --accent: #ff3d71;
  --accent-2: #ff6a90;
  --accent-ink: #fff;
  --accent-soft: rgba(255, 61, 113, 0.14);
  --gold: #ffc23d;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  --header-h: 68px;
  --container: 1440px;
  --gutter: clamp(16px, 4vw, 48px);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.no-scroll { overflow: hidden; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #34344a; }

.i { width: 1.15em; height: 1.15em; flex: none; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--accent); border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ───────── Tugmalar ───────── */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px; border-radius: 999px;
  font-weight: 700; font-size: 14px; letter-spacing: -0.01em; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; pointer-events: none; }
.btn .i { width: 18px; height: 18px; }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 13.5px; }
.btn-xs { --h: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-lg { --h: 52px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: var(--h); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #ff5a5f 100%);
  color: var(--accent-ink);
  box-shadow: 0 10px 28px -10px rgba(255, 61, 113, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover { box-shadow: 0 14px 34px -10px rgba(255, 61, 113, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25); filter: brightness(1.06); }
.btn-ghost { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--line-2); }
.btn-glass { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.14); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.18); }
.btn-saved { background: var(--accent-soft); border-color: rgba(255, 61, 113, 0.4); color: var(--accent-2); }
.btn-danger { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: #ff7b7b; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }
[data-save-btn] .when-on { display: none; }
[data-save-btn][aria-pressed="true"] .when-on { display: inline-flex; gap: 8px; align-items: center; }
[data-save-btn][aria-pressed="true"] .when-off { display: none; }
[data-save-btn] .when-off { display: inline-flex; gap: 8px; align-items: center; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  color: var(--text-2); transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .i { width: 21px; height: 21px; }
.icon-btn-sm { width: 34px; height: 34px; border-radius: 9px; }
.icon-btn-sm .i { width: 17px; height: 17px; }
.icon-btn.danger:hover { background: rgba(239, 68, 68, 0.14); color: #ff7b7b; }
.link-btn { color: var(--accent-2); font-weight: 700; font-size: 14px; margin-top: 6px; }
.link-btn:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap;
}
.chip .i { width: 14px; height: 14px; }
.chip small { color: var(--muted); font-weight: 600; }
.chip[style*="--c"] .i { color: var(--c); }
.chip-gold { color: var(--gold); background: rgba(255, 194, 61, 0.1); border-color: rgba(255, 194, 61, 0.25); }
.chip-accent { color: #fff; background: var(--accent); border-color: transparent; }
.chip-quality { height: 26px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 800; color: #fff; border-color: transparent; background: var(--surface-3); }
.chip-quality.q-2160 { background: linear-gradient(135deg, #ffc23d, #ff8a3d); color: #1a1200; }
.chip-quality.q-1440 { background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.chip-quality.q-1080 { background: var(--accent); }
.chip-quality.q-720 { background: #2a5bd7; }
.chip-link:hover { border-color: var(--line-2); color: var(--text); }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; }
.badge-hd { background: var(--accent); color: #fff; }
.badge-q2160, .badge-q1440 { background: linear-gradient(135deg, #ffc23d, #ff8a3d); color: #1a1200; }
.badge-dark { background: rgba(8, 8, 12, 0.78); color: #fff; backdrop-filter: blur(6px); }

/* ───────── Sarlavha (header) ───────── */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: linear-gradient(to bottom, rgba(8, 8, 12, 0.92), rgba(8, 8, 12, 0));
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled, .page-watch .site-header, body:not(:has(.hero)) .site-header {
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 100%; }

.logo { display: inline-flex; align-items: center; gap: 9px; flex: none; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #ff8a5c); box-shadow: 0 8px 20px -8px rgba(255, 61, 113, 0.9);
}
.logo-mark .i { width: 16px; height: 16px; color: #fff; margin-left: 2px; }
.logo-text b { color: var(--accent); font-weight: 800; }
.logo-tag { font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); color: var(--text-2); letter-spacing: 0.06em; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  position: relative; padding: 8px 13px; border-radius: 10px;
  font-size: 14.5px; font-weight: 700; color: var(--text-2); transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.main-nav a.active { color: var(--text); }
.main-nav a.active::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--accent); }

.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search input {
  width: 100%; height: 42px; padding: 0 40px 0 42px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); outline: none;
  font-size: 14px; transition: background 0.2s, border-color 0.2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { background: var(--surface-2); border-color: rgba(255, 61, 113, 0.5); }
.search input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-kbd { position: absolute; right: 12px; top: 50%; translate: 0 -50%; font: 700 11px var(--font); color: var(--muted); padding: 2px 7px; border: 1px solid var(--line-2); border-radius: 6px; }
.search input:focus ~ .search-kbd { display: none; }
.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; max-height: min(70vh, 560px); overflow-y: auto;
  animation: pop 0.18s var(--ease);
}
.sd-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.sd-item:hover, .sd-item.is-active { background: var(--surface-2); }
.sd-poster { width: 40px; height: 58px; flex: none; border-radius: 7px; overflow: hidden; background: var(--surface-3); }
.sd-poster img { width: 100%; height: 100%; object-fit: cover; }
.sd-text { display: flex; flex-direction: column; min-width: 0; }
.sd-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-text small { color: var(--muted); font-size: 12.5px; }
.sd-all { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; padding: 11px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--accent-2); }
.sd-all:hover, .sd-all.is-active { background: var(--accent-soft); }
.sd-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 14px; }

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.user-menu { position: relative; }
.avatar-btn { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); }
.avatar-btn:hover { background: rgba(255, 255, 255, 0.09); }
.avatar-name { font-weight: 700; font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { width: 14px; height: 14px; color: var(--muted); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, #ff3d71, #8b5cf6); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: 0.02em;
}
.avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.avatar-xl { width: 88px; height: 88px; font-size: 30px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(255, 61, 113, 0.5); }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); width: 250px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; animation: pop 0.18s var(--ease);
}
.dropdown-head { display: flex; flex-direction: column; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown-head small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); color: var(--text); }
.dropdown .i { width: 18px; height: 18px; color: var(--muted); }
.dropdown form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }

.only-mobile, .only-xs { display: none !important; }

/* Mobil menyu (drawer) */
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.25s; backdrop-filter: blur(4px); }
.drawer-panel {
  position: absolute; inset: 0 auto 0 0; width: min(320px, 86vw); display: flex; flex-direction: column;
  background: var(--bg-2); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform 0.28s var(--ease);
  padding: 16px; padding-top: max(16px, env(safe-area-inset-top));
}
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; }
.drawer-nav a { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 12px; font-weight: 700; color: var(--text-2); }
.drawer-nav a .i { width: 21px; height: 21px; color: var(--c, var(--muted)); }
.drawer-nav a.active, .drawer-nav a:hover { background: var(--surface-2); color: var(--text); }
.drawer-foot { margin-top: auto; display: grid; gap: 10px; }

/* Mobil pastki menyu */
.tabbar {
  display: none; position: fixed; inset: auto 0 0; z-index: 45;
  background: rgba(12, 12, 18, 0.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 8px; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.tabbar a .i { width: 22px; height: 22px; }
.tabbar a.active { color: var(--accent); }

/* ───────── Asosiy qism ───────── */
.site-main { min-height: 70vh; padding-bottom: 40px; }
body:not(:has(.hero)) .site-main { padding-top: var(--header-h); }

/* ───────── Hero slayder ───────── */
.hero { position: relative; height: clamp(540px, 84vh, 800px); overflow: hidden; isolation: isolate; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s var(--ease), visibility 0.9s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-bg { position: absolute; inset: -40px; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: blur(26px) saturate(1.3) brightness(0.55); transform: scale(1.08); }
.hero-slide::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 90% at 80% 30%, transparent 0%, rgba(8, 8, 12, 0.35) 60%),
    linear-gradient(90deg, rgba(8, 8, 12, 0.96) 0%, rgba(8, 8, 12, 0.75) 38%, rgba(8, 8, 12, 0.15) 75%),
    linear-gradient(0deg, var(--bg) 0%, rgba(8, 8, 12, 0) 38%);
}
.hero-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 48px; padding-top: var(--header-h); padding-bottom: 60px; }
.hero-content { max-width: 620px; }
.hero-slide.is-active .hero-content > * { animation: rise 0.8s var(--ease) both; }
.hero-slide.is-active .hero-content > :nth-child(2) { animation-delay: 0.06s; }
.hero-slide.is-active .hero-content > :nth-child(3) { animation-delay: 0.12s; }
.hero-slide.is-active .hero-content > :nth-child(4) { animation-delay: 0.18s; }
.hero-slide.is-active .hero-content > :nth-child(5) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--c); margin-bottom: 16px; }
.hero-kicker .i { width: 16px; height: 16px; }
.hero-title { font-size: clamp(2.2rem, 5.4vw, 4.4rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 18px; text-wrap: balance; text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hero-meta .chip { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(8px); }
.hero-desc { color: var(--text-2); font-size: 16.5px; line-height: 1.65; max-width: 540px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-poster {
  flex: none; width: clamp(220px, 22vw, 320px); aspect-ratio: 2 / 3; border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: perspective(1200px) rotateY(-8deg) rotateX(2deg); transition: transform 0.6s var(--ease);
  background: var(--surface-2);
}
.hero-poster:hover { transform: perspective(1200px) rotateY(0) scale(1.02); }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide.is-active .hero-poster { animation: posterIn 1s var(--ease) both 0.1s; }
@keyframes posterIn { from { opacity: 0; transform: perspective(1200px) rotateY(-18deg) translateX(40px); } }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; gap: 8px; }
.hero-dot { width: 34px; height: 22px; display: grid; align-items: center; }
.hero-dot span { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); overflow: hidden; position: relative; }
.hero-dot.is-active { width: 60px; }
.hero-dot.is-active span::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform-origin: left; animation: dotfill 7s linear forwards; }
.hero:hover .hero-dot.is-active span::after { animation-play-state: paused; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-dot { transition: width 0.3s var(--ease); }

/* ───────── Kategoriya plitkalari ───────── */
.quick-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: -26px; position: relative; z-index: 2; margin-bottom: 18px; }
.cat-tile {
  display: flex; align-items: center; gap: 14px; padding: 16px 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--surface)) 0%, var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.cat-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--c) 70%, transparent); }
.cat-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.cat-icon .i { width: 22px; height: 22px; }
.cat-text { display: flex; flex-direction: column; min-width: 0; }
.cat-text strong { font-size: 15px; }
.cat-text small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.cat-arrow { margin-left: auto; width: 18px; height: 18px; color: var(--muted); transition: transform 0.25s var(--ease), color 0.25s; }
.cat-tile:hover .cat-arrow { transform: translateX(3px); color: var(--c); }

/* ───────── Bo'lim sarlavhalari va qatorlar ───────── */
.row-section { margin-top: 38px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 11px; font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 800; letter-spacing: -0.02em; }
.section-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.section-icon .i { width: 18px; height: 18px; }
.section-actions { display: flex; align-items: center; gap: 6px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--text-2); padding: 6px 10px; border-radius: 9px; margin-right: 4px; }
.link-more .i { width: 16px; height: 16px; transition: transform 0.2s; }
.link-more:hover { color: var(--text); }
.link-more:hover .i { transform: translateX(3px); }
.row-arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); transition: background 0.2s, opacity 0.2s; }
.row-arrow:hover { background: var(--surface-3); }
.row-arrow:disabled { opacity: 0.3; cursor: default; }
.row-arrow .i { width: 18px; height: 18px; }

.row-track {
  --card-w: clamp(140px, 15vw, 196px);
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-w); gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 4px max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))) 14px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > .card { scroll-snap-align: start; }
.row-top .row-track { --card-w: clamp(170px, 18vw, 236px); }

/* ───────── Kartochka ───────── */
.card { display: block; position: relative; min-width: 0; }
.card-poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius-md); overflow: hidden;
  background: linear-gradient(160deg, var(--surface-3), var(--surface));
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.35s; }
.card-poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 40%); opacity: 0.85; transition: opacity 0.3s; pointer-events: none; }
.card-poster.noimg::before {
  content: attr(data-initials); position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 34px; font-weight: 800; color: rgba(255, 255, 255, 0.22); letter-spacing: 0.04em;
  background: radial-gradient(circle at 30% 20%, rgba(255, 61, 113, 0.25), transparent 60%), linear-gradient(160deg, #23232f, #15151d);
}
.card:hover .card-poster { transform: translateY(-6px); box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 61, 113, 0.55); }
.card:hover .card-poster img { transform: scale(1.06); filter: brightness(0.75); }
.card-badges { position: absolute; top: 9px; left: 9px; z-index: 2; display: flex; gap: 5px; flex-wrap: wrap; }
.card-rating {
  position: absolute; z-index: 2; left: 9px; bottom: 9px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 800; color: #fff; padding: 3px 8px; border-radius: 7px; background: rgba(8, 8, 12, 0.7); backdrop-filter: blur(6px);
}
.card-rating .i { width: 12px; height: 12px; color: var(--gold); }
.card-play {
  position: absolute; z-index: 2; left: 50%; top: 50%; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); color: #fff; box-shadow: 0 10px 30px -6px rgba(255, 61, 113, 0.9);
  translate: -50% -50%; scale: 0.6; opacity: 0; transition: scale 0.3s var(--ease), opacity 0.3s;
}
.card-play .i { width: 22px; height: 22px; margin-left: 3px; }
.card:hover .card-play { scale: 1; opacity: 1; }
.card-body { padding: 10px 2px 0; }
.card-title { font-size: 14.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.2s; }
.card:hover .card-title { color: var(--accent-2); }
.card-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.2); }
.card-progress span { display: block; height: 100%; background: var(--accent); }

/* Top-10 tartib raqami */
.card-ranked { padding-left: 34%; }
.card-rank {
  position: absolute; left: -4px; bottom: 54px; z-index: 0;
  font-size: clamp(90px, 10vw, 150px); line-height: 0.8; font-weight: 800; letter-spacing: -0.08em;
  color: var(--bg); -webkit-text-stroke: 2px rgba(255, 255, 255, 0.3);
}
.card-ranked .card-poster { z-index: 1; }

/* ───────── To'r (grid) ───────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 18px; }

/* ───────── Sahifa sarlavhasi ───────── */
.page-hero {
  position: relative; padding: 34px 0 24px; margin-bottom: 8px;
  background: radial-gradient(ellipse 60% 120% at 0% 0%, color-mix(in srgb, var(--c, var(--accent)) 14%, transparent), transparent 70%);
}
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .i { width: 13px; height: 13px; opacity: 0.6; }
.breadcrumbs span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.page-hero-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.page-title { display: flex; align-items: center; gap: 14px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.page-title-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: color-mix(in srgb, var(--c, var(--accent)) 18%, transparent); color: var(--c, var(--accent)); }
.page-title-icon .i { width: 24px; height: 24px; }
.page-sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.sort-form { display: flex; gap: 10px; flex-wrap: wrap; }
.select { position: relative; display: inline-flex; }
.select select {
  appearance: none; height: 42px; padding: 0 40px 0 16px; border-radius: 12px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; outline: none;
}
.select select:focus { border-color: rgba(255, 61, 113, 0.5); }
.select select option { background: var(--surface); }
.select > .i { position: absolute; right: 13px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.select-block, .select-block select { width: 100%; }

.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-top: 22px; padding-bottom: 2px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; flex: none; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--text-2);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.filter-chip small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.filter-chip .i { width: 14px; height: 14px; opacity: 0.7; }
.filter-chip:hover { border-color: var(--line-2); color: var(--text); }
.filter-chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter-chip.active small { color: rgba(0, 0, 0, 0.5); }

/* Sahifalash */
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin: 48px 0 10px; }
.page-btn {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--text-2);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.page-btn:hover { border-color: var(--line-2); color: var(--text); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(255, 61, 113, 0.8); }
.page-btn .i { width: 18px; height: 18px; }
.page-gap { color: var(--muted); padding: 0 4px; }

/* Bo'sh holat */
.empty { text-align: center; padding: 70px 20px; max-width: 520px; margin: 0 auto; }
.empty-icon { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: var(--surface-2); color: var(--muted); margin-bottom: 20px; border: 1px solid var(--line); }
.empty-icon .i { width: 34px; height: 34px; }
.empty h2 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 22px; }

/* Qidiruv sahifasi */
.search-big { display: flex; align-items: center; gap: 10px; margin-top: 20px; max-width: 720px; padding: 6px 6px 6px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); }
.search-big:focus-within { border-color: rgba(255, 61, 113, 0.55); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-big > .i { width: 20px; height: 20px; color: var(--muted); }
.search-big input { flex: 1; min-width: 0; height: 44px; background: none; border: 0; outline: none; font-size: 16px; }
.results-count { color: var(--muted); margin: 6px 0 20px; }
.results-count strong { color: var(--text); }

/* ───────── Tomosha sahifasi ───────── */
.watch-backdrop { position: absolute; inset: 0 0 auto; height: 720px; z-index: -1; overflow: hidden; pointer-events: none; }
.watch-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.4) brightness(0.35); transform: scale(1.2); opacity: 0.85; }
.watch-backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(8, 8, 12, 0.3), var(--bg) 92%); }
.page-watch .site-main { position: relative; isolation: isolate; }
.watch { padding-top: 22px; }
.watch-layout { display: grid; gap: 26px; }
.watch-layout.has-episodes { grid-template-columns: minmax(0, 1fr) 340px; }
.watch-main { min-width: 0; }

.watch-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 18px; margin: 22px 0 26px; }
.watch-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.watch-original { color: var(--muted); margin-top: 3px; font-size: 15px; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.watch-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.block-title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.block-title .i { width: 20px; height: 20px; color: var(--accent); }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-3); font-size: 12px; font-weight: 800; color: var(--text-2); }

.about { display: flex; gap: 24px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 26px; }
.about-poster { width: 150px; flex: none; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; align-self: flex-start; box-shadow: var(--shadow); }
.about-body { min-width: 0; flex: 1; }
.about-text { color: var(--text-2); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.about-text.is-open { -webkit-line-clamp: unset; display: block; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 20px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.facts dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 3px; }
.facts dd { font-weight: 700; font-size: 14.5px; }

/* Aktyorlar */
.cast { margin-bottom: 26px; }
.cast-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cast-track { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 14px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; padding: 2px 2px 6px; }
.cast-track::-webkit-scrollbar { display: none; }
.actor { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; scroll-snap-align: start; }
.actor-photo {
  position: relative; width: 100px; height: 100px; border-radius: 50%; overflow: hidden; flex: none;
  background: linear-gradient(160deg, var(--surface-3), var(--surface)); box-shadow: 0 0 0 2px var(--line-2);
  transition: box-shadow 0.25s, transform 0.25s var(--ease);
}
.actor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.actor-photo.noimg { background: linear-gradient(145deg, hsl(var(--h, 340) 55% 42%), hsl(calc(var(--h, 340) + 40) 50% 22%)); }
.actor-photo.noimg::before { content: attr(data-initials); position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; font-weight: 800; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.92); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.actor:hover .actor-photo { box-shadow: 0 0 0 3px var(--accent); transform: translateY(-3px); }
.actor-name { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.actor:hover .actor-name { color: var(--text); }
.actor-role { margin-top: -6px; font-size: 11.5px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* Aktyor sahifasi */
.actor-hero { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.actor-hero .actor-photo { width: 150px; height: 150px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(255, 61, 113, 0.55), var(--shadow-lg); }
.actor-hero .actor-photo.noimg::before { font-size: 44px; }

/* Qismlar */
.episodes { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.episodes-desktop { position: sticky; top: calc(var(--header-h) + 16px); }
.episodes-mobile { display: none; margin-bottom: 26px; }
.episodes-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.episodes-head .block-title { margin-bottom: 10px; }
.episodes-search { width: 96px; height: 34px; padding: 0 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); outline: none; font-size: 13px; margin-bottom: 10px; }
.episodes-search:focus { border-color: rgba(255, 61, 113, 0.5); }
.episodes-scroll { max-height: min(64vh, 620px); overflow-y: auto; padding: 2px; margin: -2px; scroll-behavior: smooth; }
.episodes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.ep-season { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 8px; margin: 14px 0 8px; padding: 6px 2px; background: var(--surface); font-size: 13px; font-weight: 800; letter-spacing: 0.02em; color: var(--text); }
.ep-season:first-child { margin-top: 0; }
.ep-season span { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ep {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 56px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.ep:hover { background: var(--surface-3); border-color: var(--line-2); }
.ep:active { transform: scale(0.95); }
.ep-n { font-size: 16px; font-weight: 800; line-height: 1; }
.ep-n small { font-size: 11px; font-weight: 700; opacity: 0.75; }
.ep-label { font-size: 10.5px; color: var(--muted); font-weight: 700; margin-top: 3px; }
.ep-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); opacity: 0.8; }
.ep.watched { background: color-mix(in srgb, var(--surface-2) 70%, var(--accent) 8%); }
.ep.watched .ep-label::after { content: ' ✓'; color: var(--green); }
.ep.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 8px 20px -8px rgba(255, 61, 113, 0.8); }
.ep.active .ep-label { color: rgba(255, 255, 255, 0.85); }
.ep.active .ep-progress { background: #fff; }

/* Izohlar */
.comments { margin-bottom: 20px; }
.comment-form { display: flex; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 18px; }
.comment-form-body { flex: 1; min-width: 0; }
.comment-form textarea, .field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  outline: none; resize: vertical; font-size: 14.5px; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.comment-form textarea:focus, .field input:focus, .field textarea:focus { border-color: rgba(255, 61, 113, 0.55); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface-3); }
.field input:disabled { opacity: 0.6; }
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars-input input { position: absolute; opacity: 0; pointer-events: none; }
.stars-input label { cursor: pointer; color: var(--surface-3); padding: 2px; transition: color 0.15s, transform 0.15s; }
.stars-input label .i { width: 24px; height: 24px; }
.stars-input label:hover, .stars-input label:hover ~ label, .stars-input input:checked ~ label { color: var(--gold); }
.stars-input label:hover { transform: scale(1.15); }
.stars-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 6px; }
.comment-login { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line-2); margin-bottom: 18px; color: var(--text-2); flex-wrap: wrap; }
.comment-list { list-style: none; display: grid; gap: 4px; }
.comment { display: flex; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 4px; }
.comment-head strong { font-size: 14.5px; }
.comment-head time { font-size: 12.5px; color: var(--muted); }
.comment-stars { display: inline-flex; gap: 1px; color: var(--surface-3); }
.comment-stars .on { color: var(--gold); }
.comment-stars .i { width: 13px; height: 13px; }
.comment-body p { color: var(--text-2); overflow-wrap: anywhere; }
.comment-empty { padding: 14px 4px; }

/* ───────── Pleyer ───────── */
.player {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; background: #000;
  border-radius: var(--radius); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); user-select: none; -webkit-user-select: none;
}
.player video { position: relative; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.player::before { content: ''; position: absolute; inset: -30px; background: var(--poster, none) center / cover no-repeat; filter: blur(28px) brightness(0.45) saturate(1.2); transition: opacity 0.4s; }
.player.is-started::before { opacity: 0; }
.player.is-started video { background: #000; }
.player.is-full { border-radius: 0; }
.player:not(.show-controls).is-playing { cursor: none; }
.player-noscript { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--text-2); }
.pl-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 32%), linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 22%); opacity: 0; transition: opacity 0.3s; }
.pl-title { position: absolute; top: 0; left: 0; right: 0; padding: 18px 22px; display: flex; flex-direction: column; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.pl-title strong { font-size: 16px; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.pl-title span { font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.pl-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 14px 10px; opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s var(--ease); }
.player.show-controls .pl-bar, .player:not(.is-playing) .pl-bar,
.player.show-controls .pl-shade, .player:not(.is-playing) .pl-shade,
.player.show-controls .pl-title, .player:not(.is-started) .pl-title { opacity: 1; transform: none; }
.player:not(.is-started) .pl-bar { opacity: 0; pointer-events: none; }

.pl-big {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center;
  width: 84px; height: 84px; border-radius: 50%; background: var(--accent); color: #fff;
  box-shadow: 0 0 0 10px rgba(255, 61, 113, 0.22), 0 20px 50px -10px rgba(255, 61, 113, 0.9);
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
.pl-big:hover { transform: scale(1.08); }
.pl-big .i { width: 34px; height: 34px; margin-left: 5px; }
.player.is-started .pl-big { opacity: 0; pointer-events: none; transform: scale(0.8); }
.player.has-error .pl-big { display: none; }

.pl-spinner { position: absolute; left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; }
.pl-spinner span { display: block; width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.18); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.player:not(.is-started) .pl-spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.pl-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(6px); }
.pl-error > .i { width: 42px; height: 42px; color: var(--accent); margin-bottom: 4px; }
.pl-error strong { font-size: 17px; }
.pl-error span { color: var(--text-2); font-size: 14px; max-width: 360px; margin-bottom: 10px; }

.pl-toast { position: absolute; left: 50%; bottom: 82px; translate: -50% 0; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 16px; border-radius: 999px; background: rgba(20, 20, 28, 0.92); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; animation: pop 0.25s var(--ease); z-index: 3; }
.pl-toast button { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-weight: 700; font-size: 12.5px; }
.pl-toast button:hover { background: rgba(255, 255, 255, 0.2); }

.pl-next { position: absolute; right: 18px; bottom: 90px; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: rgba(16, 16, 22, 0.94); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop 0.3s var(--ease); z-index: 3; }
.pl-next > span { font-size: 13px; color: var(--text-2); }
.pl-next b { color: #fff; }
.pl-next-actions { display: flex; gap: 8px; }
.pl-next em { font-style: normal; opacity: 0.8; }

.pl-seek-hint { position: absolute; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 22px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); font-size: 12px; font-weight: 700; pointer-events: none; animation: pop 0.2s; }
.pl-seek-hint .i { width: 30px; height: 30px; }
.pl-seek-left { left: 12%; }
.pl-seek-right { right: 12%; }

.pl-progress { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.pl-rail { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); overflow: hidden; transition: height 0.15s; }
.pl-progress:hover .pl-rail, .player.is-seeking .pl-rail { height: 6px; }
.pl-buffer, .pl-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.pl-buffer { background: rgba(255, 255, 255, 0.3); }
.pl-played { background: var(--accent); }
.pl-thumb { position: absolute; top: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; translate: 0 -50%; scale: 0; transition: scale 0.15s; box-shadow: 0 0 0 4px rgba(255, 61, 113, 0.35); }
.pl-progress:hover .pl-thumb, .player.is-seeking .pl-thumb { scale: 1; }
.pl-tip { position: absolute; bottom: 24px; translate: -50% 0; padding: 4px 8px; border-radius: 6px; background: rgba(16, 16, 22, 0.94); font-size: 12px; font-weight: 700; pointer-events: none; white-space: nowrap; }
.pl-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pl-group { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pl-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: #fff; transition: background 0.2s; flex: none; }
.pl-btn:hover { background: rgba(255, 255, 255, 0.12); }
.pl-btn .i { width: 23px; height: 23px; }
.pl-time { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.9); margin-left: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-volume { display: flex; align-items: center; }
.pl-vol {
  --v: 90%; width: 0; opacity: 0; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 4px; cursor: pointer;
  background: linear-gradient(90deg, #fff var(--v), rgba(255, 255, 255, 0.25) var(--v)); transition: width 0.25s var(--ease), opacity 0.25s, margin 0.25s;
}
.pl-volume:hover .pl-vol, .pl-vol:focus { width: 84px; opacity: 1; margin: 0 8px 0 4px; }
.pl-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.pl-vol::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }
.pl-menu-wrap { position: relative; }
.pl-btn[data-pl="settings"] { position: relative; }
.pl-qbadge { position: absolute; top: 3px; right: -2px; padding: 1px 4px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 800; line-height: 1.3; letter-spacing: 0.02em; pointer-events: none; }
.pl-qbadge.is-top { background: linear-gradient(135deg, #ffc23d, #ff8a3d); color: #1a1200; }
.pl-menu { position: absolute; right: 0; bottom: 50px; width: 250px; padding: 10px; border-radius: 14px; background: rgba(16, 16, 22, 0.96); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); backdrop-filter: blur(12px); animation: pop 0.2s var(--ease); z-index: 4; }
.pl-menu-sec + .pl-menu-sec { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pl-menu-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 2px 4px 8px; }
.pl-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-opt { padding: 6px 11px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); font-size: 13px; font-weight: 700; color: var(--text-2); }
.pl-opt:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.pl-opt.active { background: var(--accent); color: #fff; }
.pl-opt:disabled { cursor: default; }
.pl-menu-note { margin: 8px 4px 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

.player-empty { display: grid; place-items: center; }
.player-empty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(20px) brightness(0.4); transform: scale(1.1); }
.player-empty-msg { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 20px; }
.player-empty-msg .i { width: 44px; height: 44px; color: var(--accent); margin-bottom: 6px; }
.player-empty-msg strong { font-size: 18px; }
.player-empty-msg span { color: var(--text-2); }

/* ───────── Profil ───────── */
.profile-hero { padding: 40px 0 26px; background: radial-gradient(ellipse 50% 140% at 10% 0%, rgba(255, 61, 113, 0.16), transparent 70%), radial-gradient(ellipse 40% 120% at 90% 0%, rgba(139, 92, 246, 0.12), transparent 70%); }
.profile-hero-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.profile-stats { display: flex; gap: 22px; margin-top: 12px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.profile-stats strong { color: var(--text); font-size: 17px; margin-right: 3px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 700; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab .i { width: 18px; height: 18px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.history-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.form-panel { max-width: 620px; display: grid; gap: 16px; }
.form-panel .block-title { margin: 8px 0 -4px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span:first-child { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* ───────── Promo ───────── */
.promo { margin-top: 56px; }
.promo-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: clamp(26px, 4vw, 44px); border-radius: 24px; overflow: hidden; position: relative;
  background: radial-gradient(ellipse 60% 140% at 100% 0%, rgba(255, 61, 113, 0.35), transparent 60%), radial-gradient(ellipse 50% 120% at 0% 100%, rgba(139, 92, 246, 0.25), transparent 60%), var(--surface);
  border: 1px solid var(--line-2);
}
.promo-card h2 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); letter-spacing: -0.03em; margin-bottom: 6px; }
.promo-card p { color: var(--text-2); max-width: 560px; }

/* ───────── Footer ───────── */
.site-footer { margin-top: 60px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin: 14px 0 16px; max-width: 320px; }
.social { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(41, 168, 235, 0.12); color: #4cb6ef; font-weight: 700; font-size: 13.5px; }
.social:hover { background: rgba(41, 168, 235, 0.2); }
.site-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 14px; }
.site-footer .footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; gap: 10px; }
.site-footer .footer-grid > div:not(.footer-brand) a { color: var(--text-2); font-size: 14px; font-weight: 600; width: fit-content; }
.site-footer .footer-grid > div:not(.footer-brand) a:hover { color: var(--accent-2); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }

/* ───────── Xabarlar ───────── */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 11px; padding: 13px 18px; border-radius: 14px; max-width: 380px; pointer-events: auto;
  background: rgba(22, 22, 30, 0.96); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 600; animation: toastIn 0.35s var(--ease); transition: opacity 0.35s, transform 0.35s;
}
.toast .i { width: 20px; height: 20px; }
.toast-success .i { color: var(--green); }
.toast-error .i { color: #ff6b6b; }
.toast-info .i { color: #4f8cff; }
.toast.is-leaving { opacity: 0; transform: translateX(20px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.alert .i { width: 19px; height: 19px; margin-top: 1px; }
.alert-error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3); color: #ffb4b4; }
.alert-success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.3); color: #a7f3c4; }
.alert-info { background: rgba(79, 140, 255, 0.12); border: 1px solid rgba(79, 140, 255, 0.3); color: #bcd3ff; }

/* ───────── Kirish / ro'yxatdan o'tish ───────── */
.page-auth { background: var(--bg); }
.auth { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.auth-wall { position: relative; overflow: hidden; }
.auth-wall-grid { position: absolute; inset: -10%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; transform: rotate(-8deg); opacity: 0.55; }
.auth-wall-grid img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.auth-wall-grid img:nth-child(6n+2), .auth-wall-grid img:nth-child(6n+4), .auth-wall-grid img:nth-child(6n+6) { transform: translateY(50%); }
.auth-wall::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 8, 12, 0.3), var(--bg) 96%), linear-gradient(0deg, var(--bg), transparent 50%); }
.auth-wall-text { position: absolute; left: 48px; bottom: 56px; z-index: 2; max-width: 460px; }
.auth-wall-text h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; letter-spacing: -0.035em; margin-bottom: 12px; }
.auth-wall-text p { color: var(--text-2); font-size: 16px; }
.auth-side { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; padding: 34px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
.auth-title { font-size: 1.75rem; letter-spacing: -0.03em; margin-bottom: 6px; }
.auth-sub { color: var(--muted); margin-bottom: 24px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .btn { margin-top: 6px; }
.auth-switch { text-align: center; color: var(--muted); margin-top: 20px; font-size: 14px; }
.auth-switch a { color: var(--accent-2); font-weight: 700; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.auth-back:hover { color: var(--text); }
.auth-back .i { width: 16px; height: 16px; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 48px; }
.password-toggle { position: absolute; right: 6px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: var(--muted); }
.password-toggle:hover, .password-toggle.is-on { color: var(--text); background: var(--surface-3); }
.password-toggle .i { width: 18px; height: 18px; }

/* ───────── Xatolik sahifasi ───────── */
.error-page { text-align: center; padding: 90px 20px 60px; }
.error-code { font-size: clamp(6rem, 18vw, 11rem); font-weight: 800; line-height: 1; letter-spacing: -0.06em; background: linear-gradient(135deg, var(--accent), #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { font-size: 1.7rem; letter-spacing: -0.03em; margin: 8px 0 10px; }
.error-page p { color: var(--muted); max-width: 460px; margin: 0 auto 26px; }
.error-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   Moslashuvchanlik
   ========================================================================== */
@media (max-width: 1240px) {
  .main-nav a { padding: 8px 10px; font-size: 14px; }
  .search { max-width: 300px; }
}

@media (max-width: 1080px) {
  .main-nav { display: none; }
  .only-mobile { display: inline-grid !important; }
  .search { max-width: none; }
  .watch-layout.has-episodes { grid-template-columns: 1fr; }
  .watch-side { display: none; }
  .episodes-mobile { display: block; }
  .episodes-scroll { max-height: 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .auth { grid-template-columns: 1fr; }
  .auth-wall { display: none; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  body { font-size: 14.5px; }
  .header-inner { gap: 8px; }
  .hide-mobile { display: none !important; }
  .only-xs { display: inline-grid !important; }
  .avatar-name, .caret { display: none; }
  .avatar-btn { padding: 2px; border: 0; background: none; }
  .logo { font-size: 18px; margin-right: auto; }
  .logo-tag { display: none; }
  .search { position: absolute; left: 0; right: 0; top: 100%; padding: 10px var(--gutter); background: rgba(10, 10, 15, 0.97); border-bottom: 1px solid var(--line); display: none; }
  body.search-open .search { display: block; }
  .search-icon { left: calc(var(--gutter) + 15px); }
  .search-kbd { display: none; }
  .search-dropdown { left: var(--gutter); right: var(--gutter); }

  .tabbar { display: flex; }
  .site-main { padding-bottom: 90px; }
  .site-footer { padding-bottom: 96px; }
  .toasts { left: 16px; right: 16px; bottom: 84px; }
  .toast { max-width: none; }

  .hero { height: auto; min-height: 560px; }
  .hero-inner { flex-direction: column-reverse; justify-content: flex-end; align-items: flex-start; gap: 22px; padding-top: calc(var(--header-h) + 18px); padding-bottom: 76px; }
  .hero-poster { width: 132px; transform: none; border-radius: 14px; }
  .hero-desc { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 22px; }
  .hero-actions .btn-glass { display: none; }
  .hero-actions .btn { flex: 1; }
  .hero-slide { position: absolute; }
  .hero-slide.is-active { position: relative; }
  .hero-dots { bottom: 26px; }

  .quick-cats { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 6px; }
  .cat-tile { padding: 12px; gap: 10px; }
  .cat-icon { width: 38px; height: 38px; }
  .cat-arrow { display: none; }
  .row-section { margin-top: 30px; }
  .row-arrow { display: none; }
  .row-track { --card-w: 132px; gap: 12px; }
  .row-top .row-track { --card-w: 160px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 20px 12px; }
  .card-title { font-size: 13.5px; }
  .card-play { display: none; }
  .card:hover .card-poster { transform: none; }

  .page-hero-row { align-items: stretch; flex-direction: column; }
  .sort-form .select, .sort-form select { flex: 1; width: 100%; }

  .watch { padding-top: 12px; }
  .watch > .breadcrumbs { display: none; }
  .watch .player { margin-inline: calc(var(--gutter) * -1); width: calc(100% + var(--gutter) * 2); border-radius: 0; box-shadow: none; }
  .watch-head { margin: 16px 0 20px; }
  .watch-actions { width: 100%; flex-wrap: nowrap; }
  .watch-actions form, .watch-actions [data-share] { flex: 1; min-width: 0; }
  .watch-actions form .btn, .watch-actions [data-share] { width: 100%; padding-inline: 12px; }
  .watch-actions .btn-icon { flex: none; }
  .about { flex-direction: column; padding: 18px; }
  .about-poster { display: none; }
  .cast-track { grid-auto-columns: 88px; gap: 10px; }
  .cast .actor-photo { width: 80px; height: 80px; }
  .cast .row-arrow { display: none; }
  .comment-form { padding: 14px; }
  .comment-form .avatar { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .pl-btn { width: 38px; height: 38px; }
  .pl-btn .i { width: 21px; height: 21px; }
  .pl-volume .pl-vol { display: none; }
  .pl-time { font-size: 12px; margin-left: 4px; }
  .pl-big { width: 68px; height: 68px; }
  .pl-big .i { width: 28px; height: 28px; }
  .pl-next { right: 10px; left: 10px; bottom: 74px; }
  .hide-xs { display: none !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .auth-card { padding: 26px 20px; }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
  .grid .card-title { font-size: 12.5px; }
  .grid .card-meta { font-size: 11.5px; }
  .grid .badge-dark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* E'lon (admin → Sayt sozlamalari) */
.announce { position: relative; z-index: 40; background: linear-gradient(90deg, var(--accent), #ff7a59); color: #fff; font-size: 14px; font-weight: 700; }
body:has(.hero) .announce { position: absolute; top: var(--header-h); left: 0; right: 0; }
.announce-inner { display: flex; align-items: center; gap: 10px; min-height: 42px; padding-block: 8px; }
.announce-inner > .i { width: 18px; height: 18px; flex: none; }
.announce a, .announce span { flex: 1; display: inline-flex; align-items: center; gap: 6px; }
.announce a:hover { text-decoration: underline; }
.announce a .i { width: 15px; height: 15px; }
.announce-close { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; }
.announce-close:hover { background: rgba(255, 255, 255, 0.18); }
.announce-close .i { width: 16px; height: 16px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.social-ig { background: rgba(225, 48, 108, 0.12); color: #f0619a; }
.social-ig:hover { background: rgba(225, 48, 108, 0.2); }
.social-yt { background: rgba(255, 0, 0, 0.12); color: #ff5b5b; }
.social-yt:hover { background: rgba(255, 0, 0, 0.2); }

/* ───────── Keng kadrli banner, janrlar, mashhur aktyorlar ───────── */
.hero-bg.is-wide { inset: 0; }
.hero-bg.is-wide img { filter: saturate(1.1) brightness(0.82); transform: none; object-position: center 20%; animation: heroZoom 14s ease-out both; }
.hero-slide:has(.hero-bg.is-wide) .hero-content { max-width: 680px; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

.genre-section { margin: 8px auto 44px; }
.genre-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.genre-tile {
  position: relative; isolation: isolate; overflow: hidden; height: 112px; border-radius: var(--radius-md);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 16px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface)); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.genre-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.6s var(--ease); }
.genre-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 8, 12, 0.92) 0%, rgba(8, 8, 12, 0.35) 70%, rgba(8, 8, 12, 0.15) 100%); }
.genre-tile:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.genre-tile:hover img { transform: scale(1.07); }
.genre-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.genre-count { font-size: 12.5px; color: var(--text-2); }

.actors-track { --card-w: 120px; }
.actors-section .actor-photo { width: 112px; height: 112px; }

@media (max-width: 1100px) { .genre-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .genre-tile { height: 86px; padding: 10px 12px; }
  .genre-name { font-size: 15px; }
  .actors-track { --card-w: 96px; }
  .actors-section .actor-photo { width: 84px; height: 84px; }
  .hero-bg.is-wide img { object-position: 70% 20%; }
  .hero-slide.is-active { min-height: 560px; }   /* qisqa slayd ostidan oldingisi ko'rinib qolmasin */
}
@media (prefers-reduced-motion: reduce) { .hero-bg.is-wide img { animation: none; } }

/* ───────── Reels ───────── */
.page-reels .site-footer, .page-reels .announce { display: none; }
.page-reels .site-main { padding-bottom: 0; min-height: 0; }
.reels { --reels-h: calc(100dvh - var(--header-h)); position: relative; height: var(--reels-h); background: #000; }
.reels-track { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.reels-track::-webkit-scrollbar { display: none; }
.reel {
  position: relative; height: var(--reels-h); scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; place-items: center; overflow: hidden; isolation: isolate;
}
.reel video { height: 100%; width: auto; max-width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; border-radius: 0; }
@media (min-width: 761px) { .reel video { border-radius: 18px; height: calc(100% - 28px); } }
.reel-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 42%), linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 18%); }
@media (min-width: 761px) { .reel-shade { left: 50%; translate: -50% 0; width: min(100%, calc((var(--reels-h) - 28px) * 9 / 16)); top: 14px; bottom: 14px; border-radius: 18px; } }
.reel-paused { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s var(--ease); transform: scale(0.85); }
.reel-paused .i { width: 38px; height: 38px; margin-left: 4px; }
.reel.is-paused .reel-paused { opacity: 1; transform: none; pointer-events: auto; }
.reel.is-loading .reel-paused { opacity: 0; }
.reel.is-loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.8s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.reel-info {
  position: absolute; z-index: 2; left: 0; bottom: 0; width: min(100%, calc((var(--reels-h) - 28px) * 9 / 16)); padding: 0 76px 22px 18px;
  display: grid; gap: 10px; justify-items: start;
}
@media (min-width: 761px) { .reel-info { left: 50%; translate: -50% 0; bottom: 14px; padding-bottom: 24px; } }
.reel-item { display: flex; align-items: center; gap: 11px; max-width: 100%; }
.reel-item img { width: 44px; height: 62px; border-radius: 8px; object-fit: cover; flex: none; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); }
.reel-item strong { display: block; font-size: 16px; line-height: 1.25; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reel-item small { display: block; font-size: 12.5px; color: rgba(255, 255, 255, 0.8); margin-top: 2px; }
.reel-caption { font-size: 14.5px; line-height: 1.45; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reel-cta { height: 44px; padding: 0 20px; font-size: 14.5px; box-shadow: 0 10px 30px -8px rgba(255, 61, 113, 0.7); }

.reel-side { position: absolute; z-index: 2; right: 10px; bottom: 26px; display: grid; gap: 16px; justify-items: center; }
@media (min-width: 761px) { .reel-side { right: auto; left: calc(50% + min(50%, (var(--reels-h) - 28px) * 9 / 32) + 14px); bottom: 40px; } }
.reel-btn { display: grid; justify-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
.reel-btn .i { width: 50px; height: 50px; padding: 13px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(10px); transition: background 0.2s, transform 0.2s var(--ease); }
.reel-btn:hover .i { background: rgba(255, 255, 255, 0.24); }
.reel-btn.is-on .i { background: var(--accent); color: #fff; }
.reel-btn.is-on .i path { fill: currentColor; }
.reel-btn.pop .i { animation: pop 0.4s var(--ease); }
@keyframes pop { 40% { transform: scale(1.25); } }
.reel-progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.15); }
@media (min-width: 761px) { .reel-progress { left: 50%; translate: -50% 0; width: min(100%, calc((var(--reels-h) - 28px) * 9 / 16)); bottom: 14px; border-radius: 0 0 18px 18px; overflow: hidden; } }
.reel-progress span { display: block; height: 100%; width: 0; background: #fff; }
.reels-hint { position: absolute; z-index: 4; left: 50%; top: 32px; translate: -50% 0; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 30px; font-size: 13px; font-weight: 700; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px); pointer-events: none; animation: hint 2s ease-in-out infinite; transition: opacity 0.4s; }
.reels-hint.is-hidden { opacity: 0; }
@keyframes hint { 50% { transform: translateY(6px); } }
.reels-empty { padding-top: 80px; }

@media (max-width: 760px) {
  .page-reels { --tabbar-h: 62px; }
  .reels { --reels-h: calc(100dvh - var(--header-h) - var(--tabbar-h) - env(safe-area-inset-bottom)); }
  .reel video { width: 100%; height: 100%; aspect-ratio: auto; }
  .reel-info { width: 100%; }
  .reels-hint { display: none; }
}

/* Bosh sahifa va film sahifasidagi reels qatori */
.reels-row .row-track { --card-w: clamp(132px, 13vw, 170px); }
.reel-card { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); isolation: isolate; scroll-snap-align: start; }
.reel-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.5s var(--ease); }
.reel-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 55%); }
.reel-card:hover img { transform: scale(1.06); }
.reel-card-play { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, 0.55); }
.reel-card-play .i { width: 12px; height: 12px; }
.reel-card-text { position: absolute; left: 10px; right: 10px; bottom: 10px; }
.reel-card-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.3; }
.reel-card-text small { display: block; margin-top: 3px; font-size: 11.5px; color: rgba(255, 255, 255, 0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-reels-track { grid-auto-columns: 140px; }
.nav-reels { display: inline-flex; align-items: center; gap: 6px; }
.nav-reels .i { width: 15px; height: 15px; color: var(--accent); }
.tabbar a.tab-reels .i { color: var(--accent); }

/* Reels: ulashish menyusi (kompyuter) */
.share-menu {
  position: absolute; z-index: 6; right: 74px; bottom: 90px; width: 240px; padding: 8px; display: grid; gap: 2px;
  background: rgba(20, 20, 28, 0.96); backdrop-filter: blur(16px); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow-lg); animation: rise 0.2s var(--ease) both;
}
@media (min-width: 761px) { .share-menu { right: auto; left: calc(50% + min(50%, (var(--reels-h) - 28px) * 9 / 32) + 78px); bottom: 110px; } }
.share-menu strong { padding: 6px 10px 8px; font-size: 13px; color: var(--muted); }
.share-menu a, .share-menu button { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 9px; font-size: 14px; font-weight: 700; text-align: left; width: 100%; }
.share-menu a:hover, .share-menu button:hover { background: var(--surface-3); }
.share-menu .i { width: 18px; height: 18px; color: var(--accent); }
.share-menu input { margin-top: 6px; width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); outline: none; }
.reel video { max-height: 100%; }
@media (min-width: 761px) { .reel video { width: min(100%, calc((var(--reels-h) - 28px) * 9 / 16)); } }
