:root {
  --bg: #0b0f17;
  --panel: #131a27;
  --panel2: #1a2332;
  --border: #243044;
  --text: #e6edf6;
  --muted: #8b9ab0;
  --accent: #4f8cff;
  --green: #2ecc71;
  --red: #ff4d5e;
  --amber: #ffb347;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 110px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0e1320, #0b0f17);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 28px; color: var(--accent); }
.topbar h1 { font-size: 18px; margin: 0; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.conn { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.off { background: #586175; }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }

.authbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--panel);
}
.authbar input {
  background: var(--panel2); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; border-radius: 8px; width: 280px; font-size: 14px;
}
.authbar .hint { color: var(--muted); font-size: 12px; }
code { background: #0c1017; padding: 1px 6px; border-radius: 4px; color: var(--amber); }

button {
  background: var(--accent); color: white; border: none; padding: 9px 16px;
  border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 600;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.danger { background: var(--red); }
button.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }

main { padding: 24px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-head h2 { font-size: 15px; margin: 0; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.badge { background: var(--panel2); border: 1px solid var(--border); padding: 2px 10px; border-radius: 999px; font-size: 12px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-name { font-weight: 700; font-size: 16px; }
.card-plat { color: var(--muted); font-size: 12px; margin-top: 2px; text-transform: capitalize; }
.status { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.status .dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status .dot.offline { background: #586175; }
.card-actions { display: flex; gap: 8px; }
.card-actions button { flex: 1; }
.streaming-tag { color: var(--red); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.empty { color: var(--muted); text-align: center; margin-top: 40px; }
.hidden { display: none !important; }

.player {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, #121a28, #0d131e);
  border-top: 1px solid var(--border); padding: 14px 24px;
  display: flex; align-items: center; gap: 24px; z-index: 10;
}
.player-info { display: flex; align-items: center; gap: 14px; min-width: 220px; }
.live-pill {
  background: var(--red); color: white; padding: 5px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 800; display: flex; align-items: center; gap: 6px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: white; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.player-name { font-weight: 700; }
.player-meta { color: var(--muted); font-size: 12px; }
.meter { flex: 1; height: 10px; background: var(--panel2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.meter-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), var(--amber), var(--red)); transition: width .08s linear; }
.player-actions { display: flex; align-items: center; gap: 16px; }
.vol { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.vol input { accent-color: var(--accent); }
