:root {
  --bg: #0f0a1e;
  --card: #1c1533;
  --card2: #2a2047;
  --text: #f4f0ff;
  --muted: #a99fc9;
  --accent: #ff3d8b;
  --accent2: #7c5cff;
  --ok: #2ee6a6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit; color: inherit; border: 0; cursor: pointer;
  background: var(--card2); border-radius: 12px; padding: 10px 14px;
}
button:active { transform: scale(.97); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent2)); font-weight: 600; }
input {
  font: inherit; color: var(--text); background: var(--card2);
  border: 2px solid transparent; border-radius: 12px; padding: 12px 14px; width: 100%;
}
input:focus { outline: none; border-color: var(--accent2); }
.muted { color: var(--muted); }
.logo {
  font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Startpagina ---------- */
.home { min-height: 100%; display: grid; place-items: center; padding: 24px; text-align: center; }
.home h1 { font-size: clamp(40px, 9vw, 80px); margin: 0 0 8px; }
.choices { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 640px; margin: 32px auto 0; }
.choice { display: block; text-decoration: none; color: var(--text); background: var(--card); padding: 28px; border-radius: 20px; }
.choice .big { font-size: 48px; }
.choice h2 { margin: 8px 0 4px; }

/* ---------- Telefoon / afstandsbediening ---------- */
.remote { max-width: 640px; margin: 0 auto; padding: 16px 16px 90px; }
.remote header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.remote header h1 { font-size: 26px; margin: 0; }
.name-chip { background: var(--card); padding: 8px 12px; border-radius: 999px; font-size: 14px; }
.now { background: var(--card); border-radius: 16px; padding: 12px; display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.now img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--card2); }
.now .info { flex: 1; min-width: 0; }
.now .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.controls { display: flex; gap: 8px; margin-bottom: 16px; }
.controls button { flex: 1; font-size: 20px; padding: 12px 0; }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search button { white-space: nowrap; }
.list { display: grid; gap: 10px; }
.row { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 14px; padding: 10px; }
.row img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--card2); }
.row .info { flex: 1; min-width: 0; }
.row .title { font-weight: 600; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.row .actions { display: flex; flex-direction: column; gap: 6px; }
.row .actions button { padding: 8px 10px; font-size: 13px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
.tabs button { flex: 1; background: transparent; padding: 12px; }
.tabs button.active { background: var(--card2); }
.badge { background: var(--accent); border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 4px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ok); color: #062; padding: 10px 16px; border-radius: 999px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Jouw beurt ---------- */
.turn { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-weight: 600; text-align: center; background: var(--card); }
.turn.soon { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.turn.live { background: var(--ok); color: #062; }
.row.mine { outline: 2px solid var(--accent); }
.me-tag { background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; margin-left: 4px; }
.alert { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); animation: pulse 1s ease-in-out infinite alternate; }
.alert .big { font-size: 72px; }
.alert h2 { font-size: 30px; margin: 10px 0; }
.alert p { font-size: 17px; margin: 0 0 24px; }
.alert button { background: #fff; color: var(--bg); font-weight: 700; padding: 14px 28px; }
/* Eigen invulvenster (vervangt prompt/confirm: die werken slecht op de iPhone) */
.dialog { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(15,10,30,.8); }
.dialog form { background: var(--card); border-radius: 20px; padding: 20px; width: 100%; max-width: 360px; }
.dialog h2 { font-size: 20px; margin: 0 0 14px; }
.dialog .btns { display: flex; gap: 8px; margin-top: 14px; }
.dialog .btns button { flex: 1; padding: 12px; }
@keyframes pulse { from { filter: brightness(1); } to { filter: brightness(1.15); } }

/* ---------- TV-scherm ---------- */
.nextup { position: fixed; left: 1.5vw; bottom: 1.5vw; z-index: 20; background: linear-gradient(135deg, var(--accent), var(--accent2));
  padding: 1.2vw 2vw; border-radius: 18px; font-size: 2vw; font-weight: 700; transition: opacity .5s; max-width: 55vw; }
.nextup small { display: block; font-weight: 400; font-size: .65em; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv { overflow: hidden; background: #000; }
#player-wrap { position: fixed; inset: 0; }
#player-wrap iframe { width: 100%; height: 100%; }
.overlay { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; background: var(--bg); z-index: 10; }
.overlay h1 { font-size: 7vw; margin: 0; }
.overlay p { font-size: 2vw; }
.overlay img.qr { width: 22vw; max-width: 380px; border-radius: 16px; background: #fff; padding: 12px; }
.start-btn { font-size: 2.2vw; padding: 1vw 3vw; margin-top: 2vw; }
.banner { position: fixed; top: 4vh; left: 50%; transform: translateX(-50%); background: rgba(15,10,30,.88); padding: 1.4vw 3vw; border-radius: 20px; font-size: 2.4vw; z-index: 20; transition: opacity .5s; text-align: center; }
.banner b { color: var(--accent); }
.side { position: fixed; right: 1.5vw; bottom: 1.5vw; z-index: 15; display: flex; gap: 1vw; align-items: flex-end; }
.upnext { background: rgba(15,10,30,.85); border-radius: 14px; padding: .8vw 1.2vw; font-size: 1.1vw; max-width: 24vw; }
.upnext ol { margin: .4vw 0 0; padding-left: 1.3vw; }
.upnext li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-qr { width: 7vw; border-radius: 10px; background: #fff; padding: 6px; }
