* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #1a1a2e;
  --color-secondary: #16213e;
  --color-accent: #e94560;
  --color-success: #06d6a0;
  --color-warning: #ffd60a;
  --color-danger: #d62839;
  --color-info: #4a90e2;
  --color-text: #e0e0e0;
  --color-text-dark: #1a1a2e;
  --color-border: #3a3a5a;
  --color-dead: #666;
  --color-alive: #06d6a0;
  --color-revealed: #ffd60a;
  --color-day: #f4d58d;
  --color-night: #2a2a4e;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--color-primary);
  color: var(--color-text);
  overflow: hidden;
}

#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Écrans */
.screen {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

.visible {
  display: block !important;
}

.hidden {
  display: none !important;
}

/* Login */
#login-screen {
  position: relative;
}

.login-bg-image {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 400px;
  margin: auto;
  padding: 40px;
  background: var(--color-secondary);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.login-container h1 {
  font-size: 48px;
  text-align: center;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="file"] {
  padding: 12px;
  background: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  font-size: 14px;
}

.form-group input[type="text"]:focus,
.form-group input[type="file"]:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

#icon-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 0;
}

#icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes founder-neon {
  0%   { box-shadow: 0 0 6px 2px #b44fff, 0 0 18px 4px #7b2fff, 0 0 32px 6px #5865F2; }
  33%  { box-shadow: 0 0 10px 3px #ff4fcb, 0 0 24px 6px #b44fff, 0 0 40px 10px #7b2fff; }
  66%  { box-shadow: 0 0 8px 2px #5865F2, 0 0 22px 5px #b44fff, 0 0 38px 8px #ff4fcb; }
  100% { box-shadow: 0 0 6px 2px #b44fff, 0 0 18px 4px #7b2fff, 0 0 32px 6px #5865F2; }
}

#icon-preview.founder-glow {
  border: 2px solid #b44fff;
  animation: founder-neon 2.4s ease-in-out infinite;
  overflow: visible;
}

#icon-preview.founder-glow img {
  border-radius: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background: #ff3d54;
  transform: scale(1.05);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary.disabled,
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--color-info);
  color: white;
}

.btn-secondary:hover {
  background: #5a9fee;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

/* Lobby */
.lobby-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 700px;
  margin: auto;
  padding: 40px;
  width: 100%;
  overflow-y: auto;
  max-height: 100vh;
}

.lobby-container h1 {
  font-size: 36px;
  text-align: center;
  color: var(--color-accent);
}

.lobby-info {
  text-align: center;
  padding: 16px;
  background: var(--color-secondary);
  border-radius: 8px;
  border-left: 4px solid var(--color-accent);
}

.lobby-info code {
  background: var(--color-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: monospace;
}

#master-lobby,
#player-lobby {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}

.master-controls {
  background: var(--color-secondary);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.seat-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.seat-control button {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 18px;
}

.seat-control span {
  font-size: 24px;
  font-weight: bold;
  min-width: 60px;
  text-align: center;
}

.players-list {
  background: var(--color-secondary);
  padding: 16px;
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
}

#players-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--color-primary);
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.player-item--master {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.5);
}

.player-item--master .player-item-name strong {
  color: #d4af37;
}

.master-star {
  font-size: 16px;
  margin-right: 4px;
  flex-shrink: 0;
}

.master-separator {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 4px 0;
}

.player-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-border);
  overflow: hidden;
  flex-shrink: 0;
}

.player-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-item-name {
  display: flex;
  flex-direction: column;
}

.player-item-name strong {
  color: var(--color-accent);
}

.player-item-name small {
  color: #888;
  font-size: 12px;
}

.player-kick-btn {
  background: var(--color-danger);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.player-kick-btn:hover {
  background: #b01f28;
}

.role-select {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border, #444);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

#randomize-roles-btn {
  width: 100%;
  margin-bottom: 10px;
}

/* Master banner in game room */
.master-banner {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.master-card-ingame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(224, 196, 122, 0.12);
  border: 2px solid #e0c47a;
  border-radius: 12px;
  padding: 10px 28px;
  min-width: 110px;
  position: relative;
}

.master-crown-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 2px;
}

.master-card-ingame .player-name {
  color: #e0c47a;
  font-weight: bold;
  font-size: 15px;
}

.master-ingame-label {
  font-size: 10px;
  color: #b89a5a;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Seats Grid */
#seats-grid,
#seats-grid-master {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
  margin-top: 16px;
  justify-items: center;
}

#seats-grid-master .seat {
  cursor: default;
  pointer-events: none;
}

.seat {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: var(--color-primary);
  font-size: 12px;
  text-align: center;
}

.seat:hover {
  border-color: var(--color-accent);
  background: var(--color-secondary);
}

.seat.occupied {
  border-style: solid;
  border-color: var(--color-accent);
  background: var(--color-secondary);
  cursor: not-allowed;
}

.seat.selected {
  border-color: var(--color-alive);
  background: var(--color-secondary);
  box-shadow: 0 0 12px rgba(6, 214, 160, 0.3);
}

.seat-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-border);
  overflow: hidden;
  margin-bottom: 4px;
}

.seat-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Game Container */
.game-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--color-secondary);
  border-radius: 8px;
  border-left: 4px solid var(--color-accent);
}

.game-header h1 {
  font-size: 28px;
  color: var(--color-accent);
}

.phase-indicator {
  padding: 8px 16px;
  background: var(--color-day);
  color: var(--color-text-dark);
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
}

.phase-indicator.night {
  background: var(--color-night);
  color: var(--color-text);
  border: 1px solid var(--color-accent);
}

.game-code-inline {
  font-size: 0.75rem;
  color: #a0aec0;
  font-family: monospace;
  background: rgba(0,0,0,0.3);
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.05em;
}

/* Players Grid */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  padding: 16px;
  background: var(--color-secondary);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.player-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--color-primary);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  position: relative;
}

.player-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
}

.player-card.dead {
  opacity: 0.5;
  filter: grayscale(1);
  border-color: var(--color-dead);
}

.player-card.selected {
  border-color: var(--color-alive);
  box-shadow: 0 0 16px rgba(6, 214, 160, 0.4);
  background: rgba(6, 214, 160, 0.1);
}

.player-card.voting-active {
  border: 2px solid var(--color-warning);
  cursor: pointer;
}

.player-card.voting-active:hover {
  box-shadow: 0 0 12px rgba(255, 214, 10, 0.3);
}

.vote-badge {
  position: absolute;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  border-radius: 20px;
  padding: 2px 6px;
  white-space: nowrap;
}

.vote-badge--voted {
  top: 6px;
  right: 6px;
  background: rgba(6, 214, 160, 0.15);
  border: 1px solid rgba(6, 214, 160, 0.4);
}

.vote-badge--target {
  bottom: 6px;
  right: 6px;
  background: rgba(233, 69, 96, 0.2);
  border: 1px solid rgba(233, 69, 96, 0.5);
  color: #ffd60a;
}

/* Carte du joueur lui-même */
.player-card--self {
  border-color: #4a90e2 !important;
  box-shadow: 0 0 14px rgba(74, 144, 226, 0.35);
  background: rgba(74, 144, 226, 0.08);
}

.player-card--self .player-name::after {
  content: ' (Vous)';
  font-size: 11px;
  color: #4a90e2;
  font-weight: normal;
}

.player-icon {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--color-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
  flex-shrink: 0;
}

.player-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-icon.large {
  width: 170px;
  height: 170px;
  font-size: 85px;
}

.player-icon-skull {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 0 3px rgba(0,0,0,0.8));
}

.player-icon-role-badge {
  position: absolute;
  bottom: -4px;
  left: -4px;
  font-size: 20px;
  line-height: 1;
  background: rgba(0,0,0,0.65);
  border-radius: 50%;
  padding: 2px 3px;
  filter: drop-shadow(0 0 3px rgba(0,0,0,0.9));
}

.player-name {
  font-weight: 600;
  color: var(--color-accent);
  font-size: 14px;
}

.player-role {
  font-size: 12px;
  color: var(--color-text);
  font-style: italic;
}

.player-status {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  margin-top: 4px;
}

.player-status.dead {
  color: var(--color-danger);
}

.player-status.revealed {
  color: var(--color-warning);
}

/* Dead player screen */
.dead-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 20px;
  gap: 12px;
  min-height: 100vh;
  background: radial-gradient(ellipse at center, #1a0a0a 0%, #0d0d0d 100%);
}

.dead-skull {
  font-size: 96px;
  animation: skull-pulse 2s ease-in-out infinite;
}

@keyframes skull-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.8; }
}

.dead-container h2 {
  color: #e94560;
  font-size: 26px;
  margin: 0;
}

#dead-role-text {
  color: #ffd60a;
  font-size: 16px;
}

.dead-observe-hint {
  color: #666;
  font-size: 13px;
  margin-bottom: 16px;
  font-style: italic;
}

/* Execution vote buttons (player) */
.btn-execute {
  padding: 12px 28px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-execute:hover {
  transform: translateY(-2px);
}

.btn-execute--hang {
  background: #e94560;
  color: #fff;
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.4);
}

.btn-execute--hang:hover {
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.6);
}

.btn-execute--spare {
  background: #06d6a0;
  color: #111;
  box-shadow: 0 4px 16px rgba(6, 214, 160, 0.3);
}

.btn-execute--spare:hover {
  box-shadow: 0 6px 20px rgba(6, 214, 160, 0.5);
}

.btn-skip-vote {
  background: transparent;
  color: #888;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-skip-vote:hover {
  color: #bbb;
  border-color: #666;
}

/* Master Toast notification */
#master-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2a1a1a;
  border: 1px solid #e94560;
  color: #f5c6cb;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
}
#master-toast.master-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Seer vision reveal */
.seer-reveal {
  text-align: center;
  padding: 20px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  margin: 12px 0;
  font-size: 18px;
}
.seer-reveal--wolf {
  color: #e94560;
}
.seer-reveal--safe {
  color: #06d6a0;
}

/* Seer vision history */
.seer-history {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}
.player-card--dialogue {
  border: 2px solid rgba(138, 43, 226, 0.8) !important;
  box-shadow: 0 0 14px rgba(138, 43, 226, 0.5) !important;
}

.dialogue-request-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(138, 43, 226, 0.9));
  pointer-events: none;
}

.btn-dialogue-request {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid rgba(138, 43, 226, 0.5);
  border-radius: 8px;
  background: rgba(138, 43, 226, 0.15);
  color: #c084fc;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-dialogue-request:hover {
  background: rgba(138, 43, 226, 0.3);
  border-color: rgba(138, 43, 226, 0.8);
}
.btn-dialogue-request.active {
  background: rgba(138, 43, 226, 0.35);
  border-color: rgba(138, 43, 226, 0.9);
  color: #e9d5ff;
}

.wolf-cub-double-kill {
  background: rgba(180, 30, 30, 0.22);
  border: 1px solid rgba(255, 80, 80, 0.45);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #fc8181;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.bodyguard-warning {
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.4);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #ffd60a;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.seer-history-title {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.seer-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 15px;
  color: #ddd;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.seer-history-row:last-child {
  border-bottom: none;
}
.seer-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  min-width: 44px;
  text-align: center;
}
.seer-tag--wolf {
  background: rgba(233,69,96,0.25);
  color: #e94560;
  border: 1px solid rgba(233,69,96,0.4);
}
.seer-tag--safe {
  background: rgba(6,214,160,0.15);
  color: #06d6a0;
  border: 1px solid rgba(6,214,160,0.3);
}

/* Seer vision badge on player cards */
.seer-vision-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  border: 2px solid transparent;
  z-index: 2;
}
.seer-vision-badge--wolf {
  background: rgba(233,69,96,0.25);
  border-color: #e94560;
}
.seer-vision-badge--safe {
  background: rgba(6,214,160,0.2);
  border-color: #06d6a0;
}

/* Night Room */
.night-room {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  position: relative;
}

#player-home {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Night atmosphere message */
.night-atmosphere {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  max-width: 280px;
  text-align: center;
  animation: atmosphere-fadein 1s ease;
}

@keyframes atmosphere-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.night-atmosphere-icon {
  font-size: 36px;
  animation: atmosphere-pulse 2.5s ease-in-out infinite;
}

@keyframes atmosphere-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.85; }
  50%       { transform: scale(1.1); opacity: 1; }
}

.night-atmosphere-line {
  font-size: 14px;
  line-height: 1.7;
  color: #b0bec5;
  font-style: italic;
}

.night-atmosphere-line strong {
  color: #e0c47a;
  font-style: normal;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.home-content p {
  font-size: 18px;
  text-align: center;
}

.wait-text {
  color: #888;
  font-style: italic;
}

#role-action-screen {
  width: 100%;
}

.action-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.action-content h2 {
  text-align: center;
  color: var(--color-accent);
  font-size: 24px;
}

#current-action-info {
  text-align: center;
  padding: 12px;
  background: rgba(233, 69, 96, 0.1);
  border-radius: 6px;
  border: 1px solid var(--color-accent);
  font-size: 14px;
}

/* Vote Panel */
.vote-panel {
  background: var(--color-secondary);
  border: 2px solid var(--color-accent);
  border-radius: 8px;
  padding: 24px;
  margin-top: 16px;
  width: 100%;
  box-shadow: var(--shadow);
}

.vote-panel h2 {
  text-align: center;
  color: var(--color-accent);
  margin-bottom: 16px;
  font-size: 24px;
}

#vote-description {
  text-align: center;
  margin-bottom: 24px;
  font-size: 14px;
}

#vote-options {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.vote-btn {
  padding: 12px 24px;
  background: var(--color-info);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.vote-btn:hover {
  background: #5a9fee;
}

.vote-btn:active {
  transform: scale(0.95);
}

#vote-results {
  padding: 12px;
  background: var(--color-primary);
  border-radius: 6px;
  text-align: center;
  margin-top: 16px;
}

/* Controls Panel */
.controls-panel {
  background: var(--color-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.controls-panel h3 {
  color: var(--color-accent);
  margin-bottom: 8px;
}

#role-call-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-call-btn {
  padding: 10px 16px;
  background: var(--color-info);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s;
}

.role-call-btn:hover {
  background: #5a9fee;
  transform: translateX(4px);
}

.role-call-btn.called {
  background: var(--color-warning);
  color: var(--color-text-dark);
}

/* Announcement Screen */
.announcement-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 600px;
  margin: auto;
  padding: 40px;
  background: var(--color-secondary);
  border: 2px solid var(--color-accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.announcement-container h1 {
  font-size: 36px;
  color: var(--color-accent);
}

#announcement-content {
  font-size: 18px;
  line-height: 1.6;
  min-height: 100px;
}

/* Game Over Screen */
.game-over-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 600px;
  margin: auto;
  padding: 40px;
  background: var(--color-secondary);
  border: 2px solid var(--color-accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.game-over-container h1 {
  font-size: 48px;
  color: var(--color-accent);
}

#game-over-content {
  font-size: 20px;
  line-height: 1.8;
  min-height: 100px;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* Responsive */
@media (max-width: 768px) {
  .players-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .game-container {
    padding: 12px;
  }

  .vote-panel {
    max-width: 90vw;
    padding: 20px;
  }
}

/* ==================== WOLF CHAT ====================*/

.wolf-chat-panel {
  margin-top: 14px;
  border-top: 1px solid rgba(233, 69, 96, 0.3);
  padding-top: 12px;
}

/* ==================== GLOBAL PLAYER CHAT ==================== */
.player-chat-panel {
  margin-top: 14px;
  border-top: 1px solid rgba(99, 179, 237, 0.3);
  padding-top: 12px;
}

.player-chat-master {
  border-top-color: rgba(99, 179, 237, 0.3);
}

.player-chat-title {
  font-size: 13px;
  font-weight: 700;
  color: #63b3ed;
  margin-bottom: 8px;
  letter-spacing: 0.4px;
}

.player-chat-log {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(99, 179, 237, 0.06);
  border: 1px solid rgba(99, 179, 237, 0.2);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 179, 237, 0.4) transparent;
}

.player-chat-msg {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.4;
}

.player-chat-sender {
  font-weight: 700;
  color: #63b3ed;
  flex-shrink: 0;
}

.player-chat-text {
  color: #eee;
  flex: 1;
  word-break: break-word;
}

.player-chat-time {
  font-size: 10px;
  color: #666;
  flex-shrink: 0;
  align-self: flex-end;
}

.wolf-chat-master {
  border-top-color: rgba(233, 69, 96, 0.3);
}

.wolf-chat-title {
  font-size: 13px;
  font-weight: 700;
  color: #e94560;
  margin-bottom: 8px;
  letter-spacing: 0.4px;
}

.wolf-chat-log {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 160px;
  overflow-y: auto;
  background: rgba(233, 69, 96, 0.06);
  border: 1px solid rgba(233, 69, 96, 0.2);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(233, 69, 96, 0.4) transparent;
}

.wolf-chat-msg {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.4;
}

.wolf-chat-sender {
  font-weight: 700;
  color: #e94560;
  flex-shrink: 0;
}

.wolf-chat-text {
  color: #eee;
  flex: 1;
  word-break: break-word;
}

.wolf-chat-time {
  font-size: 10px;
  color: #666;
  flex-shrink: 0;
  align-self: flex-end;
}

.wolf-chat-input-row {
  display: flex;
  gap: 6px;
}

.wolf-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(233, 69, 96, 0.35);
  border-radius: 6px;
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}

.wolf-chat-input:focus {
  border-color: #e94560;
  background: rgba(255, 255, 255, 0.1);
}

.wolf-chat-send-btn {
  background: #e94560;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.wolf-chat-send-btn:hover {
  background: #c73050;
}

/* ==================== SPEAKING TIMER ==================== */

/* Gold pulsing highlight for the speaking player's card */
.player-card--speaking {
  border: 3px solid #ffd700 !important;
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.55) !important;
  animation: speaking-pulse 1.2s ease-in-out infinite;
}

@keyframes speaking-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 215, 0, 0.4); }
  50%       { box-shadow: 0 0 32px rgba(255, 215, 0, 0.85); }
}

/* Timer badge shown on the player card */
.speaking-timer-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #ffd700;
  color: #111;
  font-weight: 700;
  font-size: 12px;
  border-radius: 10px;
  padding: 2px 8px;
  line-height: 1.4;
  pointer-events: none;
  z-index: 5;
}

/* Speaking controls panel in master controls */
.speaking-controls-panel {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 12px;
}

.speaking-controls-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 8px;
  letter-spacing: 0.4px;
}

.speaking-duration-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.speaking-duration-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.speaking-duration-btn:hover {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
}

.speaking-duration-btn.active {
  background: #ffd700;
  color: #111;
  font-weight: 700;
  border-color: #ffd700;
}

.speaking-player-hint {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 6px;
}

.speaking-player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.speaking-player-btn {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.speaking-player-btn:hover {
  background: rgba(255, 215, 0, 0.35);
}

.speaking-active-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  padding: 6px 10px;
}

.speaking-active-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffd700;
  flex: 1;
}

.speaking-skip-btn {
  background: #e94560;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.speaking-skip-btn:hover {
  background: #c73050;
}

/* ==================== DISCORD BADGE ==================== */
.discord-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 3px;
  opacity: 0.9;
}
.discord-badge svg {
  display: block;
}

/* ==================== LEADERBOARD ==================== */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 8px;
}
.leaderboard-table th {
  color: #ffd60a;
  font-size: 12px;
  text-transform: uppercase;
  padding: 8px 6px;
  border-bottom: 1px solid #333;
  text-align: left;
}
.leaderboard-table td {
  padding: 10px 6px;
  border-bottom: 1px solid #222;
  color: #e0e0e0;
  vertical-align: middle;
}
.leaderboard-table tbody tr:hover {
  background: rgba(255,255,255,0.04);
}

