/* ─────────────────────────────────────────────────────────────────
   Wie is de Mol — WIDM 2026 inspired theme
   Dark teal-black base with green radial vignette + neon accents
   ─────────────────────────────────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg-base:        #041214;
  --bg-center:      #001a10;
  --bg-overlay:     rgba(0, 0, 0, .3);

  /* Surfaces */
  --surface-1:      #0b2819;
  --surface-2:      rgba(0, 75, 46, .25);  /* glass green */
  --surface-3:      rgba(0, 75, 46, .12);
  --surface-line:   rgba(107, 226, 148, .15);

  /* Brand greens */
  --green-deep:     #004b2e;
  --green-mid:      #096941;
  --green-bright:   #239961;
  --green-neon:     #6be294;
  --green-neon-15:  rgba(107, 226, 148, .15);
  --green-neon-30:  rgba(107, 226, 148, .30);

  /* Mol red (subtle, for sabotage role) */
  --red-deep:       #7a1a22;
  --red-bright:     #dc2626;

  /* Neutrals */
  --text:           #ffffff;
  --text-muted:     #d5d5d5;
  --text-dim:       #bebebe;
  --text-faint:     #8b9c91;
  --text-darkest:   #494949;

  /* Sizing */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 12px 40px rgba(0, 0, 0, .45);
  --shadow-glow: 0 0 28px rgba(107, 226, 148, .25);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  background: var(--bg-base);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  background:
    linear-gradient(180deg, var(--bg-overlay), transparent 34.77%),
    radial-gradient(45.69% 50% at 50% 50%, var(--bg-center) 0%, var(--bg-base) 100%);
  background-attachment: fixed;
  background-size: 100% 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

/* ─── Layout ──────────────────────────────────────────────────── */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screen {
  display: none;
  animation: fadeIn .35s ease-out;
  text-align: center;
}

.screen.active { display: block; }

/* Forms align left inside centered screens */
.screen input,
.screen textarea,
.screen select { text-align: left; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Typography ──────────────────────────────────────────────── */

h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 7vw, 42px);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 0 0 8px;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .6);
}

h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 20px;
  margin: 24px 0 12px;
  color: var(--text);
}

h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 17px;
  margin: 18px 0 8px;
  color: var(--text-muted);
}

p { margin: 0 0 12px; }

.subtitle {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0 0 24px;
  font-weight: 400;
}

.info {
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
  margin: 8px 0;
}

.error {
  color: #ff8b8b;
  font-size: 14px;
  margin: 8px 0;
}

.detail-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* ─── PWA install banner ──────────────────────────────────────── */

.install-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--surface-2);
  outline: 1px solid var(--surface-line);
  outline-offset: -1px;
  border-radius: var(--radius-md);
  padding: 12px 12px 12px 16px;
  margin: 0 0 18px;
  backdrop-filter: blur(6px);
}
.install-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.35;
}
.install-banner-text strong {
  font-weight: 600;
  color: var(--text);
}
.install-banner-text span {
  color: var(--text-dim);
  font-size: 12px;
}
.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.install-btn {
  padding: 8px 14px;
  font-size: 13px;
  min-height: 0;
  width: auto;
  margin: 0;
}
.install-dismiss {
  background: transparent;
  border: 0;
  color: var(--text-faint);
  font-size: 22px;
  line-height: 1;
  width: 28px;
  height: 28px;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
}
.install-dismiss:hover { color: var(--text); }

.install-ios-instructions {
  text-align: left;
  background: var(--surface-1);
  outline: 1px solid var(--surface-line);
  outline-offset: -1px;
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-muted);
}
.install-ios-instructions ol {
  margin: 8px 0 14px;
  padding-left: 20px;
  line-height: 1.55;
}
.install-ios-instructions strong { color: var(--text); }

/* ─── Device diagnostics panel ────────────────────────────────── */

.diag-section {
  margin: 18px 0 8px;
  text-align: left;
}
.diag-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--surface-3);
  outline: 1px solid var(--surface-line);
  outline-offset: -1px;
  border: 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
}
.diag-toggle:hover { background: var(--surface-2); color: var(--text); }
.diag-summary {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 400;
}
.diag-list {
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.diag-row {
  background: var(--surface-1);
  outline: 1px solid var(--surface-line);
  outline-offset: -1px;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.diag-row.diag-pass { outline-color: rgba(107, 226, 148, .35); }
.diag-row.diag-fail { outline-color: rgba(220, 38, 38, .45); }
.diag-row.diag-testing { outline-color: rgba(255, 255, 255, .2); }
.diag-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.diag-name {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.diag-status {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 600;
  white-space: nowrap;
}
.diag-pass .diag-status { color: var(--green-neon); }
.diag-fail .diag-status { color: #ff8b8b; }
.diag-testing .diag-status { color: var(--text-dim); }
.diag-detail {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}
.diag-fail .diag-detail { color: #ffb0b0; }
.diag-btn {
  align-self: flex-start;
  padding: 6px 18px;
  font-size: 13px;
  min-height: 0;
  width: auto;
  margin: 2px 0 0;
}

/* ─── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row-reverse;
  column-gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 27px;
  min-height: 54px;
  padding: 12px 32px;
  border: none;
  outline: none;
  border-radius: 64px;
  cursor: pointer;
  text-align: center;
  width: 100%;
  margin: 16px 0 8px;
  color: var(--text);
  background: transparent;
  overflow: hidden;
  position: relative;
  text-rendering: optimizeLegibility;
  transition:
    box-shadow .15s ease-out,
    background .15s ease-out,
    padding .15s ease-out,
    margin .15s ease-out,
    outline .15s ease-out,
    color .15s ease-out,
    border .15s ease-out;
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background-image: radial-gradient(105.92% 100% at 50% 0, var(--green-bright) 0, var(--green-mid));
  box-shadow: 0 4px 20px rgba(0, 75, 46, .4);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 28px rgba(35, 153, 97, .5);
}

.btn-secondary {
  background: var(--surface-2);
  outline: 1px solid var(--surface-line);
  outline-offset: -1px;
  backdrop-filter: blur(6px);
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(0, 75, 46, .35);
  outline-color: var(--green-neon-30);
}

.btn-danger {
  background-image: radial-gradient(105.92% 100% at 50% 0, #c0282f 0, var(--red-deep));
  box-shadow: 0 4px 20px rgba(122, 26, 34, .5);
}

.btn-vote {
  background: var(--surface-2);
  outline: 1px solid var(--surface-line);
  outline-offset: -1px;
  flex-direction: row;
  justify-content: flex-start;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-weight: 500;
}
.btn-vote:hover { outline-color: var(--green-neon); }

/* ─── Inputs ──────────────────────────────────────────────────── */

input[type="text"],
input[type="number"],
input[type="search"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  background: rgba(0, 0, 0, .4);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  color: var(--text);
  margin: 6px 0;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--green-neon);
  background: rgba(0, 0, 0, .55);
}

input::placeholder, textarea::placeholder {
  color: var(--text-faint);
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: 500;
}

/* ─── Generic card ────────────────────────────────────────────── */

.card {
  background: var(--surface-2);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 12px 0;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}

/* ─── Status bar (top) ────────────────────────────────────────── */

.status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(4, 18, 20, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-line);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  z-index: 50;
  cursor: pointer;
}

.status-bar .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-neon);
  box-shadow: 0 0 8px var(--green-neon);
  display: inline-block;
  margin-right: 8px;
}

.game-code {
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--green-neon);
}

/* Lobby — prominent game-code display */
.screen .game-code {
  display: block;
  font-size: clamp(40px, 11vw, 64px);
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--green-neon);
  text-shadow: 0 0 32px rgba(107, 226, 148, .4);
  background: var(--surface-2);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 16px 0 24px;
  cursor: pointer;
  user-select: all;
  transition: background .15s, transform .1s;
}
.screen .game-code:active { transform: scale(.98); }
.screen .game-code:hover { background: rgba(0, 75, 46, .35); }

/* Push container down when status bar is visible */
.container:has(.status-bar) { padding-top: 56px; }

/* ─── Lobby — player list ─────────────────────────────────────── */

.player-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-3);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  text-align: left;
  transition: background .15s ease;
}

.player-item .name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.player-item .status {
  font-size: 13px;
  color: var(--text-faint);
  white-space: nowrap;
}

.player-item .status.ready {
  color: var(--green-neon);
  font-weight: 600;
}

.player-item.ready {
  background: rgba(35, 153, 97, .15);
  border-color: var(--green-bright);
}

.player-item.is-you {
  outline: 2px solid var(--green-neon-30);
  outline-offset: -2px;
}

.player-item.eliminated {
  opacity: .45;
  text-decoration: line-through;
}

/* Generic badge */
.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--surface-line);
}

.player-item.is-you .badge { background: var(--green-neon-15); color: var(--green-neon); border-color: var(--green-neon-30); }

/* ─── Role countdown ──────────────────────────────────────────── */

.countdown-display {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(120px, 30vw, 200px);
  text-align: center;
  margin: 40px 0;
  color: var(--green-neon);
  text-shadow: 0 0 60px rgba(107, 226, 148, .5);
  animation: countdownPulse 1s ease-out;
}

@keyframes countdownPulse {
  0%   { transform: scale(.5); opacity: 0; }
  40%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── Role reveal — flip card ─────────────────────────────────── */

.player-card-container {
  perspective: 1200px;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 5 / 7;
  margin: 24px auto;
  cursor: pointer;
  user-select: none;
}

.player-card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
  transform-style: preserve-3d;
}

.player-card.flipped { transform: rotateY(180deg); }

.player-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.card-back {
  background: linear-gradient(160deg, var(--surface-1), #050d10);
  border: 1px solid var(--surface-line);
}

.card-back .card-logo { font-size: 56px; margin-bottom: 12px; filter: drop-shadow(0 0 12px var(--green-neon-30)); }
.card-back .card-label { font-weight: 700; font-size: 22px; letter-spacing: -.01em; margin-bottom: 8px; }
.card-back .card-hint { font-size: 13px; color: var(--text-dim); }
.card-back .hold-ring { font-size: 28px; margin-top: 16px; opacity: .6; }

.card-front { transform: rotateY(180deg); }

.card-front.kandidaat-card {
  background: linear-gradient(160deg, var(--green-deep), #001a10);
  border: 1px solid var(--green-bright);
}

.card-front.mol-card {
  background: linear-gradient(160deg, #2a0608, #050001);
  border: 1px solid var(--red-bright);
  box-shadow: var(--shadow-card), 0 0 36px rgba(220, 38, 38, .35);
}

.card-role-emoji { font-size: 64px; margin-bottom: 12px; }
.card-role-title { font-size: 32px; font-weight: 800; letter-spacing: .04em; margin-bottom: 12px; }
.card-role-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.card-name { font-size: 14px; color: var(--text-faint); margin-top: 16px; font-style: italic; }

/* ─── Intro screen ────────────────────────────────────────────── */

.intro-progress {
  text-align: center;
  margin: 40px 0;
}

.intro-spinner {
  font-size: 64px;
  display: inline-block;
  animation: introPulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 16px var(--green-neon-30));
}

@keyframes introPulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50%      { transform: scale(1.15); opacity: 1; }
}

/* ─── Photo challenge ─────────────────────────────────────────── */

.photo-preview {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 8px 0;
  display: block;
  border: 1px solid var(--surface-line);
}

.criteria-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.criteria-list li {
  background: var(--surface-3);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 14px;
}

.upload-area {
  background: var(--surface-3);
  border: 2px dashed var(--surface-line);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin: 12px 0;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.upload-area:hover { border-color: var(--green-neon); background: var(--surface-2); }

.guess-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  margin: 6px 0;
  background: var(--surface-3);
  cursor: pointer;
  transition: all .15s ease;
}

.guess-item.selected {
  border-color: var(--green-neon);
  background: var(--green-neon-15);
}

.guess-item.is-locked {
  cursor: not-allowed;
  opacity: .65;
}

.team-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.team-a-card, .team-a .team-badge { background: rgba(35, 153, 97, .25); color: var(--green-neon); }
.team-b-card, .team-b .team-badge { background: rgba(220, 159, 50, .25); color: #f4c060; }

.score-display {
  font-size: 14px;
  color: var(--text-muted);
}

.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin: 4px 0;
}

.result-row.correct { background: rgba(107, 226, 148, .12); }
.result-row.wrong   { background: rgba(220, 38, 38, .12); }

.result-icon { font-size: 18px; }
.answer-text { color: var(--text-muted); font-size: 14px; }

.correct-card { border-color: var(--green-bright) !important; }
.wrong-card   { border-color: var(--red-bright) !important; opacity: .7; }

/* ─── Puzzle ──────────────────────────────────────────────────── */

.clue-number {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-deep);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  line-height: 28px;
  margin-right: 8px;
}

.clue-text {
  font-size: 16px;
  line-height: 1.5;
  margin: 8px 0 16px;
}

/* ─── Estafette / Relay ───────────────────────────────────────── */

.relay-order {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  counter-reset: relay;
}

.relay-order li {
  counter-increment: relay;
  padding: 10px 14px;
  background: var(--surface-3);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.relay-order li::before {
  content: counter(relay);
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-deep);
  color: var(--text);
  font-weight: 700;
  text-align: center;
  line-height: 26px;
  margin-right: 12px;
  font-size: 13px;
}

.song-card {
  background: var(--surface-2);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 10px 0;
}

.song-title  { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.song-artist { color: var(--text-dim); font-size: 13px; }

.chain-choice {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--surface-line);
  margin: 8px 0;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.chain-choice:hover { border-color: var(--green-neon); }

/* ─── Quiz ────────────────────────────────────────────────────── */

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  background: var(--surface-3);
  margin: 6px 0;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.quiz-option:hover { border-color: var(--green-neon-30); background: var(--surface-2); }

.quiz-option.selected {
  border-color: var(--green-neon);
  background: var(--green-neon-15);
}

.quiz-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--surface-line);
  flex-shrink: 0;
  display: inline-block;
  position: relative;
}

.quiz-option.selected .quiz-radio {
  border-color: var(--green-neon);
  background: var(--green-neon);
  box-shadow: 0 0 8px var(--green-neon-30);
}

.option-btn {
  background: var(--surface-2);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 4px 0;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  width: 100%;
  text-align: left;
  transition: all .15s ease;
}

.option-btn:hover { border-color: var(--green-neon); }
.option-btn.selected { border-color: var(--green-neon); background: var(--green-neon-15); }

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

.pot-display {
  text-align: center;
  font-size: clamp(36px, 9vw, 56px);
  font-weight: 800;
  color: var(--green-neon);
  text-shadow: 0 0 24px rgba(107, 226, 148, .35);
  margin: 24px 0;
  letter-spacing: -.02em;
}

.amount {
  font-weight: 700;
  color: var(--green-neon);
}

/* ─── Gameover ────────────────────────────────────────────────── */

.gameover-card {
  background: linear-gradient(160deg, var(--surface-1), var(--bg-base));
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  margin: 16px 0;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  text-align: center;
}

.big-role-text {
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 800;
  letter-spacing: .04em;
  margin: 16px 0 8px;
}

.big-role-text.mol-text { color: var(--red-bright); text-shadow: 0 0 28px rgba(220, 38, 38, .4); }
.big-role-text.kandidaat-text { color: var(--green-neon); }

.role-emoji { font-size: 72px; margin: 12px 0; }

.recap-card {
  background: var(--surface-3);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 10px 0;
  text-align: left;
}

.recap-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.recap-icon { font-size: 22px; }
.recap-title { font-weight: 700; font-size: 15px; }
.recap-sub { color: var(--text-dim); font-size: 13px; }
.recap-detail { color: var(--text-muted); font-size: 13px; margin-top: 6px; }
.recap-earned { font-weight: 700; color: var(--green-neon); margin-top: 6px; font-size: 14px; }

/* ─── Reveal sequence ─────────────────────────────────────────── */

.reveal-card {
  background: linear-gradient(160deg, var(--surface-1), var(--bg-base));
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  padding: 32px 22px;
  margin: 24px 0;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  text-align: center;
  animation: reveal-fade-in .45s ease-out;
}

.reveal-card.drumroll {
  background: linear-gradient(160deg, #1a0a0e, var(--bg-base));
  border-color: rgba(220, 38, 38, .35);
  box-shadow: var(--shadow-card), 0 0 36px rgba(220, 38, 38, .25);
}

.reveal-card.mol-card-final {
  background: linear-gradient(160deg, #2a0d12, #1a0508);
  border-color: var(--red-bright);
  box-shadow: var(--shadow-card), 0 0 48px rgba(220, 38, 38, .45);
  animation: reveal-shake .6s ease-out;
}

.reveal-emoji {
  font-size: 84px;
  margin: 8px 0 12px;
  display: inline-block;
}

.reveal-emoji.pulse { animation: drumroll-pulse 1s ease-in-out infinite; }

@keyframes reveal-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes reveal-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes drumroll-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.1); opacity: .75; }
}

/* ─── Rood/groen winnaar flash (reveal stage 3) ─────────────────── */

.reveal-card.flash-card {
  transition: background 180ms ease-in, border-color 180ms ease-in, box-shadow 180ms ease-in;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reveal-card.flash-card.green {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 0 64px rgba(16, 185, 129, .55);
  animation: flash-pop .35s ease-out;
}

.reveal-card.flash-card.red {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  box-shadow: 0 0 64px rgba(220, 38, 38, .55);
  animation: flash-pop .35s ease-out;
}

.flash-card.green .big-role-text,
.flash-card.red .big-role-text,
.flash-card.green .info,
.flash-card.red .info { color: #fff; }

.flash-verdict {
  margin-top: 12px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
}

.flash-stage { width: 100%; }

@keyframes flash-pop {
  0%   { transform: scale(0.94); opacity: 0.4; }
  60%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Vote tally bars */
.tally-row {
  display: grid;
  grid-template-columns: minmax(60px, 1fr) 3fr auto;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
}

.tally-name { font-weight: 600; font-size: 14px; text-align: left; }

.tally-bar {
  height: 12px;
  background: var(--surface-3);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--surface-line);
}

.tally-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green-mid), var(--green-neon));
  transition: width .8s ease-out;
}

.tally-count { font-weight: 800; color: var(--green-neon); min-width: 20px; text-align: right; }

.winner-row {
  font-size: 18px;
  font-weight: 700;
  color: var(--green-neon);
  margin: 6px 0;
}

.leaderboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.leaderboard-score {
  color: var(--green-neon);
  font-weight: 700;
  font-size: 13px;
}

/* ─── Walkie ──────────────────────────────────────────────────── */

.walkie-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.walkie-btn {
  flex: 1;
  background: var(--green-deep);
  border: 1px solid var(--green-bright);
  border-radius: var(--radius-md);
  padding: 14px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}

.walkie-btn:active,
.walkie-btn.walkieTalking {
  background: var(--green-bright);
  transform: scale(.98);
  box-shadow: 0 0 24px var(--green-neon-30);
}

.walkie-jam-btn {
  background: var(--red-deep);
  border: 1px solid var(--red-bright);
}

.walkie-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-neon);
  box-shadow: 0 0 8px var(--green-neon);
  margin-right: 6px;
}

.walkie-denied,
.walkie-denied-box {
  background: rgba(220, 38, 38, .1);
  border: 1px solid var(--red-deep);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13px;
  color: #ffb8b8;
}

/* ─── Timer ───────────────────────────────────────────────────── */

.timer {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--green-neon);
  letter-spacing: .04em;
  background: rgba(0, 0, 0, .3);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--surface-line);
}

.timer.urgent {
  color: var(--red-bright);
  border-color: var(--red-bright);
  animation: urgentPulse .8s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .5); }
  50%      { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* ─── City selector ──────────────────────────────────────────── */

.city-section { margin-top: 20px; }
.city-options { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.city-btn { flex: 1; min-width: 120px; }
.city-btn-active { background: #4ade80; color: #0a0a0a; border-color: #4ade80; font-weight: 700; }

/* ─── Dev / test mode ───────────────────────────────────────── */

.testmode-section {
  margin-top: 18px;
  padding: 10px;
  border: 1px dashed #b45309;
  border-radius: 10px;
  background: rgba(180, 83, 9, 0.08);
}
.testmode-toggle {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid #b45309;
  color: #fbbf24;
  border-radius: 8px;
  cursor: pointer;
}
.testmode-toggle.active {
  background: #fbbf24;
  color: #0a0a0a;
  font-weight: 700;
}

/* Sticky bar that floats above all screens when test mode is on */
.sim-switcher {
  position: sticky;
  top: 0;
  z-index: 500;
  margin: -24px -20px 12px;
  background: linear-gradient(180deg, rgba(180,83,9,0.95), rgba(180,83,9,0.85));
  border-bottom: 1px solid #fbbf24;
  backdrop-filter: blur(4px);
}
.sim-switcher-toggle {
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sim-switcher-toggle strong { color: #fbbf24; }
.sim-badge {
  background: #fbbf24;
  color: #0a0a0a;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.sim-caret { margin-left: auto; opacity: 0.8; }
.sim-switcher-list {
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid #b45309;
  max-height: 320px;
  overflow-y: auto;
}
.sim-switcher-item {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #222;
  color: #e0e0e0;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sim-switcher-item:hover { background: rgba(251, 191, 36, 0.1); }
.sim-switcher-item.active { background: rgba(251, 191, 36, 0.18); color: #fbbf24; font-weight: 700; }
.sim-tag {
  font-size: 0.7rem;
  background: #222;
  color: #888;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}
.sim-switcher-item.active .sim-tag { background: #fbbf24; color: #0a0a0a; }

/* Hint for click-to-place GPS in test mode */
.sim-gps-hint {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  background: rgba(251, 191, 36, 0.95);
  color: #0a0a0a;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 600;
}

/* ─── Spotify / playlist ──────────────────────────────────────── */

.playlist-section { margin-top: 24px; }
.playlist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  margin: 4px 0;
  font-size: 14px;
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.remove-btn:hover { color: var(--red-bright); }

/* ─── Dialog / lightbox ───────────────────────────────────────── */

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.dialog {
  background: var(--surface-1);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-card);
}

.dialog-info {
  font-size: 14px;
  color: var(--text-muted);
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .9);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ─── Spinner ─────────────────────────────────────────────────── */

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--surface-line);
  border-top-color: var(--green-neon);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 12px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Misc ────────────────────────────────────────────────────── */

/* Text divider — used as <div class="divider">of join...</div> */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-faint);
  margin: 24px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--surface-line);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .two-col { grid-template-columns: 1fr; }
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
}

.mol-toggle-active { color: var(--red-bright) !important; }

/* ─── Mol toggle (lobby) ──────────────────────────────────────── */

.mol-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin: 10px 0;
  background: var(--surface-1);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  user-select: none;
}

.mol-toggle-label {
  flex: 1;
  font-weight: 600;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #3a3a3a;
  border-radius: 28px;
  transition: background .2s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.toggle-switch input:checked + .toggle-slider { background: var(--red-bright); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(24px); }

/* ─── Drone map override ──────────────────────────────────────── */

.leaflet-container {
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-line);
}

/* ─── Prijsjacht ─────────────────────────────────────────────── */

.prijsjacht-rules {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #cfd2cf;
}
.prijsjacht-rules li { margin-bottom: 4px; }
.prijsjacht-rules em { color: #fbbf24; font-style: italic; }

.prijsjacht-briefing-map {
  width: 100%;
  height: 200px;
  background: #111;
}

.prijsjacht-briefing-puzzle {
  padding: 8px 0;
  border-bottom: 1px solid #222;
}
.prijsjacht-briefing-puzzle:last-child { border-bottom: none; }

.prijsjacht-puzzle-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fbbf24;
  margin-bottom: 4px;
}

.prijsjacht-target-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.85rem;
  color: #cfd2cf;
}
.prijsjacht-target-list li { padding: 1px 0; }

.prijsjacht-base-bar {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 8px 0 12px;
  text-align: center;
}
.prijsjacht-base-bar.here {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.5);
}
.prijsjacht-base-label {
  font-weight: 700;
  font-size: 0.95rem;
}
.prijsjacht-base-status {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 2px;
}

.prijsjacht-reject-toast {
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(220, 38, 38, 0.5);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.prijsjacht-puzzle {
  padding: 12px;
  margin: 0 0 12px;
}
.prijsjacht-puzzle.is-solved {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(74, 222, 128, 0.06);
}
.prijsjacht-puzzle.is-failed {
  border-color: rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.06);
}

.prijsjacht-puzzle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 12px;
}
.prijsjacht-puzzle-title {
  font-weight: 800;
  font-size: 1rem;
}
.prijsjacht-puzzle-sub {
  font-size: 0.8rem;
  opacity: 0.75;
}
.prijsjacht-attempts {
  font-size: 0.85rem;
  font-weight: 700;
  background: #1f1f1f;
  padding: 4px 10px;
  border-radius: 999px;
}
.prijsjacht-attempts.low { color: #fbbf24; }
.prijsjacht-attempts.none { color: #dc2626; }

.prijsjacht-hints {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.prijsjacht-hint {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 8px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 90px;
}
.prijsjacht-hint.approved {
  border-color: rgba(74, 222, 128, 0.6);
  background: rgba(74, 222, 128, 0.08);
}
.prijsjacht-hint.judging {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.05);
}
.prijsjacht-hint.cooldown {
  opacity: 0.65;
}
.prijsjacht-hint-target {
  font-weight: 700;
  color: #fbbf24;
  font-size: 0.8rem;
}
.prijsjacht-hint-state {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.85;
}
.prijsjacht-hint-text {
  font-size: 0.85rem;
  line-height: 1.3;
  color: #e5e7eb;
}
.prijsjacht-hint-text.masked {
  font-family: monospace;
  letter-spacing: 2px;
  color: #6b7280;
  font-size: 0.95rem;
}
.prijsjacht-camera-btn {
  font-size: 0.8rem !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  width: 100%;
}

.prijsjacht-guess-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.prijsjacht-guess-row input {
  flex: 1;
  margin: 0;
}
.prijsjacht-guess-row button {
  margin: 0;
  font-size: 0.9rem;
  padding: 10px 14px;
}

.prijsjacht-solved-banner,
.prijsjacht-failed-banner {
  font-weight: 700;
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  margin-top: 8px;
}
.prijsjacht-solved-banner {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}
.prijsjacht-failed-banner {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

.prijsjacht-attempt-log {
  margin-top: 8px;
  border-top: 1px solid #222;
  padding-top: 6px;
}
.prijsjacht-attempt {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 3px 0;
  color: #aaa;
}
.prijsjacht-attempt.correct { color: #4ade80; }

.prijsjacht-result-puzzle.is-solved {
  border-color: rgba(74, 222, 128, 0.55);
}
.prijsjacht-result-puzzle.is-failed {
  border-color: rgba(220, 38, 38, 0.55);
}
.prijsjacht-result-badge {
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.prijsjacht-result-badge.ok { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.prijsjacht-result-badge.bad { background: rgba(220, 38, 38, 0.2); color: #dc2626; }

.prijsjacht-hint-result-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.prijsjacht-hint-result-list li {
  padding: 6px 0;
  border-bottom: 1px solid #222;
}
.prijsjacht-hint-result-list li:last-child { border-bottom: none; }
.prijsjacht-hint-result-list li.missed .prijsjacht-hint-target { opacity: 0.55; }
.prijsjacht-hint-by {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}
