/* ═══════════════════════════════════════════
   CSS Custom Properties
═══════════════════════════════════════════ */
:root {
  --bg:        #1a1a2e;
  --surface:   #16213e;
  --surface-2: #0f3460;
  --accent:    #e94560;
  --text:      #eaeaea;
  --text-dim:  #8892a4;
  --success:   #2dd4bf;
  --radius:    14px;
  --shadow:    0 8px 32px rgba(0, 0, 0, 0.4);

  /* Option colors — QuizEngine original palette */
  --opt-violet: #6d28d9;
  --opt-cyan:   #0891b2;
  --opt-amber:  #d97706;
  --opt-emerald:#059669;

  /* Timer */
  --timer-pct: 1;
}

/* ═══════════════════════════════════════════
   Reset & Base
═══════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   View System — show/hide
═══════════════════════════════════════════ */
.view {
  display: none;
  width: 100%;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.view.active {
  display: flex;
  flex-direction: column;
}

html.autohost-launch #view-home .btn-group,
html.autohost-launch #view-home .subtitle,
html.autohost-launch #view-home #quiz-title-banner {
  display: none !important;
}

html.autohost-launch #view-home {
  display: none !important;
}

html.autohost-launch #view-host-loading.active {
  display: flex !important;
  flex-direction: column;
}

.host-loading-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
}

.host-loading-logo {
  width: 150px;
  height: 86px;
}

/* ═══════════════════════════════════════════
   Card
═══════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  width: 100%;
  max-width: 480px;
}

.card.lobby-card {
  max-width: 480px;
}

@media (min-width: 900px) {
  .card.lobby-card {
    max-width: 900px;
  }
}

.center-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.lobby-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Studio logo placeholder */
.studio-logo {
  width: 140px;
  height: 80px;
  align-self: center;
  display: block;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 4px 0;
}

.lobby-mode-corner {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mode-indicator {
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  display: none;
}

.btn-mode-icon {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.btn-mode-icon:hover {
  background: rgba(255,255,255,0.14);
}

.btn-mode-icon.mode-active {
  outline: none;
  background: rgba(255,255,255,0.14);
}

.btn-back-top-right {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.btn-back-top-right:hover {
  background: rgba(255,255,255,0.14);
  color: var(--text);
}

.host-home-menu {
  position: absolute;
  top: 48px;
  right: 0;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 20;
}

.host-home-menu-btn {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.host-home-menu-btn:hover {
  background: rgba(255,255,255,0.08);
}

.home-hero-logo {
  width: 100px;
  height: 100px;
  display: block;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

/* ═══════════════════════════════════════════
   Host Mode Toggle (hidden — controls are in lobby-header)
═══════════════════════════════════════════ */
.mode-toggle {
  display: none;
}

.mode-warning {
  font-size: 0.68rem;
  color: var(--opt-amber);
}

.mode-url {
  font-size: 0.72rem;
  color: var(--text-dim);
  word-break: break-all;
  background: var(--bg);
  padding: 6px 8px;
  border-radius: 10px;
}

#btn-copy-join-url {
  padding: 8px 10px;
  font-size: 0.78rem;
}

/* ═══════════════════════════════════════════
   Typography
═══════════════════════════════════════════ */
h1.logo {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--accent);
}

h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-dim); }

.subtitle {
  color: var(--text-dim);
  font-size: 1rem;
}

.build-time {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.scan-fallback {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-size: 0.85rem;
}

.scan-fallback strong {
  font-size: 0.86rem;
  color: #facc15;
}

/* ═══════════════════════════════════════════
   Host Controls (pause, skip)
═══════════════════════════════════════════ */
.host-controls {
  display: flex;
  gap: 10px;
}

.btn-host-ctrl {
  flex: 1;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 14px;
}

.btn-host-ctrl:hover { filter: brightness(1.2); }

.btn-skip { background: #7c3aed; }
.btn-end { background: #b91c1c; }

/* ═══════════════════════════════════════════
   Kick Button
═══════════════════════════════════════════ */
.player-chip.kickable {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
}

.btn-kick {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0.5;
  padding: 0;
  line-height: 1;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-kick:hover { opacity: 1; transform: scale(1.2); }

/* ═══════════════════════════════════════════
   Pause Overlay
═══════════════════════════════════════════ */
.pause-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pause-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

#btn-overlay-resume {
  margin-top: 6px;
}

.pause-icon { font-size: 3.5rem; }

.pause-sub {
  color: var(--text-dim);
  animation: pulse 2s infinite;
}

/* ═══════════════════════════════════════════
   Streak Badge
═══════════════════════════════════════════ */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--opt-amber);
  color: #000;
  border-radius: 20px;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 0.85rem;
  animation: popIn 0.2s ease-out;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  color: var(--success);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 20px;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.45);
  color: #ddd6fe;
  border-radius: 20px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
}

.role-panel {
  width: 100%;
  background: rgba(15, 52, 96, 0.45);
  border: 1px solid rgba(136, 146, 164, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-panel p {
  margin: 0;
}

.role-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

#role-target-select {
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
}

.type-container {
  width: 100%;
}

#player-type-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
}

.boss-panel {
  width: 100%;
  background: rgba(233, 69, 96, 0.14);
  border: 1px solid rgba(233, 69, 96, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.boss-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.boss-name {
  font-weight: 800;
  font-size: 0.9rem;
}

.boss-hp {
  font-size: 0.8rem;
  color: #fecaca;
}

.boss-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.boss-bar-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 55%, #22c55e 100%);
  transition: width 0.3s ease;
}

.host-type-preview {
  width: 100%;
  background: var(--surface-2);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}

.host-type-label {
  font-weight: 800;
}

.host-type-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.result-streak-msg {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--opt-amber);
  min-height: 1.4em;
}

.lb-streak {
  font-size: 0.75rem;
  background: var(--opt-amber);
  color: #000;
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: 800;
  margin-left: 4px;
}

/* ═══════════════════════════════════════════
   Mute Button
═══════════════════════════════════════════ */
.btn-mute {
  position: fixed;
  top: 12px;
  right: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-mute:hover { background: var(--surface-2); }

.tooryan-attribution,
.qyan-attribution {
  display: none !important;
}

.hint-text {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* ═══════════════════════════════════════════
   Buttons
═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  user-select: none;
}

.btn:active { transform: scale(0.97); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary  { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-success  { background: var(--success); color: #0a0a0a; }

.full-width { width: 100%; }

.btn-group.vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 0;
}

.btn-back:hover { color: var(--text); }

/* ═══════════════════════════════════════════
   Form Fields
═══════════════════════════════════════════ */
form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input {
  padding: 13px 16px;
  background: var(--bg);
  border: 2px solid var(--surface-2);
  border-radius: 10px;
  color: var(--text);
  font-size: 1.1rem;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

input::placeholder { color: rgba(148, 163, 184, 0.3); }

.error-msg {
  color: var(--accent);
  font-size: 0.88rem;
  min-height: 1.2em;
}

/* ═══════════════════════════════════════════
   PIN Display
═══════════════════════════════════════════ */
.pin-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px 16px;
  gap: 6px;
}

.host-quiz-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #93c5fd;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .lobby-card {
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    grid-auto-flow: dense;
  }
  
  .lobby-header {
    grid-column: 1 / -1;
  }
  
  .mode-toggle {
    display: none;
  }
  
  .pin-display {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  
  .qr-section {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  
  .share-url-section {
    grid-column: 1 / -1;
    grid-row: 4;
  }
  
  .qr-wrapper svg,
  .qr-wrapper canvas {
    width: 280px;
    height: 280px;
  }
  
  #btn-start-game {
    grid-column: 1 / -1;
    grid-row: 5;
  }
  
  .hint-text {
    grid-column: 1 / -1;
    grid-row: 6;
  }

  .player-list-section {
    grid-column: 1 / -1;
    grid-row: 7;
  }
}

.pin-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.pin-code {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.pin-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Difficulty label removed from host lobby */

/* ═══════════════════════════════════════════
   QR Code
═══════════════════════════════════════════ */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0 auto;
}

.qr-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.qr-wrapper {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qr-wrapper canvas {
  display: block;
  border-radius: 8px;
}

.qr-wrapper svg {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 8px;
}

/* ═══════════════════════════════════════════
   Share URL Bar
═══════════════════════════════════════════ */
.share-url-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.share-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.share-url-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin: 0;
  text-align: center;
}

.share-url-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.share-url-details {
  width: 100%;
}

.share-url-details > summary {
  list-style: none;
  cursor: pointer;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.share-url-details > summary::-webkit-details-marker {
  display: none;
}

.share-url-details[open] > summary {
  margin-bottom: 6px;
}

.share-url-input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  font-size: 0.78rem;
  background: var(--bg);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  color: var(--text-dim);
  cursor: text;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.share-copy-btn.icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}

.share-copy-btn:hover {
  background: rgba(99,102,241,0.25);
}

.share-copy-btn.copied {
  background: rgba(45,212,191,0.2);
  color: #2dd4bf;
}

.share-social-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.share-social-btn {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  flex: 0 0 auto;
  justify-content: center;
  white-space: nowrap;
  width: 34px;
  height: 34px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
}

.share-social-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.share-wa,
.share-tg,
.share-tw {
  background: rgba(255,255,255,0.07);
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.1);
}

.share-wa:hover,
.share-tg:hover,
.share-tw:hover {
  color: var(--text);
}

.host-as-player-section {
  margin: 0.25rem 0;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(124,58,237,0.07);
  border: 1px solid rgba(124,58,237,0.2);
}

.host-as-player-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  user-select: none;
}

.host-as-player-toggle input {
  width: 14px;
  height: 14px;
  accent-color: #7c3aed;
  border-width: 1px;
}

.host-player-form {
  margin-top: 0.55rem;
}

.host-player-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.host-player-input {
  flex: 1;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(124,58,237,0.35);
  background: transparent;
  font-size: 0.8rem;
  color: inherit;
}

.host-player-input:focus {
  border-color: rgba(124,58,237,0.7);
}

.host-player-confirm {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  border-radius: 8px;
}

.host-player-status {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  color: #a78bfa;
  min-height: 1em;
}

#view-host-lobby .lobby-card {
  gap: 8px;
  max-width: 430px;
  padding: 18px 16px;
}

#view-host-lobby .studio-logo {
  width: 112px;
  height: 64px;
  border-radius: 12px;
}

#view-host-lobby .lobby-header {
  padding: 0;
}

#view-host-lobby .pin-display {
  padding: 14px 12px;
  gap: 4px;
}

#view-host-lobby .pin-code {
  font-size: 1.95rem;
  letter-spacing: 3px;
}

#view-host-lobby .qr-label {
  font-size: 0.68rem;
}

#view-host-lobby .qr-wrapper {
  padding: 7px;
}

#view-host-lobby .qr-wrapper svg,
#view-host-lobby .qr-wrapper canvas {
  width: 170px;
  height: 170px;
}

#view-host-lobby #btn-start-game {
  padding: 10px 14px;
  font-size: 0.9rem;
}

#view-host-lobby .player-list-section {
  gap: 8px;
  padding: 10px;
}

#view-host-lobby .player-list-section h3 {
  font-size: 0.95rem;
}

#view-host-lobby .player-chip {
  padding: 6px 10px 6px 8px;
  font-size: 0.82rem;
}

/* ═══════════════════════════════════════════
   Player List
═══════════════════════════════════════════ */
.player-list-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(45, 212, 191, 0.08);
  border: 2px solid rgba(45, 212, 191, 0.2);
  border-radius: var(--radius);
  padding: 16px;
}

.player-list-section h3 {
  margin: 0;
  color: var(--success);
  font-size: 1.2rem;
}

.player-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 40px;
}

.player-chip {
  background: var(--success);
  color: #0a0a0a;
  border-radius: 20px;
  padding: 8px 14px 8px 10px;
  font-size: 0.9rem;
  font-weight: 700;
  animation: popIn 0.2s ease-out;
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-waiting-msg {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
  font-style: italic;
}

/* ═══════════════════════════════════════════
   Avatar
═══════════════════════════════════════════ */

/* Trigger button — shows selected avatar, opens modal on click */
.avatar-trigger-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text);
  font-size: 1rem;
}

.nickname-avatar-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.nickname-avatar-row input {
  flex: 1;
  min-width: 0;
}

.avatar-trigger-inline {
  width: auto;
  flex-shrink: 0;
  padding: 0;
  width: 52px;
  border-radius: 10px;
  justify-content: center;
}

.avatar-trigger-btn:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.08);
}

.avatar-trigger-icon {
  font-size: 1.75rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar-trigger-label {
  flex: 1;
  font-weight: 600;
  text-align: left;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.avatar-trigger-arrow {
  font-size: 1.3rem;
  color: var(--text-dim);
}

/* Modal overlay */
.avatar-picker-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}

/* Dialog box */
.avatar-picker-dialog {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  width: min(360px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: popIn 0.2s ease-out;
}

.avatar-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.avatar-picker-close {
  background: var(--surface-2);
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.avatar-picker-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Grid inside the modal */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.avatar-option {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  font-size: 1.6rem;
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  padding: 0;
  line-height: 1;
}

.avatar-option:hover {
  transform: scale(1.15);
  border-color: rgba(99, 102, 241, 0.5);
}

.avatar-option.selected {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.18);
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* Small circle used inside player chips */
.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  flex-shrink: 0;
}

/* Edit profile section in player lobby */
.edit-profile-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, color 0.15s;
}

.edit-profile-toggle:hover {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text);
}

.edit-profile-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  padding: 14px;
}

.edit-profile-panel.open {
  display: flex;
}

.edit-profile-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.edit-profile-input {
  padding: 10px 14px;
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.edit-profile-input:focus {
  outline: none;
  border-color: var(--accent);
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Question slide-in from right */
@keyframes slideInRight {
  from { transform: translateX(32px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.question-layout.animate-in {
  animation: slideInRight 0.3s ease-out;
}

/* Staggered option entrance */
.stagger-1 { animation: popIn 0.2s ease-out 0.05s both; }
.stagger-2 { animation: popIn 0.2s ease-out 0.12s both; }
.stagger-3 { animation: popIn 0.2s ease-out 0.19s both; }
.stagger-4 { animation: popIn 0.2s ease-out 0.26s both; }

/* Answer reveal — correct bounce */
@keyframes correctPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); box-shadow: 0 0 24px rgba(45, 212, 191, 0.7); }
  100% { transform: scale(1); }
}

/* Answer reveal — wrong shake */
@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-7px); }
  60%       { transform: translateX(7px); }
}

.option-btn.reveal-correct {
  animation: correctPulse 0.55s ease;
  outline: 3px solid #fff;
  filter: brightness(1.15);
}

.option-btn.reveal-wrong {
  animation: wrongShake 0.4s ease;
  opacity: 0.35;
  filter: grayscale(0.5);
}

/* Timer urgent pulse */
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.18); }
}

.timer-ring.timer-urgent {
  animation: timerPulse 0.45s infinite;
}

.waiting-text {
  color: var(--text-dim);
  font-size: 1rem;
  text-align: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* ═══════════════════════════════════════════
   Question Layout
═══════════════════════════════════════════ */
.question-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 700px;
  padding: 16px;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.q-progress {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
}

.difficulty-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  padding: 3px 8px;
  background: rgba(136, 146, 164, 0.15);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.answer-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success);
  white-space: nowrap;
}

/* Timer Ring */
.timer-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(
    var(--success) calc(var(--timer-pct) * 360deg),
    var(--surface-2) 0deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.5s;
  position: relative;
}

.timer-ring::before {
  content: '';
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
}

.timer-count {
  font-size: 1rem;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.timer-ring.timer-danger {
  background: conic-gradient(
    var(--opt-amber) calc(var(--timer-pct) * 360deg),
    var(--surface-2) 0deg
  );
}

/* Question Box */
.question-text-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.question-media {
  max-width: 100%;
  max-height: 260px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
}

video.question-media {
  max-height: 260px;
  width: 100%;
  border-radius: 8px;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════
   Options Grid
═══════════════════════════════════════════ */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Shared option styles */
.option-card,
.option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: transform 0.1s, filter 0.2s;
  min-height: 64px;
}

.option-card {
  cursor: default;
}

.option-btn:active { transform: scale(0.96); }

.option-btn:disabled { cursor: default; }

.option-btn.selected {
  outline: 4px solid #fff;
  outline-offset: 2px;
}

.option-btn.dimmed { filter: brightness(0.45); }

.opt-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.opt-text { flex: 1; }

.opt-violet  { background: var(--opt-violet);  }
.opt-cyan    { background: var(--opt-cyan);    }
.opt-amber   { background: var(--opt-amber);   }
.opt-emerald { background: var(--opt-emerald); }

.answered-msg {
  text-align: center;
  font-size: 0.95rem;
  color: var(--success);
  font-weight: 600;
  min-height: 1.4em;
}

/* ═══════════════════════════════════════════
   Question Result Screen
═══════════════════════════════════════════ */
.result-card { gap: 16px; }

.result-answer {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--success);
}

.result-score-msg {
  font-size: 1.2rem;
  font-weight: 700;
}

.result-score-msg.correct  { color: var(--success); }
.result-score-msg.incorrect { color: var(--accent); }

/* ═══════════════════════════════════════════
   Leaderboard
═══════════════════════════════════════════ */
.leaderboard-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
}

.lb-title {
  text-align: center;
  font-size: 1.8rem;
}

.winner-announcement {
  text-align: center;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.22), rgba(45, 212, 191, 0.22));
  border: 1px solid rgba(233, 69, 96, 0.35);
  border-radius: 14px;
  padding: 14px 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 26px rgba(0, 0, 0, 0.35);
  animation: winnerGlow 1.8s ease-in-out infinite alternate;
}

.winner-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.winner-name {
  font-size: 1.9rem;
  font-weight: 900;
  color: #fff;
  margin-top: 4px;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.winner-score {
  margin-top: 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--success);
}

@keyframes winnerGlow {
  from { transform: translateY(0); filter: saturate(1); }
  to   { transform: translateY(-2px); filter: saturate(1.15); }
}

.leaderboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 10px;
  transition: transform 0.2s;
  animation: slideIn 0.25s ease-out;
}

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

.lb-entry.lb-mine {
  background: var(--surface-2);
  outline: 2px solid var(--accent);
}

.lb-rank {
  font-size: 1.1rem;
  font-weight: 900;
  width: 28px;
  text-align: center;
  color: var(--accent);
}

.lb-nickname { flex: 1; font-weight: 600; }

.lb-score {
  font-weight: 700;
  color: var(--success);
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Top-3 ranks get medals */
.lb-entry:nth-child(1) .lb-rank::before { content: '🥇 '; }
.lb-entry:nth-child(2) .lb-rank::before { content: '🥈 '; }
.lb-entry:nth-child(3) .lb-rank::before { content: '🥉 '; }

.lb-next-hint {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════════
   Podium Ceremony (Game Over)
═══════════════════════════════════════════ */
.podium-ceremony {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 20px 12px 32px;
}

.podium-title {
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.5px;
  animation: fadeSlideDown 0.5s ease-out both;
}

/* ── Stage: three columns, aligned at bottom ── */
.podium-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

/* Shared column */
.podium-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  opacity: 0;
  transform: translateY(-40px);
  transition: none;
}
.podium-col.podium-revealed {
  animation: podiumDrop 0.65s cubic-bezier(0.22, 1.5, 0.5, 1) forwards;
}

@keyframes podiumDrop {
  from { opacity: 0; transform: translateY(-55px) scale(0.88); }
  70%  { opacity: 1; transform: translateY(6px) scale(1.02); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Player info above the block ── */
.podium-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-bottom: 10px;
}

.podium-trophy-crown {
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.75));
  animation: trophyBob 2s ease-in-out infinite;
}
@keyframes trophyBob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%       { transform: translateY(-6px) rotate(4deg); }
}

.podium-avatar {
  font-size: 2.8rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.12);
}
.podium-avatar-gold {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.28), 0 0 18px rgba(250, 204, 21, 0.4);
  font-size: 3.2rem;
  width: 68px;
  height: 68px;
}

.podium-nickname {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
  text-align: center;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium-nickname-gold {
  font-size: 1rem;
  color: #fef08a;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.55);
  max-width: 140px;
}

.podium-score {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--success);
  white-space: nowrap;
}
.podium-score-gold {
  font-size: 0.95rem;
  color: #facc15;
}

/* ── The colored block (staircase heights) ── */
.podium-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10px;
  gap: 6px;
  border-radius: 8px 8px 0 0;
  width: 110px;
}

.podium-block-1 {
  height: 120px;
  width: 130px;
  background: linear-gradient(160deg, #fbbf24 0%, #d97706 60%, #92400e 100%);
  box-shadow: 0 -4px 24px rgba(251, 191, 36, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}
.podium-block-2 {
  height: 85px;
  background: linear-gradient(160deg, #cbd5e1 0%, #94a3b8 55%, #475569 100%);
  box-shadow: 0 -4px 18px rgba(148, 163, 184, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.podium-block-3 {
  height: 60px;
  background: linear-gradient(160deg, #d97706 0%, #b45309 55%, #78350f 100%);
  box-shadow: 0 -4px 14px rgba(180, 83, 9, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.podium-medal {
  font-size: 1.4rem;
  line-height: 1;
}
.podium-rank-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1;
}

/* ── Full results section (fades in last) ── */
.podium-full-results {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.podium-full-results.podium-results-visible {
  opacity: 1;
  transform: translateY(0);
}

.podium-details {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}
.podium-details-summary {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
}
.podium-details[open] .podium-details-summary {
  border-bottom-color: var(--border);
  color: var(--text);
}
.podium-details .leaderboard-list {
  padding: 10px 14px 14px;
}

.podium-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   Arabic / auto-direction text
═══════════════════════════════════════════ */
.question-text {
  unicode-bidi: plaintext;
  text-align: center;
}

/* ═══════════════════════════════════════════
   Multi-Select: toggled (selected) state
═══════════════════════════════════════════ */
.option-btn.multi-selected {
  outline: 4px solid #fff;
  outline-offset: 2px;
  filter: brightness(1.15);
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════
   Match / Connect — drag-and-drop
═══════════════════════════════════════════ */
.match-container { width: 100%; }

.match-dnd-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

/* Left column: label + drop zone rows */
.match-dnd-slots  { display: flex; flex-direction: column; gap: 10px; }

.match-dnd-row    { display: flex; flex-direction: column; gap: 4px; }

.match-dnd-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0 4px;
  unicode-bidi: plaintext;
}

.match-dropzone {
  min-height: 52px;
  border-radius: var(--radius);
  border: 2px dashed rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  transition: border-color 0.15s, background 0.15s;
}
.match-dz-empty  { background: var(--surface); }
.match-dz-filled { border-style: solid; border-color: rgba(255,255,255,0.25); background: var(--surface-2); }
.match-dz-hover  { border-color: var(--accent) !important; background: rgba(233,69,96,0.15) !important; }

.match-drop-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.45;
  font-style: italic;
}

/* Right column: chip pool */
.match-dnd-pool {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 22px; /* visually align with first slot */
}

.match-pool-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.6;
  margin-bottom: 2px;
}

/* Chips (shared between pool and placed-in-slot) */
.match-chip {
  padding: 11px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: grab;
  text-align: center;
  unicode-bidi: plaintext;
  user-select: none;
  touch-action: none;
  transition: opacity 0.15s;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}
.match-chip:active { cursor: grabbing; }

/* Ghost that follows pointer */
.match-drag-ghost {
  box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
  cursor: grabbing !important;
  border-radius: var(--radius) !important;
  background: var(--opt-violet) !important;
}

/* Host preview for match (unchanged) */
.host-pairs-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: span 2;
}
.host-pair-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 14px;
}
.host-pair-side  { flex: 1; font-weight: 700; unicode-bidi: plaintext; }
.host-pair-right { color: var(--text-dim); }
.host-pair-arrow { color: var(--text-dim); font-size: 1.1rem; }

/* ═══════════════════════════════════════════
   Order / Sort — drag-and-drop
═══════════════════════════════════════════ */
.order-container { width: 100%; }

.order-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: opacity 0.15s, box-shadow 0.15s;
}
.order-item:active { cursor: grabbing; }
.order-dragging-source { opacity: 0.2 !important; }

.order-drag-handle {
  font-size: 1.3rem;
  color: var(--text-dim);
  flex-shrink: 0;
  cursor: grab;
  line-height: 1;
}

.order-label {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  unicode-bidi: plaintext;
}

.order-drag-ghost {
  box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
  cursor: grabbing !important;
  border-radius: var(--radius) !important;
}

.order-insert-indicator {
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  width: 100%;
  box-shadow: 0 0 10px var(--accent);
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Host preview for order */
.host-order-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: span 2;
}
.host-order-item {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  unicode-bidi: plaintext;
}

/* ═══════════════════════════════════════════
   Result — pairs / order reveal list
═══════════════════════════════════════════ */
.result-pairs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
}

.result-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  animation: slideIn 0.25s ease-out;
  unicode-bidi: plaintext;
}

.pair-arrow { color: var(--success); font-size: 1.1rem; flex-shrink: 0; }

.result-order-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   Desktop breakpoint (≥ 640px)
═══════════════════════════════════════════ */
@media (min-width: 640px) {
  .question-text { font-size: 1.5rem; }
  .option-card,
  .option-btn   { font-size: 1.05rem; padding: 20px 18px; min-height: 80px; }
  .pin-code     { font-size: 3.6rem; }
  h1.logo       { font-size: 3rem; }
}

@media (min-width: 1024px) {
  .options-grid { gap: 14px; }
  .question-layout { max-width: 860px; }
}
