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

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #111;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.scanlines {
  pointer-events: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  z-index: 10;
}

.crt-vignette {
  pointer-events: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.6) 100%);
  z-index: 11;
}

.crt-glow {
  box-shadow: inset 0 0 60px rgba(0, 255, 0, 0.03), 0 0 20px rgba(0, 255, 0, 0.05);
}

.crt-glow-amber {
  box-shadow: inset 0 0 60px rgba(255, 176, 0, 0.03), 0 0 20px rgba(255, 176, 0, 0.05);
}

.text-glow-green {
  text-shadow: 0 0 5px rgba(51, 255, 51, 0.5), 0 0 10px rgba(51, 255, 51, 0.2);
}

.text-glow-amber {
  text-shadow: 0 0 5px rgba(255, 176, 0, 0.5), 0 0 10px rgba(255, 176, 0, 0.2);
}

.text-glow-cyan {
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

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

.cursor-blink {
  animation: blink 0.5s step-end infinite;
}

@keyframes warmup {
  0% { opacity: 0; filter: brightness(0); }
  30% { opacity: 0.3; filter: brightness(0.5); }
  100% { opacity: 1; filter: brightness(1); }
}

.warmup-anim {
  animation: warmup 2s ease-out forwards;
}

@keyframes flash-changed {
  0% { background: rgba(0, 255, 255, 0.4); }
  100% { background: transparent; }
}

.reg-flash {
  animation: flash-changed 0.6s ease-out;
}

@keyframes spin-floppy {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spin-floppy {
  animation: spin-floppy 0.5s linear infinite;
}

@keyframes pulse-led {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.pulse-led {
  animation: pulse-led 0.3s ease-in-out;
}

.retro-btn {
  background: linear-gradient(180deg, #444 0%, #222 100%);
  border: 1px solid #555;
  border-bottom: 2px solid #111;
  border-right: 2px solid #111;
  padding: 4px 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #ddd;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.1s;
}

.retro-btn:hover {
  background: linear-gradient(180deg, #555 0%, #333 100%);
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
  color: #fff;
}

.retro-btn:active {
  border-bottom: 1px solid #111;
  border-right: 1px solid #111;
  border-top: 2px solid #111;
  border-left: 2px solid #111;
  transform: translateY(1px);
}

.retro-btn.active-btn {
  background: linear-gradient(180deg, #1a4a1a 0%, #0a2a0a 100%);
  border-color: #33ff33;
  color: #33ff33;
  box-shadow: 0 0 8px rgba(51, 255, 51, 0.3);
}

.led-on {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 4px currentColor;
}

.noise-bg {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
}

.drop-zone {
  border: 2px dashed #555;
  transition: all 0.2s;
}

.drop-zone.drag-over {
  border-color: #33ff33;
  background: rgba(51, 255, 51, 0.05);
}

.terminal-container {
  position: relative;
  overflow: hidden;
}

@keyframes post-flicker {
  0% { opacity: 0; }
  10% { opacity: 1; }
  12% { opacity: 0.3; }
  14% { opacity: 1; }
  100% { opacity: 1; }
}

.post-flicker {
  animation: post-flicker 0.5s ease-out;
}