:root {
  --bg: #0c0a1d;
  --bg2: #141130;
  --panel: #1a1640;
  --panel2: #221d52;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f3f0ff;
  --muted: #a49fc8;
  --accent: #ff4fa3;
  --accent2: #7c5cff;
  --good: #3ee08f;
  --warn: #ffb547;
  --close: #ff8a3d;
  --danger: #ff5d6c;
  --radius: 16px;
  --grad: linear-gradient(135deg, #ff4fa3 0%, #7c5cff 55%, #38bdf8 100%);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 10% -10%, #2b1660 0%, transparent 60%),
              radial-gradient(900px 500px at 110% 10%, #0f3a5c 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: #b9a6ff; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ------------------------------------------------------------ knoppen & velden */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 11px 18px; cursor: pointer;
  background: var(--panel2); color: var(--text); font-weight: 700;
  transition: transform .12s, filter .12s, background .12s; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn.primary { background: var(--grad); box-shadow: 0 6px 24px rgba(255, 79, 163, .35); }
.btn.big { padding: 15px 26px; font-size: 17px; border-radius: 14px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.danger { background: rgba(255, 93, 108, .15); color: #ffb3bb; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.icon-btn {
  border: 0; background: transparent; cursor: pointer; color: var(--muted);
  width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 15px;
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }

.input, select.input, textarea.input {
  width: 100%; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; outline: none; transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(124, 92, 255, .25); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}

.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); text-transform: uppercase;
}
.src-deezer { background: rgba(162, 56, 255, .18); color: #d5a8ff; }
.src-itunes { background: rgba(255, 79, 120, .18); color: #ff9db5; }
.src-youtube { background: rgba(255, 0, 0, .18); color: #ff8f8f; }
.src-soundcloud { background: rgba(255, 119, 0, .18); color: #ffb072; }
.src-spotify { background: rgba(30, 215, 96, .18); color: #7df0a6; }
.src-audio { background: rgba(56, 189, 248, .18); color: #9adfff; }

/* ------------------------------------------------------------ logo / header */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo .ear {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: grid; place-items: center;
  font-size: 22px; box-shadow: 0 4px 18px rgba(255, 79, 163, .4);
}
.logo b { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: .01em; }
.logo b em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--line);
  background: rgba(12, 10, 29, .6); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20;
}
.topbar .spacer { flex: 1; }

/* ------------------------------------------------------------ homepagina */
.home main { max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 64px 0 40px; }
.hero h1 { font-family: var(--display); font-size: clamp(38px, 5vw, 62px); line-height: 1.05; margin: 0 0 18px; font-weight: 600; }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 540px; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.join-box { display: flex; gap: 8px; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
.join-box input { background: transparent; border: 0; outline: none; width: 150px; padding: 0 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.join-box input::placeholder { letter-spacing: .02em; font-weight: 600; text-transform: none; }
.join-error { color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 18px; }

.hero-visual { position: relative; height: 340px; }
.vinyl {
  position: absolute; inset: 20px 30px; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #111 0 2px, #1b1b22 3px 5px);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 10px #0a0a0f; animation: spin 8s linear infinite;
  aspect-ratio: 1; height: 300px; width: 300px; margin: auto;
}
.vinyl::after { content: '👂'; position: absolute; inset: 37%; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 34px; }
.bubble {
  position: absolute; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow); animation: float 4s ease-in-out infinite;
}
.bubble.b1 { top: 10px; left: 0; }
.bubble.b2 { top: 140px; right: -10px; animation-delay: -1.3s; color: var(--close); }
.bubble.b3 { bottom: 10px; left: 30px; animation-delay: -2.6s; color: var(--good); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }

.section { margin-top: 56px; }
.section h2 { font-family: var(--display); font-weight: 600; font-size: 28px; margin: 0 0 6px; }
.section .sub { color: var(--muted); margin: 0 0 22px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { padding: 22px; }
.step .num { width: 38px; height: 38px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; font-weight: 900; margin-bottom: 12px; }
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mode-card { padding: 22px; }
.mode-card h3 { margin: 0 0 6px; font-size: 18px; }
.mode-card p { margin: 0; color: var(--muted); }
.chat-demo { margin-top: 14px; display: grid; gap: 6px; font-size: 14px; }
.chat-demo div { background: rgba(0,0,0,.25); padding: 6px 10px; border-radius: 9px; }
.sources { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.sources .badge { font-size: 12px; padding: 5px 12px; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.lib-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .15s; }
.lib-card:hover { transform: translateY(-3px); }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1; background: var(--panel2); position: relative; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; filter: blur(6px) saturate(1.2); transform: scale(1.1); }
.mosaic .q { position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px; text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.lib-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lib-body h3 { margin: 0; font-size: 16px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13px; }
.lib-body .btn { margin-top: auto; }
.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

.rooms-list { display: grid; gap: 10px; }
.room-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.room-row .code { font-weight: 900; letter-spacing: .14em; background: rgba(0,0,0,.3); padding: 4px 10px; border-radius: 8px; font-family: ui-monospace, monospace; }
.room-row .name { font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

footer.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0 20px; }

/* ------------------------------------------------------------ modals */
.modal-bg {
  position: fixed; inset: 0; background: rgba(5, 4, 15, .7); backdrop-filter: blur(6px);
  display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .15s;
}
.modal { width: 100%; max-width: 480px; padding: 28px; background: var(--bg2); position: relative; max-height: 92vh; overflow: auto; }
.modal h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 600; font-size: 26px; }
.modal .sub { margin: 0 0 20px; color: var(--muted); }
.modal .close-x { position: absolute; top: 14px; right: 14px; }
.modal .error { color: var(--danger); font-size: 14px; min-height: 20px; margin-bottom: 8px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-cards label { cursor: pointer; }
.radio-cards input { position: absolute; opacity: 0; pointer-events: none; }
.radio-cards .rc { border: 2px solid var(--line); border-radius: 12px; padding: 12px; height: 100%; transition: border .15s, background .15s; }
.radio-cards .rc b { display: block; margin-bottom: 2px; }
.radio-cards .rc span { font-size: 12.5px; color: var(--muted); }
.radio-cards input:checked + .rc { border-color: var(--accent); background: rgba(255, 79, 163, .08); }
.lib-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(124,92,255,.12); border: 1px solid rgba(124,92,255,.35); padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14px; }
@keyframes fade { from { opacity: 0; } }

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; justify-items: center; }
.toast { background: var(--panel2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 700; animation: toast .25s; }
.toast.good { border-color: rgba(62, 224, 143, .5); }
.toast.bad { border-color: rgba(255, 93, 108, .6); }
.toast.warn { border-color: rgba(255, 181, 71, .7); color: #ffd99b; }
@keyframes toast { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------ lobby */
.room-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.room-code {
  display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.3); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px 4px 4px 12px; font-size: 13px; color: var(--muted);
}
.room-code b { color: var(--text); font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: .15em; }
.room-title { font-weight: 800; font-size: 16px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.vol input { width: 110px; accent-color: var(--accent); }

.layout {
  flex: 1; min-height: 0; display: grid; grid-template-columns: 290px minmax(0, 1fr) 400px; gap: 16px; padding: 16px;
}
.col { min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.panel { padding: 16px; display: flex; flex-direction: column; min-height: 0; }
.panel h3 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.panel h3 .grow { flex: 1; }

/* spelers */
.players { display: grid; gap: 6px; overflow: auto; }
.player { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.18); position: relative; }
.player.me { outline: 1px solid rgba(124, 92, 255, .5); }
.player.off { opacity: .45; }
.player.guessed { background: rgba(62, 224, 143, .12); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #1a1033; flex-shrink: 0; font-size: 15px; }
.player .info { flex: 1; min-width: 0; }
.player .pname { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.player .psub { font-size: 12px; color: var(--muted); }
.player .score { font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; }
.player .checks { display: flex; gap: 2px; font-size: 13px; }
.player .menu { position: absolute; right: 6px; top: 100%; z-index: 10; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 4px; display: grid; min-width: 150px; box-shadow: var(--shadow); }
.player .menu button { background: transparent; border: 0; text-align: left; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.player .menu button:hover { background: rgba(255,255,255,.08); }

/* instellingen */
.settings { display: grid; gap: 10px; font-size: 14px; }
.settings .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.settings select, .settings input[type=text] { width: auto; padding: 6px 10px; border-radius: 9px; }
.settings input[type=text] { width: 150px; }
.seg { display: inline-flex; background: rgba(0,0,0,.3); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--accent2); color: white; }
.seg button:disabled { cursor: default; }
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: rgba(255,255,255,.15); border-radius: 22px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:disabled + span { cursor: default; opacity: .6; }

/* podium (midden) */
.stage { padding: 22px; min-height: 250px; display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; }
.stage h2 { font-family: var(--display); font-weight: 600; margin: 0 0 6px; font-size: 28px; }
.stage .round-label { position: absolute; top: 14px; left: 18px; font-weight: 800; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.stage .host-ctrl { position: absolute; top: 10px; right: 12px; display: flex; gap: 6px; }
.countdown { font-family: var(--display); font-size: 96px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .9s ease-out infinite; }
@keyframes pop { 0% { transform: scale(1.4); opacity: 0; } 30% { transform: scale(1); opacity: 1; } }

.eq { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 64px; margin: 18px auto 16px; }
.eq i { width: 9px; border-radius: 4px; background: var(--grad); animation: eq 1s ease-in-out infinite; height: 20%; }
.eq i:nth-child(2) { animation-delay: -.2s; } .eq i:nth-child(3) { animation-delay: -.5s; }
.eq i:nth-child(4) { animation-delay: -.7s; } .eq i:nth-child(5) { animation-delay: -.3s; }
.eq i:nth-child(6) { animation-delay: -.9s; } .eq i:nth-child(7) { animation-delay: -.4s; }
.eq.paused i { animation-play-state: paused; }
@keyframes eq { 50% { height: 100%; } }
.mask { font-family: ui-monospace, 'Cascadia Code', monospace; font-size: 26px; letter-spacing: .28em; font-weight: 700; margin: 6px 0 4px; word-break: break-word; }
.timer-bar { width: min(420px, 90%); height: 8px; background: rgba(255,255,255,.08); border-radius: 8px; margin: 14px auto 0; overflow: hidden; }
.timer-bar div { height: 100%; background: var(--grad); border-radius: 8px; transition: width .25s linear; }
.timer-num { font-weight: 900; font-size: 15px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.own-song { display: inline-block; margin-top: 10px; background: rgba(255, 181, 71, .14); color: var(--warn); padding: 5px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; }

.reveal { display: flex; align-items: center; gap: 22px; text-align: left; animation: fade .3s; }
.reveal img, .reveal .noart { width: 150px; height: 150px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow); background: var(--panel2); display: grid; place-items: center; font-size: 50px; }
.reveal .t { font-family: var(--display); font-size: 28px; line-height: 1.15; font-weight: 600; }
.reveal .a { font-size: 18px; color: var(--muted); margin-bottom: 8px; }
.reveal .who { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { background: rgba(62, 224, 143, .14); color: var(--good); padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: 13px; }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: 14px 0 10px; }
.podium .pl { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 110px; }
.podium .block { width: 100%; border-radius: 12px 12px 0 0; display: grid; place-items: center; font-family: var(--display); font-size: 28px; background: var(--panel2); }
.podium .p1 .block { height: 110px; background: linear-gradient(180deg, #ffcf4a, #b8860b); color: #3a2700; }
.podium .p2 .block { height: 80px; background: linear-gradient(180deg, #d9dde8, #8a91a6); color: #23263a; }
.podium .p3 .block { height: 60px; background: linear-gradient(180deg, #f0a46b, #8b4a1c); color: #3a1a05; }
.podium .nm { font-weight: 800; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* chat */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.msg { padding: 3px 0; word-wrap: break-word; animation: fade .15s; }
.msg .n { font-weight: 800; margin-right: 6px; }
.msg.system { color: var(--muted); font-size: 13.5px; text-align: center; padding: 4px 0; }
.msg.system.good { color: var(--good); font-weight: 700; }
.msg.system.warn { color: var(--warn); }
.msg.private { align-self: flex-start; background: rgba(124, 92, 255, .16); border: 1px dashed rgba(124, 92, 255, .5); padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.msg.private.close { background: rgba(255, 138, 61, .14); border-color: rgba(255, 138, 61, .55); color: #ffc69e; }
.msg.private.good { background: rgba(62, 224, 143, .13); border-color: rgba(62, 224, 143, .5); color: #a5f5c9; }
.msg.private.warn { background: rgba(255, 181, 71, .13); border-color: rgba(255, 181, 71, .5); color: #ffd99b; }
.msg.private small { display: block; font-weight: 600; opacity: .6; font-size: 11px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: rgba(0,0,0,.15); }
.chat-form .input { flex: 1; }
.chat-form.guessing .input { border-color: rgba(255, 79, 163, .55); box-shadow: 0 0 0 3px rgba(255, 79, 163, .15); }

/* playlist (rechts) */
.pl-panel { flex: 1; padding: 0; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; white-space: nowrap; background: transparent; border: 0; padding: 13px 8px; cursor: pointer; font-weight: 800; color: var(--muted); border-bottom: 2px solid transparent; font-size: 13px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs button .count { background: rgba(255,255,255,.1); border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
.tab-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.omni { padding: 14px 14px 10px; display: grid; gap: 10px; }
.omni-input { position: relative; }
.omni-input .input { padding-left: 42px; padding-right: 40px; height: 46px; }
.omni-input .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 17px; pointer-events: none; }
.omni-input .clear { position: absolute; right: 6px; top: 7px; }
.src-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.src-chips button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 5px 11px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 13px; }
.src-chips button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.link-detect { display: flex; align-items: center; gap: 10px; background: rgba(62, 224, 143, .09); border: 1px solid rgba(62, 224, 143, .35); padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.link-detect .grow { flex: 1; min-width: 0; }
.hint-line { font-size: 12.5px; color: var(--muted); }
.results { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.track { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 11px; }
.track:hover { background: rgba(255,255,255,.04); }
.track .art { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--panel2); flex-shrink: 0; position: relative; display: grid; place-items: center; overflow: hidden; }
.track .art img { width: 100%; height: 100%; object-fit: cover; }
.track .art .play {
  position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.55); color: white; cursor: pointer; opacity: 0; transition: opacity .15s; font-size: 16px;
}
.track:hover .art .play, .track .art .play.on { opacity: 1; }
.track .meta { flex: 1; min-width: 0; }
.track .tt { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.track .ar { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .add { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--panel2); cursor: pointer; font-size: 18px; font-weight: 900; flex-shrink: 0; transition: .15s; }
.track .add:hover { background: var(--accent); }
.track .add.done { background: rgba(62, 224, 143, .2); color: var(--good); }
.track input.edit { background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; width: 100%; font-size: 13px; margin: 1px 0; }
.mine-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 4px; }
.mine-head .grow { flex: 1; font-size: 13px; color: var(--muted); }
.others { padding: 10px 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 14px; }
.others .o { display: flex; align-items: center; gap: 8px; }
.others .o .dot { width: 10px; height: 10px; border-radius: 50%; }
.others .o b { margin-left: auto; font-variant-numeric: tabular-nums; }
.locked-note { padding: 30px 22px; text-align: center; color: var(--muted); }
.locked-note .big { font-size: 46px; margin-bottom: 8px; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 20px auto; }
.lib-list { overflow-y: auto; padding: 10px 12px; display: grid; gap: 8px; align-content: start; flex: 1; }
.lib-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(0,0,0,.2); }
.lib-item .meta { flex: 1; min-width: 0; }
.lib-item .tt { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-item .ar { font-size: 12.5px; color: var(--muted); }
.lib-thumb { width: 46px; height: 46px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; overflow: hidden; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; filter: blur(3px); }
.lib-loaded { margin: 10px 14px 0; display: flex; align-items: center; gap: 10px; background: rgba(124,92,255,.12); border: 1px solid rgba(124,92,255,.35); padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.lib-loaded .grow { flex: 1; }
.drop-hover { outline: 2px dashed var(--accent); outline-offset: -8px; }

.start-area { display: grid; gap: 8px; }
.sound-gate {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: rgba(5,4,15,.75); backdrop-filter: blur(4px);
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1250px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr) 340px; }
}
@media (max-width: 1000px) {
  .room-page { height: auto; overflow: visible; }
  .layout { grid-template-columns: 1fr; }
  .chat { height: 60vh; flex: none; }
  .pl-panel { height: 75vh; flex: none; }
  .layout > .col:nth-child(2) { order: -1; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .vol input { width: 70px; }
  .room-title { display: none; }
}
@media (max-width: 640px) {
  .steps, .modes { grid-template-columns: 1fr; }
  .topbar { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .logo b { display: none; }
  .reveal { flex-direction: column; text-align: center; }
}

/* Mapje "Al gespeeld" */
details.played { margin: 6px 14px 12px; border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 12px; }
details.played summary { cursor: pointer; padding: 10px 12px; font-size: 14px; list-style: none; }
details.played summary::-webkit-details-marker { display: none; }
details.played summary::before { content: '▸ '; color: var(--muted); }
details.played[open] summary::before { content: '▾ '; }
details.played .mine-head { padding: 0 10px 4px; }
details.played .track { opacity: .65; }
.chip.bonus { background: rgba(255, 181, 71, .16); color: #ffb547; }

/* v1.2: doorspelen-stem, versienummer, huiskamer-keuze */
.vote-box { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ver { text-align: center; opacity: .6; padding: 2px 0 0; }
.mode-card.wide { grid-column: 1 / -1; }
.tv-toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; border: 2px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.tv-toggle input { margin-top: 4px; accent-color: var(--accent); }
.tv-toggle b { display: block; }
.tv-toggle span { font-size: 12.5px; color: var(--muted); }
.tv-toggle:has(input:checked) { border-color: var(--accent); background: rgba(255, 79, 163, .08); }

/* ------------------------------------------------------------ tv-scherm (huiskamer) */
.tv-layout {
  flex: 1; min-height: 0; display: grid; gap: 18px; padding: 18px;
  grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1fr) 210px;
  grid-template-areas: "stage side" "chat side";
}
.tv-stage { grid-area: stage; min-height: 0; }
.tv-side { grid-area: side; display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.tv-chat { grid-area: chat; padding: 10px 14px; display: flex; flex-direction: column; min-height: 0; }
.tv-chat .chat-log { flex: 1; font-size: 17px; }
.tv-players { flex: 1; }
.tv-players .avatar { font-size: 18px; }
.tv-players .pname { font-size: 18px; }
.tv-players .score { font-size: 22px; }
.qr-card { padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.qr-card img { width: 100%; max-width: 300px; aspect-ratio: 1; background: #fff; border-radius: 14px; padding: 8px; }
.qr-text { display: flex; flex-direction: column; gap: 4px; }
.qr-text b { font-size: 20px; }
.tv-code { color: var(--muted); }
.tv-code b { color: var(--text); font-family: ui-monospace, monospace; font-size: 26px; letter-spacing: .18em; margin-left: 6px; }
.qr-card.compact { flex-direction: row; text-align: left; padding: 12px; }
.qr-card.compact img { width: 110px; padding: 4px; border-radius: 10px; }
.qr-card.compact .qr-text b { font-size: 16px; }
.tv-page .stage h2 { font-size: 46px; }
.tv-page .stage .round-label { font-size: 17px; }
.tv-page .countdown { font-size: 170px; }
.tv-page .eq { height: 110px; }
.tv-page .eq i { width: 16px; }
.tv-page .mask { font-size: 48px; }
.tv-page .timer-bar { max-width: 720px; margin-left: auto; margin-right: auto; height: 14px; }
.tv-page .timer-num { font-size: 22px; }
.tv-page .reveal img, .tv-page .reveal .noart { width: 260px; height: 260px; }
.tv-page .reveal .t { font-size: 44px; }
.tv-page .reveal .a { font-size: 26px; }
.tv-page .reveal .chip { font-size: 17px; }
.tv-page .podium .pl .nm { font-size: 22px; }
.tv-lobby .big-text { font-size: 22px; }
.chip.vote { background: rgba(124, 92, 255, .18); color: #b9a8ff; }
@media (max-width: 1000px) {
  .tv-layout { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "stage" "side" "chat"; }
  .tv-chat { height: 240px; }
}

/* v1.3: genres, artiesten bij hover, admin */
.chip.genre { background: rgba(255, 181, 71, .15); color: #ffcf85; }
.genre-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
.genre-filter:empty { display: none; }
.genre-filter .chip { border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--muted); cursor: pointer; font: inherit; font-weight: 700; font-size: 13px; }
.genre-filter .chip.on { background: var(--accent2); color: white; border-color: transparent; }
.mosaic .artists {
  position: absolute; inset: 0; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 4px;
  background: rgba(20, 16, 43, .9); font-size: 13.5px; line-height: 1.4; opacity: 0; transition: opacity .15s; overflow: hidden;
}
.mosaic .artists b { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.lib-card:hover .artists, .lib-card:focus-within .artists, .lib-card:focus .artists { opacity: 1; }
.lib-item .artists-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.admin-wrap { max-width: 860px; margin: 0 auto; padding: 24px; display: grid; gap: 20px; }
.admin-wrap .card { padding: 20px 22px; }
.admin-wrap h2 { margin: 0 0 6px; }
.key-row { display: grid; grid-template-columns: 220px 1fr; gap: 8px 14px; align-items: center; margin-bottom: 12px; }
.key-row .now { grid-column: 2; font-size: 12.5px; color: var(--muted); margin-top: -4px; }
@media (max-width: 640px) { .key-row { grid-template-columns: 1fr; } .key-row .now { grid-column: 1; } }
.admin-lib { display: grid; gap: 8px; }
.admin-lib .row { display: grid; grid-template-columns: 1fr 180px auto auto; gap: 8px; align-items: center; }
.admin-lib .row .small { grid-column: 1 / -1; margin-top: -4px; }
@media (max-width: 640px) { .admin-lib .row { grid-template-columns: 1fr 1fr; } }
#adminArea:not(.hidden) { display: grid; gap: 20px; }

/* v1.6: telefoon-weergave ------------------------------------------------ */
#copyLink .short, #leaveBtn .short, .sheet-close, .scorebar, .songs-btns { display: none; }
.results.loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .col { min-width: 0; }
}
body.phone { overflow-x: hidden; }
body.phone #copyLink .long, body.phone #leaveBtn .long, body.phone #copyCode, body.phone .room-code > span.lbl { display: none; }
body.phone #copyLink .short, body.phone #leaveBtn .short { display: inline; }
body.phone .topbar { flex-wrap: nowrap; gap: 8px; padding: 8px 10px; }
body.phone .logo .ear { width: 38px; height: 38px; font-size: 20px; }
body.phone .vol input { width: 56px; }
body.phone .room-code { gap: 6px; font-size: 12px; }
body.phone .room-code b { font-size: 14px; letter-spacing: .08em; }
body.phone .room-code { padding-left: 8px; }
body.phone.tvplays .vol { display: none; }
.songs-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px 0 14px; }
body.phone .songs-btns { display: flex; }

/* Nummer-menu als schermvullend venster */
body.phone .pl-panel {
  display: none; position: fixed; inset: 0; z-index: 120; height: auto; border-radius: 0; border: 0;
  background: var(--bg); flex-direction: column;
}
body.phone.sheet-open { overflow: hidden; }
body.phone.sheet-open .pl-panel { display: flex; }
body.phone .tabs { align-items: stretch; }
body.phone .tabs button { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 12px 6px; font-size: 12.5px; }
body.phone .sheet-close { display: block; flex: 0 0 48px; font-size: 18px; color: var(--text); }
body.phone .omni { padding: 10px 10px 8px; }
body.phone .omni-input .input { font-size: 16px; } /* voorkomt inzoomen op iPhone */
body.phone .results { padding: 4px 4px 12px; overscroll-behavior: contain; }
body.phone .track { padding: 6px 6px; gap: 8px; }
body.phone .track .add { width: 40px; height: 40px; }
body.phone .others { padding: 8px 12px; }

/* Minimale weergave voor spelers (niet de host) */
body.compact .room-page { height: 100vh; height: 100dvh; overflow: hidden; }
body.compact .topbar { flex-wrap: nowrap; padding: 8px 10px; }
body.compact .layout { display: flex; flex-direction: column; padding: 8px; gap: 8px; flex: 1; min-height: 0; }
body.compact .layout > .col:first-child { display: none; }
body.compact .layout > .col:nth-child(2) { order: 0; flex: 1; min-height: 0; gap: 8px; }
body.compact .layout > .col:nth-child(3) { display: contents; }
body.compact .stage { min-height: 0; padding: 12px 12px 10px; flex: none; }
body.compact .stage h2 { font-size: 22px; }
body.compact .stage .round-label { position: static; text-align: center; margin-bottom: 2px; font-size: 12px; }
body.compact .stage { display: block; }
body.compact .eq { height: 40px; margin: 8px auto 8px; }
body.compact .mask { font-size: 22px; letter-spacing: .2em; }
body.compact #cdWrap .countdown { font-size: 54px; }
body.compact .reveal { flex-direction: row; text-align: left; gap: 12px; align-items: center; }
body.compact .reveal img, body.compact .reveal .noart { width: 72px; height: 72px; flex-shrink: 0; }
body.compact .reveal .t { font-size: 18px; }
body.compact .chat { flex: 1; height: auto; min-height: 120px; }
body.compact .chat-form .input { font-size: 16px; }
body.compact .scorebar {
  display: flex; gap: 6px; overflow-x: auto; flex: none; padding: 2px 0; scrollbar-width: none;
}
body.compact .scorebar::-webkit-scrollbar { display: none; }
.scorebar .sb {
  display: flex; align-items: center; gap: 6px; white-space: nowrap; background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; font-size: 13px; flex-shrink: 0;
}
.scorebar .sb.me { border-color: var(--accent); }
.scorebar .sb.guessed { background: rgba(62, 224, 143, .14); }
.scorebar .sb .rk { color: var(--muted); font-weight: 800; }
.scorebar .sb .dot { width: 9px; height: 9px; border-radius: 50%; }
.scorebar .sb .nm { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
