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

:root {
  --bg-dark: #06060c;
  --bg-panel: #0c0c18;
  --bg-panel-light: #12122a;
  --neon-green: #39ff14;
  --cherenkov-blue: #0ef0fc;
  --warning-amber: #ff9f1c;
  --danger-red: #ff2020;
  --text-dim: #5a5a7a;
  --text-mid: #9090b0;
  --text-light: #d0d0e8;
}

body {
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: 'IBM Plex Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Radiation particles */
@keyframes floatParticle {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-10vh) translateX(40px); opacity: 0; }
}

.radiation-particle {
  position: fixed;
  width: 2px;
  height: 2px;
  background: var(--neon-green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: floatParticle linear infinite;
  box-shadow: 0 0 4px var(--neon-green);
}

/* Core glow */
@keyframes coreGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(14, 240, 252, 0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(14, 240, 252, 0.7)); }
}

@keyframes corePulseIntense {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(14, 240, 252, 0.5)) drop-shadow(0 0 40px rgba(57, 255, 20, 0.3)); }
  50% { filter: drop-shadow(0 0 40px rgba(14, 240, 252, 0.9)) drop-shadow(0 0 80px rgba(57, 255, 20, 0.6)); }
}

@keyframes corePulseCritical {
  0%, 100% { filter: drop-shadow(0 0 25px rgba(255, 32, 32, 0.6)) drop-shadow(0 0 60px rgba(14, 240, 252, 0.8)); }
  50% { filter: drop-shadow(0 0 60px rgba(255, 32, 32, 0.9)) drop-shadow(0 0 100px rgba(14, 240, 252, 1)); }
}

.core-normal { animation: coreGlow 3s ease-in-out infinite; }
.core-intense { animation: corePulseIntense 1.5s ease-in-out infinite; }
.core-critical { animation: corePulseCritical 0.5s ease-in-out infinite; }

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

.screen-shake {
  animation: shake 0.5s ease-in-out;
}

/* Blue flash */
@keyframes blueFlash {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

.blue-flash-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(14,240,252,0.9) 0%, rgba(57,255,20,0.4) 50%, transparent 80%);
  z-index: 1000;
  pointer-events: none;
  animation: blueFlash 1.5s ease-out forwards;
}

.white-flash-overlay {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 1001;
  pointer-events: none;
  animation: blueFlash 2s ease-out forwards;
}

/* Typewriter log */
.log-entry {
  font-family: 'Special Elite', cursive;
  border-left: 2px solid var(--neon-green);
  padding-left: 8px;
  margin-bottom: 4px;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Screwdriver slider */
input[type="range"].screwdriver-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  background: linear-gradient(90deg, #1a1a3a 0%, var(--cherenkov-blue) 50%, var(--danger-red) 100%);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

input[type="range"].screwdriver-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c0c0d0, #808090);
  border: 2px solid var(--cherenkov-blue);
  box-shadow: 0 0 10px rgba(14,240,252,0.5);
  cursor: grab;
}

input[type="range"].screwdriver-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c0c0d0, #808090);
  border: 2px solid var(--cherenkov-blue);
  box-shadow: 0 0 10px rgba(14,240,252,0.5);
  cursor: grab;
}

/* Skill tree node */
.skill-node {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  border: 2px solid transparent;
}

.skill-node.locked {
  background: #1a1a2e;
  border-color: #2a2a4e;
  opacity: 0.4;
  cursor: not-allowed;
}

.skill-node.available {
  background: #1a1a3e;
  border-color: var(--cherenkov-blue);
  animation: coreGlow 2s ease-in-out infinite;
}

.skill-node.purchased {
  background: linear-gradient(135deg, #1a3a2e, #0a2a1e);
  border-color: var(--neon-green);
  box-shadow: 0 0 15px rgba(57,255,20,0.4);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #2a2a4e; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a6e; }

/* Dragon button */
@keyframes dragonPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255,159,28,0.3), inset 0 0 10px rgba(255,159,28,0.1); }
  50% { box-shadow: 0 0 30px rgba(255,159,28,0.6), inset 0 0 20px rgba(255,159,28,0.2); }
}

.dragon-btn {
  animation: dragonPulse 2s ease-in-out infinite;
}

.dragon-btn:hover {
  animation: dragonPulse 0.5s ease-in-out infinite;
}

/* Radiation meter */
@keyframes meterFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.meter-segment.active {
  animation: meterFlicker 0.5s ease-in-out infinite;
}

/* Title glow */
@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(57,255,20,0.4), 0 0 20px rgba(57,255,20,0.2); }
  50% { text-shadow: 0 0 20px rgba(57,255,20,0.7), 0 0 40px rgba(57,255,20,0.4), 0 0 60px rgba(57,255,20,0.2); }
}

.title-glow {
  animation: titleGlow 3s ease-in-out infinite;
}

/* Tooltip */
.skill-tooltip {
  position: absolute;
  background: #0c0c20;
  border: 1px solid var(--cherenkov-blue);
  border-radius: 8px;
  padding: 12px;
  width: 220px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(14,240,252,0.2);
}

/* Memorial wall */
.memorial-entry {
  border-bottom: 1px solid #1a1a3e;
  padding: 6px 0;
}

/* Death report modal */
.death-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.death-modal {
  background: #0c0c18;
  border: 2px solid var(--danger-red);
  border-radius: 8px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  font-family: 'Special Elite', cursive;
  box-shadow: 0 0 40px rgba(255,32,32,0.3);
}