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

body {
  background: #1a1a2e;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  color: #33FF33;
  overflow-x: hidden;
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.06) 0px,
    rgba(0, 0, 0, 0.06) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* CRT Monitor effect */
.crt-monitor {
  position: relative;
  background: #2a2a2a;
  border-radius: 20px;
  padding: 20px;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.5),
    0 0 20px rgba(0,0,0,0.8),
    0 4px 12px rgba(0,0,0,0.6);
  border: 3px solid #555;
}

.crt-monitor::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border-radius: 8px;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.4);
}

.crt-screen {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  border-radius: 6px;
  display: block;
}

/* Beige panel styling */
.beige-panel {
  background: linear-gradient(180deg, #D4C8B0 0%, #C8B89A 30%, #B8A888 100%);
  border: 2px solid #A89880;
  border-top-color: #E0D4BC;
  border-left-color: #E0D4BC;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.3),
    inset -1px -1px 0 rgba(0,0,0,0.15),
    2px 2px 8px rgba(0,0,0,0.3);
  color: #2a2a2a;
}

/* Retro button */
.retro-btn {
  background: linear-gradient(180deg, #E0D4BC 0%, #C8B89A 50%, #B8A888 100%);
  border: 2px solid #A89880;
  border-top-color: #F0E4CC;
  border-left-color: #F0E4CC;
  border-bottom-color: #887860;
  border-right-color: #887860;
  color: #2a2a2a;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 12px;
  font-size: 11px;
  transition: all 0.05s;
}

.retro-btn:active {
  border-top-color: #887860;
  border-left-color: #887860;
  border-bottom-color: #F0E4CC;
  border-right-color: #F0E4CC;
  transform: translate(1px, 1px);
}

.retro-btn:hover {
  background: linear-gradient(180deg, #F0E4CC 0%, #D4C8B0 50%, #C8B89A 100%);
}

.retro-btn-red {
  background: linear-gradient(180deg, #E06040 0%, #CC4430 50%, #B03020 100%);
  border-top-color: #F08060;
  border-left-color: #F08060;
  border-bottom-color: #802010;
  border-right-color: #802010;
  color: white;
}

.retro-btn-red:hover {
  background: linear-gradient(180deg, #F07050 0%, #DD5540 50%, #CC4430 100%);
}

.retro-btn-green {
  background: linear-gradient(180deg, #40B040 0%, #309030 50%, #208020 100%);
  border-top-color: #60D060;
  border-left-color: #60D060;
  border-bottom-color: #106010;
  border-right-color: #106010;
  color: white;
}

/* LED indicators */
.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.3);
}

.led-off {
  background: #444;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.led-green {
  background: #33FF33;
  box-shadow: 0 0 6px #33FF33, 0 0 12px rgba(51,255,51,0.4);
}

.led-red {
  background: #FF3333;
  box-shadow: 0 0 6px #FF3333, 0 0 12px rgba(255,51,51,0.4);
}

.led-amber {
  background: #FFB000;
  box-shadow: 0 0 6px #FFB000, 0 0 12px rgba(255,176,0,0.4);
}

/* Floppy drive slot */
.floppy-slot {
  background: #1a1a1a;
  border: 2px inset #888;
  height: 6px;
  border-radius: 1px;
}

/* Blinking cursor */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

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

/* Blinking LED */
@keyframes ledBlink {
  0%, 40% { opacity: 1; }
  50%, 90% { opacity: 0.2; }
}

.led-blink {
  animation: ledBlink 0.3s ease-in-out infinite;
}

/* Power button */
.power-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #E06040, #B03020);
  border: 3px solid #802010;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.power-btn:active {
  box-shadow:
    0 1px 2px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(0,0,0,0.3);
  transform: translateY(2px);
}

.power-btn.on {
  background: linear-gradient(145deg, #40CC40, #209020);
  border-color: #106010;
}

/* Debug panel */
.debug-panel {
  background: #0a0a1a;
  border: 1px solid #333;
  font-size: 11px;
  line-height: 1.4;
}

/* Register display */
.register-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  font-size: 10px;
}

.register-item {
  padding: 1px 4px;
  background: rgba(0,0,0,0.3);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Phosphor glow effect for text */
.phosphor-green {
  text-shadow: 0 0 4px rgba(51, 255, 51, 0.6);
}

.phosphor-amber {
  text-shadow: 0 0 4px rgba(255, 176, 0, 0.6);
}

/* Turbo LED blink fast */
@keyframes turboBlink {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0.3; }
}
.turbo-led {
  animation: turboBlink 0.15s ease-in-out infinite;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .crt-monitor {
    padding: 10px;
    border-radius: 12px;
  }
}