:root {
  --bg: #0a0c12;
  --bg2: #0e1119;
  --panel: #131722;
  --panel2: #1a1f2d;
  --panel3: #222839;
  --line: #242b3b;
  --line2: #2f374a;
  --text: #eef0f5;
  --muted: #8d95a6;
  --dim: #5f6779;
  --accent: #ff4d6d;
  --accent2: #7c5cff;
  --live: #ff3b4e;
  --star: #ffc94d;
  --ok: #43d17a;
  --radius: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 140ms;
  --t-med: 240ms;
  --topbar-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 10% -10%, rgba(124, 92, 255, .10), transparent 60%),
              radial-gradient(900px 500px at 100% 0%, rgba(255, 77, 109, .07), transparent 60%),
              var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px;
  background: rgba(10, 12, 18, .78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center;
  box-shadow: 0 6px 20px -6px rgba(255, 77, 109, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand-mark span { width: 0; height: 0; border-left: 10px solid #fff; border-top: 6.5px solid transparent; border-bottom: 6.5px solid transparent; margin-left: 3px; }
.brand-name { font-size: 17px; letter-spacing: -.02em; font-weight: 500; }
.brand-name b { font-weight: 800; }

.search {
  flex: 1; max-width: 620px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.search:focus-within { border-color: rgba(124, 92, 255, .7); box-shadow: 0 0 0 4px rgba(124, 92, 255, .15); background: var(--panel2); }
.search svg { color: var(--muted); width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { display: none; }
.kbd-hint { font: 600 11px/1 Inter, sans-serif; color: var(--muted); border: 1px solid var(--line2); border-radius: 6px; padding: 4px 7px; }
.search:focus-within .kbd-hint { display: none; }
.search-clear { background: none; border: 0; padding: 4px; color: var(--muted); display: grid; border-radius: 6px; }
.search-clear:hover { color: var(--text); background: var(--panel3); }
.search-clear svg { width: 16px; height: 16px; }
.topbar-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; flex: none; }

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 59, 78, .6); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 78, .55); } 70% { box-shadow: 0 0 0 7px rgba(255, 59, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 78, 0); } }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 24px;
  padding: 24px;
  max-width: 1800px; margin: 0 auto;
  align-items: start;
}
.stage-col { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

/* ---------- Player ---------- */
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06);
  isolation: isolate;
  outline: none;
}
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.player:-webkit-full-screen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }

/* idle home */
.idle {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  background:
    radial-gradient(600px 300px at 20% 10%, rgba(124, 92, 255, .35), transparent 60%),
    radial-gradient(600px 320px at 90% 100%, rgba(255, 77, 109, .28), transparent 60%),
    linear-gradient(180deg, #121624, #0b0d14);
  transition: opacity var(--t-med) var(--ease);
}
.player:not([data-state="idle"]) .idle { opacity: 0; pointer-events: none; }
.idle-inner { width: 100%; max-width: 760px; text-align: center; }
.idle-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #ffd0d7; background: rgba(255, 59, 78, .14); border: 1px solid rgba(255, 59, 78, .3); padding: 6px 12px; border-radius: 99px; }
.idle h1 { font-size: clamp(20px, 3vw, 34px); letter-spacing: -.03em; line-height: 1.15; margin: 14px 0 8px; font-weight: 800; }
.idle p { color: var(--muted); margin: 0 0 22px; font-size: clamp(13px, 1.4vw, 15px); }
.idle-rows { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.idle-row-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.idle-cards { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.idle-cards::-webkit-scrollbar { display: none; }

/* spinner */
.spinner {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: rgba(255, 255, 255, .85); font-weight: 500; font-size: 13px;
  background: radial-gradient(circle at center, rgba(0, 0, 0, .35), transparent 70%);
  opacity: 0; pointer-events: none; transition: opacity var(--t-med);
}
.player[data-state="loading"] .spinner, .player.buffering .spinner { opacity: 1; }
.ring { width: 48px; height: 48px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* error */
.err { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 20px; background: rgba(6, 8, 12, .82); backdrop-filter: blur(6px); }
.err-card { text-align: center; max-width: 380px; }
.err-card svg { width: 40px; height: 40px; color: var(--star); }
.err-card h3 { margin: 10px 0 6px; font-size: 18px; }
.err-card p { margin: 0 0 18px; color: var(--muted); }
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.unmute {
  position: absolute; z-index: 7; top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: #fff; color: #111; border: 0; border-radius: 99px; padding: 10px 16px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  animation: drop var(--t-med) var(--ease);
}
.unmute svg { width: 18px; height: 18px; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -8px); } }

.osd {
  position: absolute; z-index: 8; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.96);
  background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px); color: #fff;
  padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 15px;
  opacity: 0; pointer-events: none; transition: opacity var(--t-med), transform var(--t-med) var(--ease);
}
.osd.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* overlays */
.ctrl-top, .controls { position: absolute; left: 0; right: 0; z-index: 5; transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
.ctrl-top { top: 0; padding: 16px 18px 40px; background: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent); pointer-events: none; }
.controls { bottom: 0; padding: 50px 12px 12px; background: linear-gradient(0deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, .35) 60%, transparent); }
.player[data-state="idle"] .ctrl-top, .player[data-state="idle"] .controls { opacity: 0; pointer-events: none; }
.player.hide-ui .ctrl-top { opacity: 0; transform: translateY(-8px); }
.player.hide-ui .controls { opacity: 0; transform: translateY(8px); pointer-events: none; }
.player.hide-ui { cursor: none; }

.now { display: flex; align-items: center; gap: 12px; }
.now-tile, .info-tile, .tile { display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: -.02em; flex: none; position: relative; overflow: hidden; }
.now-tile { width: 38px; height: 38px; border-radius: 10px; font-size: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.now-name { font-weight: 700; font-size: 16px; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.now-meta { font-size: 12px; color: rgba(255, 255, 255, .75); }

.ctrl-row { display: flex; align-items: center; gap: 4px; }
.grow { flex: 1; }
.cbtn {
  width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: #fff;
  display: grid; place-items: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.cbtn:hover { background: rgba(255, 255, 255, .14); }
.cbtn:active { transform: scale(.92); }
.cbtn.big svg { width: 24px; height: 24px; }
.cbtn .fill { fill: currentColor; stroke: none; }
.cbtn.txt { width: auto; padding: 0 10px; font-size: 13px; font-weight: 600; }
#btnPlay .i-play, #btnPlay .i-pause { fill: currentColor; stroke: none; }
.player.paused #btnPlay .i-pause, .player:not(.paused) #btnPlay .i-play { display: none; }
.player.muted #btnMute .i-vol, .player:not(.muted) #btnMute .i-muted { display: none; }
#btnFs .i-exitfs { display: none; }
.player.fs #btnFs .i-fs { display: none; }
.player.fs #btnFs .i-exitfs { display: block; }
#btnFav.on svg, .info-actions .on svg { fill: var(--star); stroke: var(--star); }

.vol { display: flex; align-items: center; }
.vol-slider {
  -webkit-appearance: none; appearance: none; width: 0; opacity: 0; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, #fff var(--v, 100%), rgba(255, 255, 255, .25) var(--v, 100%));
  transition: width var(--t-med) var(--ease), opacity var(--t-med), margin var(--t-med);
  cursor: pointer; visibility: hidden;
}
.vol:hover .vol-slider, .vol:focus-within .vol-slider { visibility: visible; width: 86px; opacity: 1; margin: 0 10px 0 4px; }
.vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
.vol-slider::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }

.live-pill {
  display: inline-flex; align-items: center; gap: 7px; margin-left: 6px;
  height: 28px; padding: 0 11px; border-radius: 99px; border: 0;
  font-size: 12px; font-weight: 800; letter-spacing: .06em;
  background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .7);
  transition: background var(--t-fast), color var(--t-fast);
}
.live-pill .live-dot { background: rgba(255, 255, 255, .5); animation: none; }
.live-pill.at-edge { background: var(--live); color: #fff; cursor: default; }
.live-pill.at-edge .live-dot { background: #fff; animation: pulse 1.8s infinite; }

.menu-wrap { position: relative; }
.menu {
  position: absolute; bottom: calc(100% + 8px); right: 0; min-width: 150px;
  background: rgba(20, 24, 34, .96); backdrop-filter: blur(12px);
  border: 1px solid var(--line2); border-radius: 12px; padding: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  animation: pop var(--t-fast) var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.menu button { display: flex; justify-content: space-between; gap: 16px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.menu button:hover { background: rgba(255, 255, 255, .08); }
.menu button.sel { color: var(--accent); font-weight: 700; }
.menu .menu-title { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px 4px; }

/* ---------- Info bar ---------- */
.info {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  animation: fadeUp var(--t-med) var(--ease);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.info-tile { width: 56px; height: 56px; border-radius: 14px; font-size: 16px; }
.info-main { flex: 1; min-width: 0; }
.info-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.info-title h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: var(--panel3); color: #cdd2dd; border: 1px solid var(--line2); }
.tag.live { background: rgba(255, 59, 78, .15); color: #ff9aa5; border-color: rgba(255, 59, 78, .35); }
.tag.live .live-dot { width: 6px; height: 6px; }
.tag.via { color: var(--muted); font-weight: 500; }
.info-actions { display: flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font-weight: 600; font-size: 13px;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:hover { background: var(--panel3); border-color: #3b4560; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #e8456a 50%, var(--accent2)); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -10px rgba(255, 77, 109, .8); }
.btn.primary:hover { filter: brightness(1.08); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Up next ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.sec-head h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }

.card {
  display: flex; flex-direction: column; gap: 10px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 0;
  transition: transform var(--t-med) var(--ease), border-color var(--t-fast), background var(--t-fast);
}
.card:hover { transform: translateY(-3px); border-color: var(--line2); background: var(--panel2); }
.card .tile { width: 100%; aspect-ratio: 16/9; border-radius: 10px; font-size: 22px; }
.card .c-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .c-meta { font-size: 12px; color: var(--muted); margin-top: -6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idle .card { width: 150px; flex: none; background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .08); backdrop-filter: blur(6px); }
.idle .card .tile { font-size: 18px; }

.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .22), transparent 45%); pointer-events: none; }
.tile .flag { position: absolute; right: 6px; bottom: 4px; font-size: 13px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }

/* ---------- Guide (sidebar) ---------- */
.guide {
  position: sticky; top: calc(var(--topbar-h) + 24px);
  height: calc(100vh - var(--topbar-h) - 48px);
  height: calc(100dvh - var(--topbar-h) - 48px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.tabs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px; padding: 4px; background: var(--bg2); border-radius: 12px; border: 1px solid var(--line); }
.tab { position: relative; z-index: 1; border: 0; background: none; height: 34px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; transition: color var(--t-fast); white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--text); }
.tab-glider { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 9px; background: var(--panel3); box-shadow: 0 2px 8px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05); transition: transform var(--t-med) var(--ease); }
.badge { font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--line2); color: var(--text); display: inline-grid; place-items: center; }

.filters { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cat {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  height: 34px; padding: 0 11px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--bg2); color: #c9cfdb;
  font-size: 12.5px; font-weight: 600; text-align: left;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.cat svg { width: 16px; height: 16px; color: var(--muted); transition: color var(--t-fast); }
.cat .cat-name { white-space: nowrap; }
.cat .n { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.cat:hover { border-color: var(--line2); color: #fff; background: var(--panel2); }
.cat:hover svg { color: #fff; }
.cat:active { transform: scale(.97); }
.cat.on { background: linear-gradient(135deg, rgba(255, 77, 109, .22), rgba(124, 92, 255, .22)); border-color: rgba(255, 77, 109, .55); color: #fff; }
.cat.on svg { color: var(--accent); }
.cat.on .n { color: #ffd0d7; }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select { appearance: none; -webkit-appearance: none; width: 100%; height: 36px; padding: 0 30px 0 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.select select:hover { border-color: var(--line2); }

.list-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; padding: 2px 4px; border-radius: 6px; }
.link-btn:hover { color: var(--accent); }

.list { list-style: none; margin: 0; padding: 4px 8px 12px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.list::-webkit-scrollbar { width: 8px; }
.list::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; border: 2px solid var(--panel); }
.row {
  display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px;
  cursor: pointer; position: relative;
  transition: background var(--t-fast);
  content-visibility: auto; contain-intrinsic-size: 60px;
}
.row:hover { background: var(--panel2); }
.row.active { background: linear-gradient(90deg, rgba(255, 77, 109, .16), rgba(124, 92, 255, .10)); box-shadow: inset 0 0 0 1px rgba(255, 77, 109, .28); }
.row.kbd { box-shadow: inset 0 0 0 2px var(--accent2); }
.row .tile { width: 52px; height: 40px; border-radius: 9px; font-size: 12.5px; }
.row-main { flex: 1; min-width: 0; }
.row-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-name mark { background: rgba(255, 201, 77, .25); color: inherit; border-radius: 3px; padding: 0 1px; }
.row-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-fav { width: 34px; height: 34px; border: 0; background: none; border-radius: 9px; display: grid; place-items: center; color: var(--dim); opacity: 0; transition: opacity var(--t-fast), color var(--t-fast), background var(--t-fast); }
.row:hover .row-fav, .row-fav.on, .row-fav:focus-visible { opacity: 1; }
.row-fav:hover { background: var(--panel3); color: var(--text); }
.row-fav svg { width: 18px; height: 18px; }
.row-fav.on { color: var(--star); }
.row-fav.on svg { fill: var(--star); }
.row-fav.pop svg { animation: starpop 380ms var(--ease); }
@keyframes starpop { 40% { transform: scale(1.35); } }
.eq { display: none; gap: 2px; align-items: flex-end; height: 14px; margin-right: 2px; }
.eq i { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s; }
.eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.player-paused-global .eq i { animation-play-state: paused; }
.ago { font-size: 11px; color: var(--dim); white-space: nowrap; }

.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0;
  background: #f4f5f8; color: #111; font-weight: 600; font-size: 13px;
  padding: 10px 16px; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  transition: opacity var(--t-med), transform var(--t-med) var(--ease); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; padding: 16px; }
  .guide { top: calc(var(--topbar-h) + 16px); height: calc(100dvh - var(--topbar-h) - 32px); }
}
@media (max-width: 860px) {
  :root { --topbar-h: 58px; }
  .topbar { gap: 12px; padding: 0 16px; }
  .brand-name, .topbar-meta, .kbd-hint { display: none; }
  .layout { grid-template-columns: 1fr; padding: 0 0 24px; gap: 0; }
  .stage-col { gap: 0; }
  .player { position: sticky; top: var(--topbar-h); z-index: 30; border-radius: 0; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .9); }
  .player[data-state="idle"] { position: relative; top: 0; aspect-ratio: auto; min-height: 56vw; }
  .player[data-state="idle"] .idle { position: relative; }
  .idle { padding: 22px 16px; }
  .info { margin: 12px 16px 0; padding: 12px; gap: 12px; }
  .info-tile { width: 44px; height: 44px; font-size: 13px; border-radius: 11px; }
  .info-title h2 { font-size: 17px; }
  .info-actions .btn span { display: none; }
  .info-actions .btn { width: 40px; padding: 0; }
  .upnext { margin: 16px 16px 0; }
  .hscroll { grid-auto-columns: 150px; }
  .guide { position: static; height: auto; margin: 16px 16px 0; border-radius: 16px; }
  .list { overflow: visible; }
  .row-fav { opacity: 1; }
  .vol-slider { display: none; }
  .cbtn { width: 38px; height: 38px; }
  #btnPrev, #btnNext { display: none; }
  .controls { padding: 40px 6px 6px; }
  .ctrl-top { padding: 10px 12px 30px; }
  .now-tile { display: none; }
  .now-name { font-size: 14px; }
}
@media (max-width: 380px) {
  #btnPip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- logos ---------- */
.tile b { font-weight: 800; }
.tile.logo { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.tile.logo::after { background: linear-gradient(160deg, rgba(255, 255, 255, .12), transparent 40%); }
.tile.logo img { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; z-index: 1; user-select: none; }
.tile.logo b { color: #6b7385; font-size: .9em; }
.tile.logo img + b { visibility: hidden; }
.row .tile.logo img { inset: 10%; width: 80%; height: 80%; }
.card .tile.logo img { inset: 16% 18%; width: 64%; height: 68%; }

/* ---------- row play button ---------- */
.row-play {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 32px; padding: 0 12px 0 10px; border-radius: 99px;
  border: 1px solid rgba(255, 77, 109, .45); background: rgba(255, 77, 109, .1); color: #ffb3c0;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.row-play svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.row:hover .row-play, .row-play:focus-visible { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px rgba(255, 77, 109, .9); }
.row-play:active { transform: scale(.94); }
.row.active .row-play { background: var(--live); border-color: transparent; color: #fff; }
.row.active .row-play svg { display: none; }
.row-play .eq { display: none; height: 12px; }
.row.active .row-play .eq { display: flex; }
.row-play .eq i { background: #fff; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* ---------- cards ---------- */
.card { cursor: pointer; }
.card-art { position: relative; display: block; border-radius: 10px; overflow: hidden; }
.card-art .tile { width: 100%; aspect-ratio: 16/9; border-radius: 10px; font-size: 22px; }
.card-play {
  position: absolute; z-index: 2; right: 8px; bottom: 8px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(6px) scale(.9);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.card-play svg { width: 14px; height: 14px; fill: #fff; stroke: none; margin-left: 2px; }
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; transform: none; }
@media (hover: none) { .card-play { opacity: 1; transform: none; width: 28px; height: 28px; } }
.c-name, .c-meta { display: block; }

.idle-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; }
.idle-cat {
  display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); color: #fff; font-weight: 600; font-size: 13px;
  backdrop-filter: blur(6px); transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.idle-cat svg { width: 18px; height: 18px; color: #ff9aa9; }
.idle-cat span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idle-cat small { color: rgba(255, 255, 255, .5); font-weight: 600; }
.idle-cat:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); transform: translateY(-2px); }
.tag svg { width: 13px; height: 13px; }

@media (max-width: 860px) {
  .row-play { height: 34px; padding: 0 12px; }
  .row-play .rp-label { display: inline; }
  .row-fav { width: 32px; }
  .idle .card { width: 132px; }
  .idle-cats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .idle-browse { display: none; }
  .player[data-state="idle"] { min-height: 0; }
  .idle h1 { margin-top: 10px; }
  .info-title .tag.live { display: none; }
}
