/* ─── Reset ──────────────────────────────────────────────────────────────── */
/* ─── Config modal & admin panel added below existing styles ──────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0a0a0f;
  color: #fff;
  font-family: 'Exo 2', sans-serif;
  min-height: 100vh;
}

button { font-family: 'Exo 2', sans-serif; }

/* ─── Notification ───────────────────────────────────────────────────────── */
.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 9999;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  pointer-events: none;
}
.notification.success { background: rgba(34,197,94,0.92); color: #fff; }
.notification.error   { background: rgba(239,68,68,0.92);  color: #fff; }
.notification.hidden  { display: none; }

/* ─── Loading ────────────────────────────────────────────────────────────── */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}
.loading-icon { font-size: 48px; }
.loading-text { font-size: 18px; opacity: 0.7; }

/* ─── Join Screen ────────────────────────────────────────────────────────── */
.join-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
  position: relative;
  overflow: hidden;
}
.join-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255,255,255,0.02) 50px, rgba(255,255,255,0.02) 51px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255,255,255,0.02) 50px, rgba(255,255,255,0.02) 51px);
}
.join-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 48px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  z-index: 1;
}
.logo-icon { font-size: 64px; margin-bottom: 8px; display: block; }
.logo-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, #06b6d4, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.logo-subtitle { opacity: 0.5; margin-bottom: 32px; font-size: 14px; }

.players-list { margin-bottom: 24px; }
.players-label {
  font-size: 12px;
  opacity: 0.4;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.players-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.player-chip {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
}

/* ─── Inputs ─────────────────────────────────────────────────────────────── */
.text-input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 16px;
  outline: none;
  margin-bottom: 16px;
  font-family: 'Exo 2', sans-serif;
  transition: border-color 0.2s;
}
.text-input::placeholder { color: rgba(255,255,255,0.3); }
.text-input:focus { border-color: rgba(255,255,255,0.35); }

.game-input {
  flex: 1;
  min-width: 0;
  padding: 13px 18px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 15px;
  outline: none;
  font-family: 'Exo 2', sans-serif;
  border: 1px solid rgba(255,255,255,0.12);
  transition: border-color 0.2s;
}
.game-input::placeholder { color: rgba(255,255,255,0.3); }
.game-input:focus { border-color: rgba(255,255,255,0.35); }
.game-input.game-input-selected {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn:hover  { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary   { background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; }
.btn-secondary { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); color: #fff; font-weight: 600; }
.btn-success   { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 0 28px rgba(34,197,94,0.25); }
.btn-warning   { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; }
.btn-ghost     { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); color: #fff; }

.btn-row { display: flex; gap: 12px; }
.btn-row .btn { flex: 1; }

.btn-remove {
  background: rgba(239,68,68,0.15);
  border: none;
  color: #ef4444;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  transition: background 0.15s;
}
.btn-remove:hover { background: rgba(239,68,68,0.28); }

.btn-lg {
  padding: 14px 36px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-lg:hover  { opacity: 0.9; }
.btn-lg:active { transform: scale(0.98); }

.add-btn {
  padding: 13px 22px;
  border-radius: 10px;
  border: none;
  color: #fff;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.add-btn:hover { opacity: 0.88; }

.join-hint { font-size: 11px; opacity: 0.3; margin-top: 16px; }

/* ─── Shared layout ──────────────────────────────────────────────────────── */
.page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
}
.header {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-brand {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}
.header-user { font-size: 13px; opacity: 0.5; }
.header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.85;
  border: 1px solid rgba(255,255,255,0.15);
}

.badge {
  margin-left: 12px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-propose { background: rgba(34,197,94,0.18);  color: #22c55e; }
.badge-draft   { background: rgba(249,115,22,0.18);  color: #f97316; }

/* ─── Lobby ──────────────────────────────────────────────────────────────── */
.lobby-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 24px 40px;
}
.lobby-icon { font-size: 52px; margin-bottom: 16px; }
.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 8px;
}
.section-subtitle { opacity: 0.5; margin-bottom: 32px; font-size: 15px; }

.connection-badge {
  display: inline-block;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 8px 20px;
  font-size: 14px;
  margin-bottom: 32px;
}
.cyan { color: #06b6d4; }
.gold { color: #f59e0b; margin-left: 8px; }

.player-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
.player-card {
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
}
.players-count-label {
  font-size: 12px;
  opacity: 0.4;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ─── Propose Phase ──────────────────────────────────────────────────────── */
.propose-layout {
  display: flex;
  height: calc(100vh - 53px);
  overflow: hidden;
}
.sidebar {
  width: 230px;
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sidebar-scroll { flex: 1; overflow-y: auto; }
.sidebar-btn {
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s;
}
.sidebar-btn:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.8); }
.sidebar-btn.active { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-btn-label { font-weight: 400; line-height: 1.2; }
.sidebar-btn.active .sidebar-btn-label { font-weight: 600; }
.sidebar-btn-count { font-size: 11px; opacity: 0.5; margin-top: 2px; }
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255,255,255,0.06); }

.main-content { flex: 1; padding: 28px 32px; overflow-y: auto; }
.main-inner { max-width: 600px; margin: 0 auto; }

.category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.category-icon { font-size: 38px; flex-shrink: 0; }
.category-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
}
.category-hint { margin: 0; font-size: 13px; opacity: 0.4; }

.add-game-row { display: flex; gap: 10px; }

.game-list { display: flex; flex-direction: column; gap: 8px; }
.game-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.game-number {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.game-info { flex: 1; min-width: 0; }
.game-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-proposer { font-size: 11px; opacity: 0.4; margin-top: 2px; }

.empty-state {
  padding: 40px;
  text-align: center;
  opacity: 0.3;
  font-size: 14px;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
}

/* ─── Draft Phase ────────────────────────────────────────────────────────── */
.progress-bar { height: 3px; background: rgba(255,255,255,0.05); }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #a855f7);
  transition: width 0.5s ease;
}

.draft-content { max-width: 700px; margin: 0 auto; padding: 28px 24px 40px; }

.category-hero { text-align: center; margin-bottom: 28px; }
.category-hero-icon { font-size: 56px; margin-bottom: 8px; }
.category-hero-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 6px;
}
.category-hero-info { opacity: 0.4; font-size: 14px; margin: 0; }

.result-banner {
  text-align: center;
  margin-bottom: 28px;
  padding: 28px 32px;
  border-radius: 16px;
}
.result-label {
  font-size: 13px;
  opacity: 0.55;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.result-winner {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 900;
}
.result-vote-count { font-size: 13px; opacity: 0.5; margin-top: 8px; }

.vote-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 28px; }
.vote-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 12px;
  color: #fff;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.vote-btn:not(:disabled):hover { transform: translateY(-1px); }
.vote-btn:disabled { cursor: default; }
.vote-btn-info { flex: 1; min-width: 0; }
.vote-btn-name { font-weight: 600; font-size: 16px; }
.vote-btn-proposer { font-size: 11px; opacity: 0.4; margin-top: 2px; }

.my-vote-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(34,197,94,0.2);
  color: #22c55e;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.vote-count-badge {
  font-size: 14px;
  font-weight: 700;
  min-width: 30px;
  text-align: center;
  flex-shrink: 0;
}

.voters-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.voter-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
}
.voter-badge.voted  { background: rgba(34,197,94,0.14);  color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.voter-badge.waiting{ background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.08); }

.admin-controls { display: flex; gap: 12px; justify-content: center; }

/* ─── Results ────────────────────────────────────────────────────────────── */
.results-content { max-width: 700px; margin: 0 auto; padding: 28px 24px 60px; }
.results-header { text-align: center; margin-bottom: 36px; padding-top: 16px; }
.results-icon { font-size: 64px; margin-bottom: 8px; }
.results-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 8px;
}
.results-subtitle { opacity: 0.4; font-size: 14px; }

.results-list { display: flex; flex-direction: column; gap: 10px; }
.result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
}
.result-item-icon { font-size: 28px; flex-shrink: 0; }
.result-item-info { flex: 1; min-width: 0; }
.result-cat-name { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.result-game-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-votes-badge {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.results-footer { text-align: center; margin-top: 36px; }

/* ─── Admin gear button ───────────────────────────────────────────────────── */
.btn-icon {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.btn-icon:hover { background: rgba(255,255,255,0.12); }

/* ─── Config summary (lobby) ─────────────────────────────────────────────── */
.config-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 auto 28px;
  max-width: 420px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px 18px;
}
.config-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  opacity: 0.65;
}
.cs-icon { font-size: 15px; flex-shrink: 0; }

/* ─── Modal overlay ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-panel {
  background: #13131f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.modal-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
}
.modal-close {
  background: rgba(255,255,255,0.07);
  border: none;
  color: rgba(255,255,255,0.5);
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: rgba(239,68,68,0.2); color: #ef4444; }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

/* ─── Config sections ────────────────────────────────────────────────────── */
.config-section {
  margin-bottom: 24px;
}
.config-section:last-child { margin-bottom: 0; }

.btn-danger {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  color: #ef4444;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-danger:hover { background: rgba(239,68,68,0.22); border-color: #ef4444; }

.danger-zone {
  border-top: 1px solid rgba(239,68,68,0.2);
  padding-top: 18px;
}
.danger-zone .config-section-title { color: #ef4444; opacity: 0.8; }
.danger-zone-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(239,68,68,0.05);
  border: 1px solid rgba(239,68,68,0.15);
}
.danger-zone-desc {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}
.danger-zone-desc strong { color: rgba(255,255,255,0.85); }
.danger-zone-desc span   { color: rgba(255,255,255,0.4); font-size: 12px; }

.config-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.config-row:last-child { border-bottom: none; }
.config-text-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  width: 200px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
.config-text-input:focus { border-color: rgba(255,255,255,0.35); }
.config-label {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}
.config-hint {
  display: block;
  font-size: 11px;
  opacity: 0.4;
  font-weight: 400;
  margin-top: 2px;
}

/* ─── Stepper ────────────────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.stepper-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 8px;
  width: 36px; height: 32px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.12s;
  font-family: 'Exo 2', sans-serif;
}
.stepper-btn:hover { background: rgba(255,255,255,0.14); }
.stepper-val {
  min-width: 52px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
}

/* ─── Toggle switch ──────────────────────────────────────────────────────── */
.toggle {
  position: relative;
  width: 44px; height: 24px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle.on { background: #22c55e; }
.toggle.on::after { transform: translateX(20px); background: #fff; }

/* ─── Segmented control ──────────────────────────────────────────────────── */
.segmented {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.seg-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: 'Exo 2', sans-serif;
}
.seg-btn.active { background: rgba(255,255,255,0.12); color: #fff; }

/* ─── Category checkboxes ────────────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.cat-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.12s, border-color 0.12s;
  opacity: 0.45;
  user-select: none;
}
.cat-checkbox.checked {
  border-color: var(--cat-color, rgba(255,255,255,0.3));
  background: color-mix(in srgb, var(--cat-color, #fff) 8%, transparent);
  opacity: 1;
}
.cat-checkbox-icon { font-size: 16px; flex-shrink: 0; }
.cat-checkbox-name { font-size: 12px; font-weight: 500; line-height: 1.2; }

/* ─── Propose: quota badge ───────────────────────────────────────────────── */
.quota-badge {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(6,182,212,0.15);
  color: #06b6d4;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.quota-badge.quota-full {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}

/* ─── Draft: info banner ─────────────────────────────────────────────────── */
.info-banner {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 16px;
  text-align: center;
}

/* ─── Draft: vote timer ──────────────────────────────────────────────────── */
.vote-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  font-family: 'Orbitron', sans-serif;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.vote-timer.urgent {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: #ef4444;
}

/* ─── Propose page (nouveau layout) ─────────────────────────────────────── */
.propose-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
  color: #fff;
  font-family: 'Exo 2', sans-serif;
  position: relative;
}

/* ─── Ready button ───────────────────────────────────────────────────────── */
.ready-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  transition: all 0.2s;
  white-space: nowrap;
}
.ready-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.ready-btn.ready-on {
  background: rgba(34,197,94,0.18);
  border-color: rgba(34,197,94,0.5);
  color: #22c55e;
}

/* ─── Admin overview (sidebar) ───────────────────────────────────────────── */
.sidebar-admin-toggle {
  width: 100%;
  padding: 8px 16px;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  text-align: left;
  font-family: 'Exo 2', sans-serif;
  transition: color 0.15s;
}
.sidebar-admin-toggle:hover { color: rgba(255,255,255,0.6); }

.admin-overview {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
}
.overview-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 10px;
}
.overview-count {
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}
.overview-count.all-ready {
  background: rgba(34,197,94,0.18);
  color: #22c55e;
}
.overview-players { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.overview-player {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(255,255,255,0.03);
}
.overview-player.ready { background: rgba(34,197,94,0.07); }
.overview-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.overview-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-stats { font-size: 11px; opacity: 0.45; white-space: nowrap; }
.overview-stats.stat-ok { opacity: 0.6; color: #4ade80; }
.overview-stats.stat-missing { opacity: 0.7; color: #f87171; }
.overview-ready { font-size: 13px; flex-shrink: 0; color: rgba(255,255,255,0.3); }
.overview-player.ready .overview-ready { color: #22c55e; }

/* ─── Config summary (propose page, visible to all) ──────────────────────── */
.cfgsummary-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.cfgsummary-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .4;
  margin-bottom: 8px;
}
.cfgsummary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 5px;
}
.cfgsummary-item {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  padding: 5px 8px;
}
.cfgsummary-label {
  font-size: 10px;
  opacity: .45;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
}
.cfgsummary-value {
  font-size: 12px;
  font-weight: 600;
}

/* ─── Player summary table (propose page, visible to all) ─────────────────── */
.psummary-wrap {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.psummary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .5;
  margin-bottom: 8px;
}
.psummary-ratio { font-weight: 700; }
.psummary-ratio.all-ready { color: #22c55e; opacity: 1; }
.psummary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 5px;
}
.psummary-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 12px;
  border: 1px solid transparent;
}
.psummary-cell.psummary-me {
  border-color: rgba(255,255,255,0.15);
}
.psummary-cell.psummary-ready {
  background: rgba(34,197,94,0.07);
}
.psummary-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.psummary-name { flex: 1; font-weight: 600; word-break: break-word; }
.psummary-count { font-size: 11px; white-space: nowrap; }
.psummary-ready-icon { font-size: 11px; flex-shrink: 0; color: rgba(255,255,255,0.25); }
.psummary-cell.psummary-ready .psummary-ready-icon { color: #22c55e; }

.btn-launch {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  border: none;
  transition: opacity 0.2s;
}
.btn-launch:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-launch:not(:disabled):hover { opacity: 0.88; }

/* ─── Sidebar category done badge ────────────────────────────────────────── */
.cat-done-badge {
  display: inline-block;
  color: #22c55e;
  font-weight: 700;
  margin-left: 2px;
}

/* ─── Proposal sections ──────────────────────────────────────────────────── */
.proposals-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  margin-top: 4px;
}
.proposals-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
}
.btn-toggle-others {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.btn-toggle-others:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06); }

/* ─── Game items variants ────────────────────────────────────────────────── */
.game-item-mine {
  border-color: rgba(255,255,255,0.1) !important;
  background: rgba(255,255,255,0.05) !important;
}
.game-item-other {
  background: rgba(255,255,255,0.02) !important;
  border-color: rgba(255,255,255,0.04) !important;
}
.game-number-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin: 0 10px;
}

/* ─── Logout button ──────────────────────────────────────────────────────── */
.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.3);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.btn-logout:hover {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.35);
  color: #ef4444;
}

/* ─── Game input autocomplete ────────────────────────────────────────────── */
.add-game-section { display: flex; flex-direction: column; gap: 8px; }

.game-input-wrap { position: relative; flex: 1; min-width: 0; }

.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  overflow: hidden;
  z-index: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  max-height: 340px;
  overflow-y: auto;
}
.ac-dropdown::-webkit-scrollbar { width: 4px; }
.ac-dropdown::-webkit-scrollbar-track { background: transparent; }
.ac-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.ac-loading {
  padding: 14px 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

.ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.ac-selected { background: rgba(255,255,255,0.07); }

.ac-thumb {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.ac-thumb-placeholder {
  width: 48px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ac-info { min-width: 0; }
.ac-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Game cover in proposal cards */
.game-cover {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.game-cover-placeholder {
  width: 72px;
  height: 48px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* Game meta row (modes + proposer) */
.game-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

/* Mode badges */
.mode-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}
.mode-solo  { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.mode-multi { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.mode-coop  { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }

/* Mode badges inline in autocomplete dropdown */
.ac-modes { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.ac-modes .mode-badge { font-size: 9px; padding: 1px 5px; }

/* Vote button cover image */
.vote-btn-cover {
  width: 80px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  margin-right: 4px;
}
.vote-btn-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

/* Selected game preview card */
.game-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-left: 3px solid var(--preview-color, #6366f1);
  animation: previewIn 0.18s ease;
}
@keyframes previewIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.game-preview-cover {
  width: 96px;
  height: 62px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
}
.game-preview-cover-ph {
  width: 96px;
  height: 62px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.game-preview-info { flex: 1; min-width: 0; }
.game-preview-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}
.game-preview-modes { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.game-preview-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}
.btn-clear-preview {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.35);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-clear-preview:hover {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}

/* Note / précision field */
.note-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 10px;
  color: rgba(255,255,255,0.7);
  font-family: 'Exo 2', sans-serif;
  font-size: 13px;
  padding: 8px 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.note-input::placeholder { color: rgba(255,255,255,0.25); font-style: italic; }
.note-input:focus {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  border-style: solid;
}

/* Note display in proposal and vote lists */
.game-note {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
  margin-top: 1px;
}
.vote-btn-note {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
  margin-top: 1px;
}

/* ─── Weighted vote buttons ──────────────────────────────────────────────── */
.vote-btns-weighted {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.vote-btn-up,
.vote-btn-normal,
.vote-btn-down {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.vote-btn-up:not(:disabled):hover    { border-color: rgba(16,185,129,0.5); color: #10b981; }
.vote-btn-normal:not(:disabled):hover { border-color: rgba(99,102,241,0.5);  color: #6366f1; }
.vote-btn-down:not(:disabled):hover  { border-color: rgba(239,68,68,0.4);  color: #ef4444; }
.vote-btn-up.active     { background: rgba(16,185,129,0.25); border-color: #10b981; color: #10b981; }
.vote-btn-normal.active   { background: rgba(99,102,241,0.2);   border-color: #6366f1; color: #6366f1; }
.vote-btn-down.active { background: rgba(239,68,68,0.2);   border-color: #ef4444; color: #ef4444; }
.vote-btn-up:disabled,
.vote-btn-normal:disabled,
.vote-btn-down:disabled { opacity: 0.4; cursor: default; }

/* ─── Custom categories list & add form ─────────────────────────────────── */
.custom-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.custom-cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cat-color) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-color) 25%, transparent);
}
.custom-cat-emoji { font-size: 18px; line-height: 1; }
.custom-cat-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--cat-color);
}
.btn-del-cat {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.btn-del-cat:hover { background: rgba(239,68,68,0.12); color: #ef4444; }

/* Add category section */
.add-cat-section {
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
}
.add-cat-title {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.add-cat-form {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.add-cat-top-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.add-cat-name-input { flex: 1; }

/* Emoji picker */
.emoji-picker-wrap { display: flex; flex-direction: column; gap: 6px; }
.emoji-input-field {
  width: 60px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 22px;
  text-align: center;
  padding: 6px 4px;
  outline: none;
  transition: border-color 0.15s;
}
.emoji-input-field:focus { border-color: rgba(99,102,241,0.6); }

.emoji-preset-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  width: 208px;
}
.emoji-preset-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  padding: 3px;
  line-height: 1;
  transition: background 0.12s, border-color 0.12s;
}
.emoji-preset-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.15);
}

/* Color picker row */
.color-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.color-swatch-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.color-swatch-btn:hover { transform: scale(1.15); }
.color-swatch-btn.selected {
  border-color: #fff;
  transform: scale(1.15);
}
.color-custom-input {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}
.color-custom-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-custom-input::-webkit-color-swatch { border: none; border-radius: 4px; }

/* ─── User manager modal ─────────────────────────────────────────────────── */
.um-body { padding: 0; }

.um-count {
  padding: 12px 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.um-list { display: flex; flex-direction: column; }

.um-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.12s;
}
.um-row:last-child { border-bottom: none; }
.um-row:hover { background: rgba(255,255,255,0.025); }

.um-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.um-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.um-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.um-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.um-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.um-self-note {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.role-admin {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.3);
}
.role-player {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.1);
}
.role-spectator {
  background: rgba(99,102,241,0.12);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.25);
}
.role-self {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  font-weight: 400;
}

.um-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.um-self-note { color: rgba(255,255,255,0.2); font-size: 13px; }

.btn-um-role {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-um-role:hover {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.4);
  color: #a5b4fc;
}

.btn-um-delete {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.15);
  background: rgba(239,68,68,0.06);
  color: rgba(239,68,68,0.5);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-um-delete:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: #ef4444;
}

/* ─── Discord avatar chip ────────────────────────────────────────────────── */
.chip-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  object-fit: cover;
}

/* ─── Discord login button ───────────────────────────────────────────────── */
.btn-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: #5865f2;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Exo 2', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  margin-bottom: 4px;
}
.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-1px);
}
.btn-discord:active {
  transform: translateY(0);
}

/* ─── Login separator ────────────────────────────────────────────────────── */
.login-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.25);
  font-size: 12px;
  margin: 16px 0;
}
.login-separator::before,
.login-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

/* ─── Login section (fallback player join) ───────────────────────────────── */
.login-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.login-section-label {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

/* ─── Admin login collapsible ────────────────────────────────────────────── */
.admin-login-details {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
}
.admin-login-summary {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  list-style: none;
  user-select: none;
  transition: color 0.15s, background 0.15s;
}
.admin-login-summary::-webkit-details-marker { display: none; }
.admin-login-summary:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.04);
}
.admin-login-details[open] .admin-login-summary {
  color: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}


/* ─── Reactions ──────────────────────────────────────────────────────────── */
.reactions-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  line-height: 1;
}

.reaction-btn:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.25);
  transform: scale(1.08);
}

.reaction-btn.active {
  background: rgba(99,102,241,0.22);
  border-color: rgba(99,102,241,0.55);
  color: #a5b4fc;
}

.reaction-count {
  font-size: 12px;
  font-weight: 600;
  min-width: 10px;
}

/* ─── Vote breakdown (results page) ─────────────────────────────────────── */
.vote-breakdown {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vote-breakdown-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 4px;
}

.vote-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.vote-breakdown-player {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.vote-breakdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vote-breakdown-game {
  color: rgba(255,255,255,0.85);
  text-align: right;
  font-size: 13px;
}

.vote-breakdown-game.no-vote {
  color: rgba(255,255,255,0.28);
  font-style: italic;
}

/* ─── History modal ──────────────────────────────────────────────────────── */
.history-modal {
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.history-sessions {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0;
}

.history-empty {
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-style: italic;
  padding: 32px 0;
}

.history-session {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 16px;
}

.history-session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.history-session-date {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  letter-spacing: .3px;
}

.history-players {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

.history-session-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.history-cat-emoji { font-size: 16px; }

.history-cat-name {
  font-weight: 600;
  min-width: 90px;
  font-size: 13px;
}

.history-arrow {
  color: rgba(255,255,255,0.25);
  font-size: 12px;
}

.history-game {
  flex: 1;
  color: rgba(255,255,255,0.88);
  font-weight: 600;
}

.history-votes {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}

.results-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 8px;
}

/* ─── History page (dedicated full-page view at #history) ────────────────── */
.history-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
  display: flex;
  flex-direction: column;
}

.history-page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.history-empty-page {
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-style: italic;
  padding: 60px 0;
  font-size: 16px;
}

/* Session card */
.history-session-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Session meta row: date + player count */
.history-session-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.history-session-date {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: .3px;
}

.history-player-badge {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 3px 10px;
  color: rgba(255,255,255,0.55);
}

.history-player-names {
  font-size: 12px;
  color: rgba(255,255,255,0.32);
  font-style: italic;
}

/* Per-category block */
.history-cat-block {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.history-cat-emoji {
  font-size: 18px;
  line-height: 1;
}

.history-cat-label {
  font-weight: 700;
  font-size: 14px;
}

.history-cat-winner {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-left: auto;
  font-style: italic;
}

/* Games list */
.history-games-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Individual game row */
.history-game-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  flex-wrap: wrap;
}

.history-game-winner {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.25);
}

.history-game-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.history-game-name {
  font-weight: 600;
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

.history-game-winner .history-game-name {
  color: #c7d2fe;
}

.history-game-proposer {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  font-style: italic;
  white-space: nowrap;
}

/* Score badge */
.history-score-badge {
  font-size: 12px;
  font-weight: 700;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: #a5b4fc;
  border-radius: 20px;
  padding: 2px 9px;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}

/* Voter chips row */
.history-voters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin-top: 2px;
}

/* Individual voter chip: "PlayerName ↑+2" */
.history-voter-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.vote-type-up {
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.08);
  color: #86efac;
}

.vote-type-normal {
  border-color: rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.08);
  color: #c7d2fe;
}

.vote-type-down {
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
}

/* Responsive */
@media (max-width: 600px) {
  .history-page-body { padding: 12px; }
  .history-session-card { padding: 14px; }
  .history-cat-winner { margin-left: 0; }
}

/* ─── Vote cards (new visual design) ────────────────────────────────────── */
.vcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  text-align: left;
  width: 100%;
  animation: vcardIn 0.3s ease both;
}
.vcard:nth-child(1) { animation-delay: 0.04s; }
.vcard:nth-child(2) { animation-delay: 0.08s; }
.vcard:nth-child(3) { animation-delay: 0.12s; }
.vcard:nth-child(4) { animation-delay: 0.16s; }
.vcard:nth-child(5) { animation-delay: 0.20s; }

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

.vcard:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: var(--cc, rgba(255,255,255,0.2));
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--cc, transparent), 0 0 20px color-mix(in srgb, var(--cc) 20%, transparent);
}

.vcard-weighted { cursor: default; }
.vcard-weighted:hover { transform: none; box-shadow: none; border-color: rgba(255,255,255,0.07); }

.vcard-main {
  display: flex;
  flex: 1;
  min-height: 60px;
}

.vcard-cover {
  width: 70px;
  min-height: 60px;
  object-fit: cover;
  flex-shrink: 0;
}
.vcard-cover-ph {
  width: 70px;
  min-height: 60px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: rgba(255,255,255,0.1);
}

.vcard-body {
  flex: 1;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.vcard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.vcard-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}
.vcard-score {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.vcard-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.vcard-proposer { color: rgba(255,255,255,0.4); }
.vcard-note {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}
.vcard-my-vote {
  font-size: 12px;
  font-weight: 700;
  color: #22c55e;
  margin-top: auto;
}

.vcard-vote-row {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.vcard-btn-up,
.vcard-btn-normal,
.vcard-btn-down {
  flex: 1;
  padding: 13px 8px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Exo 2', sans-serif;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-right: 1px solid rgba(255,255,255,0.06);
  letter-spacing: 0.3px;
}
.vcard-btn-down { border-right: none; }
.vcard-btn-up:not(:disabled):hover    { background: rgba(34,197,94,0.15);  color: #22c55e; }
.vcard-btn-normal:not(:disabled):hover { background: rgba(99,102,241,0.15); color: #818cf8; }
.vcard-btn-down:not(:disabled):hover  { background: rgba(239,68,68,0.15);  color: #ef4444; }
.vcard-btn-up.active    { background: rgba(34,197,94,0.2);  color: #22c55e;  box-shadow: inset 0 -2px 0 #22c55e; }
.vcard-btn-normal.active { background: rgba(99,102,241,0.2); color: #818cf8; box-shadow: inset 0 -2px 0 #818cf8; }
.vcard-btn-down.active  { background: rgba(239,68,68,0.2);  color: #ef4444; box-shadow: inset 0 -2px 0 #ef4444; }
.vcard-btn-up:disabled,
.vcard-btn-normal:disabled,
.vcard-btn-down:disabled { opacity: 0.35; cursor: default; }

/* ─── Vcard: score révélé (grand) ───────────────────────────────────────── */
.vcard-score-big {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-top: 6px;
  animation: scorePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes scorePop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ─── Vcard: winner ──────────────────────────────────────────────────────── */
.vcard--winner {
  animation: vcardIn 0.3s ease both, winnerPulse 2s ease-in-out 0.4s infinite alternate !important;
  transform: scale(1.02) !important;
  z-index: 2;
  position: relative;
}

@keyframes winnerPulse {
  from { box-shadow: 0 0 20px color-mix(in srgb, var(--cc) 35%, transparent),
                     0 0 0 2px var(--cc); }
  to   { box-shadow: 0 0 48px color-mix(in srgb, var(--cc) 60%, transparent),
                     0 0 0 2px var(--cc), 0 0 80px color-mix(in srgb, var(--cc) 20%, transparent); }
}

/* Cards non-gagnantes après révélation : très estompées */
.vote-list:has(.vcard--winner) .vcard:not(.vcard--winner) {
  opacity: 0.3 !important;
  filter: saturate(0.3);
  transition: opacity 0.5s ease, filter 0.5s ease;
}

/* ─── Bouton annuler draft ───────────────────────────────────────────────── */
.btn-abort {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.35);
  color: rgba(239,68,68,0.7);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-abort:hover {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.6);
  color: #ef4444;
}

/* ─── Score colonne (révélation) ─────────────────────────────────────────── */
.vcard-score-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  min-width: 90px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,0.07);
  animation: scorePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.vcard-score-num {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  color: var(--sc, rgba(255,255,255,0.3));
  letter-spacing: -2px;
  text-shadow: 0 0 20px color-mix(in srgb, var(--sc) 60%, transparent);
}

.vcard-score-unit {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sc, rgba(255,255,255,0.3));
  opacity: 0.8;
  margin-top: 2px;
}

.vcard-score-col.winner-score .vcard-score-num {
  animation: scorePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             winnerNumGlow 1.5s ease-in-out 0.5s infinite alternate;
}

@keyframes winnerNumGlow {
  from { text-shadow: 0 0 10px var(--sc); }
  to   { text-shadow: 0 0 30px var(--sc), 0 0 60px color-mix(in srgb, var(--sc) 40%, transparent); }
}

/* ─── Suppression animation au vote (pas de flicker) ─────────────────────── */
.no-anim .vcard,
.no-anim .vcard--winner {
  animation: none !important;
}

/* ─── Score panneau révélé ───────────────────────────────────────────────── */
/* ─── Score colonne droite (dans vcard-main) ─────────────────────────────── */
.vcard-score-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 0 18px;
  border-left: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.vcard-score-number {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  color: rgba(255,255,255,0.25);
  font-variant-numeric: tabular-nums;
  text-align: center;
  animation: scorePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.vcard-score-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.18);
  margin-top: 3px;
  text-align: center;
}

/* Zero score — neutral */
.vcard-score-zero .vcard-score-number {
  color: rgba(255,255,255,0.2);
}
.vcard-score-zero .vcard-score-label {
  color: rgba(255,255,255,0.12);
}

/* Positive score — green */
.vcard-score-pos {
  border-left-color: rgba(74, 222, 128, 0.25);
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.06) 0%, transparent 60%);
}

.vcard-score-pos .vcard-score-number {
  color: #4ade80;
  text-shadow: 0 0 18px rgba(74, 222, 128, 0.5);
  animation: scorePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             scoreGlowGreen 2s ease-in-out 0.5s infinite alternate;
}

.vcard-score-pos .vcard-score-label {
  color: rgba(74, 222, 128, 0.6);
}

/* Negative score — red */
.vcard-score-neg {
  border-left-color: rgba(248, 113, 113, 0.25);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.06) 0%, transparent 60%);
}

.vcard-score-neg .vcard-score-number {
  color: #f87171;
  text-shadow: 0 0 18px rgba(248, 113, 113, 0.5);
  animation: scorePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             scoreGlowRed 2s ease-in-out 0.5s infinite alternate;
}

.vcard-score-neg .vcard-score-label {
  color: rgba(248, 113, 113, 0.6);
}

/* Winner score — category color */
.vcard-score-winner {
  border-left-color: color-mix(in srgb, var(--sc) 30%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--sc) 12%, transparent) 0%, transparent 60%);
}

.vcard-score-winner .vcard-score-number {
  font-size: 40px;
  color: var(--sc);
  text-shadow:
    0 0 20px color-mix(in srgb, var(--sc) 80%, transparent),
    0 0 50px color-mix(in srgb, var(--sc) 40%, transparent);
  animation: scorePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             scoreGlow 1.8s ease-in-out 0.7s infinite alternate;
}

.vcard-score-winner .vcard-score-label {
  color: var(--sc);
  opacity: 0.7;
}

@keyframes scoreGlow {
  from { text-shadow: 0 0 15px color-mix(in srgb, var(--sc) 70%, transparent); }
  to   { text-shadow: 0 0 40px color-mix(in srgb, var(--sc) 100%, transparent),
                      0 0 80px color-mix(in srgb, var(--sc) 50%, transparent); }
}

@keyframes scoreGlowGreen {
  from { text-shadow: 0 0 12px rgba(74, 222, 128, 0.4); }
  to   { text-shadow: 0 0 30px rgba(74, 222, 128, 0.9), 0 0 60px rgba(74, 222, 128, 0.4); }
}

@keyframes scoreGlowRed {
  from { text-shadow: 0 0 12px rgba(248, 113, 113, 0.4); }
  to   { text-shadow: 0 0 30px rgba(248, 113, 113, 0.9), 0 0 60px rgba(248, 113, 113, 0.4); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Tablet & mobile (≤ 768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Header — opaque sur mobile pour masquer le contenu qui défile derrière */
  .header { padding: 10px 14px; background: #0d0d18; }
  .header-brand { font-size: 13px; }
  .badge-propose, .badge-draft { display: none; }
  .btn-icon { width: 32px; height: 32px; font-size: 15px; }

  /* Masque les compteurs dans la sidebar strip */
  .sidebar-btn-count { display: none; }

  /* Config summary : dernière case seule → pleine largeur */
  .cfgsummary-item:last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* Propose layout : sidebar en haut, contenu en dessous */
  .propose-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  /* Sidebar → strip horizontal scrollable + sticky sous le header */
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-direction: column;
    overflow: visible;
    position: sticky;
    top: 53px;
    z-index: 90;
    background: #0d0d18;
  }
  .sidebar-scroll {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    gap: 6px;
    scrollbar-width: none;
  }
  .sidebar-scroll::-webkit-scrollbar { display: none; }
  .sidebar-btn {
    flex-direction: row;
    min-width: max-content;
    padding: 6px 12px;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 20px;
    gap: 6px;
    white-space: nowrap;
  }
  .sidebar-btn.active {
    border-left: none;
    border-bottom-color: var(--accent, #7c3aed);
    background: rgba(255,255,255,0.08);
  }
  .sidebar-btn-label { font-size: 12px; }
  .sidebar-btn-count { font-size: 10px; }
  .sidebar-admin-toggle { width: 100%; border-radius: 0; }

  /* Main content */
  .main-content { padding: 14px; overflow: visible; }
  .main-inner { max-width: 100%; }

  /* Category header */
  .category-header { gap: 10px; margin-bottom: 14px; }
  .category-icon { font-size: 28px; }
  .category-name { font-size: 18px; }
  .category-hint { font-size: 11px; }

  /* Game input — font-size 16px min pour éviter le zoom iOS au focus */
  .add-game-section { margin-bottom: 14px; }
  .add-game-row { gap: 8px; }
  .add-btn { padding: 10px 14px; font-size: 13px; white-space: nowrap; }
  .game-input { font-size: 16px; padding: 11px 14px; }
  .note-input { font-size: 16px; }

  /* Game items */
  .game-cover { width: 50px; min-height: 50px; }
  .game-title { font-size: 13px; }

  /* Config summary */
  .cfgsummary-grid { grid-template-columns: repeat(2, 1fr); }

  /* Player summary */
  .psummary-grid { grid-template-columns: repeat(2, 1fr); }

  /* Vote list */
  .vote-list { grid-template-columns: 1fr; gap: 8px; }
  .vcard { padding: 10px 12px; }
  .vcard-cover { width: 54px; min-height: 50px; }

  /* Draft content */
  .draft-content { padding: 16px 14px 28px; }
  .category-hero-icon { font-size: 42px; }
  .category-hero-name { font-size: 20px; }

  /* Lobby */
  .lobby-content { padding: 28px 14px 28px; }
  .join-card { padding: 24px 16px; }
  .player-grid { gap: 8px; }

  /* Results */
  .results-content { padding: 16px 14px 40px; }

  /* Modals → plein écran */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-panel {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }

  /* History */
  .history-page-body { padding: 10px; gap: 12px; }
  .history-session-card { padding: 12px; gap: 10px; }
  .history-cat-block { padding: 10px 12px; }
  .history-cat-winner { margin-left: 0; width: 100%; }
  .history-session-date { font-size: 13px; }
  .history-game-name { font-size: 13px; }
  .history-voter-chip { font-size: 10px; padding: 2px 6px; }

  /* Admin overview */
  .admin-overview { margin: 0 8px 8px; }

  /* Ready button */
  .ready-btn { padding: 8px 14px; font-size: 12px; }
}

/* ─── Small phones (≤ 480px) ─────────────────────────────────────────────── */
@media (max-width: 480px) {

  .header { padding: 8px 10px; gap: 8px; }
  .header-brand { font-size: 12px; }
  .header-user { display: none; }

  .main-content { padding: 10px; }

  .cfgsummary-grid { grid-template-columns: repeat(2, 1fr); }
  .psummary-grid { grid-template-columns: repeat(2, 1fr); }

  .vcard-cover { display: none; }
  .vcard { padding: 8px 10px; }

  .vote-btn-row { gap: 4px; }
  .vote-btn { font-size: 11px; padding: 5px 4px; }

  .category-hero-icon { font-size: 34px; }
  .category-hero-name { font-size: 17px; }

  .draft-content { padding: 10px 10px 20px; }
  .lobby-content { padding: 20px 10px; }

  .modal-panel { max-height: 96vh; }

  .quota-badge { font-size: 11px; padding: 4px 8px; }
}
