/* ═══════════════════════════════════════════════════════
   BLUFFIN' IT — Styles
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #0f0e17;
  --bg2: #1a1932;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --text: #fffffe;
  --text-dim: rgba(255, 255, 255, 0.55);
  --primary: #ff6b6b;
  --primary-glow: rgba(255, 107, 107, 0.3);
  --secondary: #4ecdc4;
  --secondary-glow: rgba(78, 205, 196, 0.3);
  --accent: #ffe66d;
  --accent-glow: rgba(255, 230, 109, 0.3);
  --purple: #a855f7;
  --pink: #ec4899;
  --green: #06d6a0;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --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: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ─── Background Particles ───────────────────────────────── */
#bg-particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
#bg-particles::before,
#bg-particles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
}
#bg-particles::before {
  width: 400px; height: 400px;
  background: var(--primary);
  top: -100px; left: -100px;
}
#bg-particles::after {
  width: 350px; height: 350px;
  background: var(--purple);
  bottom: -100px; right: -100px;
  animation-delay: -10s;
  animation-direction: reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(60px, 40px) scale(1.1); }
  50% { transform: translate(-30px, 80px) scale(0.95); }
  75% { transform: translate(40px, -20px) scale(1.05); }
}

/* ─── 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.4s ease-out;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) 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: 15vh; }
.logo-emoji {
  font-size: 72px;
  animation: logoBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--primary-glow));
}
@keyframes logoBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}
.logo-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 52px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  line-height: 1.1;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.logo-subtitle {
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  color: var(--text-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 4px;
}
.home-footer {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 32px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.home-buttons { display: flex; flex-direction: column; gap: 14px; width: 100%; margin-top: 40px; }

.btn {
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  padding: 16px 32px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active { transform: scale(0.96); }

.btn-large { padding: 18px 36px; font-size: 20px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #ff8a80);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 6px 30px var(--primary-glow); transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.96) translateY(0); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid rgba(255, 255, 255, 0.12);
}
.btn-secondary:hover { background: var(--surface-hover); border-color: rgba(255,255,255,0.2); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #ffd43b);
  color: #1a1a2e;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 0;
}
.btn-back:hover { color: var(--text); }

.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px var(--primary-glow); }
  50% { box-shadow: 0 4px 40px var(--primary-glow), 0 0 60px var(--primary-glow); }
}

/* ─── 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: 'Fredoka', sans-serif;
  font-size: 28px;
  text-align: center;
}
.form-icon {
  font-size: 52px;
  margin-bottom: 4px;
}
.form-hint {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: -8px;
}
.setup-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.setup-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
}

/* Emoji Picker */
.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(--surface);
  border: 2.5px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-user-select: none;
  user-select: none;
}
.emoji-option:active { transform: scale(0.88); }
.emoji-option:hover { border-color: rgba(255, 255, 255, 0.2); background: var(--surface-hover); }
.emoji-option.selected {
  border-color: var(--primary);
  background: rgba(255, 107, 107, 0.15);
  transform: scale(1.08);
  box-shadow: 0 0 12px var(--primary-glow);
}

.input-field {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: var(--surface);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
}
.input-field::placeholder { color: var(--text-dim); font-weight: 400; }
.input-field:focus { border-color: var(--primary); }

.input-code {
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  letter-spacing: 8px;
  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-dim);
  font-size: 14px;
  text-align: center;
}

.hidden { display: none !important; }

/* ─── Lobby ──────────────────────────────────────────────── */
.lobby-header { text-align: center; padding-top: 8vh; }
.lobby-label { color: var(--text-dim); font-size: 14px; text-transform: uppercase; letter-spacing: 2px; }
.room-code {
  font-family: 'Fredoka', sans-serif;
  font-size: 56px;
  letter-spacing: 12px;
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
  animation: codeGlow 3s ease-in-out infinite;
}
@keyframes codeGlow {
  0%, 100% { text-shadow: 0 0 20px var(--accent-glow); }
  50% { text-shadow: 0 0 40px var(--accent-glow), 0 0 60px var(--accent-glow); }
}
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  background: var(--surface);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  color: var(--text-dim);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-share:hover { color: var(--text); border-color: rgba(255,255,255,0.28); }
.btn-share.copied { color: var(--green); border-color: var(--green); }

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}
.player-card {
  background: var(--surface);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: playerIn 0.4s ease-out;
  position: relative;
}
@keyframes playerIn {
  from { opacity: 0; transform: scale(0.7) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.player-emoji { font-size: 36px; }
.player-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  word-break: break-word;
}
.player-host-badge {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 12px;
  background: var(--accent);
  color: #1a1a2e;
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
}
.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.15s;
  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(--surface);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-settings-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-settings-toggle.open {
  border-color: var(--secondary);
  color: var(--secondary);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.settings-panel {
  background: var(--surface);
  border: 1.5px solid var(--secondary);
  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: settingsIn 0.3s ease-out;
}
@keyframes settingsIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.setting-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
}
.setting-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: var(--surface);
  color: var(--text);
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
  padding: 0;
}
.btn-step:hover {
  border-color: var(--secondary);
  background: rgba(78, 205, 196, 0.12);
  color: var(--secondary);
}
.btn-step:active { transform: scale(0.9); }
.setting-value {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary);
  min-width: 40px;
  text-align: center;
}

/* ─── Round Start ────────────────────────────────────────── */
.round-label {
  font-size: 16px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 3px;
}
.round-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 36px;
  text-align: center;
  animation: roundIn 0.6s ease-out;
}
@keyframes roundIn {
  from { opacity: 0; transform: scale(0.5); }
  50% { transform: scale(1.1); }
  to { opacity: 1; transform: scale(1); }
}
.waiting-msg {
  color: var(--text-dim);
  font-size: 15px;
  font-style: italic;
  text-align: center;
}

/* ─── Choose Mode ────────────────────────────────────────── */
.choose-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  text-align: center;
  margin-bottom: 20px;
}
.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: 18px 22px;
  background: var(--surface);
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  width: 100%;
  text-align: left;
  animation: responseIn 0.4s ease-out 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; }
.btn-choose-mode:active { transform: scale(0.96); }
.btn-choose-mode:hover {
  border-color: var(--secondary);
  background: rgba(78, 205, 196, 0.12);
}
.choose-waiting-icon {
  font-size: 64px;
  animation: logoBounce 2s ease-in-out infinite;
}
.choose-waiting-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  margin-top: 8px;
}

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

/* ─── Task / Response ────────────────────────────────────── */
.task-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.task-badge {
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-dim);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.vote-badge { background: var(--purple); color: white; }

.timer-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.timer-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--green));
  border-radius: 3px;
  width: 100%;
  transition: width 0.5s linear;
}
.timer-fill.urgent {
  background: linear-gradient(90deg, var(--primary), var(--danger));
}

/* Faker alert */
.faker-alert {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
  border: 2px solid var(--purple);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  animation: fakerPulse 1.5s ease-in-out infinite;
  margin-top: 20px;
}
@keyframes fakerPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.2); }
  50% { box-shadow: 0 0 40px rgba(168, 85, 247, 0.4), 0 0 60px rgba(236, 72, 153, 0.2); }
}
.faker-icon { font-size: 56px; margin-bottom: 8px; }
.faker-alert h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  color: var(--purple);
}
.faker-alert p { color: var(--text-dim); margin-top: 4px; }

/* Question display (task screen) */
.question-display {
  background: var(--surface);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-top: 20px;
  text-align: center;
  animation: questionIn 0.5s ease-out;
}
@keyframes questionIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.question-silent-warning {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 10px;
  animation: warningPulse 2s ease-in-out infinite;
}
@keyframes warningPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.question-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}
.question-display.faker-decoy {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(236, 72, 153, 0.12));
  border-color: var(--purple);
}
.question-display.faker-decoy .question-silent-warning {
  color: var(--purple);
}

/* Response areas */
.response-area {
  width: 100%;
  margin-top: 24px;
  animation: responseIn 0.4s ease-out 0.3s both;
}
@keyframes responseIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Raise hand buttons */
.raise-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.btn-raise {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px;
  font-size: 18px;
  background: var(--surface);
  border: 3px solid rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.btn-raise:active { transform: scale(0.95); }
.raise-emoji { font-size: 44px; }
.btn-yes:hover, .btn-yes.selected { border-color: var(--green); background: rgba(6, 214, 160, 0.15); }
.btn-no:hover, .btn-no.selected { border-color: var(--primary); background: rgba(255, 107, 107, 0.15); }

/* Number buttons */
.number-info {
  text-align: center;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
}
.number-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.btn-number {
  font-family: 'Fredoka', sans-serif;
  font-size: 32px;
  font-weight: 700;
  padding: 20px;
  background: var(--surface);
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-number:active { transform: scale(0.92); }
.btn-number:hover, .btn-number.selected {
  border-color: var(--secondary);
  background: rgba(78, 205, 196, 0.15);
  color: var(--secondary);
}

/* 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(--surface);
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  width: 100%;
}
.btn-pick-player:active { transform: scale(0.97); }
.btn-pick-player .player-emoji { font-size: 28px; }
.btn-pick-player:hover, .btn-pick-player.selected {
  border-color: var(--accent);
  background: rgba(255, 230, 109, 0.1);
}

/* 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;
  animation: checkIn 0.5s ease-out;
}
@keyframes checkIn {
  from { transform: scale(0) rotate(-180deg); }
  to { transform: scale(1) rotate(0); }
}
.submit-count {
  text-align: center;
  color: var(--text-dim);
  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: 'Fredoka', sans-serif;
  font-size: 24px;
}
.results-question-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.12), rgba(6, 214, 160, 0.12));
  border: 2.5px solid var(--secondary);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 0 24px rgba(78, 205, 196, 0.15);
  animation: questionRevealIn 0.6s ease-out;
}
@keyframes questionRevealIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.results-question-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary);
  display: block;
  margin-bottom: 6px;
}
.results-question-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.discuss-callout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: rgba(78, 205, 196, 0.1);
  border: 1.5px solid rgba(78, 205, 196, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
}
.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: 10px;
  margin-top: 8px;
}
.result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid rgba(255, 255, 255, 0.06);
  animation: resultIn 0.4s ease-out both;
}
.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }
.result-card:nth-child(5) { animation-delay: 0.5s; }
.result-card:nth-child(6) { animation-delay: 0.6s; }
.result-card:nth-child(7) { animation-delay: 0.7s; }
.result-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes resultIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.result-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.result-left .player-emoji { font-size: 28px; }
.result-left .player-name { font-size: 16px; }

.result-value {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 600;
}
.result-value.hand-yes { color: var(--green); }
.result-value.hand-no { color: var(--text-dim); }
.result-value.number-val { color: var(--secondary); }
.result-value.pick-val { color: var(--accent); font-size: 16px; }
.result-value.text-val {
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  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: rgba(255,255,255,0.08); stroke-width: 6; }
.timer-fg {
  fill: none;
  stroke: var(--secondary);
  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(--primary); }
.timer-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 42px;
  font-weight: 700;
}

/* ─── Voting ─────────────────────────────────────────────── */
.vote-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 26px;
  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: 16px 18px;
  background: var(--surface);
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  width: 100%;
  text-align: left;
}
.btn-vote-player:active { transform: scale(0.97); }
.btn-vote-player .player-emoji { font-size: 28px; }
.btn-vote-player:hover, .btn-vote-player.selected {
  border-color: var(--primary);
  background: rgba(255, 107, 107, 0.12);
}

/* ─── Vote Results ───────────────────────────────────────── */
.reveal-icon {
  font-size: 72px;
  margin-bottom: 8px;
}
.caught-icon { animation: shake 0.5s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(15deg); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(10deg); }
}
.survived-icon { animation: coolIn 0.6s ease-out; }
@keyframes coolIn {
  from { transform: scale(0); }
  50% { transform: scale(1.3); }
  to { transform: scale(1); }
}
.reveal-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 40px;
  font-weight: 700;
}
.reveal-sub { color: var(--text-dim); font-size: 16px; }

.faker-reveal {
  margin-top: 24px;
  text-align: center;
}
.faker-reveal p { color: var(--text-dim); font-size: 14px; margin-bottom: 12px; }
.faker-reveal-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
  border: 2px solid var(--purple);
  border-radius: var(--radius);
  padding: 14px 24px;
  animation: fakerRevealIn 0.6s ease-out 0.5s both;
}
@keyframes fakerRevealIn {
  from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  50% { transform: scale(1.1) rotate(2deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
.faker-reveal-emoji { font-size: 36px; }
.faker-reveal-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--purple);
}

.vote-breakdown {
  width: 100%;
  max-width: 360px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-dim);
  padding: 6px 0;
}
.vote-row-name { font-weight: 600; color: var(--text); }
.vote-row-arrow { margin: 0 8px; opacity: 0.4; }
.vote-row-target { color: var(--text-dim); }
.vote-row-abstain { opacity: 0.45; }
.vote-row-none { font-style: italic; }

/* ─── Scoreboard ─────────────────────────────────────────── */
.scoreboard-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  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 18px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid rgba(255, 255, 255, 0.06);
  animation: resultIn 0.4s ease-out both;
}
.score-card:first-child {
  border-color: var(--accent);
  background: rgba(255, 230, 109, 0.08);
}
.score-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.score-rank {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dim);
  width: 28px;
  text-align: center;
}
.score-card:first-child .score-rank { color: var(--accent); }
.score-left .player-emoji { font-size: 28px; }
.score-left .player-name { font-size: 16px; font-weight: 700; }
.score-value {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--secondary);
}

/* ─── Game Over ──────────────────────────────────────────── */
.gameover-trophy {
  font-size: 80px;
  animation: trophyBounce 1s ease-out;
}
@keyframes trophyBounce {
  from { transform: scale(0) rotate(-30deg); }
  60% { transform: scale(1.2) rotate(5deg); }
  to { transform: scale(1) rotate(0); }
}
.gameover-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 36px;
}
.gameover-winner {
  text-align: center;
  margin-bottom: 8px;
}
.winner-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 28px;
  color: var(--accent);
  font-weight: 700;
}
.winner-label {
  color: var(--text-dim);
  font-size: 14px;
}
.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(--bg2);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  animation: toastIn 0.4s ease-out, toastOut 0.4s ease-in 2.6s forwards;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* ─── Mute Button ────────────────────────────────────────── */
#btn-mute {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  line-height: 1;
  padding: 0;
}
#btn-mute:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.1);
}
#btn-mute:active {
  transform: scale(0.95);
}
#btn-mute.muted {
  opacity: 0.5;
}

/* ─── 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; }
}

/* ─── Inline Voting ─────────────────────────────────────── */
.vote-inline-section {
  width: 100%;
  margin-top: 20px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
}
.vote-inline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.vote-inline-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 600;
}
.vote-lock-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--surface);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}
.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 16px;
  background: var(--surface);
  border: 2.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  width: 100%;
  text-align: left;
}
.btn-vote-inline:active { transform: scale(0.97); }
.btn-vote-inline .player-emoji { font-size: 26px; }
.btn-vote-inline.selected {
  border-color: var(--primary);
  background: rgba(255, 107, 107, 0.12);
}
.btn-vote-inline.dimmed { opacity: 0.4; pointer-events: none; }
.vote-player-name { flex: 1; }
.vote-count-badge {
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  transition: all 0.25s;
}
.vote-count-badge.has-votes {
  background: var(--primary);
  color: white;
  transform: scale(1.15);
}

/* ─── Accused Section ───────────────────────────────────── */
.accused-section {
  margin-top: 20px;
  text-align: center;
}
.accused-label {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 10px;
}
.accused-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  padding: 12px 22px;
  animation: fakerRevealIn 0.5s ease-out 0.3s both;
}
.accused-emoji { font-size: 32px; }
.accused-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--danger);
}

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

@media (max-width: 360px) {
  .logo-title { font-size: 40px; }
  .room-code { font-size: 44px; letter-spacing: 8px; }
  .btn-large { padding: 14px 24px; font-size: 18px; }
  .raise-buttons { gap: 10px; }
  .raise-emoji { font-size: 36px; }
  .btn-raise { padding: 20px 12px; }
  .btn-number { font-size: 26px; padding: 16px; }
  .question-text { font-size: 22px; }
}

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