/* ═══════════════════════════════════════════════════════
   BLUFFIN' IT — Styles
   Bold party-game aesthetic · Inspired by Jackbox
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #0d1520;
  --bg-card: #162030;
  --bg-card-hover: #1c2940;
  --bg-elevated: #1e2d42;
  --border: #253545;
  --border-light: #2d4558;
  --text: #e8e6e1;
  --text-muted: #7a8a99;
  --red: #ff4757;
  --red-deep: #bf2c3b;
  --teal: #00cec9;
  --teal-deep: #00878a;
  --yellow: #ffc312;
  --yellow-deep: #b38800;
  --purple: #c44dff;
  --purple-deep: #8e24aa;
  --green: #2ed573;
  --green-deep: #1a9c50;
  --pink: #ff6b81;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 999px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Rubik', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ─── Background ─────────────────────────────────────── */
#bg-particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(0, 206, 201, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(196, 77, 255, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 110%, rgba(255, 71, 87, 0.04) 0%, transparent 50%);
}
#bg-particles::before,
#bg-particles::after { display: none; }

/* ─── Screens ────────────────────────────────────────── */
.screen {
  position: fixed; inset: 0; z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px calc(24px + var(--safe-bottom));
}
.screen.active {
  display: flex;
  animation: screenIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes screenIn {
  from { opacity: 0; transform: scale(0.93); }
  to { opacity: 1; transform: scale(1); }
}

.screen-content {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  flex: 1;
}
.center-content { justify-content: center; }

/* ─── Logo ───────────────────────────────────────────── */
.logo-container { text-align: center; padding-top: 13vh; }
.logo-emoji {
  font-size: 72px;
  display: inline-block;
  animation: logoWobble 3s ease-in-out infinite;
}
@keyframes logoWobble {
  0%, 100% { transform: rotate(-4deg) scale(1); }
  50% { transform: rotate(4deg) scale(1.05); }
}
.logo-title {
  font-family: 'Bangers', cursive;
  font-size: 68px;
  color: var(--yellow);
  text-shadow:
    3px 3px 0 var(--yellow-deep),
    6px 6px 0 rgba(0,0,0,0.35);
  letter-spacing: 4px;
  line-height: 1;
  margin-top: 4px;
}
.logo-subtitle {
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-top: 10px;
}
.home-footer {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 32px;
  letter-spacing: 0.5px;
}

/* ─── Buttons ────────────────────────────────────────── */
.home-buttons {
  display: flex; flex-direction: column; gap: 14px;
  width: 100%; margin-top: 40px;
}
.btn {
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  padding: 15px 28px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative;
  -webkit-user-select: none;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.btn:active { transform: translateY(3px); }

.btn-large { padding: 17px 32px; font-size: 17px; }

.btn-primary {
  background: var(--red);
  color: white;
  box-shadow: 0 5px 0 var(--red-deep);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--red-deep);
}
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--red-deep);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 2px solid var(--border-light);
  box-shadow: 0 4px 0 var(--border);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  box-shadow: 0 6px 0 var(--border);
}
.btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--border);
}

.btn-accent {
  background: var(--yellow);
  color: #1a1a2e;
  box-shadow: 0 5px 0 var(--yellow-deep);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--yellow-deep);
}
.btn-accent:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--yellow-deep);
}

.btn-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Rubik', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  text-transform: none;
  letter-spacing: 0;
}
.btn-back:hover { color: var(--text); }

.pulse {
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 5px 0 var(--red-deep); }
  50% { box-shadow: 0 5px 0 var(--red-deep), 0 0 20px rgba(255, 71, 87, 0.3); }
}

/* ─── Inputs ─────────────────────────────────────────── */
.form-card {
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding-top: 18vh;
}
.setup-card { padding-top: 10vh; gap: 20px; }
.form-card h2 {
  font-family: 'Bangers', cursive;
  font-size: 32px;
  letter-spacing: 2px;
  text-align: center;
}
.form-icon { font-size: 52px; margin-bottom: 4px; }
.form-hint { color: var(--text-muted); font-size: 14px; margin-top: -8px; }
.setup-section {
  width: 100%;
  display: flex; flex-direction: column; gap: 10px;
}
.setup-label {
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--text-muted);
}

.emoji-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px; width: 100%;
}
.emoji-option {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: 0 3px 0 var(--border);
}
.emoji-option:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }
.emoji-option:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}
.emoji-option.selected {
  border-color: var(--teal);
  background: rgba(0, 206, 201, 0.1);
  transform: scale(1.08);
  box-shadow: 0 3px 0 var(--teal-deep);
}
.emoji-option.taken {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.8);
  box-shadow: none;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Rubik', sans-serif;
  font-size: 17px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.25);
}
.input-field::placeholder { color: var(--text-muted); font-weight: 400; }
.input-field:focus { border-color: var(--teal); }

.input-code {
  font-family: 'Bangers', cursive;
  font-size: 32px;
  letter-spacing: 10px;
  text-transform: uppercase;
}

.error-text {
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
  text-align: center;
}
.status-text {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.hidden { display: none !important; }

/* ─── Lobby ──────────────────────────────────────────── */
.lobby-header {
  text-align: center;
  padding-top: 6vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.lobby-label {
  color: var(--text-muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: 3px; font-weight: 700;
}
.room-code {
  font-family: 'Bangers', cursive;
  font-size: 56px;
  letter-spacing: 12px;
  color: var(--yellow);
  background: var(--bg-card);
  border: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 4px 20px;
  display: inline-block;
  box-shadow: 0 4px 0 var(--yellow-deep);
  margin-top: 6px;
}
.btn-share {
  display: inline-flex;
  align-items: center; gap: 6px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: 'Rubik', sans-serif;
  font-size: 13px; font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-share:hover { color: var(--text); border-color: var(--border-light); }
.btn-share.copied { color: var(--green); border-color: var(--green); }

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; width: 100%; margin-top: 16px;
}
.player-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px;
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  animation: cardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.player-emoji { font-size: 36px; }
.player-name {
  font-family: 'Rubik', sans-serif;
  font-size: 14px; font-weight: 700;
  text-align: center; word-break: break-word;
}
.player-host-badge {
  position: absolute; top: 5px; right: 5px;
  font-size: 10px; font-weight: 800;
  background: var(--yellow);
  color: #1a1a2e;
  border-radius: var(--radius-full);
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.player-kick-btn {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px;
  border-radius: 50%; border: none;
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
  line-height: 1; padding: 0;
}
.player-kick-btn:hover {
  background: var(--danger);
  color: white;
}

/* ─── Lobby Settings ─────────────────────────────────── */
.lobby-settings { width: 100%; margin-bottom: 12px; }
.btn-settings-toggle {
  width: 100%;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Rubik', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  text-transform: uppercase; letter-spacing: 1px;
}
.btn-settings-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}
.btn-settings-toggle.open {
  border-color: var(--teal);
  color: var(--teal);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.settings-panel {
  background: var(--bg-card);
  border: 2px solid var(--teal);
  border-top: none;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  animation: settingsSlide 0.25s ease-out;
}
@keyframes settingsSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
}
.setting-label {
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.setting-stepper { display: flex; align-items: center; gap: 10px; }
.btn-step {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Rubik', sans-serif;
  font-size: 20px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
  line-height: 1; padding: 0;
  box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}
.btn-step:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.btn-step:active { transform: translateY(2px); box-shadow: none; }
.setting-value {
  font-family: 'Bangers', cursive;
  font-size: 22px;
  color: var(--teal);
  min-width: 40px;
  text-align: center;
  letter-spacing: 1px;
}

/* ─── Round Start ────────────────────────────────────── */
.round-label {
  font-size: 13px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 3px;
}
.round-name {
  font-family: 'Bangers', cursive;
  font-size: 42px;
  text-align: center;
  letter-spacing: 2px;
  color: var(--teal);
  text-shadow: 2px 2px 0 var(--teal-deep);
  animation: roundPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes roundPop {
  from { opacity: 0; transform: scale(0.5); }
  60% { transform: scale(1.08); }
  to { opacity: 1; transform: scale(1); }
}
.waiting-msg {
  color: var(--text-muted);
  font-size: 15px;
  font-style: italic;
  text-align: center;
}

/* ─── Choose Mode ────────────────────────────────────── */
.choose-title {
  font-family: 'Bangers', cursive;
  font-size: 32px;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 2px;
}
.choose-options {
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 360px; margin-bottom: 20px;
}
.btn-choose-mode {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: all 0.12s;
  font-family: 'Rubik', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--text);
  width: 100%; text-align: left;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
  animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.btn-choose-mode:nth-child(1) { animation-delay: 0.05s; }
.btn-choose-mode:nth-child(2) { animation-delay: 0.1s; }
.btn-choose-mode:nth-child(3) { animation-delay: 0.15s; }
.btn-choose-mode:nth-child(4) { animation-delay: 0.2s; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-choose-mode:hover {
  border-color: var(--teal);
  background: rgba(0, 206, 201, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 rgba(0,0,0,0.3);
}
.btn-choose-mode:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
#choose-waiting {
  text-align: center;
  width: 100%;
}
.choose-waiting-icon {
  font-size: 64px;
  animation: logoWobble 2.5s ease-in-out infinite;
}
.choose-waiting-name {
  font-family: 'Bangers', cursive;
  font-size: 28px;
  margin-top: 8px;
  letter-spacing: 2px;
}

/* ─── Free Response Input ────────────────────────────── */
.input-free {
  text-align: left;
  font-size: 16px;
  margin-bottom: 12px;
}

/* ─── Task / Response ────────────────────────────────── */
.task-header {
  width: 100%;
  display: flex; flex-direction: column;
  gap: 8px; align-items: center;
}
.task-badge {
  font-family: 'Rubik', sans-serif;
  font-size: 12px; font-weight: 800;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.vote-badge { background: var(--purple); color: white; border-color: var(--purple); }

.timer-bar {
  width: 100%; height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.timer-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 4px;
  width: 100%;
  transition: width 0.5s linear;
}
.timer-fill.urgent {
  background: var(--red);
}

/* Faker alert */
.faker-alert {
  background: var(--bg-card);
  border: 3px solid var(--purple);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 4px 0 var(--purple-deep), inset 0 0 30px rgba(196, 77, 255, 0.08);
  margin-top: 20px;
  animation: fakerShake 0.5s ease-out;
}
@keyframes fakerShake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-8px) rotate(-1deg); }
  30% { transform: translateX(8px) rotate(1deg); }
  45% { transform: translateX(-5px); }
  60% { transform: translateX(5px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
.faker-icon { font-size: 56px; margin-bottom: 8px; }
.faker-alert h2 {
  font-family: 'Bangers', cursive;
  font-size: 30px;
  color: var(--purple);
  letter-spacing: 3px;
}
.faker-alert p { color: var(--text-muted); margin-top: 6px; font-weight: 500; }

.question-display {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-top: 20px;
  text-align: center;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
  animation: slideUp 0.4s ease-out;
}
.question-silent-warning {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--yellow);
  margin-bottom: 10px;
}
.question-text {
  font-family: 'Rubik', sans-serif;
  font-size: 20px; font-weight: 700;
  line-height: 1.4;
}
.question-display.faker-decoy {
  border-color: var(--purple);
  box-shadow: 0 3px 0 var(--purple-deep);
}
.question-display.faker-decoy .question-silent-warning {
  color: var(--purple);
}

/* Response areas */
.response-area {
  width: 100%; margin-top: 24px;
  animation: slideUp 0.35s ease-out 0.2s both;
}

/* Raise hand buttons */
.raise-buttons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.btn-raise {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 24px 16px; font-size: 16px; font-weight: 700;
  background: var(--bg-card);
  border: 3px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  transition: all 0.12s;
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  cursor: pointer;
  font-family: 'Rubik', sans-serif;
}
.btn-raise:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.raise-emoji { font-size: 40px; }
.btn-yes:hover, .btn-yes.selected {
  border-color: var(--green);
  background: rgba(46, 213, 115, 0.1);
  box-shadow: 0 4px 0 var(--green-deep);
}
.btn-no:hover, .btn-no.selected {
  border-color: var(--red);
  background: rgba(255, 71, 87, 0.1);
  box-shadow: 0 4px 0 var(--red-deep);
}

/* Number buttons */
.number-info {
  text-align: center; margin-bottom: 16px;
  display: flex; justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.number-buttons {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.btn-number {
  font-family: 'Bangers', cursive;
  font-size: 36px;
  padding: 18px;
  background: var(--bg-card);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer; transition: all 0.12s;
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  letter-spacing: 2px;
}
.btn-number:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.btn-number:hover, .btn-number.selected {
  border-color: var(--teal);
  background: rgba(0, 206, 201, 0.1);
  color: var(--teal);
  box-shadow: 0 4px 0 var(--teal-deep);
}

/* Pick player */
.pick-players {
  display: flex; flex-direction: column; gap: 10px;
}
.btn-pick-player {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: all 0.12s;
  font-family: 'Rubik', sans-serif;
  font-size: 16px; font-weight: 600;
  color: var(--text);
  text-align: left; width: 100%;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
}
.btn-pick-player:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.btn-pick-player .player-emoji { font-size: 28px; }
.btn-pick-player:hover, .btn-pick-player.selected {
  border-color: var(--yellow);
  background: rgba(255, 195, 18, 0.08);
  box-shadow: 0 3px 0 var(--yellow-deep);
}

/* Waiting / submitted */
.submit-check {
  width: 64px; height: 64px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700;
  margin: 20px auto 12px;
  box-shadow: 0 4px 0 var(--green-deep);
  animation: checkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes checkPop {
  from { transform: scale(0) rotate(-90deg); }
  to { transform: scale(1) rotate(0); }
}
.submit-count {
  text-align: center;
  color: var(--text-muted); font-size: 14px;
}

/* ─── Results ────────────────────────────────────────── */
.results-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  width: 100%; gap: 12px; padding-top: 4px;
}
.results-header-left {
  display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.results-title {
  font-family: 'Bangers', cursive;
  font-size: 26px;
  letter-spacing: 2px;
}
.results-question-card {
  width: 100%;
  background: var(--bg-card);
  border: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
  box-shadow: 0 4px 0 var(--teal-deep);
  animation: slideUp 0.4s ease-out;
}
.results-question-label {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--teal);
  display: block; margin-bottom: 6px;
}
.results-question-text {
  font-family: 'Rubik', sans-serif;
  font-size: 19px; font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}
.discuss-divider {
  display: flex; align-items: center; gap: 14px;
  width: 100%; margin: 6px 0 2px;
}
.discuss-divider-line {
  flex: 1; height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-light) 30%, var(--border-light) 70%, transparent);
}
.discuss-divider-text {
  font-family: 'Bangers', cursive;
  font-size: 17px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.timer-circle-sm {
  width: 70px !important; height: 70px !important;
  flex-shrink: 0; margin: 0 !important;
}
.timer-circle-sm .timer-text { font-size: 22px !important; }

.results-list {
  width: 100%;
  display: flex; flex-direction: column;
  gap: 8px; margin-top: 8px;
}
.result-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
  animation: slideUp 0.35s ease-out both;
}
.result-card:nth-child(1) { animation-delay: 0.05s; }
.result-card:nth-child(2) { animation-delay: 0.1s; }
.result-card:nth-child(3) { animation-delay: 0.15s; }
.result-card:nth-child(4) { animation-delay: 0.2s; }
.result-card:nth-child(5) { animation-delay: 0.25s; }
.result-card:nth-child(6) { animation-delay: 0.3s; }
.result-card:nth-child(7) { animation-delay: 0.35s; }
.result-card:nth-child(8) { animation-delay: 0.4s; }

.result-left {
  display: flex; align-items: center; gap: 10px;
}
.result-left .player-emoji { font-size: 26px; }
.result-left .player-name { font-size: 15px; font-weight: 700; }

.result-value {
  font-family: 'Rubik', sans-serif;
  font-size: 18px; font-weight: 700;
}
.result-value.hand-yes { color: var(--green); }
.result-value.hand-no { color: var(--text-muted); }
.result-value.number-val { color: var(--teal); font-family: 'Bangers', cursive; font-size: 24px; letter-spacing: 2px; }
.result-value.pick-val { color: var(--yellow); font-size: 15px; }
.result-value.text-val {
  color: var(--text);
  font-size: 14px; font-weight: 600;
  font-style: italic;
  max-width: 55%; text-align: right;
  word-break: break-word;
}

/* ─── Discussion Timer ───────────────────────────────── */
.timer-circle {
  position: relative;
  width: 140px; height: 140px;
  margin: 24px auto;
}
.timer-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-bg { fill: none; stroke: var(--border); stroke-width: 6; }
.timer-fg {
  fill: none;
  stroke: var(--teal);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}
.timer-fg.urgent { stroke: var(--red); }
.timer-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bangers', cursive;
  font-size: 42px;
  letter-spacing: 2px;
}

/* ─── Inline Voting ──────────────────────────────────── */
.vote-inline-section {
  width: 100%; margin-top: 16px;
  padding-top: 18px;
}
.vote-inline-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.vote-inline-title {
  font-family: 'Bangers', cursive;
  font-size: 24px; letter-spacing: 3px;
  color: var(--red);
  text-shadow: 1px 1px 0 var(--red-deep);
}
.vote-lock-status {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
}
.vote-inline-players {
  display: flex; flex-direction: column;
  gap: 8px; margin-bottom: 14px;
}
.btn-vote-inline {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: all 0.12s;
  font-family: 'Rubik', sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--text); width: 100%;
  text-align: left;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}
.btn-vote-inline:active {
  transform: translateY(2px);
  box-shadow: none;
}
.btn-vote-inline .player-emoji { font-size: 24px; }
.btn-vote-inline.selected {
  border-color: var(--red);
  background: rgba(255, 71, 87, 0.08);
  box-shadow: 0 2px 0 var(--red-deep);
}
.btn-vote-inline.dimmed { opacity: 0.35; pointer-events: none; }
.btn-vote-inline.vote-self {
  opacity: 0.35; cursor: default;
  pointer-events: none;
  border-style: dashed;
  box-shadow: none;
}
.vote-you-tag {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
}
.vote-player-name { flex: 1; }
.vote-count-badge {
  min-width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: 'Rubik', sans-serif;
  font-size: 13px; font-weight: 700;
  background: var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
}
.vote-count-badge.has-votes {
  background: var(--red);
  color: white;
  transform: scale(1.1);
}

/* Vote lock delay */
.btn-vote-locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-vote-locked:hover {
  transform: none;
  box-shadow: 0 5px 0 var(--red-deep);
}
.vote-lock-countdown {
  font-variant-numeric: tabular-nums;
}

/* ─── Vote Results (Dramatic Reveal) ─────────────────── */
.vr-phase {
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
}
.vr-phase.vr-hidden { display: none; }
.vr-phase.vr-visible {
  display: block;
  animation: vrReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes vrReveal {
  0% { opacity: 0; transform: translateY(24px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.vr-dramatic-text {
  font-family: 'Bangers', cursive;
  font-size: 44px;
  color: var(--yellow);
  letter-spacing: 4px;
  text-shadow: 3px 3px 0 var(--yellow-deep);
  animation: vrTextPulse 1.5s ease-in-out infinite;
}
@keyframes vrTextPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.vr-caption {
  font-size: 14px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.vr-spotlight {
  display: inline-flex;
  align-items: center; gap: 16px;
  background: var(--bg-card);
  border: 3px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 32px;
  box-shadow: 0 5px 0 rgba(0,0,0,0.4);
}
.vr-spotlight-emoji { font-size: 48px; }
.vr-spotlight-name {
  font-family: 'Bangers', cursive;
  font-size: 32px;
  letter-spacing: 2px;
}

.vr-spotlight-accused {
  border-color: var(--red);
  box-shadow: 0 5px 0 var(--red-deep);
}
.vr-spotlight-accused .vr-spotlight-name { color: var(--red); }

.vr-verdict-icon { font-size: 72px; margin-bottom: 8px; }

.vr-verdict-title {
  font-family: 'Bangers', cursive;
  font-size: 48px;
  letter-spacing: 4px;
}
.vr-verdict-title.vr-caught { color: var(--red); text-shadow: 2px 2px 0 var(--red-deep); }
.vr-verdict-title.vr-safe { color: var(--green); text-shadow: 2px 2px 0 var(--green-deep); }
.vr-verdict-title.vr-tie { color: var(--yellow); text-shadow: 2px 2px 0 var(--yellow-deep); }

.vr-verdict-sub {
  color: var(--text-muted);
  font-size: 16px; font-weight: 600;
  margin-top: 8px;
}

.vr-spotlight-faker {
  border-color: var(--purple);
  box-shadow: 0 5px 0 var(--purple-deep);
  animation: fakerCardReveal 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes fakerCardReveal {
  0% { opacity: 0; transform: scale(0.5) rotate(-8deg); }
  60% { transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.vr-spotlight-faker .vr-spotlight-name { color: var(--purple); }

/* Legacy vote-results classes kept for compatibility */
.reveal-icon { font-size: 72px; margin-bottom: 8px; }
.reveal-title { font-family: 'Bangers', cursive; font-size: 40px; letter-spacing: 3px; }
.reveal-sub { color: var(--text-muted); font-size: 16px; }

.vote-breakdown {
  width: 100%; max-width: 400px;
  margin: 12px auto 0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.vb-title {
  font-family: 'Bangers', cursive;
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 4px;
}
.vb-card {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease-out both;
}
.vb-card.vb-faker {
  border-color: var(--purple);
  box-shadow: 0 2px 0 var(--purple-deep);
}
.vb-voter, .vb-target {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.vb-target { justify-content: flex-end; }
.vb-emoji { font-size: 22px; flex-shrink: 0; }
.vb-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vb-faker-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: var(--purple);
  color: white;
  border-radius: var(--radius-full);
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: middle;
}
.vb-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 16px;
  margin: 0 10px;
  opacity: 0.5;
}
.vb-abstain {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  opacity: 0.5;
}

/* Legacy vote-row classes kept for compat */
.vote-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--text-muted); padding: 5px 0;
}
.vote-row-name { font-weight: 700; color: var(--text); }
.vote-row-arrow { margin: 0 8px; opacity: 0.4; }
.vote-row-target { color: var(--text-muted); }
.vote-row-abstain { opacity: 0.4; }
.vote-row-none { font-style: italic; }

/* ─── Voting (standalone, if still used) ─────────────── */
.vote-title {
  font-family: 'Bangers', cursive;
  font-size: 28px; letter-spacing: 2px;
  text-align: center; margin-top: 8px;
}
.vote-players {
  width: 100%;
  display: flex; flex-direction: column;
  gap: 10px; margin-top: 8px;
}
.btn-vote-player {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: all 0.12s;
  font-family: 'Rubik', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--text); width: 100%;
  text-align: left;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
}
.btn-vote-player:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,0.3); }
.btn-vote-player .player-emoji { font-size: 28px; }
.btn-vote-player:hover, .btn-vote-player.selected {
  border-color: var(--red);
  background: rgba(255, 71, 87, 0.08);
}

/* ─── Scoreboard ─────────────────────────────────────── */
.scoreboard-title {
  font-family: 'Bangers', cursive;
  font-size: 32px;
  letter-spacing: 3px;
  padding-top: 8vh;
}
.scoreboard-list {
  width: 100%;
  display: flex; flex-direction: column;
  gap: 10px; margin-top: 12px;
}
.score-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
  animation: slideUp 0.35s ease-out both;
}
.score-card:first-child {
  border-color: var(--yellow);
  box-shadow: 0 4px 0 var(--yellow-deep);
}
.score-left {
  display: flex; align-items: center; gap: 12px;
}
.score-rank {
  font-family: 'Bangers', cursive;
  font-size: 22px;
  color: var(--text-muted);
  width: 28px; text-align: center;
  letter-spacing: 1px;
}
.score-card:first-child .score-rank { color: var(--yellow); }
.score-left .player-emoji { font-size: 28px; }
.score-left .player-name { font-size: 15px; font-weight: 700; }
.score-value {
  font-family: 'Bangers', cursive;
  font-size: 26px;
  color: var(--teal);
  letter-spacing: 2px;
}

/* ─── Game Over ──────────────────────────────────────── */
.gameover-trophy {
  font-size: 80px;
  animation: trophyDrop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes trophyDrop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.gameover-title {
  font-family: 'Bangers', cursive;
  font-size: 40px;
  letter-spacing: 3px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--yellow-deep);
}
.gameover-winner { text-align: center; margin-bottom: 8px; }
.winner-name {
  font-family: 'Bangers', cursive;
  font-size: 30px;
  color: var(--yellow);
  letter-spacing: 2px;
}
.winner-label {
  color: var(--text-muted);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.final-scores { max-width: 400px; }

/* ─── Host Advance Button ────────────────────────────── */
.host-advance {
  margin-top: 20px; width: 100%;
  display: flex; justify-content: center;
}

/* ─── Toasts ─────────────────────────────────────────── */
#toast-container {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  pointer-events: none;
  width: 90%; max-width: 400px;
}
.toast {
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px; font-weight: 700;
  color: var(--text);
  box-shadow: 0 4px 0 rgba(0,0,0,0.4);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), toastOut 0.3s ease-in 2.6s forwards;
  text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

/* ─── Volume Control ─────────────────────────────────── */
#volume-control {
  position: fixed; top: 14px; right: 14px;
  z-index: 100;
  display: flex; align-items: center;
  gap: 0; height: 40px;
}
#btn-mute {
  width: 40px; height: 40px;
  border-radius: 50%; border: none;
  background: var(--bg-card);
  border: 2px solid var(--border);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  line-height: 1; padding: 0; flex-shrink: 0;
}
#btn-mute:hover { background: var(--bg-card-hover); transform: scale(1.08); }
#btn-mute:active { transform: scale(0.92); }
#btn-mute.muted { opacity: 0.5; }

#volume-slider {
  width: 0; opacity: 0; pointer-events: none;
  transition: width 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 3px;
  background: var(--border);
  outline: none; margin-right: 0;
  align-self: center;
}
#volume-control.open #volume-slider {
  width: 100px; opacity: 1;
  pointer-events: auto; margin-right: 10px;
}
#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: 2px solid var(--teal);
  transition: transform 0.12s;
  margin-top: -6px;
}
#volume-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
#volume-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: 2px solid var(--teal);
}
#volume-slider::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
}
#volume-slider::-moz-range-track {
  height: 6px; border-radius: 3px;
  background: var(--border);
}

/* ─── Confetti ───────────────────────────────────────── */
#confetti-container {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 50;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 2px;
  top: -10px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── Accused Section (legacy compat) ────────────────── */
.accused-section { margin-top: 20px; text-align: center; }
.accused-label {
  color: var(--text-muted);
  font-size: 14px; margin-bottom: 10px;
}
.accused-card {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 12px 22px;
  box-shadow: 0 4px 0 rgba(239, 68, 68, 0.4);
}
.accused-emoji { font-size: 32px; }
.accused-name {
  font-family: 'Bangers', cursive;
  font-size: 24px; letter-spacing: 2px;
  color: var(--danger);
}

.faker-reveal { margin-top: 24px; text-align: center; }
.faker-reveal p { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.faker-reveal-card {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 3px solid var(--purple);
  border-radius: var(--radius);
  padding: 14px 24px;
  box-shadow: 0 4px 0 var(--purple-deep);
  animation: fakerCardReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}
.faker-reveal-emoji { font-size: 36px; }
.faker-reveal-name {
  font-family: 'Bangers', cursive;
  font-size: 26px; letter-spacing: 2px;
  color: var(--purple);
}

/* ─── Responsive ─────────────────────────────────────── */
@media (min-width: 640px) {
  .logo-title { font-size: 80px; }
  .room-code { font-size: 64px; letter-spacing: 16px; }
  .screen { padding: 32px; }
  .screen-content { max-width: 520px; }
}

@media (max-width: 360px) {
  .logo-title { font-size: 50px; }
  .room-code { font-size: 42px; letter-spacing: 8px; }
  .btn-large { padding: 14px 24px; font-size: 16px; }
  .raise-buttons { gap: 10px; }
  .raise-emoji { font-size: 32px; }
  .btn-raise { padding: 18px 10px; }
  .btn-number { font-size: 28px; padding: 14px; }
  .question-text { font-size: 18px; }
  .vr-dramatic-text { font-size: 34px; }
  .vr-verdict-title { font-size: 36px; }
  .vr-spotlight { padding: 14px 20px; }
  .vr-spotlight-name { font-size: 24px; }
}

@media (max-height: 600px) {
  .logo-container { padding-top: 6vh; }
  .form-card { padding-top: 10vh; }
  .lobby-header { padding-top: 3vh; }
  .scoreboard-title { padding-top: 4vh; }
}
