:root {
  --bg: #0e0f13;
  --panel: #181a21;
  --line: #2a2d38;
  --text: #ecedf2;
  --muted: #9a9db0;
  --accent: #e5484d;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--line); flex: none;
}
.brand { font-weight: 700; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.viewers { display: flex; gap: 4px; }
.viewers img, .viewers span {
  width: 26px; height: 26px; border-radius: 50%; background: var(--line);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}

.status { text-align: center; color: var(--muted); padding: 24px 16px; margin: 0; }

main { flex: 1; overflow-y: auto; padding: 12px 16px 24px; }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; background: var(--panel); border-radius: 8px; padding: 3px; }
.tab { background: none; border: 0; padding: 6px 14px; border-radius: 6px; color: var(--muted); }
.tab.on { background: var(--line); color: var(--text); }
#search {
  flex: 1; min-width: 140px; background: var(--panel); border: 1px solid var(--line);
  color: var(--text); padding: 7px 10px; border-radius: 8px;
}
.ghost { background: var(--panel); border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; }
.ghost:hover { border-color: var(--muted); }
.crumb { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0;
  text-align: left; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .12s, border-color .12s;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; display: block; }
.card .t { padding: 8px 10px 0; font-weight: 600; }
.card .s { padding: 2px 10px 10px; color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); grid-column: 1 / -1; text-align: center; padding: 40px 0; }

#player { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.player-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 16px; flex-wrap: wrap;
}
.player-bar strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.actions { display: flex; gap: 8px; }
.stage { flex: 1; position: relative; background: #000; min-height: 0; }
video { width: 100%; height: 100%; display: block; background: #000; }
.unmute {
  position: absolute; inset: 0; margin: auto; width: max-content; height: max-content;
  background: var(--accent); border: 0; padding: 14px 22px; border-radius: 999px; font-weight: 700;
}

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  background: rgba(24, 26, 33, .95); border: 1px solid var(--line); padding: 8px 14px;
  border-radius: 999px; font-size: 13px; pointer-events: none;
}
