﻿/* ---- DRINKS SHEET ---- */
.gp-drinks-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
}

.gp-drinks-summary-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.gp-drinks-summary-count {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #fbbf24;
}

.gp-drinks-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gp-drink-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.gp-drink-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.gp-drink-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.gp-drink-count {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fbbf24;
  min-width: 24px;
  text-align: center;
  font-family: var(--font-display);
}

.gp-drink-minus {
  background: rgba(239, 68, 68, 0.7);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gp-drink-minus:hover {
  background: #ef4444;
  transform: scale(1.1);
}

/* ---- CHAT SHEET ---- */
.gp-chat-messages {
  height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
}

.gp-chat-bubble {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  animation: fadeSlideUp 0.2s ease-out;
}

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

.gp-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.gp-chat-content {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
  border: 1px solid var(--glass-border);
  max-width: 85%;
}

.gp-chat-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 0.1rem;
}
/* Per-player chat name colors (matches avatar gradients) */
.gp-chat-name.chat-name-color-0 { color: #8b9cf7; }
.gp-chat-name.chat-name-color-1 { color: #f5b44e; }
.gp-chat-name.chat-name-color-2 { color: #34d399; }
.gp-chat-name.chat-name-color-3 { color: #f87171; }
.gp-chat-name.chat-name-color-4 { color: #a78bfa; }
.gp-chat-name.chat-name-color-5 { color: #22d3ee; }
.gp-chat-name.chat-name-color-6 { color: #f472b6; }
.gp-chat-name.chat-name-color-7 { color: #a3e635; }

.gp-chat-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.gp-chat-input-row {
  display: flex;
  gap: 0.5rem;
  position: sticky;
  bottom: 0;
  padding: 0.5rem 0;
  background: rgba(18, 18, 28, 0.97);
}

.gp-chat-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.gp-chat-input::placeholder {
  color: var(--text-muted);
}

.gp-chat-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.gp-chat-send {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.gp-chat-send:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* ---- HOST SHEET ---- */
.gp-host-player-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  margin-bottom: 0.5rem;
}

.gp-host-player-info {
  flex: 1;
}

.gp-host-player-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.gp-host-player-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gp-host-player-status.online {
  color: #10b981;
}

.gp-host-player-actions {
  display: flex;
  gap: 0.4rem;
}

.gp-host-btn {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-display);
}

.gp-host-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.gp-host-btn.danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.gp-host-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ---- SETTINGS SHEET ---- */
.gp-settings-section {
  margin-bottom: 1.25rem;
}

.gp-settings-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.gp-settings-game-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.gp-settings-game-icon {
  font-size: 2rem;
}

.gp-settings-game-info {
  flex: 1;
}

.gp-settings-game-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.gp-settings-game-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.gp-settings-select {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.gp-settings-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.gp-settings-select option {
  background: #1a1a2e;
  color: var(--text-primary);
}

.gp-settings-apply {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.gp-settings-apply:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.gp-quit-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.gp-quit-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

/* ---- GAME INFO CARD (in content) ---- */
.game-info-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-info-icon {
  font-size: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
}

.game-info-content {
  flex: 1;
}

.game-info-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.game-info-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---- HOST ACTIONS (in content) ---- */
.host-actions-panel {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.host-actions-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.host-actions-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.host-action-btn {
  flex: 1;
  min-width: 90px;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.host-action-btn.primary {
  background: var(--accent-gradient);
  color: white;
}

.host-action-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.host-action-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.host-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* ---- PHASE INFO CARD ---- */
.phase-info-card {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.phase-icon {
  font-size: 1.3rem;
}

.phase-info-content {
  flex: 1;
}

.phase-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: #93c5fd;
  font-size: 0.9rem;
}

.phase-hint {
  font-size: 0.8rem;
  color: #60a5fa;
}

/* ---- CONNECTION STATUS ---- */
.connection-status {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem;
}

.connection-status.connected {
  color: #10b981;
}

.connection-status.disconnected {
  color: #ef4444;
}

/* ---- GAME SELECTOR (in settings sheet) ---- */
.game-selector {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.game-selector-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.game-selector select {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  cursor: pointer;
}

.game-selector select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.game-selector select option {
  background: #1a1a2e;
  color: var(--text-primary);
}

/* ---- AVATAR COLORS ---- */
.avatar-color-0 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.avatar-color-1 {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.avatar-color-2 {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.avatar-color-3 {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.avatar-color-4 {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.avatar-color-5 {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.avatar-color-6 {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.avatar-color-7 {
  background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
}

/* ---- RESPONSIVE ---- */
@media (min-width: 768px) {
  .gp-content {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .gp-content {
    max-width: 720px;
  }

  .gp-sheet {
    max-width: 500px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(100%);
    border-radius: 20px 20px 0 0;
  }

  .gp-sheet.open {
    transform: translateX(-50%) translateY(0);
  }
}



/* ============================================
   GAME BOXES - No scroll, full height visible
   ============================================ */

/* All game boxes should expand to fit content */
#palmierBox,
#rouletteBox,
#auctionsBox,
#neverBox,
#undercoverSection,
#liarBox {
  max-height: none;
  overflow: visible;
}

/* Keep scroll only for specific elements that need it */
#rouletteHistory {
  max-height: 120px;
  overflow-y: auto;
}

.chat {
  max-height: 150px;
  overflow-y: auto;
}

/* Phase and drinks panels - compact but no scroll */
#phaseBox,
#drinksPanel {
  max-height: none;
  overflow: visible;
}

/* Ensure the main card can grow */
.card {
  max-height: none;
  overflow: visible;
}


/* --- End game results for espion/cupide --- */
.uc-espion-result, .uc-cupide-result {
  padding: 0.6rem;
  border-radius: var(--radius-md);
  margin: 0.5rem 0;
  font-size: 0.95rem;
  text-align: center;
}
.uc-espion-win { background: rgba(100,116,139,0.15); border: 1px solid rgba(100,116,139,0.3); color: #cbd5e1; }
.uc-espion-lose { background: rgba(100,116,139,0.08); color: var(--text-muted); }
.uc-cupide-win { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); color: #fbbf24; }
.uc-cupide-lose { background: rgba(245,158,11,0.08); color: var(--text-muted); }
.uc-word-espion {
  background: rgba(100,116,139,0.15) !important;
  border-color: rgba(100,116,139,0.3) !important;
}

/* --- Dual word display for witness / cameleon --- */
.uc-word-dual-civil {
  color: #4ade80;
  font-weight: 700;
}
.uc-word-dual-sep {
  color: var(--text-muted);
  margin: 0 0.3rem;
}
.uc-word-dual-impostor {
  color: #f87171;
  font-weight: 700;
}

/* --- Witness choice phase --- */
.uc-witness-choice { margin: 0.75rem 0; }
.uc-witness-card {
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}
.uc-witness-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #a78bfa;
  margin-bottom: 0.4rem;
}
.uc-witness-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.uc-witness-timer {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.uc-witness-timer strong {
  color: #fbbf24;
  font-size: 1.1rem;
}
.uc-witness-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.uc-witness-btn {
  flex: 1;
  max-width: 200px;
  padding: 1rem;
  border-radius: 14px;
  border: 2px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.uc-witness-btn-civil {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.4);
  color: #4ade80;
}
.uc-witness-btn-civil:hover {
  background: rgba(34,197,94,0.25);
  transform: translateY(-2px);
}
.uc-witness-btn-impostor {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: #f87171;
}
.uc-witness-btn-impostor:hover {
  background: rgba(239,68,68,0.25);
  transform: translateY(-2px);
}

/* --- Witness waiting --- */
.uc-witness-wait {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Witness result in winner card --- */
.uc-witness-result {
  text-align: center;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.75rem 0;
}
.uc-witness-correct {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
}
.uc-witness-wrong {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
}

/* --- Distribution panel for witness --- */
.uc-dist-panel {
  background: rgba(139,92,246,0.06);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
}
.uc-dist-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.uc-dist-emoji { font-size: 1.4rem; }
.uc-dist-title {
  font-size: 1rem;
  font-weight: 600;
  color: #a78bfa;
}
.uc-dist-players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}
.uc-dist-player-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-dist-player-count {
  background: rgba(139,92,246,0.3);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #e9d5ff;
}
.uc-dist-confirm {
  display: block;
  width: 100%;
  padding: 0.6rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}
.uc-dist-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.uc-dist-confirm:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}

/* --- Clue item witness marker --- */
.uc-clue-witness {
  border-left: 3px solid rgba(245,158,11,0.5);
  padding-left: 0.5rem;
}

/* --- Mobile responsive for witness / setup --- */
@media (max-width: 480px) {
  .uc-witness-btns { flex-direction: column; align-items: center; }
  .uc-witness-btn { max-width: 100%; width: 100%; }
  .uc-config-row { flex-wrap: wrap; }
  .uc-config-label { flex: 0 0 80px; font-size: 0.8rem; }
  .uc-dist-panel { padding: 12px; }
}


/* ============================================
   GAME PAGE — RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .game-page-container {
    padding: 0.5rem;
  }

  .lobby-container {
    border-radius: var(--radius-lg);
  }

  .lobby-header {
    padding: 1.25rem 1rem;
  }

  .lobby-header h1 {
    font-size: 1.2rem;
  }

  .lobby-code-value {
    font-size: 1.5rem;
  }

  .lobby-container > *:not(.lobby-header):not(.chat-section):not(.connection-status) {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }

  .lobby-container > .chat-section {
    margin: 0 0.75rem 0.5rem;
  }

  .lobby-container > .connection-status {
    margin: 0 0.75rem 0.75rem;
  }

  .player-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
  }

  .player-avatar {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .player-name {
    font-size: 0.8rem;
  }

  .host-actions-btns {
    flex-direction: column;
  }

  .host-action-btn {
    min-width: unset;
  }

  #quizAnswers {
    grid-template-columns: 1fr;
  }

  .wheel-wrap {
    width: 240px;
    height: 240px;
  }
}


/* ============================================
   CUSTOM SCROLLBAR — DARK THEME
   ============================================ */
.modern-theme ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.modern-theme ::-webkit-scrollbar-track {
  background: transparent;
}

.modern-theme ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.modern-theme ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}


/* ============================================
   INLINE STYLE OVERRIDES FOR DARK THEME
   Game HTML uses many inline styles with light
   theme colors — override them here
   ============================================ */
.lobby-container [style*="color:#1f2937"],
.lobby-container [style*="color: #1f2937"] {
  color: var(--text-primary) !important;
}

.lobby-container [style*="color:#64748b"],
.lobby-container [style*="color: #64748b"],
.lobby-container [style*="color:#6b7280"],
.lobby-container [style*="color: #6b7280"] {
  color: var(--text-muted) !important;
}

.lobby-container [style*="color:#92400e"],
.lobby-container [style*="color: #92400e"] {
  color: #fbbf24 !important;
}

.lobby-container [style*="color:#78350f"],
.lobby-container [style*="color: #78350f"] {
  color: #fcd34d !important;
}

.lobby-container [style*="color:#334155"],
.lobby-container [style*="color: #334155"] {
  color: var(--text-secondary) !important;
}

.lobby-container [style*="color:#374151"],
.lobby-container [style*="color: #374151"] {
  color: var(--text-secondary) !important;
}

.lobby-container [style*="color:#166534"],
.lobby-container [style*="color: #166534"] {
  color: #6ee7b7 !important;
}

.lobby-container [style*="color:#065f46"],
.lobby-container [style*="color: #065f46"] {
  color: #6ee7b7 !important;
}

.lobby-container [style*="color:#047857"],
.lobby-container [style*="color: #047857"] {
  color: #34d399 !important;
}

.lobby-container [style*="color:#0369a1"],
.lobby-container [style*="color: #0369a1"] {
  color: #7dd3fc !important;
}

.lobby-container [style*="color:#1e40af"],
.lobby-container [style*="color: #1e40af"] {
  color: #93c5fd !important;
}

.lobby-container [style*="color:#5b21b6"],
.lobby-container [style*="color: #5b21b6"] {
  color: #c4b5fd !important;
}

.lobby-container [style*="color:#7c3aed"],
.lobby-container [style*="color: #7c3aed"] {
  color: #a78bfa !important;
}

.lobby-container [style*="color:#4338ca"],
.lobby-container [style*="color: #4338ca"] {
  color: #a5b4fc !important;
}

.lobby-container [style*="color:#b91c1c"],
.lobby-container [style*="color: #b91c1c"] {
  color: #fca5a5 !important;
}

.lobby-container [style*="color:#991b1b"],
.lobby-container [style*="color: #991b1b"] {
  color: #fca5a5 !important;
}

.lobby-container [style*="color:#b45309"],
.lobby-container [style*="color: #b45309"] {
  color: #fcd34d !important;
}

/* Override inline backgrounds for glass effect */
.lobby-container [style*="background:#f8fafc"],
.lobby-container [style*="background: #f8fafc"],
.lobby-container [style*="background:#f1f5f9"],
.lobby-container [style*="background: #f1f5f9"],
.lobby-container [style*="background:#f3f4f6"],
.lobby-container [style*="background: #f3f4f6"] {
  background: rgba(255, 255, 255, 0.04) !important;
}

.lobby-container [style*="background:white"],
.lobby-container [style*="background: white"],
.lobby-container [style*="background:#fff"],
.lobby-container [style*="background: #fff"],
.lobby-container [style*="background:#ffffff"],
.lobby-container [style*="background: #ffffff"] {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Override gradient backgrounds to darker versions */
.lobby-container [style*="background:linear-gradient(135deg, #f0f4ff"],
.lobby-container [style*="background:linear-gradient(135deg, #f0f9ff"],
.lobby-container [style*="background:linear-gradient(135deg, #faf5ff"],
.lobby-container [style*="background:linear-gradient(135deg, #ecfdf5"],
.lobby-container [style*="background:linear-gradient(135deg, #e0f2fe"],
.lobby-container [style*="background:linear-gradient(135deg, #eff6ff"] {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: var(--glass-border) !important;
}

.lobby-container [style*="background:linear-gradient(135deg, #fef3c7"],
.lobby-container [style*="background: linear-gradient(135deg, #fef3c7"] {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.lobby-container [style*="background:linear-gradient(135deg, #fee2e2"],
.lobby-container [style*="background: linear-gradient(135deg, #fee2e2"],
.lobby-container [style*="background:linear-gradient(135deg, #fecaca"] {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.lobby-container [style*="background:linear-gradient(135deg, #dcfce7"],
.lobby-container [style*="background: linear-gradient(135deg, #dcfce7"] {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

.lobby-container [style*="background:#e0f2fe"],
.lobby-container [style*="background: #e0f2fe"],
.lobby-container [style*="background:#dcfce7"],
.lobby-container [style*="background: #dcfce7"],
.lobby-container [style*="background:#fef3c7"],
.lobby-container [style*="background: #fef3c7"] {
  background: rgba(255, 255, 255, 0.05) !important;
}

.lobby-container [style*="background:#f0fdf4"],
.lobby-container [style*="background: #f0fdf4"],
.lobby-container [style*="background:#e0f2fe"],
.lobby-container [style*="background: #e0f2fe"] {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* Override borders */
.lobby-container [style*="border:1px solid #e2e8f0"],
.lobby-container [style*="border: 1px solid #e2e8f0"],
.lobby-container [style*="border:1px solid #e4e8f2"],
.lobby-container [style*="border: 1px solid #e4e8f2"],
.lobby-container [style*="border:1px solid #ddd"],
.lobby-container [style*="border: 1px solid #ddd"] {
  border-color: var(--glass-border) !important;
}

.lobby-container [style*="border:2px solid #e2e8f0"],
.lobby-container [style*="border: 2px solid #e2e8f0"] {
  border-color: var(--glass-border) !important;
}

.lobby-container [style*="border-top:1px solid #e0e0e0"],
.lobby-container [style*="border-bottom:2px solid #e5e7eb"],
.lobby-container [style*="border-bottom: 2px solid #e5e7eb"] {
  border-color: var(--glass-border) !important;
}

/* Inline text inputs in game sections */
.lobby-container input[style*="border:2px solid #e2e8f0"],
.lobby-container input[style*="border: 2px solid #e2e8f0"],
.lobby-container input[style*="border:2px solid #d8b4fe"],
.lobby-container input[style*="border: 2px solid #d8b4fe"],
.lobby-container textarea[style*="border:2px solid #e9d5ff"],
.lobby-container textarea[style*="border: 2px solid #e9d5ff"] {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--glass-border) !important;
  color: var(--text-primary) !important;
}

.lobby-container input:focus,
.lobby-container textarea:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2) !important;
}

/* Suggestions dropdown in blindtest */
.lobby-container #blindtestSuggestions {
  background: var(--bg-secondary) !important;
  border-color: var(--glass-border) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* Table styling (generic) */
.lobby-container table {
  color: var(--text-primary);
}

.lobby-container table th {
  color: var(--text-secondary);
}


/* ============================================
   GAME-SPECIFIC CSS CLASSES
   (Replacing inline styles in JS templates)
   ============================================ */

/* --- Shared Timer Urgency --- */
.timer-urgent {
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
  color: #fca5a5 !important;
}

.timer-pulse {
  animation: pulse 0.5s infinite !important;
}

/* --- Liar Game Classes --- */
.liar-reveal-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.liar-reveal-value {
  font-size: 2rem;
  font-weight: 700;
}

.liar-truth-vrai {
  color: #4ade80;
}

.liar-truth-faux {
  color: #f87171;
}

.liar-vote-pills {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}

.liar-pill-vrai {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
}

.liar-pill-faux {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
}

.liar-vote-summary {
  font-size: 0.9rem;
}

.liar-outcome {
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
}

.liar-outcome-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.liar-outcome-fail {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.liar-outcome-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.liar-outcome-detail {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.liar-wrong-voters {
  background: rgba(245, 158, 11, 0.1);
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 0.75rem;
}

.liar-wrong-voters-text {
  font-size: 0.9rem;
  color: #fbbf24;
}

.liar-history-item {
  font-size: 0.85rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--glass-border);
}

/* --- Liar Mode Badge --- */
.liar-mode-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.75rem auto 0;
  width: fit-content;
}
.liar-badge-classic {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #d8b4fe;
}
.liar-badge-bluff {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}
.liar-badge-icon {
  font-size: 1rem;
}

/* --- Liar Waiting Content --- */
.liar-waiting-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.liar-waiting-emoji {
  font-size: 2rem;
  animation: liar-pulse 2s ease-in-out infinite;
}
@keyframes liar-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

/* --- Bluff Speaker Prompt --- */
.liar-bluff-speaker-prompt {
  text-align: center;
  padding: 1.5rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
}

/* --- Bluff Choice Buttons (Speaker: pick which is the lie) --- */
.liar-bluff-choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}
.liar-bluff-choice {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.liar-bluff-choice:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}
.liar-bluff-choice:active {
  transform: translateY(0);
}
.liar-bluff-choice-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(124, 58, 237, 0.4));
  font-size: 1.1rem;
  font-weight: 700;
  color: #d8b4fe;
  flex-shrink: 0;
}

/* --- Bluff Voter Box --- */
.liar-bluff-voter-box {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

/* --- Bluff Vote Choices (Voter: pick 1/2/3) --- */
.liar-bluff-vote-choices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1rem 0;
}
.liar-bluff-vote-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.liar-bluff-vote-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}
.liar-bluff-vote-btn:active {
  transform: translateY(0);
}
.liar-bluff-vote-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.4));
  font-size: 0.95rem;
  font-weight: 700;
  color: #93c5fd;
  flex-shrink: 0;
}

/* --- Bluff Result Reveal --- */
.liar-bluff-reveal-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.liar-bluff-reveal-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* --- Bluff Vote Results (in result phase) --- */
.liar-bluff-vote-results {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.liar-bluff-result-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.liar-bluff-pill-correct {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.liar-bluff-pill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 700;
}
.liar-bluff-pill-correct .liar-bluff-pill-num {
  background: rgba(239, 68, 68, 0.3);
}
.liar-bluff-pill-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}


/* ============================================
   SHARED TOAST SYSTEM — All Games
   ============================================ */
.game-toasts {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  z-index: 10000; display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none; width: 90%; max-width: 360px;
}
.game-toast {
  background: rgba(30, 30, 40, 0.92); border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 10px; padding: 0.6rem 1rem; color: var(--text-primary);
  font-size: 0.9rem; font-weight: 500; pointer-events: auto;
  animation: gameToastIn 0.3s ease-out forwards;
}
.game-toast-out { animation: gameToastOut 0.3s ease-in forwards; }

/* Toast type variants */
.game-toast-success { border-color: rgba(34, 197, 94, 0.4); }
.game-toast-error { border-color: rgba(239, 68, 68, 0.4); }
.game-toast-info { border-color: rgba(56, 189, 248, 0.4); }
.game-toast-warning { border-color: rgba(251, 191, 36, 0.4); }
.game-toast-purple { border-color: rgba(139, 92, 246, 0.4); }
.game-toast-pink { border-color: rgba(236, 72, 153, 0.4); }

@keyframes gameToastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gameToastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}


/* ============================================
   PHASE TRANSITIONS — Animations
   ============================================ */
.phase-transition-enter {
  animation: phaseEnter 0.4s ease-out forwards;
}
@keyframes phaseEnter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.phase-transition-exit {
  animation: phaseExit 0.25s ease-in forwards;
}
@keyframes phaseExit {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}


/* ============================================
   LOBBY PLAYER JOIN/LEAVE ANIMATIONS
   ============================================ */
.gp-player-chip.player-enter {
  animation: playerEnter 0.4s ease-out forwards;
}
@keyframes playerEnter {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
.gp-player-chip.player-leave {
  animation: playerLeave 0.3s ease-in forwards;
}
@keyframes playerLeave {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.5); }
}


/* ============================================
   READY STATUS — Player Chip
   ============================================ */
.gp-player-chip.is-ready::after {
  content: "✓";
  position: absolute; bottom: -2px; right: -2px;
  background: #22c55e; color: white; font-size: 0.55rem;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-primary, #0a0a0f);
  font-weight: 700;
  animation: readyPop 0.3s ease-out;
}
@keyframes readyPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}


/* ============================================
   DRINKS COUNTER — Visual Enhancement
   ============================================ */
.gp-drink-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; border-radius: 14px;
  background: rgba(239, 68, 68, 0.15); color: #f87171;
  font-weight: 700; font-size: 0.9rem; padding: 0 6px;
  transition: all 0.3s ease;
}
.gp-drink-count.drink-bump {
  animation: drinkBump 0.4s ease-out;
}
@keyframes drinkBump {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); background: rgba(239, 68, 68, 0.35); }
  100% { transform: scale(1); }
}
.gp-drink-row .gp-drink-count-zero {
  background: rgba(255,255,255,0.05); color: var(--text-muted);
}
.gp-drinks-summary-count.drink-bump {
  animation: drinkBump 0.4s ease-out;
}


/* ============================================
   MOBILE KEYBOARD — Input Handling
   ============================================ */
@media (max-width: 768px) {
  .keyboard-open .gp-bottom-nav { display: none; }
  .keyboard-open .gp-sheet { bottom: 0; }
}


/* ============================================
   END GAME RESULTS SCREEN
   ============================================ */
.end-results-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999; background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.4s ease-out;
}
.end-results-card {
  max-width: 420px; width: 90%; background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  padding: 2rem 1.5rem; text-align: center;
  animation: modal-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.end-results-title {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem;
  background: var(--accent-gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.end-results-subtitle { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.end-results-podium { display: flex; justify-content: center; align-items: flex-end; gap: 0.5rem; margin-bottom: 1.5rem; }
.end-podium-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.75rem 0.5rem; border-radius: 12px; min-width: 70px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
}
.end-podium-item.first {
  background: rgba(251,191,36,0.15); border-color: rgba(251,191,36,0.3);
  transform: scale(1.1); order: 0;
}
.end-podium-item.second { order: -1; }
.end-podium-item.third { order: 1; }
.end-podium-rank { font-size: 1.5rem; margin-bottom: 0.25rem; }
.end-podium-name { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); }
.end-podium-score { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.end-results-list { text-align: left; margin-bottom: 1.5rem; }
.end-result-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.75rem; border-radius: 8px;
  animation: phaseEnter 0.3s ease-out backwards;
}
.end-result-row:nth-child(even) { background: rgba(255,255,255,0.03); }
.end-result-row:nth-child(1) { animation-delay: 0.1s; }
.end-result-row:nth-child(2) { animation-delay: 0.2s; }
.end-result-row:nth-child(3) { animation-delay: 0.3s; }
.end-result-row:nth-child(4) { animation-delay: 0.4s; }
.end-result-row:nth-child(5) { animation-delay: 0.5s; }
.end-result-rank { font-weight: 600; color: var(--text-muted); width: 24px; }
.end-result-name { flex: 1; font-weight: 500; }
.end-result-score { font-weight: 600; color: #a78bfa; }
.end-results-drinks { margin-bottom: 1.5rem; }
.end-drinks-title { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.end-drinks-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.4rem 0.75rem; font-size: 0.9rem;
}
.end-drinks-name { color: var(--text-secondary); }
.end-drinks-count { color: #f87171; font-weight: 600; }
.end-results-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.end-btn-replay {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; border: none;
  padding: 0.75rem 1.5rem; border-radius: 10px; font-weight: 600; cursor: pointer;
}
.end-btn-replay:hover { filter: brightness(1.1); }
.end-btn-menu {
  background: rgba(255,255,255,0.1); color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.15); padding: 0.75rem 1.5rem;
  border-radius: 10px; font-weight: 500; cursor: pointer;
}
.end-btn-menu:hover { background: rgba(255,255,255,0.15); }


/* ============================================
   SETTINGS — Toggles, QR Code
   ============================================ */
.gp-settings-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
}
.gp-settings-toggle-label { font-size: 0.9rem; color: var(--text-primary); }
.gp-toggle {
  position: relative; width: 48px; height: 26px;
  background: rgba(255,255,255,0.15); border: none; border-radius: 13px;
  cursor: pointer; transition: background 0.2s;
}
.gp-toggle.active { background: #8b5cf6; }
.gp-toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; transition: transform 0.2s;
  pointer-events: none;
}
.gp-toggle.active .gp-toggle-knob { transform: translateX(22px); }

.gp-qr-wrapper {
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
}
.gp-qr-wrapper canvas { border-radius: 12px; }
.gp-qr-hint {
  font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; margin-bottom: 0;
}


/* ============================================
   DRINKS SHEET — Leaderboard button
   ============================================ */
.gp-drinks-leaderboard-row {
  padding: 0.75rem 1rem; text-align: center;
}
.gp-leaderboard-btn {
  background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.2));
  color: #fbbf24; border: 1px solid rgba(251,191,36,0.3);
  padding: 0.6rem 1.2rem; border-radius: 10px; font-weight: 600;
  cursor: pointer; font-size: 0.9rem; transition: all 0.2s;
}
.gp-leaderboard-btn:hover { background: linear-gradient(135deg, rgba(251,191,36,0.3), rgba(245,158,11,0.3)); }


/* =====================================================
   SHARED ANIMATIONS SYSTEM
   Confetti, transitions, ripple, stagger, score pops
   ===================================================== */

/* --- Confetti canvas overlay --- */
.confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 99999;
}

/* --- Button Ripple Effect --- */
.ripple-btn {
  position: relative;
  overflow: hidden;
}
.ripple-btn .ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: rippleExpand 0.5s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleExpand {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* --- Staggered list entrance --- */
.stagger-in > * {
  opacity: 0;
  transform: translateY(12px);
  animation: staggerFadeUp 0.35s ease-out forwards;
}
.stagger-in > *:nth-child(1)  { animation-delay: 0s; }
.stagger-in > *:nth-child(2)  { animation-delay: 0.04s; }
.stagger-in > *:nth-child(3)  { animation-delay: 0.08s; }
.stagger-in > *:nth-child(4)  { animation-delay: 0.12s; }
.stagger-in > *:nth-child(5)  { animation-delay: 0.16s; }
.stagger-in > *:nth-child(6)  { animation-delay: 0.2s; }
.stagger-in > *:nth-child(7)  { animation-delay: 0.24s; }
.stagger-in > *:nth-child(8)  { animation-delay: 0.28s; }
.stagger-in > *:nth-child(9)  { animation-delay: 0.32s; }
.stagger-in > *:nth-child(10) { animation-delay: 0.36s; }
.stagger-in > *:nth-child(n+11){ animation-delay: 0.4s; }
@keyframes staggerFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Score pop (gain / loss) --- */
.score-pop {
  display: inline-block;
  animation: scorePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.score-pop-gain {
  color: #4ade80;
  animation: scorePopGain 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.score-pop-loss {
  color: #f87171;
  animation: scorePopLoss 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes scorePop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes scorePopGain {
  0% { transform: scale(0.5) translateY(8px); opacity: 0; }
  50% { transform: scale(1.3) translateY(-4px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes scorePopLoss {
  0% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: translateX(-4px) scale(1); }
  45% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

/* --- Success flash --- */
.success-flash {
  animation: successFlash 0.5s ease-out;
}
@keyframes successFlash {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  50% { box-shadow: 0 0 20px 4px rgba(34,197,94,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* --- Error shake --- */
.error-shake {
  animation: errorShake 0.4s ease-out;
}
@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  90% { transform: translateX(2px); }
}

/* --- Celebrate bounce (for winner / podium) --- */
.celebrate-bounce {
  animation: celebrateBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes celebrateBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Phase transition --- */
.phase-enter {
  animation: phaseSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes phaseSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Floating score delta ("+3", "-1") --- */
.score-delta-float {
  position: absolute;
  font-weight: 800;
  font-size: 1.1rem;
  pointer-events: none;
  animation: scoreDeltaFloat 1.2s ease-out forwards;
  z-index: 100;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.score-delta-float.positive { color: #4ade80; }
.score-delta-float.negative { color: #f87171; }
@keyframes scoreDeltaFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  70% { opacity: 1; transform: translateY(-40px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.8); }
}

/* --- Pulse ring (countdown / attention) --- */
.pulse-ring {
  position: relative;
}
.pulse-ring::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulseRing 1.5s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* --- Podium stagger for leaderboard --- */
.end-results-podium.stagger-in > .end-podium-item:nth-child(1) { animation-delay: 0.15s; }
.end-results-podium.stagger-in > .end-podium-item:nth-child(2) { animation-delay: 0s; }
.end-results-podium.stagger-in > .end-podium-item:nth-child(3) { animation-delay: 0.3s; }

/* --- Card deal stagger --- */
.deal-stagger > * {
  opacity: 0;
  transform: translateY(-20px) rotate(-5deg);
  animation: dealCard 0.3s ease-out forwards;
}
.deal-stagger > *:nth-child(1) { animation-delay: 0s; }
.deal-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.deal-stagger > *:nth-child(3) { animation-delay: 0.2s; }
.deal-stagger > *:nth-child(4) { animation-delay: 0.3s; }
.deal-stagger > *:nth-child(5) { animation-delay: 0.4s; }
@keyframes dealCard {
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

/* --- Glow attention pulse (for current player, active item) --- */
.glow-attention {
  animation: glowAttention 2s ease-in-out infinite;
}
@keyframes glowAttention {
  0%, 100% { box-shadow: 0 0 5px rgba(139,92,246,0.2); }
  50% { box-shadow: 0 0 20px rgba(139,92,246,0.5), 0 0 40px rgba(139,92,246,0.15); }
}

/* --- Slide-in from sides --- */
.slide-in-left {
  animation: slideInLeft 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.slide-in-right {
  animation: slideInRight 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Countdown tick animation --- */
.countdown-tick {
  animation: countdownTick 0.3s ease-out;
}
@keyframes countdownTick {
  0% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* --- Winner crown float --- */
.winner-crown {
  display: inline-block;
  animation: crownFloat 2s ease-in-out infinite;
}
@keyframes crownFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}


/* ============================================================
   BREAKPOINT 360px — Petits mobiles (iPhone SE, Galaxy A)
   ============================================================ */
@media (max-width: 360px) {
  /* Header */
  .gp-header { padding: 0.4rem 0.5rem; }
  .gp-header-code { font-size: 1rem; letter-spacing: 0.08em; }
  .gp-header-back, .gp-header-game { font-size: 1.1rem; width: 28px; height: 28px; }

  /* Players bar */
  .gp-players-bar { padding: 0.4rem 0.6rem; gap: 0.5rem; }
  .gp-player-avatar { width: 32px; height: 32px; font-size: 0.85rem; }
  .gp-player-name { font-size: 0.55rem; max-width: 40px; }

  /* Boutons génériques */
  .btn { padding: 0.6rem 0.8rem; font-size: 0.85rem; }

  /* Game cards / boxes */
  .palmier-card-display { font-size: 3.5rem; }
  .palmier-action-text { font-size: 0.85rem; }

  /* Setup panels — plus compact */
  .palmier-setup-card,
  .lg-setup-panel,
  .bj-setup-card,
  .hr-setup-card,
  .orc-setup-card,
  .tl-setup-card,
  .unan-setup-card { padding: 0.8rem; }

  /* Grilles d'options — empêcher l'overflow */
  .orc-options-grid,
  .jug-options,
  .dt-options { grid-template-columns: 1fr !important; }
  .orc-option-btn,
  .jug-option-btn { font-size: 0.85rem; padding: 0.6rem; }

  /* Slider labels */
  .palmier-slider-row label,
  .lg-role-row,
  .tl-setup-row,
  .hr-setup-row,
  .bj-setup-row { font-size: 0.8rem; }

  /* Distribution panel */
  .palmier-dist-overlay { padding: 0.8rem; }
  .palmier-player-btn { padding: 0.5rem; font-size: 0.8rem; min-width: 0; }

  /* Bottom nav + sheets */
  .gp-bottom-nav { padding: 0.4rem 0; gap: 0.3rem; }
  .gp-nav-btn { font-size: 0.65rem; padding: 0.3rem 0; }
  .gp-nav-btn .gp-nav-icon { font-size: 1rem; }
  .gp-sheet-content { padding: 0.8rem; }

  /* Timer — plus petit */
  .timer-bar { height: 4px; }

  /* Chat */
  .chat-bubble { padding: 0.3rem 0.5rem; font-size: 0.8rem; }

  /* Leaderboard */
  .end-results-overlay { padding: 1rem 0.5rem; }

  /* Blindtest / Quiz — options */
  .quiz-answer-btn,
  .bt-answer-btn { font-size: 0.8rem; padding: 0.6rem; }

  /* Pictionary toolbar */
  .pict-toolbar { gap: 0.25rem; padding: 0.3rem; }
  .pict-tool-btn, .pict-size-btn { width: 30px; height: 30px; font-size: 0.85rem; }

  /* Code Names — cards grid */
  .cn-grid { gap: 2px; }
  .cn-card { font-size: 0.55rem; padding: 0.2rem; min-height: 28px; }

  /* Bomb Party input */
  .bp-input { font-size: 1rem; padding: 0.5rem; }

  /* Loup-Garou role cards */
  .lg-my-role-card { padding: 0.8rem; }
  .lg-role-icon { font-size: 2rem; }
  .lg-role-name { font-size: 1rem; }
}

