/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --color-a: #3498db;
  --color-b: #2ecc71;
  --color-c: #e67e22;
  --color-d: #9b59b6;
  --color-a-dark: #2980b9;
  --color-b-dark: #27ae60;
  --color-c-dark: #d35400;
  --color-d-dark: #8e44ad;

  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-panel: #16213e;
  --bg-highlight: #1e2a4a;

  --text-primary: #eaeaea;
  --text-muted: #7a8a9e;
  --text-dim: #4a5568;

  --timer-green: #2ecc71;
  --timer-yellow: #f1c40f;
  --timer-red: #e74c3c;

  --accent: #e94560;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);

  --font: 'Nunito', system-ui, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Phase system ───────────────────────────────────────────────────────── */
.phase { display: none; width: 100%; }
.phase.active { display: flex; flex-direction: column; }

/* ── Overlay ────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  max-width: 420px;
}
.overlay-icon { font-size: 3rem; margin-bottom: 16px; }
.overlay-card h2 { font-size: 1.6rem; margin-bottom: 12px; }
.overlay-card p { color: var(--text-muted); font-size: 1rem; }

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  0%   { transform: scale(0.85); opacity: 0; }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
}
@keyframes celebrate {
  0%   { transform: scale(1) rotate(0deg); }
  25%  { transform: scale(1.15) rotate(-3deg); }
  50%  { transform: scale(1.2) rotate(3deg); }
  75%  { transform: scale(1.1) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
  50%       { box-shadow: 0 0 50px rgba(255, 215, 0, 0.9); }
}
@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.anim-fade-in  { animation: fadeIn 0.35s ease both; }
.anim-pop-in   { animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
.anim-slide-up { animation: slideUp 0.5s ease both; }
