:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 28%),
              radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.18), transparent 30%),
              linear-gradient(180deg, #020617 0%, #111827 100%);
  color: #e5e7eb;
}

.input-glass {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  padding: 0.95rem 1rem;
  transition: border-color 200ms ease, transform 200ms ease;
}

.input-glass:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.85);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
  transform: translateY(-1px);
}

.range-glass {
  width: 100%;
}

.switch-label {
  align-items: center;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.75);
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}

.switch-label:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

.switch-label input {
  accent-color: #818cf8;
}

.btn-primary,
.btn-secondary {
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(34, 211, 238, 0.95));
  color: #0f172a;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e2e8f0;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

#leaderboard li {
  padding: 0.9rem 1rem;
  border-radius: 1.25rem;
  background: rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#leaderboard li span:last-child {
  font-weight: 700;
}

#confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  will-change: transform, opacity;
}

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

@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 0px rgba(99, 102, 241, 0.35); }
  50% { box-shadow: 0 0 24px rgba(99, 102, 241, 0.18); }
}

.ghost-card {
  animation: pulseGlow 4s ease-in-out infinite;
}

@media (max-width: 768px) {
  .input-glass,
  .switch-label,
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}
