* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #120c2b; }
body { font-family: "Samsung One", "SamsungOne", "Segoe UI", Roboto, Arial, sans-serif; color: #fff; }
#stage { position: absolute; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden;
  background: radial-gradient(circle at 20% 10%, #3b2a8a 0, transparent 45%),
              radial-gradient(circle at 85% 90%, #0d6b8a 0, transparent 45%), #160f36; }
#screen { position: absolute; inset: 0; }
.hidden { display: none !important; }
#conn { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); background: #c0392b; padding: 12px 28px;
  border-radius: 30px; font-size: 26px; z-index: 50; }
#toast { position: absolute; bottom: 40px; left: 50%; transform: translate(-50%, 140px); background: rgba(0,0,0,.8);
  padding: 18px 40px; border-radius: 40px; font-size: 32px; transition: transform .35s; z-index: 60; }
#toast.show { transform: translate(-50%, 0); }
small { font-size: .6em; opacity: .7; font-weight: 400; }

/* ---------- lobby ---------- */
.lobby { display: flex; height: 100%; padding: 70px 80px; gap: 70px; }
.lobby-left { width: 560px; display: flex; flex-direction: column; align-items: center; }
.logo { font-size: 104px; font-weight: 900; letter-spacing: -2px; margin-bottom: 40px; text-shadow: 0 8px 0 rgba(0,0,0,.25); }
.logo span { color: #ffc531; }
.qr-box { background: #fff; color: #222; border-radius: 36px; padding: 34px; text-align: center; width: 100%;
  box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.qr { width: 440px; height: 440px; display: block; margin: 0 auto; }
.qr-wait { display: flex; align-items: center; justify-content: center; font-size: 80px; color: #aaa; }
.qr-text { font-size: 34px; font-weight: 700; margin-top: 16px; line-height: 1.25; }
.code { margin-top: 14px; font-size: 30px; color: #666; }
.code b { color: #222; font-size: 44px; letter-spacing: 8px; margin-left: 8px; }
.lobby-right { flex: 1; display: flex; flex-direction: column; }
.slots { display: flex; gap: 30px; }
.slot { flex: 1; height: 330px; border-radius: 30px; border: 4px dashed rgba(255,255,255,.25); display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative; }
.slot.filled { border: none; background: linear-gradient(160deg, var(--pc), rgba(0,0,0,.25)); box-shadow: 0 16px 40px rgba(0,0,0,.35);
  animation: pop .4s ease-out; }
.slot.off { opacity: .4; }
.slot-empty { font-size: 120px; font-weight: 900; opacity: .25; height: 150px; line-height: 150px; }
.slot-name { font-size: 38px; font-weight: 800; margin-top: 18px; }
.slot-tag { position: absolute; top: 16px; background: rgba(0,0,0,.35); padding: 6px 18px; border-radius: 20px; font-size: 22px; }
.slots.small { margin-top: 40px; width: 1100px; }
.slots.small .slot { height: 200px; }
.slots.small .slot svg { width: 90px; height: 90px; }
.slots.small .slot-name { font-size: 28px; margin-top: 6px; }
.hint { font-size: 34px; opacity: .8; margin: 40px 0 30px; text-align: center; }
.gcards { display: flex; gap: 30px; flex: 1; }
.gcard { flex: 1; border-radius: 30px; background: linear-gradient(170deg, var(--gc), rgba(0,0,0,.35)); padding: 30px; display: flex;
  flex-direction: column; align-items: center; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.gicon { font-size: 110px; height: 150px; line-height: 150px; }
.gicon.big { font-size: 170px; height: 220px; line-height: 220px; }
.gname { font-size: 44px; font-weight: 900; margin: 10px 0; }
.gdesc { font-size: 25px; opacity: .85; line-height: 1.3; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- instellingen ---------- */
.settings { height: 100%; display: flex; flex-direction: column; align-items: center; padding-top: 60px;
  background: radial-gradient(circle at 50% 0, var(--gc), transparent 60%); }
.settings h1 { font-size: 96px; font-weight: 900; }
.srows { margin-top: 40px; width: 900px; }
.srow { display: flex; justify-content: space-between; font-size: 40px; padding: 18px 34px; background: rgba(255,255,255,.08);
  border-radius: 20px; margin-bottom: 14px; }
.srow b { color: #ffc531; }
.settings .hint { margin: 30px 0 0; }

/* ---------- uitslag ---------- */
.results { display: flex; height: 100%; padding: 60px 80px; gap: 60px; background: radial-gradient(circle at 25% 30%, var(--gc), transparent 55%); }
.winner { width: 640px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.winner svg { animation: bounce 1.2s ease-in-out infinite; }
.winner h1 { font-size: 80px; font-weight: 900; margin-top: 20px; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-30px); } }
.rlist { flex: 1; }
.rlist h2 { font-size: 50px; margin-bottom: 24px; }
.rlist h3 { font-size: 34px; margin: 34px 0 12px; opacity: .85; }
.rrow { display: flex; align-items: center; gap: 24px; background: rgba(255,255,255,.08); border-left: 12px solid var(--pc);
  border-radius: 20px; padding: 8px 30px; margin-bottom: 12px; }
.rrow.place1 { background: rgba(255,197,49,.22); }
.rplace { font-size: 54px; font-weight: 900; width: 50px; }
.rname { flex: 1; font-size: 40px; font-weight: 800; }
.rdetail { font-size: 24px; font-weight: 400; opacity: .8; }
.rscore { font-size: 52px; font-weight: 900; }
table.rank { width: 100%; border-collapse: collapse; font-size: 28px; }
table.rank th { text-align: left; opacity: .6; font-weight: 600; padding: 6px 12px; }
table.rank td { padding: 4px 12px; border-top: 1px solid rgba(255,255,255,.1); }
table.rank svg { display: block; }
.rank-empty { font-size: 30px; opacity: .6; margin-top: 30px; }

/* ---------- ranglijsten ---------- */
.ranking { padding: 60px 120px; height: 100%; }
.ranking h1 { font-size: 80px; font-weight: 900; }
.tabs { display: flex; gap: 20px; margin: 30px 0; }
.tab { padding: 14px 34px; border-radius: 30px; font-size: 32px; background: rgba(255,255,255,.1); }
.tab.on { background: var(--gc); font-weight: 800; }
.rank-wrap table.rank { font-size: 36px; }
.ranking .hint { position: absolute; bottom: 30px; left: 0; right: 0; }

/* ---------- gedeeld in spellen ---------- */
.chip { display: inline-flex; align-items: center; gap: 10px; background: rgba(0,0,0,.35); border: 4px solid var(--pc);
  border-radius: 50px; padding: 4px 22px 4px 6px; font-size: 30px; font-weight: 700; }
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 110px; display: flex; align-items: center; padding: 0 50px; gap: 30px; }
.topbar .title { font-size: 46px; font-weight: 900; }
.timer { margin-left: auto; font-size: 60px; font-weight: 900; font-variant-numeric: tabular-nums; }
.timer.low { color: #ff5a5f; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }

/* ---------- quiz ---------- */
.quiz { position: absolute; inset: 0; }
.qhead { position: absolute; top: 34px; left: 60px; right: 60px; height: 120px; display: flex; align-items: center; gap: 24px; }
.qnum { font-size: 40px; font-weight: 900; background: rgba(10,6,30,.6); padding: 12px 30px; border-radius: 40px; }
.qcat { font-size: 34px; font-weight: 800; background: var(--qc, #2a7fff); padding: 12px 30px; border-radius: 40px; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.qtimer { margin-left: auto; position: relative; width: 120px; height: 120px; }
.qtimer svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.qtimer circle { fill: rgba(10,6,30,.7); stroke-width: 9; }
.qtimer .bg { stroke: rgba(255,255,255,.15); }
.qtimer .fg { fill: none; stroke: #ffc531; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.qtimer span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 50px; font-weight: 900; }
.qtimer.low .fg { stroke: #ff5a5f; } .qtimer.low span { color: #ff5a5f; animation: pulse 1s infinite; }
.qcard { position: absolute; top: 150px; left: 50%; width: 1240px; margin-left: -620px; min-height: 190px; background: #fff; color: #1d1840;
  border-radius: 34px; padding: 30px 60px; display: flex; align-items: center; justify-content: center; text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.35); border-top: 12px solid var(--qc, #2a7fff); }
.qcard.in { animation: pop .5s ease-out; }
.qtext { font-size: 54px; font-weight: 900; line-height: 1.18; }
.qanswers { position: absolute; top: 370px; left: 50%; width: 1100px; margin-left: -550px; display: flex; flex-direction: column; gap: 14px; }
.qans { position: relative; height: 88px; background: #fff; color: #1d1840; border-radius: 50px; display: flex; align-items: center; padding: 0 28px 0 14px;
  font-size: 40px; font-weight: 800; box-shadow: 0 8px 0 rgba(0,0,0,.2); animation: slidein .4s ease-out both; transition: all .3s; }
.qletter { width: 62px; height: 62px; border-radius: 50%; background: var(--qc, #2a7fff); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 32px; font-weight: 900; margin-right: 26px; flex: none; }
.qlabel { flex: 1; }
.qwho { display: flex; gap: 4px; margin-right: 12px; }
.qwho svg { width: 58px; height: 58px; }
.qmark { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 36px; font-weight: 900; }
.qmark.ok { background: #21b45b; } .qmark.no { background: #e74c3c; }
.qans.right { background: #d9f7e3; box-shadow: 0 0 0 6px #21b45b, 0 8px 0 rgba(0,0,0,.2); transform: scale(1.03); }
.qans.right .qletter { background: #21b45b; }
.qans.wrong { opacity: .55; }
@keyframes slidein { from { transform: translateX(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
.qplayers { position: absolute; inset: 0; }
.qpl { position: absolute; top: 970px; width: 300px; height: 90px; margin-left: -150px; border-radius: 22px; background: rgba(10,6,30,.78);
  border-bottom: 8px solid var(--pc); display: flex; align-items: center; justify-content: center; gap: 18px; }
.qpl.answered { background: rgba(60,40,140,.9); }
.qpn { font-size: 30px; font-weight: 800; }
.qps { font-size: 36px; font-weight: 900; color: #ffc531; }
.qpl b { position: absolute; top: -34px; right: -10px; font-size: 54px; text-shadow: 0 4px 10px rgba(0,0,0,.5); }
.qpl .done { color: #fff; } .qpl .plus { color: #4fff95; animation: pop .4s; } .qpl .miss { color: #ff5a5f; }

/* ---------- 3D-laag ---------- */
#bg3d { position: absolute; inset: 0; }
canvas.gl { position: absolute; left: 0; top: 0; width: 1920px !important; height: 1080px !important; display: block; }
.hub-labels { position: absolute; inset: 0; pointer-events: none; }
.nameplate { position: absolute; transform: translate(-50%, 0); background: var(--pc); padding: 8px 26px; border-radius: 30px;
  font-size: 32px; font-weight: 900; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.4); text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.nameplate.empty { background: rgba(255,255,255,.12); border: 3px dashed rgba(255,255,255,.35); font-size: 40px; padding: 4px 26px; }
.stage-space { height: 560px; }
.lobby .hint { margin: 0 0 26px; }
.gcards { flex: 0 0 300px; }
.settings { background: radial-gradient(circle at 50% 0, var(--gc), transparent 55%); }
.srows { background: rgba(10,6,30,.55); border-radius: 30px; padding: 20px; }
.results { background: transparent; }
.winner { justify-content: flex-start; padding-top: 10px; }
.rlist { background: rgba(10,6,30,.6); border-radius: 34px; padding: 34px 40px; }
.ranking { background: rgba(10,6,30,.55); }
.game { position: absolute; inset: 0; overflow: hidden; }
.overlay { position: absolute; inset: 0; pointer-events: none; }
.stage-space { height: 600px; }
.gcards { flex: 0 0 250px; flex-wrap: wrap; gap: 20px; }
.gcard { padding: 18px; flex-direction: row; text-align: left; gap: 18px; align-items: center; flex: 1 1 40%; height: 115px; }
.gcard .gicon { font-size: 90px; height: 110px; line-height: 110px; }
.gcard .gname { font-size: 38px; margin: 0; }
.gcard .gdesc { font-size: 22px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-box { padding: 20px; }
.qr { width: 480px; height: 480px; }

/* ---------- laadscherm ---------- */
#loading { position: absolute; inset: 0; z-index: 40; background: #160f36; transition: opacity .8s, transform .8s; }
#loading.out { opacity: 0; transform: scale(1.08); pointer-events: none; }
.load-ui { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.logo3d { margin-top: 70px; font-size: 170px; font-weight: 900; letter-spacing: -3px; line-height: 1; animation: logoin 1s cubic-bezier(.2,1.6,.4,1) both; }
.logo3d span { display: inline-block; color: #fff; text-shadow: 0 2px 0 #d9d2ff, 0 4px 0 #c2b8ff, 0 6px 0 #a99cf5, 0 8px 0 #8f80e6,
  0 10px 0 #7565d4, 0 12px 0 #5c4bbf, 0 22px 30px rgba(0,0,0,.45); }
.logo3d .l2 { color: #ffc531; text-shadow: 0 2px 0 #f5b200, 0 4px 0 #e6a400, 0 6px 0 #d49500, 0 8px 0 #c08600,
  0 10px 0 #a87500, 0 12px 0 #8f6300, 0 22px 30px rgba(0,0,0,.45); animation: wob 2.4s ease-in-out infinite; }
@keyframes logoin { from { transform: translateY(-300px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wob { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) translateY(-8px); } }
.tagline { font-size: 38px; font-weight: 700; margin-top: 26px; text-shadow: 0 3px 10px rgba(0,0,0,.5); }
.lbar { position: absolute; bottom: 90px; width: 900px; height: 30px; border-radius: 20px; background: rgba(10,6,30,.6); padding: 5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.lfill { height: 100%; width: 0; border-radius: 15px; background: linear-gradient(90deg, #ff5a5f, #ffc531, #4fd17a, #3fa7ff); transition: width .3s; }
.llabel { position: absolute; bottom: 40px; font-size: 30px; font-weight: 700; opacity: .9; }
.logo3d.small { font-size: 104px; margin: 0 0 40px; animation: none; }

/* ---------- boggle ---------- */
.boggle-ui .bg-title { position: absolute; top: 40px; left: 60px; font-size: 56px; font-weight: 900; text-shadow: 0 4px 12px rgba(0,40,90,.5); }
.boggle-ui .bg-title span { font-size: 36px; background: #1d8fa8; padding: 6px 20px; border-radius: 30px; margin-left: 12px; vertical-align: middle; }
.bg-timer { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); font-size: 70px; font-weight: 900; font-variant-numeric: tabular-nums;
  background: rgba(10,40,80,.6); padding: 6px 44px; border-radius: 50px; box-shadow: 0 8px 20px rgba(0,30,60,.4); }
.bg-timer.low { color: #ff6b6b; animation: pulse 1s infinite; }
.bg-msg { position: absolute; bottom: 36px; left: 0; right: 0; text-align: center; font-size: 38px; font-weight: 800; text-shadow: 0 3px 10px rgba(0,40,90,.7); }
.bg-msg b { color: #ffe27a; }
.bpl { position: absolute; transform: translateX(-50%); background: rgba(10,40,80,.75); border-bottom: 6px solid var(--pc); border-radius: 18px;
  padding: 6px 20px; text-align: center; white-space: nowrap; }
.bpl b { display: block; font-size: 28px; } .bpl span { font-size: 22px; opacity: .9; }
.bpop { position: absolute; transform: translate(-50%, 0); background: var(--pc); padding: 8px 22px; border-radius: 30px; font-size: 34px; font-weight: 900;
  animation: floatup 1.6s ease-out forwards; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -110px) scale(1); } }
.bg-end { position: absolute; right: 50px; top: 150px; bottom: 110px; width: 900px; background: rgba(10,30,70,.82); border-radius: 30px; padding: 26px 30px;
  animation: pop .5s ease-out; }
.bcols { display: flex; gap: 18px; height: calc(100% - 60px); }
.bcol { flex: 1; min-width: 0; border-top: 8px solid var(--pc); background: rgba(255,255,255,.06); border-radius: 16px; padding: 12px; overflow: hidden; }
.bcol h3 { font-size: 30px; display: flex; justify-content: space-between; } .bcol h3 span { color: #ffe27a; }
.bws { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bws i { font-style: normal; font-size: 22px; background: rgba(255,255,255,.12); padding: 3px 10px; border-radius: 8px; text-transform: uppercase; }
.bws i.dup { text-decoration: line-through; opacity: .45; }
.bws em { font-size: 20px; opacity: .6; }
.bposs { font-size: 26px; margin-top: 16px; text-align: center; opacity: .9; } .bposs b { color: #ffe27a; }

.boggle-ui .bg-title em { display: block; font-size: 30px; font-style: normal; opacity: .85; margin-top: 6px; }
.bg-chal { position: absolute; top: 140px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.4);
  backdrop-filter: blur(8px); border-radius: 40px; padding: 10px 34px; font-size: 32px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0,30,70,.3); }
.bg-chal i { font-style: normal; background: #ffc531; color: #5a3a00; border-radius: 20px; padding: 2px 14px; margin-left: 10px; font-weight: 900; }
.bpl.isout { opacity: .45; } .bpl .out { color: #ff6b6b; }
.bpop.bad { background: #e74c3c; }
.bws i.uniq { background: #ffc531; color: #4a2c00; font-weight: 800; }
.bws i.shared { opacity: .55; }
.blegend { margin-top: 12px; font-size: 22px; display: flex; gap: 14px; justify-content: center; }
.blegend i { font-style: normal; padding: 3px 12px; border-radius: 8px; background: rgba(255,255,255,.12); }
.blegend i.uniq { background: #ffc531; color: #4a2c00; }
.bdaily { margin-top: 12px; font-size: 24px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.bdaily b { width: 100%; text-align: center; color: #ffe27a; }
.bg-fx { position: absolute; inset: 0; pointer-events: none; }
.comic { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-7deg); text-align: center; animation: comic 2.4s ease-out forwards; }
.comic b { display: block; font-size: 130px; font-weight: 900; color: #ff2fb4; letter-spacing: -2px;
  -webkit-text-stroke: 10px #fff; paint-order: stroke fill; text-shadow: 0 12px 0 rgba(90,0,90,.35); }
.comic span { display: inline-block; font-size: 40px; font-weight: 900; background: #fff; color: #5a0a5a; padding: 8px 28px; border-radius: 30px; margin-top: 6px; }
@keyframes comic { 0% { transform: translate(-50%, -50%) rotate(-7deg) scale(.2); opacity: 0; } 12% { transform: translate(-50%, -50%) rotate(-7deg) scale(1.15); opacity: 1; }
  20% { transform: translate(-50%, -50%) rotate(-7deg) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -60%) rotate(-7deg) scale(1); opacity: 0; } }
.unlock-msg { margin-top: 26px; font-size: 40px; font-weight: 900; background: #ffc531; color: #4a2c00; padding: 14px 30px; border-radius: 30px; animation: pulse 1.2s infinite; }

/* ---------- pesten ---------- */
.ps-title { position: absolute; top: 40px; left: 60px; font-size: 60px; font-weight: 900; text-shadow: 0 4px 14px rgba(0,0,0,.6); }
.ps-info { position: absolute; top: 44px; right: 60px; display: flex; gap: 14px; }
.pchip { font-size: 34px; font-weight: 900; background: rgba(20,10,40,.8); padding: 10px 26px; border-radius: 40px; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.pchip.suit { background: #fff; color: #1b1b2a; } .pchip.suit.red { color: #d0021b; }
.pchip.pend { background: #ff2f6d; animation: pulse 1s infinite; }
.pchip.dir { font-size: 44px; padding: 2px 22px; }
.pchip.timer.low { background: #e74c3c; }
.psp { position: absolute; transform: translateX(-50%); background: rgba(20,10,40,.82); border-bottom: 7px solid var(--pc); border-radius: 20px;
  padding: 8px 26px; text-align: center; white-space: nowrap; transition: transform .3s, box-shadow .3s; }
.psp b { display: block; font-size: 32px; } .psp span { font-size: 24px; opacity: .9; }
.psp i { display: block; font-style: normal; font-size: 22px; font-weight: 900; color: #ffc531; }
.psp.on { transform: translateX(-50%) scale(1.12); box-shadow: 0 0 0 5px #ffc531, 0 0 40px rgba(255,197,49,.6); }
.ps-msg { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; font-size: 36px; font-weight: 800; text-shadow: 0 3px 12px rgba(0,0,0,.8); }
.ps-fx { position: absolute; inset: 0; pointer-events: none; }

/* leesbaarheid: vaste vakken, tekst krimpt mee */
.qcard { height: 200px; min-height: 0; overflow: hidden; }
.qlabel { white-space: nowrap; overflow: hidden; min-width: 0; }
.nameplate, .psp b, .bpl b, .qpn { max-width: 340px; overflow: hidden; text-overflow: clip; }
