:root {
  --color-green: #22c55e;
  --color-yellow: #eab308;
  --color-red: #ef4444;
  --color-violet: #8b5cf6;
  --color-teal: #14b8a6;
}

* {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.dark .glass-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.5);
}

.simulator-card {
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--color-violet), var(--color-teal)) border-box;
  border: 3px solid transparent;
}

.dark .simulator-card {
  background: linear-gradient(rgb(30, 41, 59), rgb(30, 41, 59)) padding-box,
              linear-gradient(135deg, var(--color-violet), var(--color-teal)) border-box;
}

.drop-zone {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}

.drop-zone.dragging {
  transform: scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.3);
}

.drop-zone.dragging::before {
  animation: none;
}

.drop-zone.invalid {
  animation: shake 0.5s ease;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

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

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

.animate-slide-up {
  animation: slide-up 0.3s ease;
}

/* Confetti */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall 3s ease-out forwards;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .drop-zone {
    padding: 2rem 1rem;
  }
  
  .simulator-card {
    padding: 1.5rem;
  }
}

/* Chart container responsive */
canvas {
  max-width: 100%;
}

/* Focus states */
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-violet);
  outline-offset: 2px;
}

/* Loading skeleton animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.skeleton {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
}

/* Number styling */
.font-mono {
  font-family: 'IBM Plex Mono', monospace;
}

/* Dark mode transitions */
.dark {
  color-scheme: dark;
}

/* Print styles */
@media print {
  .glass-card {
    background: white !important;
    box-shadow: none !important;
  }
  
  header, footer, button {
    display: none !important;
  }
}