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

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background-color: #0a0f1a;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(147, 51, 234, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #0a0f1a 0%, #0f172a 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Monospace for numbers */
.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

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

::-webkit-scrollbar-track {
  background: #1e293b;
}

::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Sector slider styling */
.sector-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: #334155;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.sector-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--slider-color, #9945FF);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--slider-color, #9945FF);
  transition: transform 0.2s;
}

.sector-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.sector-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--slider-color, #9945FF);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px var(--slider-color, #9945FF);
}

/* Value pulse animation */
.value-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Shake animation for warnings */
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Sector card hover effect */
.sector-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sector-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Donut chart animation */
.donut-slice {
  transition: all 0.5s ease;
}

.donut-chart:hover .donut-slice {
  filter: brightness(1.2);
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  top: -20px;
  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;
  }
}

/* Input focus styles */
input:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.3);
}

/* Button hover effects */
button {
  transition: all 0.2s ease;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .sector-card {
    padding: 1rem;
  }
  
  .sector-slider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }
}

/* Gradient text */
.bg-gradient-to-r {
  -webkit-background-clip: text;
  background-clip: text;
}

/* Table styles */
table {
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem;
}

/* Grid pattern background for header */
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(148, 69, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 69, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}