@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: #334155;
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --cyan: #06B6D4;
  --cyan-light: #22D3EE;
  --orange: #F59E0B;
  --orange-light: #FBBF24;
  --red: #EF4444;
  --green: #10B981;
  --pink: #EC4899;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

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

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

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.3); }
  50% { box-shadow: 0 0 40px rgba(124, 58, 237, 0.6); }
}

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

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

@keyframes countdownPulse {
  0% { transform: scale(1); color: var(--text-primary); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes timerBar {
  from { width: 100%; }
  to { width: 0%; }
}

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

@keyframes glowText {
  0%, 100% { text-shadow: 0 0 10px rgba(124, 58, 237, 0.5); }
  50% { text-shadow: 0 0 30px rgba(124, 58, 237, 0.8), 0 0 60px rgba(124, 58, 237, 0.4); }
}

/* Utility */
.hidden { display: none !important; }

.btn {
  padding: 16px 32px;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--purple), #9333EA);
  color: white;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(124, 58, 237, 0.6);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--bg-card);
}

.btn-secondary:hover {
  border-color: var(--purple);
}

.btn-start {
  background: linear-gradient(135deg, var(--green), #059669);
  color: white;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  font-size: 22px;
  padding: 20px 48px;
}

.btn-start:hover {
  box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 20px;
  top: -20px;
  animation: confetti-fall linear forwards;
  z-index: 9999;
  pointer-events: none;
}

/* Category badges */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

/* Toast notifications */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 10000;
  animation: fadeInScale 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 3px;
}
