/* ══════════════════════════════════════════════════════════════════
   LUMEN — cinematic streaming UI
   ══════════════════════════════════════════════════════════════════ */
:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --bg-3: #14141e;
  --panel: rgba(22, 22, 34, .62);
  --panel-solid: #15151f;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f5f2ee;
  --text-2: #cfcbd8;
  --muted: #9b98a8;
  --dim: #6c6a78;
  --accent: #ff3d5a;
  --accent-2: #ff9f43;
  --live: #ff2d55;
  --ok: #3ddc97;
  --violet: #7b2ff7;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --font: 'Inter', 'Noto Sans Ethiopic', 'Nyala', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bebas Neue', 'Noto Sans Ethiopic', 'Oswald', 'Impact', var(--font);
  --radius: 14px;
  --radius-lg: 22px;
  --nav-h: 68px;
  --sb-w: 252px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
  --modal-bg: linear-gradient(180deg, #17171f, #101017);
  --menu-bg: rgba(18, 18, 27, .97);
  --surface: rgba(255, 255, 255, .05);
  --surface-2: rgba(255, 255, 255, .09);
  --nav-fade: rgba(7, 7, 11, .85);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(255, 61, 90, .08), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(123, 47, 247, .06), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(255, 61, 90, .45); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.i { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12px; word-break: break-all; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); }
.display { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 6vw, 84px); letter-spacing: .01em; line-height: .95; }
.display.small { font-size: clamp(34px, 4vw, 56px); }
.display em, .hero-title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row-between { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(255, 159, 67, .12); color: #ffc98f; font-size: 13px; margin-bottom: 12px; }

/* ── film grain + vignette ── */
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 9999; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); } 40% { transform: translate(4%, -6%); } 60% { transform: translate(-3%, 5%); } 80% { transform: translate(6%, 2%); } }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; font-weight: 650; font-size: 14px; white-space: nowrap; letter-spacing: .01em;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, border-color .25s, opacity .2s; position: relative; user-select: none;
}
.btn:active { transform: scale(.96); }
.btn .i { width: 18px; height: 18px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-lg .i { width: 20px; height: 20px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-lg { width: 52px; }
.btn-sm.btn-icon { width: 34px; }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: 0 10px 30px -10px rgba(255, 255, 255, .35); }
.btn-primary:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 14px 40px -10px rgba(255, 159, 67, .55); }
.btn-glass { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-glass:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .26); }
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.btn-ghost.danger, .btn-danger { color: #ff6b81; border-color: rgba(255, 61, 90, .35); }
.btn-danger { background: rgba(255, 61, 90, .16); }
.btn-danger:hover, .btn-ghost.danger:hover { background: rgba(255, 61, 90, .25); }
.btn-live { background: var(--grad); color: #fff; box-shadow: 0 12px 40px -12px rgba(255, 61, 90, .8); }
.btn-live:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-live.is-live { background: #2a1219; border: 1px solid rgba(255, 61, 90, .5); box-shadow: 0 0 0 0 rgba(255, 45, 85, .6); animation: pulseRing 2s infinite; }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 85, .5); } 70% { box-shadow: 0 0 0 16px rgba(255, 45, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0); } }

/* ── form controls ── */
.input, .select {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--text);
  border: 1px solid var(--line-2); font: inherit; outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; min-height: 64px; }
.input:focus, .select:focus { border-color: rgba(255, 159, 67, .6); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 4px rgba(255, 159, 67, .12); }
.select { appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%239b98a8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.select option { background: var(--panel-solid); }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.field-grid .field:last-child:nth-child(odd) { grid-column: 1 / -1; }
.search-box { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); flex: 1; min-width: 220px; transition: border-color .2s, box-shadow .2s; }
.search-box:focus-within { border-color: rgba(255, 159, 67, .55); box-shadow: 0 0 0 4px rgba(255, 159, 67, .1); }
.search-box .i { color: var(--muted); }
.search-box input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; }
.url-form { display: flex; gap: 10px; margin: 14px 0; }
.url-form .grow { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.chip.big { height: 36px; padding: 0 14px; font-size: 14px; }
button.chip { cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
button.chip:hover { background: rgba(255, 255, 255, .12); }
button.chip.on { background: var(--text); color: var(--bg); border-color: transparent; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 22px; }
.meta-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.seg button { height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: background .25s var(--ease), color .2s; }
.seg button.on { background: rgba(255, 255, 255, .12); color: var(--text); }
.seg-icons button { padding: 0 11px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch-row span { display: inline-flex; align-items: center; gap: 8px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.pm-switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .18); transition: background .25s; flex: none; }
.pm-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.pm-switch.on, input:checked + .pm-switch { background: var(--accent); }
.pm-switch.on::after, input:checked + .pm-switch::after { transform: translateX(16px); }
.bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .4s var(--ease); }
.bar.indeterminate i { width: 30% !important; animation: indet 1.3s ease-in-out infinite; }
.bar.error i { background: #ff5a6e; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.badge-accent { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11px; letter-spacing: .14em; font-weight: 800; text-transform: uppercase; }
.badge-accent .i { width: 13px; height: 13px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; box-shadow: 0 0 0 0 rgba(255, 45, 85, .7); animation: livePulse 1.6s infinite; flex: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 85, .7); } 70% { box-shadow: 0 0 0 8px rgba(255, 45, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0); } }
.live-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 6px; background: var(--live); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.live-pill.pending { background: #6b4a12; color: #ffd28f; }
.live-pill.pending i { background: #ffd28f; }
.live-pill.off { background: rgba(255, 255, 255, .12); color: var(--muted); }
.live-pill.off i { background: var(--muted); animation: none; }
@keyframes blink { 50% { opacity: .25; } }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin-right: 4px; }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }

/* ══════════════ intro ══════════════ */
#intro { position: fixed; inset: 0; z-index: 10000; background: #000; display: grid; place-items: center; overflow: hidden; cursor: pointer; transition: opacity .9s var(--ease), visibility .9s; }
#intro.done { opacity: 0; visibility: hidden; }
.intro-bars::before, .intro-bars::after { content: ''; position: absolute; left: 0; right: 0; height: 50vh; background: #000; z-index: 3; animation: bars 2.6s var(--ease-out) forwards; }
.intro-bars::before { top: 0; }
.intro-bars::after { bottom: 0; animation-name: barsB; }
@keyframes bars { 0% { transform: translateY(0); } 30% { transform: translateY(-38vh); } 100% { transform: translateY(-38vh); } }
@keyframes barsB { 0% { transform: translateY(0); } 30% { transform: translateY(38vh); } 100% { transform: translateY(38vh); } }
.intro-glow { position: absolute; width: 140vmax; height: 140vmax; border-radius: 50%; background: radial-gradient(circle, rgba(255, 61, 90, .35), rgba(255, 159, 67, .12) 30%, transparent 60%); animation: glow 2.8s var(--ease-out) forwards; opacity: 0; }
@keyframes glow { 0% { transform: scale(.2); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.05); opacity: .55; } }
.intro-logo { position: relative; z-index: 2; display: grid; justify-items: center; gap: 10px; }
.intro-mark { width: 84px; height: 84px; filter: drop-shadow(0 0 40px rgba(255, 61, 90, .8)); animation: markIn 1.4s .35s var(--ease-out) both; }
@keyframes markIn { 0% { transform: scale(.4) rotate(-30deg); opacity: 0; filter: blur(12px); } 100% { transform: none; opacity: 1; filter: drop-shadow(0 0 40px rgba(255, 61, 90, .8)); } }
.intro-word { display: flex; gap: .06em; font-family: var(--display); font-size: clamp(64px, 12vw, 140px); line-height: .9; letter-spacing: .14em; padding-left: .14em; }
.intro-word span { display: inline-block; background: linear-gradient(180deg, #fff 30%, #ffb8a0); -webkit-background-clip: text; background-clip: text; color: transparent; animation: letter 1.1s var(--ease-out) both; }
.intro-word span:nth-child(1) { animation-delay: .7s; } .intro-word span:nth-child(2) { animation-delay: .78s; } .intro-word span:nth-child(3) { animation-delay: .86s; } .intro-word span:nth-child(4) { animation-delay: .94s; } .intro-word span:nth-child(5) { animation-delay: 1.02s; }
@keyframes letter { 0% { transform: translateY(60%) scale(1.4); opacity: 0; filter: blur(14px); letter-spacing: .5em; } 100% { transform: none; opacity: 1; filter: blur(0); } }
.intro-tag { font-size: 13px; letter-spacing: .6em; text-transform: uppercase; color: rgba(255, 255, 255, .6); padding-left: .6em; animation: fadeUp 1s 1.4s var(--ease-out) both; }
.intro-sweep { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%); transform: translateX(-100%); animation: sweep 1.4s 1.5s var(--ease) forwards; mix-blend-mode: overlay; }
@keyframes sweep { to { transform: translateX(100%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
body.intro-playing { overflow: hidden; }

/* ══════════════ navigation ══════════════ */
.nav {
  position: fixed; inset: 0 0 auto var(--sb-w); height: var(--nav-h); z-index: 100; display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter) 0 18px;
  background: linear-gradient(180deg, var(--nav-fade), transparent); transition: background .4s, backdrop-filter .4s, box-shadow .4s, left .35s var(--ease);
}
.brand-mobile { display: none; }
.nav.scrolled { background: rgba(9, 9, 14, .78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 30px; height: 30px; filter: drop-shadow(0 0 14px rgba(255, 61, 90, .5)); transition: transform .5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.08); }
.brand-word { font-family: var(--display); font-size: 30px; letter-spacing: .14em; line-height: 1; padding-top: 3px; background: linear-gradient(180deg, #fff, #ffc4ac); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--text-2); transition: color .2s, background .2s; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav-links a.active { color: #fff; }
.nav-links a.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); }
.nav-links .live-dot { display: none; }
body.has-live .nav-links .live-dot { display: inline-block; }
.nav-links a[data-count]:not([data-count=''])::before { content: attr(data-count); position: absolute; top: 1px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--live); font-size: 10px; font-weight: 800; display: grid; place-items: center; color: #fff; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-search { display: flex; align-items: center; height: 40px; width: 40px; border-radius: 999px; padding: 0 11px; gap: 8px; border: 1px solid transparent; transition: width .4s var(--ease), background .3s, border-color .3s; cursor: text; overflow: hidden; }
.nav-search .i { color: var(--text-2); flex: none; }
.nav-search input { width: 100%; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 14px; opacity: 0; transition: opacity .3s; }
.nav-search.open, .nav-search:focus-within { width: 280px; background: rgba(0, 0, 0, .45); border-color: var(--line-2); }
.nav-search.open input, .nav-search:focus-within input { opacity: 1; }
.nav-search input::-webkit-search-cancel-button { filter: invert(1); }
.nav-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text-2); transition: background .2s, color .2s; }
.nav-icon:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 10px; font-weight: 800; font-size: 13px; color: #fff; display: grid; place-items: center; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); margin-left: 4px; transition: transform .3s var(--ease); }
.avatar:hover { transform: scale(1.08); }
.nav-burger { display: none; }
.tabbar { display: none; }

/* ══════════════ views & transitions ══════════════ */
.view { min-height: 100vh; transition: opacity .17s ease, transform .17s ease; }
.view.leaving { opacity: 0; transform: translateY(6px); }
.view.entering { opacity: 0; }
.view:not(.entering):not(.leaving) { animation: viewIn .55s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.page { padding: calc(var(--nav-h) + 28px) var(--gutter) 80px; max-width: 1680px; margin: 0 auto; }
.page.narrow { max-width: 820px; }
.page-head { display: grid; gap: 8px; margin-bottom: 28px; }
.page-head p { max-width: 720px; }
.page-head.row-between { display: flex; }
.page-head.row-between > div { display: grid; gap: 8px; }
.empty-state { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 80px 20px; color: var(--muted); }
.empty-state.page { min-height: 80vh; align-content: center; }
.empty-state > .i { width: 48px; height: 48px; color: var(--dim); }
.empty-state h3 { color: var(--text); font-size: 20px; }
.empty-state a:not(.btn) { color: var(--accent-2); }
.empty-state.wide { grid-column: 1 / -1; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.toolbar .select { width: auto; min-width: 170px; height: 46px; border-radius: 999px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.panel h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; margin: 18px 0; }

/* ══════════════ hero ══════════════ */
.hero { position: relative; height: min(92vh, 900px); min-height: 560px; overflow: hidden; isolation: isolate; }
.hero-media, .hero-slide { position: absolute; inset: 0; }
.hero-slide { opacity: 0; transition: opacity 1.4s var(--ease); }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s; }
.hero-slide img.ok { opacity: 1; }
.hero-slide.active img { animation: kenburns 22s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.12) translate(1.5%, 1%); } to { transform: scale(1) translate(0, 0); } }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s var(--ease); }
.hero.video-on .hero-video { opacity: 1; }
.hero-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 7, 11, .96) 0%, rgba(7, 7, 11, .7) 32%, rgba(7, 7, 11, .1) 65%, rgba(7, 7, 11, .3) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 7, 11, .55) 18%, transparent 45%), linear-gradient(180deg, rgba(7, 7, 11, .6), transparent 22%); }
.hero-content { position: absolute; z-index: 2; left: var(--gutter); bottom: clamp(90px, 16vh, 170px); width: min(640px, 100% - 2 * var(--gutter)); display: grid; gap: 18px; }
.hero-content > * { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.hero-content.in > * { opacity: 1; transform: none; }
.hero-content.in > *:nth-child(2) { transition-delay: .07s; } .hero-content.in > *:nth-child(3) { transition-delay: .14s; } .hero-content.in > *:nth-child(4) { transition-delay: .21s; } .hero-content.in > *:nth-child(5) { transition-delay: .28s; }
.hero-kicker { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.hero-title { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 9vw, 128px); line-height: .88; letter-spacing: .01em; text-shadow: 0 10px 50px rgba(0, 0, 0, .5); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.hero-meta span:first-child { padding: 1px 7px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 4px; font-size: 12px; }
.hero-meta span + span::before { content: '•'; margin-right: 14px; color: var(--accent-2); }
.hero-desc { color: var(--text-2); font-size: clamp(15px, 1.25vw, 17px); max-width: 560px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-progress { height: 4px; width: 260px; border-radius: 4px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.hero-progress i { display: block; height: 100%; background: var(--grad); }
.hero-side { position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(90px, 16vh, 170px); display: flex; align-items: center; gap: 18px; }
.hero-mute { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); display: grid; place-items: center; background: rgba(0, 0, 0, .25); backdrop-filter: blur(6px); }
.hero-dots { display: flex; gap: 6px; }
.hero-dots button { width: 34px; height: 20px; display: grid; align-items: center; }
.hero-dots i { display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); position: relative; overflow: hidden; transition: background .3s; }
.hero-dots button.on i::after { content: ''; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: dotfill 16s linear forwards; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-empty { display: grid; align-items: end; }
.hero-empty .hero-content > * { opacity: 1; transform: none; }
.hero-aurora { position: absolute; inset: -20%; z-index: -1; filter: blur(60px); opacity: .9;
  background: radial-gradient(40% 50% at 70% 40%, rgba(255, 61, 90, .5), transparent 70%), radial-gradient(35% 45% at 30% 60%, rgba(123, 47, 247, .45), transparent 70%), radial-gradient(30% 40% at 85% 75%, rgba(255, 159, 67, .4), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate; }
@keyframes aurora { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-4%, 3%) rotate(6deg); } 100% { transform: translate(3%, -2%) rotate(-4deg); } }

/* ══════════════ rows & cards ══════════════ */
.rows { position: relative; z-index: 2; margin-top: -80px; padding-bottom: 80px; }
.row { margin-bottom: 38px; }
.row-head { display: flex; align-items: baseline; gap: 16px; padding: 0 var(--gutter); margin-bottom: 12px; }
.row-head h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(18px, 1.6vw, 22px); font-weight: 750; letter-spacing: -.01em; }
.row-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 650; color: var(--accent-2); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s var(--ease); }
.row:hover .row-more { opacity: 1; transform: none; }
.row-more .i { width: 15px; height: 15px; }
.row-wrap { position: relative; }
.row-track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 21vw, 340px); gap: 14px; overflow-x: auto; overflow-y: visible; padding: 10px var(--gutter) 34px; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
.row-track::-webkit-scrollbar { display: none; }
.row-track > * { scroll-snap-align: start; }
.row-photos .row-track { grid-auto-columns: clamp(180px, 16vw, 260px); }
.row-arrow { position: absolute; top: 10px; bottom: 34px; width: calc(var(--gutter) - 6px); min-width: 44px; z-index: 5; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .3s; background: linear-gradient(90deg, rgba(7, 7, 11, .9), transparent); }
.row-arrow .i { width: 34px; height: 34px; transition: transform .3s var(--ease); }
.row-arrow:hover .i { transform: scale(1.25); }
.row-arrow.l { left: 0; }
.row-arrow.r { right: 0; background: linear-gradient(270deg, rgba(7, 7, 11, .9), transparent); }
.row-wrap.can-l:hover .row-arrow.l, .row-wrap.can-r:hover .row-arrow.r { opacity: 1; pointer-events: auto; }

.card { position: relative; display: block; border-radius: var(--radius); animation: cardIn .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); outline-offset: 4px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.card-media { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background-size: cover; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .06); transform: translateZ(0); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.card-image .card-media { aspect-ratio: 4 / 3; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s, transform .8s var(--ease); }
.card-media img.ok { opacity: 1; }
.card-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; z-index: 1; }
.card.previewing .card-preview { opacity: 1; }
.card-glyph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .85); }
.card-glyph .i { width: 22%; height: auto; aspect-ratio: 1; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .4)); }
.card-shine { position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .55)), linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .18) 48%, transparent 60%); background-size: 100% 100%, 250% 100%; background-position: 0 0, 120% 0; transition: background-position .9s var(--ease); pointer-events: none; }
.card-badge, .card-dur { position: absolute; z-index: 3; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.card-badge { top: 9px; left: 9px; }
.card-dur { bottom: 9px; right: 9px; display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.card-dur .i { width: 12px; height: 12px; }
.card-flag { position: absolute; z-index: 3; top: 9px; right: 9px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: var(--accent-2); }
.card-flag .i { width: 13px; height: 13px; }
.card-live .live-pill { position: absolute; z-index: 3; top: 9px; left: 9px; }
.card-play { position: absolute; z-index: 3; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #0a0a0f; opacity: 0; transform: scale(.6); transition: opacity .35s, transform .45s var(--ease); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.card-play .i { width: 22px; height: 22px; margin-left: 3px; }
.card-progress { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 8px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.card-progress i { display: block; height: 100%; background: var(--grad); }
.card-progress ~ .card-dur { bottom: 18px; }
.card-info { display: flex; align-items: flex-start; gap: 8px; padding: 11px 2px 0; }
.card-text { flex: 1; min-width: 0; }
.card-text h3 { font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-text p { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-more { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity .3s, background .2s, color .2s; flex: none; }
.card-more .i { width: 15px; height: 15px; }
.card-more:hover { background: var(--text); color: var(--bg); }
@media (hover: hover) {
  .card:hover .card-media { transform: scale(1.045) translateY(-4px); box-shadow: 0 26px 50px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .14), 0 0 40px -10px rgba(255, 61, 90, .35); }
  .card:hover .card-media img { transform: scale(1.06); }
  .card:hover .card-shine { background-position: 0 0, -40% 0; }
  .card:hover .card-play { opacity: 1; transform: none; }
  .card.previewing .card-play { opacity: 0; }
  .card:hover .card-more { opacity: 1; }
}
.card:focus-visible .card-more { opacity: 1; }
.onboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 0 var(--gutter); }
.onboard-card { padding: 26px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 10px; transition: transform .4s var(--ease), border-color .3s; }
.onboard-card:hover { transform: translateY(-4px); border-color: rgba(255, 159, 67, .4); }
.onboard-card > .i { width: 34px; height: 34px; color: var(--accent-2); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 26px 18px; }
.grid.layout-list { grid-template-columns: 1fr; gap: 10px; }
.grid.layout-list .card { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; padding: 8px; border-radius: var(--radius); background: rgba(255, 255, 255, .02); border: 1px solid var(--line); }
.grid.layout-list .card:hover { background: rgba(255, 255, 255, .05); }
.grid.layout-list .card-info { padding: 0; }
.grid.layout-list .card-text h3 { font-size: 16px; }
.grid.layout-list .card:hover .card-media { transform: none; }

/* ══════════════ player ══════════════ */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - var(--nav-h) - 40px); color: #fff; outline: none; user-select: none; -webkit-user-select: none; --cue-scale: 1; }
.ply-ambient { position: absolute; inset: -6% -4%; width: 108%; height: 112%; z-index: 0; filter: blur(70px) saturate(1.6); opacity: 0; transition: opacity 1.5s; pointer-events: none; transform: translateZ(0); }
.player.ambient-on .ply-ambient { opacity: .55; }
.player.no-ambient .ply-ambient, .player.is-fs .ply-ambient, .player.is-mini .ply-ambient { opacity: 0 !important; }
.ply-box { position: absolute; inset: 0; z-index: 1; border-radius: 18px; overflow: hidden; background: #000; box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .06); container-type: inline-size; }
.player.is-fs .ply-box { border-radius: 0; }
.ply-stage { position: absolute; inset: 0; }
.ply-stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.ply-art { position: absolute; inset: 0; display: none; place-items: center; overflow: hidden; background: radial-gradient(60% 70% at 50% 45%, rgba(255, 61, 90, .25), transparent 70%), linear-gradient(160deg, #120a14, #07070c); }
.player.is-audio .ply-art { display: grid; }
.player.is-audio video { opacity: 0; }
.ply-viz { position: absolute; inset: 0; width: 100%; height: 100%; }
.ply-art-cover { --beat: 1; position: relative; width: 36cqh; height: 36cqh; width: min(36cqw, 260px); height: min(36cqw, 260px); border-radius: 50%; transform: scale(var(--beat)); transition: transform .08s linear; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 6px rgba(255, 255, 255, .06); background: var(--grad); overflow: hidden; }
.ply-art-img { position: absolute; inset: 0; background-size: cover; background-position: center; animation: spin 24s linear infinite; animation-play-state: paused; }
.player:not(.is-paused) .ply-art-img { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.ply-art-cover::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14%; height: 14%; margin: -7% 0 0 -7%; border-radius: 50%; background: #0b0b10; box-shadow: 0 0 0 3px rgba(255, 255, 255, .15); }
.ply-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(0, 0, 0, .78), transparent 32%), linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 22%); transition: opacity .4s; }
.ply-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px; pointer-events: none; transition: opacity .4s, transform .4s var(--ease); }
.ply-title strong { display: block; font-size: clamp(15px, 2cqw, 22px); font-weight: 700; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.ply-title span { font-size: 13px; color: rgba(255, 255, 255, .7); }
.ply-live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--live); font-size: 12px; font-weight: 800; letter-spacing: .1em; pointer-events: auto; }
.ply-live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.player.is-behind .ply-live-badge { background: rgba(255, 255, 255, .2); }
.ply-captions { position: absolute; left: 6%; right: 6%; bottom: 7%; display: grid; justify-items: center; gap: 4px; pointer-events: none; transition: bottom .35s var(--ease); z-index: 2; }
.player:not(.idle) .ply-captions, .player.is-paused .ply-captions { bottom: max(7%, 92px); }
.ply-captions .cue span { display: inline; padding: .12em .45em; border-radius: .25em; background: rgba(0, 0, 0, .72); font-size: calc(clamp(14px, 2.6cqw, 34px) * var(--cue-scale)); font-weight: 600; line-height: 1.4; text-align: center; box-decoration-break: clone; -webkit-box-decoration-break: clone; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); white-space: pre-line; }
.ply-big { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; display: grid; place-items: center; z-index: 3; background: rgba(255, 255, 255, .14); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 20px 60px rgba(0, 0, 0, .5); opacity: 0; transform: scale(.7); pointer-events: none; transition: opacity .35s, transform .45s var(--ease); }
.ply-big .i { width: 34px; height: 34px; margin-left: 4px; }
.player.is-paused:not(.is-scrubbing) .ply-big { opacity: 1; transform: none; pointer-events: auto; }
.player.is-paused .ply-big:hover { background: rgba(255, 255, 255, .24); transform: scale(1.08); }
.player.is-fresh.is-paused .ply-big { width: 104px; height: 104px; margin: -52px 0 0 -52px; background: var(--grad); box-shadow: 0 20px 60px rgba(255, 61, 90, .45), 0 0 0 10px rgba(255, 61, 90, .15); }
.ply-flash { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; z-index: 3; }
.ply-flash .i { width: 30px; height: 30px; }
.ply-flash.go { animation: flash .6s var(--ease) forwards; }
@keyframes flash { 0% { opacity: .9; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.5); } }
.ply-ripple { position: absolute; top: 0; bottom: 0; width: 38%; display: grid; place-items: center; pointer-events: none; opacity: 0; z-index: 2; }
.ply-ripple-l { left: 0; border-radius: 0 50% 50% 0 / 0 50% 50% 0; background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, .18), transparent 70%); }
.ply-ripple-r { right: 0; border-radius: 50% 0 0 50% / 50% 0 0 50%; background: radial-gradient(circle at 80% 50%, rgba(255, 255, 255, .18), transparent 70%); }
.ply-ripple span { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.ply-ripple .i { width: 40px; height: 40px; }
.ply-ripple.go { animation: rip .7s ease-out; }
@keyframes rip { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.ply-spinner { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; pointer-events: none; z-index: 3; }
.ply-ring, .ply-spinner .ply-ring { width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--accent); border-right-color: var(--accent-2); animation: spin .9s linear infinite; filter: drop-shadow(0 0 12px rgba(255, 61, 90, .5)); }
.ply-spin-text { font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .55); }
.ply-spin-text:empty { display: none; }
.ply-error { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(5, 5, 8, .82); backdrop-filter: blur(10px); padding: 20px; }
.ply-error-card { display: grid; justify-items: center; gap: 10px; text-align: center; max-width: 440px; }
.ply-error-card > .i { width: 40px; height: 40px; color: var(--accent); }
.ply-error-card p { color: var(--text-2); font-size: 14px; }
.ply-notice { position: absolute; left: 50%; top: 12%; transform: translate(-50%, -8px); padding: 8px 16px; border-radius: 999px; background: rgba(0, 0, 0, .65); backdrop-filter: blur(8px); font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); z-index: 5; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.ply-notice.show { opacity: 1; transform: translate(-50%, 0); }
.ply-stats { position: absolute; top: 14px; left: 14px; z-index: 6; padding: 12px 34px 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .78); backdrop-filter: blur(8px); font: 11.5px/1.5 ui-monospace, Consolas, monospace; max-width: min(460px, 90%); }
.ply-stats th { text-align: right; color: #a9a6b4; font-weight: 500; padding-right: 12px; white-space: nowrap; vertical-align: top; }
.ply-stats td { word-break: break-all; }
.ply-stats-x { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.ply-stats-x:hover { background: rgba(255, 255, 255, .15); }
.ply-stats-x .i { width: 14px; height: 14px; }

/* controls */
.ply-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 0 18px 12px; transition: opacity .4s, transform .4s var(--ease); }
.player.idle { cursor: none; }
.player.idle .ply-controls, .player.idle .ply-top { opacity: 0; transform: translateY(10px); pointer-events: none; }
.player.idle .ply-top { transform: translateY(-10px); }
.player.idle .ply-shade { opacity: 0; }
.ply-progress { position: relative; height: 26px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.ply-track { position: relative; flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); transition: height .2s var(--ease); }
.ply-progress:hover .ply-track, .player.is-scrubbing .ply-track { height: 7px; }
.ply-buffer, .ply-played, .ply-hoverbar { position: absolute; inset: 0; border-radius: inherit; transform-origin: left; transform: scaleX(0); }
.ply-buffer { background: rgba(255, 255, 255, .32); transition: transform .3s; }
.ply-hoverbar { background: rgba(255, 255, 255, .2); opacity: 0; transition: opacity .2s; }
.player.is-previewing .ply-hoverbar { opacity: 1; }
.ply-played { background: var(--grad); box-shadow: 0 0 14px rgba(255, 61, 90, .5); }
.ply-knob { position: absolute; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 61, 90, .35), 0 2px 8px rgba(0, 0, 0, .4); transform: scale(0); transition: transform .2s var(--ease); }
.ply-progress:hover .ply-knob, .player.is-scrubbing .ply-knob { transform: scale(1); }
.ply-preview { position: absolute; bottom: 30px; left: 0; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.player.is-previewing .ply-preview, .player.is-scrubbing .ply-preview { opacity: 1; }
.ply-preview-img { display: none; border-radius: 10px; background-repeat: no-repeat; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 12px 30px rgba(0, 0, 0, .6); }
.player.has-sprite .ply-preview-img { display: block; }
.ply-preview-time { padding: 3px 9px; border-radius: 6px; background: rgba(0, 0, 0, .75); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.player.is-rtc .ply-progress { visibility: hidden; height: 10px; }
.ply-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ply-group { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pb { position: relative; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: #fff; transition: background .2s, transform .2s var(--ease); flex: none; }
.pb .i { width: 22px; height: 22px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.pb:hover { background: rgba(255, 255, 255, .12); }
.pb:active { transform: scale(.9); }
.ply-play .i { width: 26px; height: 26px; }
.player.cc-on .ply-cc { color: var(--accent-2); }
.player.cc-on .ply-cc::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--accent-2); }
.player.menu-open .ply-settings .i { transform: rotate(60deg); }
.ply-settings .i { transition: transform .4s var(--ease); }
.pb[data-tip]::before { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px); padding: 5px 9px; border-radius: 6px; background: rgba(15, 15, 22, .92); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s .3s, transform .2s .3s; }
.pb[data-tip]:hover::before { opacity: 1; transform: translate(-50%, 0); }
.ply-group:last-child .pb:last-child[data-tip]::before { left: auto; right: 0; transform: translateY(4px); }
.ply-group:last-child .pb:last-child[data-tip]:hover::before { transform: none; }
.player.menu-open .pb[data-tip]::before { display: none; }
.ply-vol { display: flex; align-items: center; }
.ply-volume { width: 0; opacity: 0; transition: width .35s var(--ease), opacity .3s, margin .3s; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; cursor: pointer; background: linear-gradient(90deg, #fff var(--fill, 100%), rgba(255, 255, 255, .25) var(--fill, 100%)); margin: 0; }
.ply-vol:hover .ply-volume, .ply-volume:focus-visible { width: 86px; opacity: 1; margin: 0 10px 0 4px; }
.ply-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.ply-volume::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }
.ply-time { display: inline-flex; gap: 6px; padding: 0 10px; height: 34px; align-items: center; border-radius: 8px; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ply-time:hover { background: rgba(255, 255, 255, .08); }
.ply-time i { font-style: normal; opacity: .5; }
.ply-dur:empty, .ply-dur:empty + i, .ply-time span:empty ~ i { display: none; }
.player.is-live .ply-time i { display: none; }
.ply-golive { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ply-golive i { width: 7px; height: 7px; border-radius: 50%; background: #aaa; }
.ply-golive:hover { background: var(--live); }
.ply-golive:hover i { background: #fff; }
.player.is-live .ply-back, .player.is-live .ply-fwd { display: none; }
.player.is-rtc .ply-shot { display: grid; }

/* settings menu */
.ply-menu { position: absolute; right: 18px; bottom: 76px; z-index: 7; width: 300px; max-height: calc(100% - 100px); overflow: auto; border-radius: 16px; background: rgba(16, 16, 24, .9); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); padding: 8px; transform-origin: bottom right; animation: menuIn .28s var(--ease-out); }
@keyframes menuIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.pm-page { display: grid; gap: 2px; animation: fadeUp .25s var(--ease-out); }
.pm-row, .pm-opt, .pm-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; text-align: left; font-size: 14px; font-weight: 550; }
.pm-row:hover, .pm-opt:hover, .pm-head:hover { background: rgba(255, 255, 255, .08); }
.pm-row > .i:first-child { width: 20px; height: 20px; opacity: .85; }
.pm-row span, .pm-opt span { flex: 1; }
.pm-row em, .pm-opt em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.pm-chev { width: 16px !important; height: 16px !important; opacity: .5; }
.pm-head { font-weight: 700; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; margin-bottom: 4px; }
.pm-head .i { width: 18px; height: 18px; }
.pm-check { width: 18px; height: 18px; opacity: 0; color: var(--accent-2); }
.pm-opt.active .pm-check { opacity: 1; }
.pm-opt.active span { color: #fff; font-weight: 700; }
.pm-slider { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.pm-slider input { flex: 1; accent-color: var(--accent); }
.pm-slider em { font-style: normal; min-width: 42px; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

/* up next */
.ply-upnext { position: absolute; right: 22px; bottom: 90px; z-index: 6; animation: fadeUp .5s var(--ease-out); }
.upn { display: flex; gap: 14px; padding: 12px; border-radius: 16px; background: rgba(12, 12, 18, .88); backdrop-filter: blur(18px); box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); max-width: 460px; }
.upn-poster { width: 170px; aspect-ratio: 16 / 9; flex: none; border-radius: 10px; background: var(--grad) center / cover; }
.upn-body { display: grid; gap: 4px; align-content: center; min-width: 0; }
.upn-body small { color: var(--muted); font-weight: 600; }
.upn-body small b { color: var(--accent-2); }
.upn-body h4 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upn-actions { display: flex; gap: 8px; margin-top: 6px; }
.upn-go { padding-left: 12px; }
.upn-ring { width: 22px; height: 22px; transform: rotate(-90deg); }
.upn-ring circle { fill: none; stroke: rgba(0, 0, 0, .15); stroke-width: 4; }
.upn-ring .upn-ring-fg { stroke: #0a0a0f; stroke-dasharray: 100.5; stroke-dashoffset: 100.5; animation: ring linear forwards; }
@keyframes ring { to { stroke-dashoffset: 0; } }

/* shortcuts card */
.ply-keys { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px); animation: fadeUp .3s var(--ease-out); }
.ply-keys-card { background: rgba(16, 16, 24, .95); border-radius: 18px; padding: 22px; max-width: min(560px, 92%); max-height: 90%; overflow: auto; display: grid; gap: 14px; box-shadow: 0 0 0 1px var(--line-2); }
.ply-keys-card h3 { display: flex; align-items: center; gap: 10px; }
.ply-keys-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: center; font-size: 14px; }
kbd { font: 700 12px/1 ui-monospace, Consolas, monospace; padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .1); white-space: nowrap; justify-self: start; }
.player.shutter .ply-box::after { content: ''; position: absolute; inset: 0; background: #fff; z-index: 9; animation: shutter .45s ease-out forwards; pointer-events: none; }
@keyframes shutter { from { opacity: .85; } to { opacity: 0; } }

/* player sizes */
@container (max-width: 560px) {
  .ply-back, .ply-fwd, .ply-shot, .ply-theater, .ply-prev { display: none !important; }
  .ply-controls { padding: 0 8px 6px; }
  .pb { width: 38px; height: 38px; }
  .ply-time { font-size: 12px; padding: 0 6px; }
  .ply-menu { right: 8px; bottom: 60px; width: calc(100% - 16px); max-width: 300px; }
  .ply-upnext { left: 10px; right: 10px; bottom: 70px; }
  .upn-poster { width: 110px; }
  .ply-big { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
}
.player.is-fs, .player:fullscreen { max-height: none; aspect-ratio: auto; width: 100vw; height: 100vh; background: #000; }

/* mini player dock */
.mini { position: fixed; right: 20px; bottom: 20px; z-index: 200; width: min(400px, calc(100vw - 32px)); border-radius: 16px; overflow: hidden; background: #0b0b11; box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 1px var(--line-2); transform: translateY(30px) scale(.95); opacity: 0; transition: transform .5s var(--ease-out), opacity .4s; }
.mini.in { transform: none; opacity: 1; }
.mini .player { max-height: none; }
.mini .ply-box { border-radius: 0; box-shadow: none; }
.player.is-mini .ply-top, .player.is-mini .ply-bar .ply-group:last-child, .player.is-mini .ply-back, .player.is-mini .ply-fwd, .player.is-mini .ply-vol, .player.is-mini .ply-prev, .player.is-mini .ply-next, .player.is-mini .ply-captions { display: none !important; }
.player.is-mini .ply-big { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.player.is-mini .ply-controls { padding: 0 8px 4px; }
.player.is-mini { cursor: pointer; }
.mini-bar { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 14px; }
.mini-title { flex: 1; font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-bar .pb { width: 34px; height: 34px; }
.mini-bar .pb .i { width: 18px; height: 18px; }

/* ══════════════ watch page ══════════════ */
.watch { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; padding: calc(var(--nav-h) + 18px) var(--gutter) 60px; max-width: 1880px; margin: 0 auto; }
.watch-backdrop { position: fixed; inset: 0; z-index: -1; opacity: .45; overflow: hidden; }
.watch-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.3); transform: scale(1.2); opacity: 0; transition: opacity 1.2s; }
.watch-backdrop img.ok { opacity: 1; }
.watch-backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 7, 11, .55), var(--bg) 70%); }
.watch-main { min-width: 0; }
.watch-player { position: relative; }
.watch.theater { grid-template-columns: 1fr; }
.watch.theater .watch-player { margin: 0 calc(-1 * var(--gutter)); }
.watch.theater .player { max-height: calc(100vh - var(--nav-h)); aspect-ratio: auto; height: calc(100vh - var(--nav-h) - 20px); }
.watch.theater .ply-box { border-radius: 0; }
.watch.theater .watch-side { max-width: 900px; }
.watch-info { padding: 22px 4px 0; display: grid; gap: 16px; }
.watch-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.watch-title { font-size: clamp(24px, 2.4vw, 34px); font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.watch-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.watch-desc { color: var(--text-2); max-width: 900px; font-size: 15px; white-space: pre-line; }
.watch-tech summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; list-style: none; padding: 6px 0; }
.watch-tech summary::-webkit-details-marker { display: none; }
.watch-tech summary:hover { color: var(--text); }
.watch-tech[open] summary { margin-bottom: 10px; }
.spec { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.spec th { text-align: left; font-weight: 500; color: var(--muted); padding: 7px 18px 7px 0; white-space: nowrap; vertical-align: top; width: 1%; }
.spec td { padding: 7px 0; word-break: break-word; }
.spec tr + tr { border-top: 1px solid var(--line); }
.spec.wide th { width: auto; }
.watch-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - var(--nav-h) - 40px); position: sticky; top: calc(var(--nav-h) + 18px); align-self: start; overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.tabs button.on { background: rgba(255, 255, 255, .08); color: var(--text); }
.tabs .i { width: 18px; height: 18px; }
.tab-panel { padding: 10px 14px 14px; overflow: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.queue { display: grid; gap: 4px; }
.qitem { display: grid; grid-template-columns: 148px 1fr; gap: 12px; padding: 7px; border-radius: 12px; align-items: center; transition: background .2s; animation: fadeUp .5s var(--ease-out) both; animation-delay: calc(var(--i) * 30ms); }
.qitem:hover { background: rgba(255, 255, 255, .06); }
.qitem.now { background: linear-gradient(90deg, rgba(255, 61, 90, .18), rgba(255, 159, 67, .06)); box-shadow: inset 2px 0 0 var(--accent); }
.qthumb { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; display: grid; place-items: center; }
.qthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.qthumb img.ok { opacity: 1; }
.qthumb em { position: absolute; right: 5px; bottom: 5px; font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .7); }
.qthumb > i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad); }
.qthumb .eq { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 30%; background: rgba(0, 0, 0, .45); }
.eq i { width: 4px; height: 30%; background: #fff; border-radius: 2px; animation: eq .9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { to { height: 60%; } }
.qtext { min-width: 0; display: grid; gap: 3px; }
.qtext strong { font-size: 14px; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qtext small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.party-intro { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 30px 10px; }
.party-art { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 20px 50px -10px rgba(255, 61, 90, .6); transform: rotate(-6deg); }
.party-art .i { width: 36px; height: 36px; }
.party-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 61, 90, .2), rgba(255, 159, 67, .1)); }
.party-banner strong { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.party-banner small { color: var(--muted); font-size: 12px; }
.party-chat { flex: 1; min-height: 0; display: flex; }
.host-row { display: flex; align-items: center; gap: 12px; }
.host-row div { display: grid; }
.live-wait { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 20px; border-radius: 18px; background: radial-gradient(60% 60% at 50% 40%, rgba(255, 61, 90, .18), transparent 70%), rgba(5, 5, 9, .92); }
.live-wait h3 { font-size: 22px; }
.recent-urls { display: grid; gap: 4px; margin: 10px 0; }
.recent-urls a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; color: var(--text-2); min-width: 0; }
.recent-urls a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-urls a:hover, .recent-urls a.now { background: rgba(255, 255, 255, .06); color: #fff; }
.sub-head { margin: 28px 0 8px; font-size: 15px; }

/* ══════════════ chat ══════════════ */
.chat { display: flex; flex-direction: column; flex: 1; min-height: 340px; width: 100%; }
.chat-members { display: flex; align-items: center; gap: 4px; padding-bottom: 10px; flex-wrap: wrap; }
.chat-count { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 6px; }
.chat-count .i { width: 16px; height: 16px; }
.msg-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); box-shadow: 0 0 0 2px var(--bg-2); }
.msg-av.big { width: 44px; height: 44px; font-size: 18px; }
.msg-av.me { box-shadow: 0 0 0 2px var(--accent-2); }
.chat-log { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 2px 10px; }
.chat-empty { margin: auto; display: grid; justify-items: center; gap: 8px; color: var(--dim); font-size: 13px; }
.chat-empty .i { width: 28px; height: 28px; }
.msg { display: flex; gap: 10px; animation: msgIn .35s var(--ease-out); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg b { font-size: 13px; font-weight: 700; }
.msg.mine b { color: var(--accent-2); }
.msg time { font-size: 11px; color: var(--dim); margin-left: 8px; }
.msg p { font-size: 14px; color: var(--text-2); word-wrap: break-word; overflow-wrap: anywhere; }
.msg-sys { align-self: center; font-size: 12px; color: var(--dim); padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .04); }
.chat-react { display: flex; gap: 2px; padding: 6px 0; border-top: 1px solid var(--line); }
.chat-react button { flex: 1; height: 36px; border-radius: 10px; font-size: 18px; transition: transform .2s var(--ease), background .2s; }
.chat-react button:hover { background: rgba(255, 255, 255, .08); transform: scale(1.2) translateY(-2px); }
.chat-form { display: flex; gap: 8px; }
.chat-form .input { border-radius: 999px; }
.float-emoji { position: absolute; bottom: 12%; font-size: 34px; z-index: 6; pointer-events: none; animation: floatUp 3.2s cubic-bezier(.2, .6, .3, 1) forwards; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); }
@keyframes floatUp { 0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 0; } 12% { opacity: 1; transform: translate(0, -20px) scale(1.15) rotate(0); } 100% { transform: translate(var(--drift), -340px) scale(.9) rotate(var(--rot)); opacity: 0; } }

/* ══════════════ modal & toasts ══════════════ */
.modal-back { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; background: rgba(3, 3, 6, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .28s; overflow-y: auto; }
.modal-back.in { opacity: 1; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--modal-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow), 0 0 0 1px var(--line-2); padding: 26px; transform: translateY(20px) scale(.97); transition: transform .4s var(--ease-out); }
.modal-back.in .modal { transform: none; }
.modal-sm { width: min(440px, 100%); }
.modal-x { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); transition: background .2s, transform .3s var(--ease); }
.modal-x:hover { background: rgba(255, 255, 255, .15); transform: rotate(90deg); }
.modal-title { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 12px; padding-right: 40px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal-details { width: min(880px, 100%); padding: 0; }
.det-hero { position: relative; aspect-ratio: 16 / 7.5; min-height: 260px; overflow: hidden; }
.det-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.det-hero img.ok { opacity: 1; animation: kenburns 30s ease-out forwards; }
.det-shade { position: absolute; inset: 0; background: linear-gradient(0deg, #101017 4%, rgba(16, 16, 23, .4) 50%, transparent), linear-gradient(90deg, rgba(16, 16, 23, .7), transparent 60%); }
.det-head { position: absolute; left: 30px; right: 30px; bottom: 22px; display: grid; gap: 10px; }
.det-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 72px); line-height: .9; }
.det-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.det-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; padding: 10px 30px 30px; }
.det-main { display: grid; gap: 16px; align-content: start; }
.det-desc { color: var(--text-2); }
.det-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.toasts { position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 10px; justify-items: center; pointer-events: none; width: min(560px, calc(100vw - 24px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--menu-bg); backdrop-filter: blur(16px); box-shadow: 0 20px 50px rgba(0, 0, 0, .5), 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 550; max-width: 100%; opacity: 0; transform: translateY(16px) scale(.96); transition: opacity .3s, transform .45s var(--ease-out); }
.toast.in { opacity: 1; transform: none; }
.toast.out { opacity: 0; transform: translateY(8px) scale(.97); }
.toast-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .1); }
.toast-ico .i { width: 16px; height: 16px; }
.toast-success .toast-ico { background: rgba(61, 220, 151, .18); color: var(--ok); }
.toast-error .toast-ico { background: rgba(255, 61, 90, .2); color: #ff6b81; }
.toast-live .toast-ico { background: var(--live); color: #fff; }
.toast-msg { flex: 1; min-width: 0; }
.toast-act { padding: 6px 12px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 13px; flex: none; }
.toast-x { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.toast-x:hover { background: rgba(255, 255, 255, .1); }
.toast-x .i { width: 15px; height: 15px; }

/* ══════════════ lightbox ══════════════ */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(2, 2, 4, .96); opacity: 0; transition: opacity .3s; display: grid; grid-template-rows: 1fr auto; }
.lightbox.in { opacity: 1; }
.lb-stage { display: grid; place-items: center; overflow: hidden; padding: 70px 70px 10px; min-height: 0; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .8); opacity: 0; transition: opacity .5s, transform .25s ease-out; cursor: zoom-in; }
.lb-img.ok { opacity: 1; }
.lightbox.kenburns .lb-img.ok { animation: kenburns 6s ease-out forwards; }
.lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent); }
.lb-title { display: grid; }
.lb-title span { color: var(--muted); font-size: 13px; }
.lb-tools { display: flex; gap: 4px; }
.lb-nav { position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); transition: background .2s, transform .3s var(--ease); }
.lb-nav:hover { background: rgba(255, 255, 255, .18); transform: scale(1.08); }
.lb-nav .i { width: 28px; height: 28px; }
.lb-nav.l { left: 14px; } .lb-nav.r { right: 14px; }
.lb-strip { display: flex; gap: 8px; padding: 12px 18px 18px; overflow-x: auto; justify-content: safe center; scrollbar-width: none; }
.lb-strip button { width: 84px; aspect-ratio: 4 / 3; flex: none; border-radius: 8px; background-size: cover; background-position: center; opacity: .45; transition: opacity .2s, transform .3s var(--ease), box-shadow .2s; }
.lb-strip button:hover { opacity: .85; }
.lb-strip button.on { opacity: 1; box-shadow: 0 0 0 2px var(--accent-2); transform: translateY(-3px); }

/* ══════════════ live ══════════════ */
.live-hero { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(28px, 5vw, 64px); margin-bottom: 40px; background: #0d0a12; border: 1px solid var(--line); isolation: isolate; }
.live-hero-bg { position: absolute; inset: 0; z-index: -1; }
.live-hero-bg i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: aurora 14s ease-in-out infinite alternate; }
.live-hero-bg i:nth-child(1) { width: 50%; height: 120%; right: -10%; top: -30%; background: var(--accent); }
.live-hero-bg i:nth-child(2) { width: 40%; height: 90%; right: 20%; bottom: -50%; background: var(--violet); animation-delay: -5s; }
.live-hero-bg i:nth-child(3) { width: 30%; height: 80%; right: 5%; bottom: -30%; background: var(--accent-2); animation-delay: -9s; }
.live-hero-text { display: grid; gap: 16px; max-width: 620px; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 50px; }
.mode-card { padding: 22px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 10px; justify-items: start; transition: transform .4s var(--ease), border-color .3s; }
.mode-card:hover { transform: translateY(-4px); border-color: rgba(255, 61, 90, .35); }
.mode-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); }
.mode-ico .i { width: 24px; height: 24px; }
.live-watch .player { max-height: calc(100vh - var(--nav-h) - 60px); }

/* ══════════════ studio ══════════════ */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; padding: calc(var(--nav-h) + 18px) var(--gutter) 60px; max-width: 1820px; margin: 0 auto; }
.studio-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
.studio-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.studio-canvas, .studio-rtmp { position: absolute; inset: 0; }
.studio-canvas canvas { width: 100%; height: 100%; display: block; }
.studio-rtmp .player { height: 100%; aspect-ratio: auto; max-height: none; }
.studio-rtmp .ply-box { border-radius: 0; }
.rtmp-wait { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 30px; background: radial-gradient(60% 60% at 50% 40%, rgba(255, 61, 90, .16), transparent 70%); }
.studio-hud { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; z-index: 3; pointer-events: none; }
.hud-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 6px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hud-chip .i { width: 14px; height: 14px; }
.hud-chip.rec { color: #ff6b81; }
.hud-chip.rec i { width: 8px; height: 8px; border-radius: 50%; background: #ff3d5a; animation: blink 1s infinite; }
.studio-meter { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; z-index: 3; }
.studio-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #ffd43b 70%, var(--accent)); transform-origin: left; transform: scaleX(0); transition: transform .08s linear; }
.studio-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.studio-toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.sbtn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); font-weight: 650; font-size: 14px; color: var(--muted); transition: background .2s, color .2s, border-color .2s; }
.sbtn:hover { background: rgba(255, 255, 255, .1); }
.sbtn.on { color: var(--text); border-color: rgba(255, 255, 255, .22); }
.sbtn.rec { background: rgba(255, 61, 90, .18); border-color: rgba(255, 61, 90, .5); color: #fff; }
.sbtn .i { width: 20px; height: 20px; }
.studio-health { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.studio-health div { padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 2px; }
.studio-health small { color: var(--muted); font-size: 12px; font-weight: 600; }
.studio-health b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-side { display: grid; gap: 14px; align-content: start; }
.step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); font-size: 12px; font-weight: 800; color: #fff; }
.mode-pick { display: grid; gap: 8px; }
.mode-opt, .source-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); text-align: left; transition: border-color .2s, background .2s, transform .3s var(--ease); }
.mode-opt:hover:not(:disabled), .source-opt:hover { background: rgba(255, 255, 255, .07); }
.mode-opt.on, .source-opt.on { border-color: var(--accent); background: linear-gradient(90deg, rgba(255, 61, 90, .16), rgba(255, 159, 67, .06)); box-shadow: 0 0 0 1px var(--accent) inset; }
.mode-opt span { display: grid; }
.mode-opt b { font-size: 14px; }
.mode-opt small { font-size: 12px; color: var(--muted); }
.mode-opt .i, .source-opt .i { width: 22px; height: 22px; color: var(--accent-2); }
.source-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.source-opt { flex-direction: column; justify-content: center; gap: 8px; padding: 16px 10px; font-weight: 650; font-size: 13.5px; text-align: center; }
.source-opt .i { width: 26px; height: 26px; }
.copy-field { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); margin-top: 4px; }
.copy-field code { flex: 1; min-width: 0; font: 12.5px ui-monospace, Consolas, monospace; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blur-key { filter: blur(5px); transition: filter .3s; }
.copy-field:hover .blur-key { filter: none; }
.rec-preview { width: 100%; border-radius: 12px; background: #000; margin-bottom: 10px; }
#sChat .chat { min-height: 300px; max-height: 420px; }

/* ══════════════ upload ══════════════ */
.dropzone { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; padding: clamp(36px, 6vw, 70px) 20px; border-radius: 28px; cursor: pointer; overflow: hidden; isolation: isolate; border: 1.5px dashed rgba(255, 255, 255, .2); background: radial-gradient(70% 90% at 50% 0%, rgba(255, 61, 90, .12), transparent 70%), var(--panel); transition: border-color .3s, transform .4s var(--ease), background .3s; }
.dropzone::before { content: ''; position: absolute; inset: -2px; z-index: -1; background: conic-gradient(from var(--a, 0deg), transparent 0 70%, var(--accent) 80%, var(--accent-2) 90%, transparent); opacity: 0; transition: opacity .3s; animation: rot 3s linear infinite; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); padding: 2px; border-radius: inherit; }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes rot { to { --a: 360deg; } }
.dropzone:hover, .dropzone.over { border-color: transparent; }
.dropzone:hover::before, .dropzone.over::before { opacity: 1; }
.dropzone.over { transform: scale(1.01); background: radial-gradient(70% 90% at 50% 0%, rgba(255, 61, 90, .25), transparent 70%), var(--panel); }
.drop-orb { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 20px 60px -10px rgba(255, 61, 90, .7); transition: transform .5s var(--ease); }
.dropzone:hover .drop-orb, .dropzone.over .drop-orb { transform: translateY(-6px) rotate(-6deg); }
.drop-orb .i { width: 38px; height: 38px; }
.dropzone h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; }
.dropzone u { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.drop-folder { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); cursor: default; }
.drop-folder span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.drop-folder .input { width: 220px; height: 34px; border-radius: 999px; }
.up-head { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 10px; }
.up-list { display: grid; gap: 10px; }
.up-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); animation: fadeUp .4s var(--ease-out); }
.up-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); flex: none; }
.up-item.done .up-ico { background: rgba(61, 220, 151, .15); color: var(--ok); }
.up-item.error .up-ico { background: rgba(255, 61, 90, .15); color: #ff6b81; }
.up-item.error .bar i { background: #ff5a6e; }
.up-item.paused .bar i { background: #8a8796; }
.up-item.done .bar i { background: var(--ok); }
.up-body { flex: 1; min-width: 0; display: grid; gap: 7px; }
.up-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; min-width: 0; }
.up-row strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.up-row small, .up-row span { white-space: nowrap; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.up-actions { display: flex; gap: 2px; }
.up-actions .pb { width: 38px; height: 38px; }
.imp-list { display: grid; gap: 10px; }
.imp-item { display: grid; gap: 6px; }
.imp-item a { color: var(--accent-2); }

/* ══════════════ stats ══════════════ */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 18px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 4px; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 61, 90, .14), transparent 70%); }
.kpi small { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }
.kpi b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; }
.kpi .bar { margin-top: 6px; }
.chart-panel canvas { width: 100%; height: 180px; display: block; margin-top: 8px; }
.lib-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.lib-stats div { display: grid; }
.lib-stats b { font-size: 22px; font-weight: 800; }
.lib-stats small { color: var(--muted); }
.stack-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; background: rgba(255, 255, 255, .05); }
.stack-bar i, .legend i { display: block; }
.t-video { background: var(--accent); } .t-audio { background: var(--accent-2); } .t-image { background: var(--violet); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; font-size: 13px; color: var(--muted); text-transform: capitalize; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.job { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.live-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-row:hover strong { color: var(--accent-2); }
.explainer { margin-top: 50px; }
.pipes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.pipe { padding: 22px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 16px; align-content: start; }
.pipe header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pipe h3 { font-size: 17px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
.flow li { position: relative; padding: 0 0 18px 38px; counter-increment: s; font-weight: 600; font-size: 14px; }
.flow li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); }
.flow li::after { content: ''; position: absolute; left: 12.5px; top: 26px; bottom: 0; width: 1px; background: linear-gradient(180deg, var(--accent), transparent); }
.flow li:last-child { padding-bottom: 0; }
.flow li:last-child::after { display: none; }
.flow li:last-child::before { background: var(--grad); border-color: transparent; }

/* ══════════════ embed ══════════════ */
body.embed { background: #000; }
body.embed .nav, body.embed .tabbar, body.embed .grain, body.embed .mini { display: none !important; }
body.embed .view { min-height: 0; animation: none; }
body.embed .player { position: fixed; inset: 0; aspect-ratio: auto; max-height: none; width: 100vw; height: 100vh; }
body.embed .ply-box { border-radius: 0; }

/* ══════════════ responsive ══════════════ */
@media (max-width: 1200px) {
  .watch, .studio { grid-template-columns: 1fr; }
  .watch-side { position: relative; top: 0; max-height: none; }
  .watch-side .tab-panel { max-height: 640px; }
  .det-body { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav-search.open, .nav-search:focus-within { width: min(220px, 50vw); }
}
@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  .nav { gap: 12px; }
  .brand-word { font-size: 25px; }
  .nav-right .nav-icon[href='#/upload'], .nav-right .nav-icon[href='#/stats'] { display: none; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(10, 10, 15, .92); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 4px 10px; font-size: 10.5px; font-weight: 600; color: var(--muted); border-radius: 10px; position: relative; }
  .tabbar a[data-count]:not([data-count=''])::after { content: attr(data-count); position: absolute; top: 0; right: 4px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--live); color: #fff; font-size: 9.5px; font-weight: 800; display: grid; place-items: center; }
  .nav .nav-icon[href='#/upload'] { display: none; }
  .tabbar a.active { color: var(--text); }
  .tabbar a.active .i { color: var(--accent-2); }
  .tabbar .i { width: 22px; height: 22px; }
  body { padding-bottom: 64px; }
  body.embed { padding-bottom: 0; }
  .toasts { bottom: 80px; }
  .mini { bottom: 76px; right: 10px; width: min(300px, calc(100vw - 20px)); }
  .hero { height: 78vh; min-height: 520px; }
  .hero-content { bottom: 70px; gap: 14px; }
  .hero-side { bottom: auto; top: calc(var(--nav-h) + 10px); }
  .hero-actions .btn-lg { height: 46px; padding: 0 18px; font-size: 15px; }
  .hero-actions .btn-icon.btn-lg { width: 46px; padding: 0; }
  .rows { margin-top: -40px; }
  .row-track { grid-auto-columns: 64vw; gap: 10px; }
  .row-photos .row-track { grid-auto-columns: 46vw; }
  .row-arrow { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 18px 10px; }
  .grid.layout-list .card { grid-template-columns: 120px 1fr; gap: 12px; }
  .card-more { opacity: 1; }
  .watch, .studio { padding-left: 0; padding-right: 0; gap: 16px; padding-top: var(--nav-h); }
  .watch-player .ply-box, .studio-stage { border-radius: 0; }
  .watch-info, .watch-side, .studio-bar, .studio-health, .studio-side { margin: 0 16px; }
  .watch-actions .btn span { display: none; }
  .watch.theater .watch-player { margin: 0; }
  .qitem { grid-template-columns: 120px 1fr; }
  .toolbar { gap: 8px; }
  .toolbar .seg { order: 3; overflow-x: auto; max-width: 100%; }
  .field-grid { grid-template-columns: 1fr; }
  .lb-stage { padding: 60px 8px 8px; }
  .lb-nav { width: 44px; height: 44px; margin-top: -22px; }
  .det-head { left: 18px; right: 18px; }
  .det-body { padding: 8px 18px 22px; }
  .drop-folder { flex-direction: column; border-radius: 18px; padding: 10px; }
  .url-form { flex-direction: column; }
  .lib-stats b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { display: none; }
}

/* ── responsive refinements ── */
@media (max-width: 480px) {
  .nav { gap: 4px; padding-right: 10px; }
  .nav-right { gap: 2px; }
  .nav-right #fsBtn { display: none; }
  .nav-icon { width: 36px; height: 36px; }
  .avatar { width: 32px; height: 32px; }
  .nav-search { width: 36px; padding: 0 9px; }
  .mini { width: min(230px, 64vw); right: 8px; }
  .mini-title { font-size: 12px; }
  .hero-title { font-size: clamp(44px, 14vw, 64px); }
  .hero-actions { gap: 8px; }
  .page { padding-left: 14px; padding-right: 14px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi b { font-size: 21px; }
  .kpi { padding: 14px; }
}
@media (max-width: 380px) {
  .nav-right #langBtn { display: none; } /* language stays available in the account menu */
  .brand-mobile .brand-word { font-size: 21px; }
}
@media (min-width: 1900px) {
  .row-track { grid-auto-columns: clamp(300px, 15.5vw, 460px); gap: 18px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .page { max-width: 2100px; }
  .watch { max-width: 2200px; grid-template-columns: minmax(0, 1fr) 440px; }
  .hero-content { width: min(780px, 100% - 2 * var(--gutter)); }
}
@media (min-width: 2400px) { html { font-size: 17px; } body { font-size: 16.5px; } }
