/* ── Quiplash Lite Presenter / TV screen ─────────────────────────────────── */

:root {
  --qlp-ink:   #160f24;
  --qlp-txt:   #F3ECFF;
  --qlp-mut:   #A99FC6;
  --qlp-panel: rgba(255,255,255,.05);
  --qlp-line:  rgba(255,255,255,.11);
  --qlp-aqua:  #2DE2C6;
  --qlp-pink:  #FF4D8D;
  --qlp-gold:  #FFC94D;
  --qlp-lime:  #B6F24D;
  --qlp-violet:#9B7BFF;
  --qlp-sky:   #4DC4FF;
  --qlp-orange:#FF8A4C;
}

body.display-mode {
  background: radial-gradient(1200px 700px at 50% -10%, #2a1c44 0%, #160f24 55%, #0e0a17 100%);
  color: var(--qlp-txt);
  font-family: 'Syne', 'Segoe UI', sans-serif;
}

/* ── Screen layout ─────────────────────────────────────────────────────── */

.qlp-screen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ── Top bar ────────────────────────────────────────────────────────────── */

.qlp-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(10px,1.6vh,18px) clamp(14px,2vw,28px);
  flex-shrink: 0;
  background: rgba(0,0,0,.15);
  border-bottom: 1px solid var(--qlp-line);
}

.qlp-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(16px,2.2vw,24px);
  letter-spacing: 1px;
  color: var(--qlp-txt);
  flex-shrink: 0;
}

.qlp-brand-accent {
  color: var(--qlp-pink);
}

.qlp-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.qlp-pill {
  font-size: clamp(10px,1.3vw,14px);
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--qlp-panel);
  border: 1px solid var(--qlp-line);
  color: var(--qlp-mut);
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Space Mono', monospace;
}

.qlp-pill-code {
  color: var(--qlp-txt);
  letter-spacing: 2px;
  border-color: rgba(255,255,255,.2);
}

.qlp-pill-phase {
  color: var(--qlp-txt);
}

.qlp-phase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--qlp-mut);
  transition: background .3s;
  flex-shrink: 0;
}

.qlp-phase-dot.active {
  background: var(--qlp-aqua);
  box-shadow: 0 0 8px var(--qlp-aqua);
}

.qlp-topbar-spacer { flex: 1; }

.qlp-clock {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(18px,2.8vw,32px);
  color: var(--qlp-gold);
  padding: 4px 14px;
  border-radius: 12px;
  background: rgba(255,201,77,.10);
  border: 1px solid rgba(255,201,77,.25);
  min-width: 3.5ch;
  text-align: center;
}

/* ── Stage ─────────────────────────────────────────────────────────────── */

.qlp-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px,1.5vh,20px) clamp(16px,2vw,32px);
  position: relative;
  overflow: hidden;
}

/* ── Player rail ────────────────────────────────────────────────────────── */

.qlp-rail {
  display: flex;
  gap: 8px;
  padding: clamp(8px,1.2vh,14px) clamp(12px,1.8vw,22px);
  flex-shrink: 0;
  overflow-x: auto;
  background: rgba(0,0,0,.2);
  border-top: 1px solid var(--qlp-line);
  scrollbar-width: none;
}

.qlp-rail::-webkit-scrollbar { display: none; }

.qlp-pc {
  flex-shrink: 0;
  min-width: clamp(80px,9vw,130px);
  background: var(--qlp-panel);
  border: 1px solid var(--qlp-line);
  border-radius: clamp(10px,1.2vw,16px);
  padding: clamp(7px,1vh,11px) clamp(8px,1vw,12px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: .3s;
}

.qlp-pc.done {
  background: rgba(182,242,77,.09);
  border-color: rgba(182,242,77,.35);
}

.qlp-pc.author {
  background: rgba(155,123,255,.12);
  border-color: rgba(155,123,255,.4);
}

.qlp-pc.off { opacity: .4; }

.qlp-pc-host {
  border-color: rgba(255,201,77,.3);
}

.qlp-pc-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.qlp-pc-av {
  width: clamp(26px,2.8vw,36px);
  height: clamp(26px,2.8vw,36px);
  border-radius: clamp(7px,.8vw,10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(14px,1.5vw,20px);
  color: #15102a;
  flex-shrink: 0;
  font-weight: 700;
}

.qlp-pc-name {
  font-weight: 600;
  font-size: clamp(10px,1.2vw,14px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.qlp-host-crown { color: var(--qlp-gold); flex-shrink: 0; font-size: .9em; }

.qlp-pc-state {
  font-size: clamp(9px,1vw,12px);
  color: var(--qlp-mut);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.qlp-state-done  { color: var(--qlp-lime); }
.qlp-state-off   { color: #f87171; }
.qlp-state-think { color: var(--qlp-mut); }
.qlp-state-author { color: var(--qlp-violet); }
.qlp-state-voting { color: var(--qlp-aqua); }
.qlp-state-partial { color: var(--qlp-gold); }

.qlp-dots { display: inline-flex; gap: 2px; }
.qlp-dots i {
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor;
  animation: qlp-blink 1.2s infinite;
  display: inline-block;
}
.qlp-dots i:nth-child(2) { animation-delay: .2s; }
.qlp-dots i:nth-child(3) { animation-delay: .4s; }

@keyframes qlp-blink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }

.qlp-pips { display: inline-flex; gap: 3px; }
.qlp-pips b {
  width: 14px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.15);
  display: inline-block;
}
.qlp-pips b.on { background: var(--qlp-lime); }

.qlp-pc-mini-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(9px,1vw,12px);
}
.qlp-pc-rank { color: var(--qlp-mut); font-weight: 600; }
.qlp-pc-pts  { font-family: 'Bebas Neue', sans-serif; color: var(--qlp-txt); font-size: clamp(12px,1.4vw,17px); }

/* ── Lobby ──────────────────────────────────────────────────────────────── */

.qlp-lobby {
  display: flex;
  gap: clamp(24px,5vw,64px);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.qlp-lobby-eyebrow {
  color: var(--qlp-mut);
  font-size: clamp(12px,1.5vw,18px);
  font-weight: 600;
  margin-bottom: 4px;
  font-family: 'Space Mono', monospace;
}

.qlp-lobby-site {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(20px,3vw,36px);
  color: var(--qlp-txt);
  margin-bottom: 8px;
}

.qlp-lobby-code {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px,10vw,120px);
  line-height: .95;
  letter-spacing: 6px;
  background: linear-gradient(120deg, var(--qlp-aqua), var(--qlp-violet) 60%, var(--qlp-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.qlp-lobby-hint, .qlp-lobby-sub {
  color: var(--qlp-mut);
  font-size: clamp(11px,1.5vw,16px);
  margin-top: 8px;
}

.qlp-big-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px,6vw,72px);
  line-height: 1;
}

.qlp-count-hi {
  background: linear-gradient(90deg, var(--qlp-lime), var(--qlp-aqua));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.qlp-ready-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(16px,2.2vw,26px);
  color: var(--qlp-lime);
  margin-top: 10px;
}

.qlp-lobby-cue {
  color: var(--qlp-mut);
  font-size: clamp(11px,1.4vw,15px);
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ── Answering ──────────────────────────────────────────────────────────── */

.qlp-answering {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px,1.5vh,18px);
  text-align: center;
}

.qlp-ring-wrap {
  position: relative;
  width: clamp(110px,16vw,180px);
  height: clamp(110px,16vw,180px);
}

.qlp-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.qlp-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,.1);
  stroke-width: 9;
}

.qlp-ring-fg {
  fill: none;
  stroke: var(--qlp-aqua);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  filter: drop-shadow(0 0 8px rgba(45,226,198,.5));
  transition: stroke-dashoffset .9s linear;
}

.qlp-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(24px,4vw,44px);
  color: var(--qlp-txt);
}

.qlp-ring-num.urgent { color: #f87171; }

.qlp-answering-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px,5vw,60px);
  line-height: 1;
}

.qlp-progress-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  width: clamp(200px,40vw,480px);
}

.qlp-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--qlp-aqua), var(--qlp-lime));
  transition: width .5s ease;
}

.qlp-answering-hint {
  color: var(--qlp-mut);
  font-size: clamp(12px,1.6vw,18px);
}

.qlp-lock-chip {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: clamp(10px,1.3vw,14px);
  color: var(--qlp-mut);
  background: var(--qlp-panel);
  border: 1px solid var(--qlp-line);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ── Voting ─────────────────────────────────────────────────────────────── */

.qlp-voting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px,1.2vh,14px);
  width: 100%;
  max-width: clamp(560px,80vw,900px);
}

.qlp-vhead {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--qlp-mut);
  font-size: clamp(11px,1.4vw,15px);
  font-weight: 600;
  font-family: 'Space Mono', monospace;
}

.qlp-vbar-wrap {
  flex: 1;
  max-width: clamp(100px,20vw,220px);
}

.qlp-vbar {
  display: block;
  height: 5px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
}

.qlp-vbar i {
  display: block;
  height: 100%;
  background: var(--qlp-gold);
  border-radius: 999px;
  transition: width .5s linear;
}

.qlp-vtimer-txt {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(14px,1.8vw,20px);
  color: var(--qlp-gold);
  min-width: 2ch;
  text-align: right;
}

.qlp-vtimer-txt.urgent { color: #f87171; }

.qlp-prompt {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(20px,3.6vw,44px);
  line-height: 1.15;
  text-align: center;
  max-width: 800px;
}

.qlp-answers-row {
  display: flex;
  gap: clamp(10px,2vw,20px);
  width: 100%;
  align-items: stretch;
}

.qlp-ans {
  flex: 1;
  background: var(--qlp-panel);
  border: 2px solid var(--qlp-line);
  border-radius: clamp(12px,1.4vw,18px);
  padding: clamp(12px,1.8vh,20px) clamp(12px,1.5vw,18px);
  text-align: left;
  position: relative;
  transition: .3s;
}

.qlp-ans-a { border-color: rgba(45,226,198,.45); }
.qlp-ans-b { border-color: rgba(255,77,141,.45); }

.qlp-ans-winner {
  box-shadow: 0 0 28px -4px rgba(182,242,77,.5);
}

.qlp-ans-a.qlp-ans-winner { border-color: var(--qlp-lime); }
.qlp-ans-b.qlp-ans-winner { border-color: var(--qlp-lime); }

.qlp-win-badge {
  position: absolute;
  top: -12px;
  left: 14px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(11px,1.5vw,15px);
  background: var(--qlp-lime);
  color: #1c3300;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.qlp-pts-badge {
  position: absolute;
  top: -12px;
  right: 14px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(13px,1.8vw,18px);
  background: var(--qlp-gold);
  color: #3a2600;
  padding: 3px 10px;
  border-radius: 999px;
}

.qlp-ans-tag {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(13px,1.7vw,18px);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.qlp-ans-a .qlp-ans-tag { background: rgba(45,226,198,.18); color: var(--qlp-aqua); }
.qlp-ans-b .qlp-ans-tag { background: rgba(255,77,141,.18); color: var(--qlp-pink); }

.qlp-ans-txt {
  font-size: clamp(14px,2vw,22px);
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: clamp(8px,1.2vh,14px);
}

.qlp-ans-meter {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}

.qlp-ans-meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width .7s cubic-bezier(.2,.9,.3,1);
}

.qlp-ans-votes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  font-size: clamp(10px,1.3vw,14px);
  color: var(--qlp-mut);
}

.qlp-ans-votes b {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--qlp-txt);
  font-size: clamp(16px,2.2vw,24px);
}

.qlp-author-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--qlp-line);
  font-size: clamp(11px,1.4vw,15px);
  color: var(--qlp-mut);
}

.qlp-author-row b { color: var(--qlp-txt); }

.qlp-vote-hint, .qlp-reveal-hint {
  color: var(--qlp-mut);
  font-size: clamp(11px,1.4vw,15px);
}

/* ── Scores ─────────────────────────────────────────────────────────────── */

.qlp-scores {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px,1.5vh,18px);
  width: 100%;
}

.qlp-scores-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(22px,3.5vw,44px);
  color: var(--qlp-txt);
}

.qlp-leaderboard {
  width: min(96vw, 680px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qlp-lb-compact {
  width: min(96vw, 580px);
  margin-top: 8px;
}

.qlp-lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--qlp-panel);
  border: 1px solid var(--qlp-line);
  border-radius: 12px;
  padding: clamp(8px,1.1vh,13px) clamp(12px,1.4vw,18px);
}

.qlp-lb-lead {
  border-color: rgba(255,201,77,.4);
  background: rgba(255,201,77,.07);
}

.qlp-lb-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(16px,2vw,24px);
  color: var(--qlp-mut);
  min-width: 28px;
}

.qlp-lb-lead .qlp-lb-rank { color: var(--qlp-gold); }

.qlp-lb-av {
  width: clamp(28px,3vw,38px);
  height: clamp(28px,3vw,38px);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(14px,1.8vw,20px);
  color: #15102a;
  flex-shrink: 0;
}

.qlp-lb-name {
  flex: 1;
  font-weight: 600;
  font-size: clamp(13px,1.7vw,18px);
  display: flex;
  align-items: center;
  gap: 7px;
}

.qlp-crown    { color: var(--qlp-gold); }
.qlp-host-badge { color: var(--qlp-mut); font-size: .8em; }

.qlp-lb-bar-wrap {
  flex: 2;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
  max-width: clamp(80px,16vw,200px);
}

.qlp-lb-bar {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease;
}

.qlp-lb-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(16px,2.2vw,26px);
  color: var(--qlp-gold);
  min-width: 60px;
  text-align: right;
}

/* ── Finished ───────────────────────────────────────────────────────────── */

.qlp-finished {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px,1.2vh,14px);
  position: relative;
  width: 100%;
}

.qlp-finished-confetti {
  position: absolute;
  inset: -40px 0 -40px 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.qlp-finished-confetti span {
  position: absolute;
  top: -16px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  animation: qlp-fall linear infinite;
}

@keyframes qlp-fall { to { transform: translateY(140%) rotate(620deg); } }

.qlp-winner-sub {
  color: var(--qlp-mut);
  font-size: clamp(11px,1.4vw,16px);
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.qlp-winner-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(34px,6vw,72px);
  line-height: 1;
  background: linear-gradient(100deg, var(--qlp-gold), var(--qlp-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.qlp-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px,2vw,20px);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

.qlp-pod {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.qlp-pod-av {
  width: clamp(38px,6vw,60px);
  height: clamp(38px,6vw,60px);
  border-radius: clamp(10px,1.2vw,16px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(18px,2.8vw,28px);
  color: #15102a;
  font-weight: 700;
}

.qlp-pod-name  { font-weight: 600; font-size: clamp(11px,1.5vw,16px); }
.qlp-pod-score { font-family: 'Bebas Neue', sans-serif; color: var(--qlp-gold); font-size: clamp(13px,1.8vw,20px); }

.qlp-pod-block {
  width: clamp(68px,11vw,120px);
  border-radius: clamp(8px,1vw,14px) clamp(8px,1vw,14px) 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 800;
  font-size: clamp(20px,3vw,32px);
}

.qlp-pod-1 .qlp-pod-block { background: linear-gradient(180deg, var(--qlp-gold), #a8860b); color: #3a2700; }
.qlp-pod-2 .qlp-pod-block { background: linear-gradient(180deg, #cfd3e0, #8b90a3); color: #23262e; }
.qlp-pod-3 .qlp-pod-block { background: linear-gradient(180deg, var(--qlp-orange), #a0511c); color: #3a1c08; }
