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

body {
  background: #0a0e1a;
  overflow-x: hidden;
}

.bg-grid {
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.glow-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--accent, #6366f1) 50%, transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}

.glow-card:hover::before {
  opacity: 1;
}

.glow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.2);
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4)); }
  50% { filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8)); }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.float-in {
  animation: float-in 0.5s ease-out forwards;
  opacity: 0;
}

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

.confetti-piece {
  position: fixed;
  top: 0;
  z-index: 9999;
  pointer-events: none;
}

@keyframes score-pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.score-pop {
  animation: score-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

@keyframes ring-fill {
  from { stroke-dashoffset: var(--circumference); }
  to { stroke-dashoffset: var(--offset); }
}

.ring-animated {
  animation: ring-fill 1.5s ease-out forwards;
}

.color-tile {
  cursor: pointer;
  transition: transform 0.15s;
  border-radius: 6px;
}

.color-tile:hover {
  transform: scale(1.08);
}

.memory-tile {
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 10px;
}

.memory-tile:hover {
  transform: scale(1.05);
}

.estimation-line {
  stroke-linecap: round;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0e1a;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 3px;
}