/* ============================================
   Reset + base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: 'Rubik', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f1f5f9;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  font-size: 16px;
  line-height: 1.5;
  touch-action: manipulation;
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
  font-family: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

#app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ============================================
   Design tokens
   ============================================ */
:root {
  --color-bg-1: #0f172a;
  --color-bg-2: #1e293b;
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-border: rgba(255, 255, 255, 0.12);
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-primary: #6366f1;
  --color-primary-hover: #818cf8;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --touch-target: 48px;
}

/* ============================================
   Shared components
   ============================================ */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.btn {
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.1s ease, background 0.2s ease;
}

.btn:hover {
  background: var(--color-primary-hover);
}

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

.btn-secondary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface-hover);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.input {
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.2s;
}

.input:focus {
  border-color: var(--color-primary);
}

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

.title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: var(--space-2);
  text-align: center;
}

.subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-6);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}

.stack > * + * {
  margin-top: var(--space-4);
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

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

/* ============================================
   Lobby + Room
   ============================================ */
.field-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: calc(var(--space-2) * -1);
}

.error {
  color: var(--color-danger);
  font-size: 0.875rem;
  margin-top: calc(var(--space-3) * -1);
  margin-bottom: calc(var(--space-2) * -1);
}

.divider {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  position: relative;
  margin: var(--space-3) 0;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: var(--color-border);
}

.divider::before { right: 0; }
.divider::after { left: 0; }

.back-btn {
  align-self: flex-start;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-muted);
  font-size: 1rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}

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

.room-code-label {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.room-code {
  text-align: center;
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(99, 102, 241, 0.4);
  margin: var(--space-3) 0 var(--space-5);
}

.room-header {
  text-align: center;
  margin-bottom: var(--space-5);
}

.copy-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9rem;
  color: var(--color-text);
  transition: background 0.2s;
}

.copy-btn:hover { background: var(--color-surface-hover); }

.room-share-row {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

/* באנר מתחבר-מחדש — מופיע בתחתית בעת ניתוק זמני */
.reconnect-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.reconnect-banner.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reconnect-banner::before {
  content: '⟳ ';
  display: inline-block;
  animation: reconnect-spin 1s linear infinite;
}

@keyframes reconnect-spin {
  to { transform: rotate(360deg); }
}

/* Invited via link — short lobby state */
.invited-code-box {
  text-align: center;
  padding: var(--space-4);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}

.invited-code-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.invited-code {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #c4b5fd;
  text-shadow: 0 0 18px rgba(168, 85, 247, 0.4);
}

.lobby-ad-wrap {
  width: 100%;
  margin-top: var(--space-4);
}

.player-count {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}

.player-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.player-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.player-item.is-me {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
}

.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.badge {
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-host {
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-warning);
}

.player-status {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.player-status.is-ready {
  color: var(--color-success);
  font-weight: 700;
}

.room-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-5);
}

.btn-success {
  background: var(--color-success);
}

.btn-success:hover {
  background: #34d399;
}

/* Lobby — subtle tinted buttons; each has its own accent but stays muted so the Zpoto ad wins */
.btn-create {
  background: linear-gradient(135deg, #3f2a3a 0%, #2a1d28 100%);
  border: 1px solid rgba(244, 114, 182, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(244, 114, 182, 0.08);
  color: #fce7f3;
  font-size: 1.1rem;
}

.btn-create:hover {
  background: linear-gradient(135deg, #4f3346 0%, #3a2535 100%);
  border-color: rgba(244, 114, 182, 0.55);
}

.btn-match {
  background: linear-gradient(135deg, #3a3326 0%, #2a2419 100%);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(251, 191, 36, 0.08);
  color: #fef3c7;
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-match:hover {
  background: linear-gradient(135deg, #4a402f 0%, #3a3322 100%);
  border-color: rgba(251, 191, 36, 0.55);
}

.btn-join {
  background: linear-gradient(135deg, #1f3a30 0%, #142a22 100%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(52, 211, 153, 0.08);
  color: #d1fae5;
  font-size: 1.1rem;
  width: 100%;
}

.btn-join:hover {
  background: linear-gradient(135deg, #2a4d3f 0%, #1f3a30 100%);
  border-color: rgba(52, 211, 153, 0.55);
}

.join-box {
  background: rgba(52, 211, 153, 0.04);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.join-label {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(52, 211, 153, 0.85);
}

.join-box .input {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.15em;
}

.loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

/* ============================================
   Screen content wrapper
   ============================================ */
.screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-2) 0;
}

.screen-content.center {
  align-items: center;
  justify-content: center;
}

/* ============================================
   Lobby — solo button
   ============================================ */
.btn-test {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  font-size: 0.95rem;
}
.btn-test:hover {
  background: rgba(148, 163, 184, 0.06);
  color: #f1f5f9;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

/* ============================================
   Config screen — game count picker
   ============================================ */
.game-count-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.game-count-btn {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  transition: all 0.2s;
  cursor: pointer;
}

.game-count-btn:hover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.game-count-btn:active {
  transform: translateY(0);
}

.count-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}

.count-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.config-hint {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.waiting-icon {
  font-size: 4rem;
  text-align: center;
  margin-bottom: var(--space-3);
}

.pulse-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.pulse-dots span {
  width: 10px;
  height: 10px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  animation: pulse 1.4s ease-in-out infinite;
}

.pulse-dots span:nth-child(2) { animation-delay: 0.2s; }
.pulse-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ============================================
   Game screen (in-game container)
   ============================================ */
.game-progress-pill {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-4);
}

.dev-note {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-size: 0.875rem;
  text-align: right;
  margin-top: var(--space-4);
}

.game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============================================
   Intro overlay
   ============================================ */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.intro-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.intro-emoji {
  font-size: 4.5rem;
  line-height: 1;
}

.intro-title {
  font-size: 1.75rem;
  font-weight: 900;
}

.intro-explanation {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.intro-countdown {
  margin: var(--space-3) 0;
}

.intro-ring {
  position: relative;
  width: 80px;
  height: 80px;
}

.intro-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.intro-ring-bg {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 6;
}

.intro-ring-fg {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 6;
  stroke-linecap: round;
}

@keyframes introCount {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 282.74; }
}

.intro-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary);
}

.intro-skip {
  margin-top: var(--space-3);
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
}

/* ============================================
   In-game UI (shared)
   ============================================ */
.game-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.game-title-sm {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.timer-pill {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.timer-pill.urgent {
  border-color: var(--color-danger);
  color: var(--color-danger);
  animation: timerPulse 0.5s ease-in-out infinite alternate;
}

@keyframes timerPulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.game-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.big-prompt {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.number-input {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.submission-list {
  margin-top: var(--space-3);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.sub-line {
  color: var(--color-success);
  font-weight: 500;
}

/* ============================================
   Reveal screen (after game ends)
   ============================================ */
.reveal-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  align-items: center;
  justify-content: center;
}

.reveal-label {
  font-size: 1rem;
  color: var(--color-text-muted);
  text-align: center;
}

.reveal-number {
  font-size: 6rem;
  font-weight: 900;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 32px rgba(99, 102, 241, 0.5);
  margin: var(--space-3) 0 var(--space-5);
  animation: revealPop 0.6s cubic-bezier(.34,1.56,.64,1);
}

@keyframes revealPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.reveal-list {
  list-style: none;
  width: 100%;
  max-width: 380px;
  margin: 0 0 var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.reveal-line {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.reveal-line.is-me {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
}

.reveal-rank {
  font-size: 1.5rem;
  text-align: center;
}

.reveal-name {
  font-weight: 700;
}

.reveal-guess {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.reveal-points {
  font-weight: 900;
  color: var(--color-success);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--color-text-muted);
}

/* ============================================
   Solo picker
   ============================================ */
.solo-game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.solo-game-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  transition: all 0.2s;
  min-height: 130px;
}

.solo-game-card:not(.disabled):hover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.solo-game-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.solo-game-emoji {
  font-size: 2.5rem;
}

.solo-game-name {
  font-weight: 700;
  text-align: center;
  font-size: 0.95rem;
}

.solo-game-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.solo-game-card:not(.disabled) .solo-game-tag {
  background: rgba(16, 185, 129, 0.2);
  color: var(--color-success);
}

.solo-result-emoji {
  font-size: 4rem;
}

.solo-score {
  font-size: 5rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 32px rgba(99, 102, 241, 0.4);
}

/* ============================================
   Cities game
   ============================================ */
.big-letter {
  display: inline-block;
  font-size: 4rem;
  font-weight: 900;
  color: var(--color-primary);
  text-shadow: 0 0 24px rgba(99, 102, 241, 0.5);
  margin-top: var(--space-2);
}

.city-input {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  direction: rtl;
}

.input.is-invalid {
  border-color: var(--color-danger);
  animation: shake 0.3s ease;
}

.input.is-valid {
  border-color: var(--color-success);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ============================================
   Math game
   ============================================ */
.math-expr {
  font-size: clamp(1rem, 4.5vw, 1.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  padding: var(--space-3) var(--space-2);
  background: var(--color-bg-1);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  letter-spacing: 0;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  text-align: center;
  min-width: 0;
}

.math-equals {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary);
}

.math-expr-reveal {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  font-variant-numeric: tabular-nums;
}

/* ============================================
   Hanoi game
   ============================================ */
.move-counter {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.hanoi-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-2);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  height: 360px;
}

.hanoi-rod {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  padding-bottom: var(--space-3);
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.hanoi-rod:hover {
  background: rgba(99, 102, 241, 0.06);
}

.hanoi-rod.is-target {
  background: rgba(16, 185, 129, 0.08);
}

.hanoi-rod.is-target:hover {
  background: rgba(16, 185, 129, 0.15);
}

.hanoi-rod.is-selected {
  background: rgba(99, 102, 241, 0.2);
}

.target-label {
  position: absolute;
  top: var(--space-2);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-success);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.rod-pole {
  position: absolute;
  top: var(--space-5);
  bottom: calc(var(--space-3) + 8px);
  width: 6px;
  background: linear-gradient(180deg, #475569, #334155);
  border-radius: 4px;
}

.rod-base {
  width: 100%;
  height: 10px;
  background: linear-gradient(180deg, #64748b, #475569);
  border-radius: 4px;
}

.disk-stack {
  position: absolute;
  bottom: calc(var(--space-3) + 10px);
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2px;
}

.hanoi-disk {
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.hanoi-disk.size-1 { width: 35%; background: linear-gradient(135deg, #f87171, #dc2626); }
.hanoi-disk.size-2 { width: 50%; background: linear-gradient(135deg, #fb923c, #ea580c); }
.hanoi-disk.size-3 { width: 65%; background: linear-gradient(135deg, #facc15, #ca8a04); }
.hanoi-disk.size-4 { width: 80%; background: linear-gradient(135deg, #4ade80, #16a34a); }
.hanoi-disk.size-5 { width: 95%; background: linear-gradient(135deg, #818cf8, #4f46e5); }

.hanoi-disk.is-top {
  cursor: pointer;
}

.hanoi-disk.is-selected {
  transform: translateY(-6px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.hanoi-rod.shake {
  animation: shake 0.4s ease;
  background: rgba(239, 68, 68, 0.2);
}

.hanoi-hint {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

.reveal-emoji {
  text-align: center;
  margin: var(--space-3) 0;
}

.quick-reveal-info {
  text-align: center;
  font-size: 1.1rem;
  margin-top: var(--space-4);
  color: var(--color-text-muted);
}

.quick-reveal-info strong {
  color: var(--color-text);
}

/* ============================================
   Memory game
   ============================================ */
.memory-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 380px) {
  .memory-board {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .mem-emoji { font-size: 1.75rem; }
  .mem-text { font-size: 0.75rem; }
  .mem-card-back { font-size: 1.5rem; }
}

.mem-card {
  aspect-ratio: 1;
  background: transparent;
  border: none;
  padding: 0;
  perspective: 800px;
  cursor: pointer;
  position: relative;
}

.mem-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(.4, .0, .2, 1);
}

.mem-card.face-up .mem-card-inner,
.mem-card.matched .mem-card-inner {
  transform: rotateY(180deg);
}

.mem-card-back,
.mem-card-front {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  text-align: center;
  padding: var(--space-2);
}

.mem-card-back {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  font-size: 2rem;
  font-weight: 900;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.mem-card-front {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  transform: rotateY(180deg);
}

.mem-card.matched .mem-card-front {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--color-success);
}

.mem-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.mem-text {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: keep-all;
}

/* ============================================
   Blackjack
   ============================================ */
.bj-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
  gap: var(--space-3);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(16, 185, 129, 0.25), transparent 70%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(15, 23, 42, 0.6), transparent 70%),
    linear-gradient(180deg, #064e3b 0%, #052e26 50%, #021510 100%);
  border-radius: var(--radius-lg);
  position: relative;
}

.bj-screen::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.bj-status {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.03em;
  padding: var(--space-3) var(--space-4);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  align-self: center;
  margin: 0 auto;
  min-height: 1.8em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bj-status strong {
  color: var(--color-warning);
  font-weight: 900;
}

.bj-status-me {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  font-size: 1.25rem;
  font-weight: 900;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.6);
  animation: bjPulseStatus 1s ease-in-out infinite alternate;
}

@keyframes bjPulseStatus {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

.bj-status-dealer {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  color: #1f2937;
  font-weight: 900;
}

.bj-turn-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1f2937;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  animation: bjBounce 0.7s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes bjBounce {
  from { transform: translateX(-50%) translateY(0); }
  to { transform: translateX(-50%) translateY(-3px); }
}

.bj-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
}

.bj-dealer {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.bj-dealer::before {
  content: 'DEALER';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #facc15, #ca8a04);
  color: #1f2937;
  padding: 2px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.bj-actor-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: var(--space-2);
  flex-wrap: nowrap;
  overflow: hidden;
}

.bj-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bj-val {
  background: var(--color-primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
}

.bj-hand-value {
  display: block;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: rgba(99, 102, 241, 0.2);
  color: var(--color-primary);
  padding: 4px 0;
  border-radius: var(--radius-md);
  margin: var(--space-2) auto;
  width: fit-content;
  min-width: 56px;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
  letter-spacing: 0.05em;
  line-height: 1;
}

.bj-player .bj-hand-value {
  font-size: 1.3rem;
  margin: var(--space-1) auto;
}

.bj-hand-value.is-21 {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.3), rgba(250, 204, 21, 0.18));
  color: #facc15;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.4);
}

.bj-hand-value.is-bust {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.bj-cards {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  min-height: 90px;
  padding: var(--space-2) 0;
}

.bj-cards > .bj-card { margin-left: -16px; }
.bj-cards > .bj-card:first-child { margin-left: 0; }

.bj-cards-sm {
  min-height: 70px;
}

.bj-cards-sm > .bj-card { margin-left: -12px; }

.bj-card {
  width: 60px;
  height: 84px;
  background: linear-gradient(180deg, #ffffff, #f3f4f6);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
  animation: bjDeal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center bottom;
}

.bj-card.sm {
  width: 46px;
  height: 64px;
}

.bj-card.red { color: #dc2626; }
.bj-card.black { color: #0f172a; }

.bj-card-corner {
  position: absolute;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
}

.bj-card-corner.tl {
  top: 4px;
  left: 5px;
}

.bj-card-corner.br {
  bottom: 4px;
  right: 5px;
  transform: rotate(180deg);
}

.bj-corner-val {
  font-size: 0.85rem;
}

.bj-corner-suit {
  font-size: 0.7rem;
  margin-top: 1px;
}

.bj-card.sm .bj-corner-val { font-size: 0.7rem; }
.bj-card.sm .bj-corner-suit { font-size: 0.55rem; }
.bj-card.sm .bj-card-corner.tl { top: 3px; left: 3px; }
.bj-card.sm .bj-card-corner.br { bottom: 3px; right: 3px; }

.bj-card-suit {
  font-size: 1.9rem;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.bj-card.sm .bj-card-suit {
  font-size: 1.3rem;
}

.bj-card.hidden {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #3730a3 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.bj-card-pattern {
  position: absolute;
  inset: 4px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background:
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 3px,
      transparent 3px,
      transparent 8px);
}

@keyframes bjDeal {
  0% { transform: translateY(-40px) scale(0.8) rotate(-10deg); opacity: 0; }
  100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }
}

.bj-empty {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.bj-players {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  position: relative;
  z-index: 1;
}

.bj-player {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.15));
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
}

.bj-player.is-current {
  border-color: var(--color-warning);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.05));
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4), inset 0 0 24px rgba(245, 158, 11, 0.08);
  transform: translateY(-2px);
}

.bj-player.is-current::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, transparent, rgba(245, 158, 11, 0.3), transparent);
  z-index: -1;
  animation: bjGlow 1.6s ease-in-out infinite alternate;
}

@keyframes bjGlow {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.bj-player.is-me {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.05));
}

.bj-player.is-me.is-current {
  border-color: var(--color-primary);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.28), rgba(99, 102, 241, 0.08));
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.5), inset 0 0 24px rgba(99, 102, 241, 0.08);
}

.bj-player.bust {
  opacity: 0.55;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.18), rgba(239, 68, 68, 0.05));
  filter: grayscale(0.4);
}

.bj-player.stand {
  opacity: 0.85;
}

.bj-player-status {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  font-weight: 700;
}

.bj-player.bust .bj-player-status { color: var(--color-danger); }
.bj-player.stand .bj-player-status { color: var(--color-success); }
.bj-player.is-current .bj-player-status { color: var(--color-warning); }

.bj-actions {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(79, 70, 229, 0.95));
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.6), 0 -4px 16px rgba(0, 0, 0, 0.3);
  position: sticky;
  bottom: 8px;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.bj-players.many {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.bj-players.many .bj-player {
  padding: var(--space-2) 4px;
}

.bj-players.many .bj-actor-label {
  font-size: 0.8rem;
  gap: 4px;
}

.bj-players.many .bj-avatar {
  width: 22px;
  height: 22px;
  font-size: 0.7rem;
}

.bj-players.many .bj-hand-value {
  font-size: 1.05rem;
  padding: 2px 8px;
  min-width: 44px;
}

.bj-players.many .bj-card.sm {
  width: 32px;
  height: 46px;
}

.bj-players.many .bj-cards-sm > .bj-card { margin-left: -10px; }

.bj-timer {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-warning);
  font-variant-numeric: tabular-nums;
  padding: 0 var(--space-3);
  min-width: 60px;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  line-height: 1.2;
}

.bj-btn-hit {
  background: linear-gradient(135deg, #10b981, #059669);
}

.bj-btn-stand {
  background: var(--color-surface);
}

/* ============================================
   Anagram game
   ============================================ */
.anagram-tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  direction: ltr;
}

.anagram-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 52px;
  font-size: 1.75rem;
  font-weight: 900;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  color: #1f2937;
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  font-family: 'Heebo', sans-serif;
}

.anagram-input {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  direction: rtl;
  letter-spacing: 0.05em;
}

/* ============================================
   Sequence (number sequence memory)
   ============================================ */
.seq-spacer { width: 56px; }

.seq-memorize-label {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1f2937;
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-weight: 900;
  font-size: 0.95rem;
}

.seq-tiles {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
  margin: var(--space-3) 0;
}

.seq-tile {
  width: 52px;
  height: 72px;
  background: linear-gradient(180deg, #ffffff, #e0e7ff);
  color: #1e293b;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.08);
  animation: bjDeal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.seq-progress {
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-3);
}

.seq-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #facc15, #f59e0b);
  animation: seqShrink linear forwards;
  transform-origin: right center;
}

@keyframes seqShrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* ============================================
   Reaction (green tap)
   ============================================ */
.rxn-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.rxn-screen.red {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
}

.rxn-screen.green {
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: white;
  animation: rxnFlash 0.2s ease;
}

@keyframes rxnFlash {
  0% { transform: scale(0.98); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.rxn-screen.done {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.rxn-title {
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rxn-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.95;
  text-align: center;
}

.rxn-result-good {
  font-size: 4rem;
  font-weight: 900;
  color: var(--color-success);
  text-align: center;
}

.rxn-result-bad {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-danger);
  text-align: center;
}

/* ============================================
   Stroop (color word)
   ============================================ */
.stroop-counter {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-3);
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

.stroop-area {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.stroop-prompt {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  width: 100%;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.stroop-prompt.flash-good {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--color-success);
  transform: scale(1.03);
}

.stroop-prompt.flash-bad {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--color-danger);
  animation: shake 0.3s ease;
}

.stroop-word {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stroop-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  width: 100%;
}

.stroop-btn {
  min-height: 60px;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.25rem;
  font-weight: 900;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

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

/* ============================================
   Categories game
   ============================================ */
.cat-counter {
  background: var(--color-primary);
  color: white;
  font-size: 1rem;
  font-weight: 900;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: center;
}

.cat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cat-prompt {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 900;
  padding: var(--space-3);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.05));
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.cat-input {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.cat-feedback {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 1.3em;
  transition: color 0.15s;
}

.cat-feedback.is-good { color: var(--color-success); }
.cat-feedback.is-bad { color: var(--color-danger); }
.cat-feedback.is-warn { color: var(--color-warning); }

.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  margin-top: var(--space-2);
  padding: var(--space-2);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  min-height: 60px;
}

.cat-chip {
  background: var(--color-success);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  animation: bjDeal 0.25s ease;
}

.cat-list-revealed {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: var(--space-3);
  max-width: 380px;
}

.cat-chip-small {
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

/* ============================================
   Timer game (Stop on time)
   ============================================ */
.timer-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5);
  text-align: center;
}

.timer-emoji {
  font-size: 5rem;
  line-height: 1;
}

.timer-emoji.pulse {
  animation: timerEmojiPulse 1.4s ease-in-out infinite;
}

@keyframes timerEmojiPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.timer-instruction {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.timer-instruction-sm {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.timer-target-big {
  font-size: 5rem;
  font-weight: 900;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 32px rgba(99, 102, 241, 0.5);
  line-height: 1;
  margin: var(--space-2) 0;
}

.timer-go-btn {
  font-size: 1.4rem;
  padding: var(--space-4) var(--space-6);
  margin-top: var(--space-4);
  background: linear-gradient(135deg, #10b981, #059669);
  min-width: 200px;
}

.timer-stop-btn {
  font-size: 1.75rem;
  padding: var(--space-5) var(--space-7);
  margin-top: var(--space-3);
  background: linear-gradient(135deg, #dc2626, #991b1b);
  min-width: 220px;
  box-shadow: 0 0 32px rgba(220, 38, 38, 0.4);
}

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

.timer-result-big {
  font-size: 6rem;
  font-weight: 900;
  color: var(--color-warning);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 32px rgba(245, 158, 11, 0.5);
  line-height: 1;
  animation: revealPop 0.5s cubic-bezier(.34, 1.56, .64, 1);
}

.timer-distance {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-top: var(--space-2);
}

/* ============================================
   Shell game (find the ball)
   ============================================ */
.shell-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-4);
}

.shell-status {
  font-size: 1.2rem;
  font-weight: 700;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-align: center;
  color: var(--color-text);
}

.shell-status.good {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.5);
}

.shell-status.bad {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
}

.shell-stage {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 170px;
  margin: 0 auto;
  /* "table" line */
  background: linear-gradient(180deg, transparent calc(100% - 14px), rgba(0, 0, 0, 0.5) calc(100% - 14px), rgba(0, 0, 0, 0.5) calc(100% - 10px), transparent calc(100% - 10px));
}

.shell-cup {
  position: absolute;
  top: 0;
  left: 0;
  width: 33.333%;
  height: 100%;
  transform: translateX(0);
  transition: transform 0.28s cubic-bezier(0.45, 0, 0.55, 1);
  cursor: default;
}

.shell-cup::before {
  /* the actual cup shape — taller, lower, fully covers the ball */
  content: '';
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 110px;
  background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 50%, #5b21b6 100%);
  border-radius: 36px 36px 6px 6px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4), inset -4px -4px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2; /* covers the ball when at rest */
}

.shell-cup.lifted::before {
  transform: translateX(-50%) translateY(-90px);
}

.shell-cup.clickable {
  cursor: pointer;
}

.shell-cup.clickable:hover::before {
  filter: brightness(1.2);
}

.shell-ball {
  position: absolute;
  bottom: 16px; /* a tad above table line */
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  background: radial-gradient(circle at 35% 30%, #fef08a, #facc15 40%, #ca8a04);
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), inset -3px -3px 0 rgba(0, 0, 0, 0.15);
  z-index: 1; /* behind cup ::before so it's hidden when cup is down */
  transition: opacity 0.25s;
}

.shell-ball.hidden {
  opacity: 0;
}

/* ============================================
   Simon game (color sequence)
   ============================================ */
.simon-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4);
}

.simon-status {
  font-size: 1.15rem;
  font-weight: 700;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-align: center;
  color: var(--color-text);
  min-height: 1.8em;
}

.simon-status.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.5);
}

.simon-status.good {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-weight: 900;
}

.simon-status.bad {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  font-weight: 900;
}

.simon-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}

.simon-row {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
}

.simon-color {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: default;
  filter: brightness(0.55) saturate(0.9);
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset -4px -4px 0 rgba(0, 0, 0, 0.2);
}

.simon-color.active {
  filter: brightness(1.4) saturate(1.3);
  transform: scale(1.18);
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.simon-color.clickable {
  cursor: pointer;
  filter: brightness(0.8) saturate(1);
}

.simon-color.clickable:hover {
  filter: brightness(1.1) saturate(1.1);
}

.simon-color.clickable:active {
  transform: scale(0.94);
}

.simon-progress {
  display: flex;
  gap: 8px;
  margin-top: var(--space-3);
}

.simon-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.2s, transform 0.2s;
}

.simon-dot.done {
  background: var(--color-success);
}

.simon-dot.next {
  background: var(--color-warning);
  animation: simonDotPulse 0.8s ease-in-out infinite;
}

@keyframes simonDotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

/* ============================================
   SeqTap (numbers scattered, click in order)
   ============================================ */
.seqtap-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3);
  gap: var(--space-3);
}

.seqtap-status {
  font-size: 1.1rem;
  font-weight: 700;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-align: center;
}

.seqtap-status strong {
  font-size: 1.4rem;
  color: var(--color-warning);
  margin: 0 4px;
}

.seqtap-status.good {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-weight: 900;
}

.seqtap-status.bad {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  font-weight: 900;
}

.seqtap-board {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.seqtap-digit {
  position: absolute;
  width: 14%;
  aspect-ratio: 1;
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  color: white;
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.15s, background 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.seqtap-digit:active {
  transform: scale(0.9);
}

.seqtap-digit.done {
  background: linear-gradient(180deg, #10b981, #059669);
  opacity: 0.35;
  pointer-events: none;
  transform: scale(0.8);
}

.seqtap-digit.wrong {
  animation: seqtapShake 0.35s ease;
  background: linear-gradient(180deg, #ef4444, #b91c1c);
}

@keyframes seqtapShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.seqtap-stats {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ============================================
   Jar game (estimate count)
   ============================================ */
.jar-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3);
}

.jar-status {
  font-size: 1.15rem;
  font-weight: 700;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-align: center;
}

.jar-status.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.4);
}

.jar-container {
  position: relative;
  width: 100%;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.05);
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.jar-container.shape-round {
  aspect-ratio: 1;
  border-radius: 50%;
}

.jar-container.shape-tall {
  aspect-ratio: 0.7;
  border-radius: 16px 16px 24px 24px;
}

.jar-container.shape-wide {
  aspect-ratio: 1.4;
  border-radius: 24px;
}

.jar-container.shape-square {
  aspect-ratio: 1;
  border-radius: 12px;
}

.jar-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.jar-item {
  position: absolute;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.jar-progress-bar {
  width: 100%;
  max-width: 280px;
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.jar-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #dc2626);
  width: 100%;
  transform-origin: right center;
  animation: jarShrink linear forwards;
}

@keyframes jarShrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

.jar-input-wrap {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.jar-input {
  font-size: 2.25rem;
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.jar-hint {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ============================================
   Balloon game
   ============================================ */
.balloon-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4);
  gap: var(--space-3);
}

.balloon-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 360px;
  font-weight: 700;
  color: var(--color-text);
}

.balloon-counter {
  font-size: 1.1rem;
}

.balloon-time {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.balloon-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
}

.balloon-shape {
  position: relative;
  width: 140px;
  height: 180px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center bottom;
}

.balloon-body {
  position: absolute;
  inset: 0 0 22px 0;
  background: radial-gradient(circle at 35% 30%, #fda4af 0%, #f43f5e 55%, #be123c 100%);
  border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%;
  box-shadow:
    inset -8px -10px 24px rgba(0, 0, 0, 0.25),
    0 6px 14px rgba(244, 63, 94, 0.35);
}

.balloon-knot {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 12px;
  background: #be123c;
  clip-path: polygon(0 0, 100% 0, 70% 100%, 30% 100%);
}

.balloon-string {
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: 2px;
  height: 30px;
  background: rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
}

.balloon-pulse {
  animation: balloon-bounce 0.22s ease;
}

@keyframes balloon-bounce {
  0% { transform: scale(var(--scale, 1)); }
  50% { transform: scale(calc(var(--scale, 1) * 1.06)); }
  100% { transform: scale(var(--scale, 1)); }
}

.balloon-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  max-width: 360px;
}

.balloon-pump-btn {
  font-size: 1.5rem;
  padding: var(--space-4);
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  box-shadow: 0 8px 22px rgba(244, 63, 94, 0.4);
}

.balloon-pump-btn:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
}

.balloon-stop-btn {
  font-size: 1.05rem;
}

.balloon-pop {
  font-size: 7rem;
  animation: balloon-pop-anim 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes balloon-pop-anim {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.balloon-pop-label {
  font-size: 1.5rem;
  font-weight: 900;
  color: #f43f5e;
}

.balloon-pop-sub {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.balloon-result-line {
  font-size: 1.2rem;
  color: var(--color-text);
}

.balloon-result-line strong {
  color: #f43f5e;
  font-size: 1.5rem;
}

.balloon-result-sub {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ============================================
   Fish game (דייג מהיר)
   ============================================ */
.fish-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
  gap: var(--space-3);
  user-select: none;
  -webkit-user-select: none;
}

.fish-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-2);
  font-weight: 800;
}

.fish-score {
  font-size: 1.3rem;
  color: #fbbf24;
}

.fish-time {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.fish-tank {
  flex: 1;
  position: relative;
  background: linear-gradient(180deg, #1e3a5f 0%, #0c1e3a 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 360px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

/* גלים עדינים ברקע */
.fish-tank::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 30% at 30% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 25% at 70% 70%, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.fish-obj {
  position: absolute;
  font-size: 2.6rem;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.18s, transform 0.12s;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

.fish-obj:active {
  transform: scale(1.25);
}

/* ימין→שמאל (משוחה מימין החוצה דרך המסך לשמאל) */
.fish-obj.fish-dir-rtl {
  right: -80px;
  animation: fish-swim-rtl var(--swim-dur, 2000ms) linear forwards;
}

/* שמאל→ימין */
.fish-obj.fish-dir-ltr {
  left: -80px;
  animation: fish-swim-ltr var(--swim-dur, 2000ms) linear forwards;
  /* היפוך אופקי כך שגם הדג ייראה כאילו פונה ימינה */
  transform: scaleX(-1);
}

.fish-obj.fish-dir-ltr:active {
  transform: scaleX(-1) scale(1.25);
}

@keyframes fish-swim-rtl {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--swim-distance, 100vw))); }
}

@keyframes fish-swim-ltr {
  from { transform: scaleX(-1) translateX(0); }
  to   { transform: scaleX(-1) translateX(calc(-1 * var(--swim-distance, 100vw))); }
}

.fish-obj.caught {
  animation-play-state: paused;
  filter: drop-shadow(0 0 12px #fbbf24);
}

.fish-obj.mistaken {
  animation-play-state: paused;
  filter: drop-shadow(0 0 10px #ef4444);
}

.fish-float {
  position: absolute;
  pointer-events: none;
  font-weight: 900;
  font-size: 1.3rem;
  transform: translate(-50%, -50%);
  animation: fish-float-rise 0.7s ease-out forwards;
  z-index: 3;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.fish-float.plus { color: #fbbf24; }
.fish-float.minus { color: #ef4444; }

@keyframes fish-float-rise {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(1.3); }
}

/* ============================================
   Rhythm game (קצב חוזר)
   ============================================ */
.rhythm-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  gap: var(--space-4);
  user-select: none;
}

.rhythm-label {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-text);
  text-align: center;
}

.rhythm-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
}

.rhythm-pulse {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18);
  opacity: 0.45;
  transition: opacity 0.18s, transform 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.rhythm-pulse-num {
  font-size: 4rem;
  font-weight: 900;
  color: white;
  opacity: 0;
  transition: opacity 0.18s;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.rhythm-burst {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.6) 0%, rgba(167, 139, 250, 0) 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.rhythm-pulse-anim {
  animation: rhythm-pulse-burst 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rhythm-pulse-anim .rhythm-pulse-num {
  animation: rhythm-num-flash 0.45s ease-out;
}

.rhythm-burst-anim {
  animation: rhythm-burst-out 0.55s ease-out;
}

@keyframes rhythm-pulse-burst {
  0% {
    transform: scale(1);
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    opacity: 1;
  }
  40% {
    transform: scale(1.35);
    background: linear-gradient(135deg, #c4b5fd 0%, #8b5cf6 100%);
    opacity: 1;
    box-shadow: 0 0 50px 18px rgba(167, 139, 250, 0.6);
  }
  100% {
    transform: scale(1);
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    opacity: 0.45;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18);
  }
}

@keyframes rhythm-num-flash {
  0% { opacity: 0; transform: scale(0.6); }
  40% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.2); }
}

@keyframes rhythm-burst-out {
  0% { opacity: 0.9; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(2.5); }
}

.rhythm-counter {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.rhythm-tap-area {
  flex: 1;
  width: 100%;
  min-height: 320px;
  border: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: white;
  cursor: pointer;
  transition: transform 0.08s;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.25);
}

.rhythm-tap-area:active {
  transform: scale(0.98);
}

.rhythm-tap-flash {
  animation: rhythm-tap-flash 0.18s ease;
}

@keyframes rhythm-tap-flash {
  0% { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); }
  50% { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }
  100% { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); }
}

.rhythm-tap-emoji {
  font-size: 5rem;
}

.rhythm-tap-counter {
  font-size: 1.5rem;
  font-weight: 800;
}

/* ============================================
   Slice game (חיתוך מדויק)
   ============================================ */
.slice-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
  gap: var(--space-4);
  user-select: none;
  -webkit-user-select: none;
}

.slice-stage {
  position: relative;
  flex: 1;
  min-height: 360px;
  background: linear-gradient(180deg, #14532d 0%, #052e16 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.slice-fruit {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 9rem;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
  z-index: 1;
}

/* סימון עדין של המרכז האמיתי — קו דק כמעט שקוף */
.slice-center {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-left: 1px dashed rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.slice-line {
  position: absolute;
  top: 0;
  width: 4px;
  height: 100%;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
}

.slice-main {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow:
    0 0 14px rgba(251, 191, 36, 0.7),
    0 0 30px rgba(251, 191, 36, 0.35);
}

.slice-shadow {
  background: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
  z-index: 3;
  opacity: 0.55;
}

.slice-locked {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  box-shadow:
    0 0 18px rgba(239, 68, 68, 0.8),
    0 0 36px rgba(239, 68, 68, 0.4);
}

.slice-cut-mark {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(239, 68, 68, 0.7);
  transform: translateX(-50%);
  z-index: 3;
  animation: slice-mark-glow 0.4s ease;
}

@keyframes slice-mark-glow {
  0% { opacity: 0; box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  100% { opacity: 1; box-shadow: 0 0 20px rgba(239, 68, 68, 0.7); }
}

.slice-cut-btn {
  font-size: 1.4rem;
  padding: var(--space-4);
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  box-shadow: 0 8px 22px rgba(244, 63, 94, 0.4);
}

.slice-cut-btn:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
}


/* ============================================
   Dice game (קוביית הסיכון)
   ============================================ */
.dice-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4);
  gap: var(--space-3);
  user-select: none;
}

.dice-rules {
  display: flex;
  gap: var(--space-3);
  font-size: 0.95rem;
  font-weight: 800;
}

.dice-rules .ok { color: #10b981; }
.dice-rules .bad { color: #ef4444; }

.dice-sum-wrap {
  text-align: center;
}

.dice-sum-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.dice-sum {
  font-size: 3.5rem;
  font-weight: 900;
  color: #fbbf24;
  transition: color 0.2s;
}

.dice-sum.busted {
  color: #ef4444;
  text-decoration: line-through;
}

.dice-rolls {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.dice-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.dice-cube {
  font-size: 9rem;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  transition: transform 0.18s;
}

.dice-cube.rolling {
  animation: dice-shake 0.12s linear infinite;
}

.dice-cube.busted {
  animation: dice-bust 0.5s ease-out forwards;
  color: #ef4444;
  filter: drop-shadow(0 0 18px rgba(239, 68, 68, 0.7));
}

@keyframes dice-shake {
  0% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-4px); }
  100% { transform: rotate(-8deg) translateY(0); }
}

@keyframes dice-bust {
  0% { transform: scale(1); }
  40% { transform: scale(1.3) rotate(15deg); }
  100% { transform: scale(1) rotate(0); }
}

.dice-final {
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-top: var(--space-2);
}

.dice-final.is-bust {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.dice-final.is-stop {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.dice-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  max-width: 360px;
}

.dice-roll-btn {
  font-size: 1.3rem;
  padding: var(--space-4);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.4);
}

.dice-roll-btn:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.dice-stop-btn {
  font-size: 1.1rem;
}

/* ============================================
   Equation game (משוואה חסרה)
   ============================================ */
.eq-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
  gap: var(--space-4);
  user-select: none;
}

.eq-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.eq-progress {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.eq-time {
  font-size: 1.1rem;
  color: #fbbf24;
  font-weight: 800;
}

.eq-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-text);
  padding: var(--space-4);
  background: rgba(148, 163, 184, 0.05);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(148, 163, 184, 0.15);
  min-height: 180px;
  transition: background 0.2s, border-color 0.2s;
}

.eq-display.is-correct {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
  animation: eq-pulse 0.4s ease;
}

.eq-display.is-wrong {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.5);
  animation: eq-shake 0.35s ease;
}

@keyframes eq-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes eq-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.eq-eq { color: var(--color-text-muted); }
.eq-result { color: #fbbf24; }

.eq-slot {
  min-width: 56px;
  min-height: 56px;
  border-radius: var(--radius-md);
  background: rgba(148, 163, 184, 0.12);
  border: 2px dashed rgba(148, 163, 184, 0.4);
  color: var(--color-text);
  font-size: 2rem;
  font-weight: 900;
  cursor: pointer;
  padding: 4px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.eq-slot.is-active {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.7);
  border-style: solid;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.eq-ops {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
}

.eq-op-btn {
  background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.8rem;
  font-weight: 900;
  padding: var(--space-3);
  cursor: pointer;
  transition: transform 0.08s, background 0.18s;
  min-height: 60px;
}

.eq-op-btn:hover {
  background: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
}

.eq-op-btn:active {
  transform: scale(0.94);
}

.eq-op-btn.eq-skip {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.3);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ============================================
   High/Low game (גדול או קטן)
   ============================================ */
.hl-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3);
  gap: var(--space-3);
  user-select: none;
}

.hl-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-weight: 700;
}

.hl-streak-info {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.hl-time {
  font-size: 1.05rem;
  color: #fbbf24;
  font-weight: 800;
}

.hl-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: var(--space-2) 0;
}

.hl-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.25s;
}

.hl-dot.is-filled {
  background: #fbbf24;
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}

.hl-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: 240px;
  position: relative;
}

.hl-card {
  font-size: 6rem;
  font-weight: 900;
  width: 140px;
  height: 200px;
  background: linear-gradient(135deg, #ffffff 0%, #e5e7eb 100%);
  color: #111827;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.hl-next {
  font-size: 5rem;
  font-weight: 900;
  width: 120px;
  height: 170px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  animation: hl-card-flip 0.4s ease;
}

.hl-next.is-right {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: 3px solid #34d399;
}

.hl-next.is-wrong {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: white;
  border: 3px solid #fca5a5;
}

@keyframes hl-card-flip {
  from { opacity: 0; transform: rotateY(90deg) scale(0.85); }
  to   { opacity: 1; transform: rotateY(0deg) scale(1); }
}

.hl-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  width: 100%;
  max-width: 360px;
}

.hl-btn {
  font-size: 1.3rem;
  padding: var(--space-4);
  font-weight: 800;
}

.hl-higher {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.hl-higher:hover {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

.hl-lower {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.4);
}

.hl-lower:hover {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
}

/* ============================================
   Zpoto ad — שפת מותג: ציאן → כחול → סגול
   ============================================ */
:root {
  --zpoto-cyan: #72D4F8;
  --zpoto-blue: #7B8CF8;
  --zpoto-purple: #B478F0;
  --zpoto-gradient: linear-gradient(135deg, var(--zpoto-cyan) 0%, var(--zpoto-blue) 50%, var(--zpoto-purple) 100%);
}

.zpoto-ad {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--zpoto-gradient);
  color: white;
  border-radius: 18px;
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  font-family: 'Heebo', system-ui, -apple-system, sans-serif;
  box-shadow:
    0 10px 28px rgba(123, 140, 248, 0.4),
    0 2px 6px rgba(180, 120, 240, 0.3);
  transition: transform 0.18s ease, box-shadow 0.25s ease;
  overflow: hidden;
  isolation: isolate;
  flex-shrink: 0;
}

.zpoto-ad::before {
  content: '';
  position: absolute;
  inset-inline-start: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, transparent 65%);
  z-index: 0;
  pointer-events: none;
}

.zpoto-ad:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 34px rgba(123, 140, 248, 0.55),
    0 4px 10px rgba(180, 120, 240, 0.4);
}

.zpoto-ad-logo {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zpoto-ad-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}

.zpoto-ad-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: start;
  line-height: 1.25;
}

.zpoto-ad-headline {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.zpoto-ad-punch {
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.2px;
  margin-top: 3px;
}

.zpoto-ad-sub {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 6px;
}

.zpoto-ad-cta {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

/* Mini variant — quiet but visible; gradient border on dark interior */
.zpoto-ad.mini {
  background:
    linear-gradient(rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92)) padding-box,
    var(--zpoto-gradient) border-box;
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 8px 12px;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(123, 140, 248, 0.18);
}

.zpoto-ad.mini::before {
  display: none;
}

.zpoto-ad.mini:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(123, 140, 248, 0.28);
}

.zpoto-ad.mini .zpoto-ad-logo {
  width: 32px;
  height: 32px;
}

.zpoto-ad.mini .zpoto-ad-logo img {
  filter: none;
}

.zpoto-ad.mini .zpoto-ad-punch {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0;
  background: var(--zpoto-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.zpoto-ad.mini .zpoto-ad-cta {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 11px;
  background: rgba(123, 140, 248, 0.12);
  border: 1px solid rgba(180, 120, 240, 0.35);
  color: #c4b5fd;
  backdrop-filter: none;
}

/* Large variant — for results screen */
.zpoto-ad.large {
  flex-direction: column;
  text-align: center;
  padding: var(--space-4) var(--space-4);
  gap: var(--space-2);
  margin-top: var(--space-4);
  border-radius: 22px;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}

.zpoto-ad.large::before {
  inset-inline-start: 50%;
  top: 40px;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
}

.zpoto-ad.large .zpoto-ad-logo {
  width: 72px;
  height: 72px;
}

.zpoto-ad.large .zpoto-ad-copy {
  text-align: center;
}

.zpoto-ad.large .zpoto-ad-headline {
  font-size: 1rem;
  font-weight: 600;
}

.zpoto-ad.large .zpoto-ad-punch {
  font-size: 1.4rem;
  margin-top: 4px;
  letter-spacing: -0.3px;
}

.zpoto-ad.large .zpoto-ad-sub {
  font-size: 0.9rem;
  margin-top: 8px;
}

.zpoto-ad.large .zpoto-ad-cta {
  margin-top: var(--space-2);
  font-size: 1rem;
  padding: 10px 22px;
}

/* ============================================
   Inter-game leaderboard (5 sec)
   ============================================ */
.leaderboard-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  gap: var(--space-4);
}

.lb-progress {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lb-title {
  font-size: 1.75rem;
  font-weight: 900;
  text-align: center;
}

.lb-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-3);
  margin: var(--space-3) 0;
  width: 100%;
  max-width: 400px;
}

.lb-spot {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
}

.lb-h1 { background: linear-gradient(135deg, rgba(250,204,21,0.18), rgba(99,102,241,0.08)); border-color: rgba(250,204,21,0.5); padding-top: var(--space-5); padding-bottom: var(--space-5); }
.lb-h2 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.lb-h3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }

.lb-spot.is-me {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.18);
}

.lb-medal {
  font-size: 2rem;
  line-height: 1;
}

.lb-name {
  font-size: 0.95rem;
  font-weight: 700;
  word-break: break-word;
}

.lb-score {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.lb-self {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.lb-countdown {
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  margin-top: var(--space-3);
}

/* ============================================
   Final results — podium
   ============================================ */
.results-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-5);
  gap: var(--space-4);
  overflow-y: auto;
}

.results-header {
  text-align: center;
}

.results-emoji {
  font-size: 4rem;
  animation: bounce 1.2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.results-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin: var(--space-2) 0 var(--space-1);
}

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 420px;
  margin: var(--space-4) 0;
}

.podium-spot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.podium-medal { font-size: 2.5rem; line-height: 1; margin-bottom: var(--space-2); }
.podium-name { font-size: 0.95rem; font-weight: 700; word-break: break-word; min-height: 2.4em; }
.podium-score { font-size: 1.75rem; font-weight: 900; color: var(--color-primary); font-variant-numeric: tabular-nums; margin-bottom: var(--space-2); }

.podium-platform {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: white;
  font-weight: 900;
  font-size: 1.5rem;
}

.podium-pos-1 .podium-platform { background: linear-gradient(180deg, #facc15, #ca8a04); height: 120px; box-shadow: 0 0 32px rgba(250, 204, 21, 0.4); }
.podium-pos-2 .podium-platform { background: linear-gradient(180deg, #cbd5e1, #94a3b8); height: 90px; }
.podium-pos-3 .podium-platform { background: linear-gradient(180deg, #fb923c, #c2410c); height: 70px; }

.podium-spot.is-me .podium-name {
  color: var(--color-primary);
}

.results-list {
  list-style: none;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.results-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.results-row.is-me {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
}

.results-rank {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

.results-name {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.results-score {
  font-weight: 900;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.results-self {
  padding: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  text-align: center;
  width: 100%;
  max-width: 420px;
}

.results-actions {
  width: 100%;
  max-width: 420px;
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.results-waiting {
  text-align: center;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: 500;
}
