:root {
  --phosphor: #33ff33;
  --phosphor-dim: #1a8c1a;
  --phosphor-glow: rgba(51, 255, 51, 0.15);
  --bg: #0a0a0a;
  --panel: #111111;
  --panel-border: #222222;
  --accent: #00aaff;
  --error: #ff3333;
  --amber: #ffb000;
  --white-phosphor: #e0e0e0;
}

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

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

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

.terminal-container {
  position: relative;
  background: #050505;
  border: 2px solid var(--panel-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 
    inset 0 0 60px rgba(0,0,0,0.5),
    0 0 20px var(--phosphor-glow);
}

.terminal-output {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-y: auto;
  padding: 12px;
  outline: none;
  min-height: 400px;
  max-height: calc(100vh - 260px);
  color: var(--phosphor);
  text-shadow: 0 0 5px var(--phosphor-glow);
  caret-color: var(--phosphor);
}

.terminal-output::-webkit-scrollbar {
  width: 6px;
}
.terminal-output::-webkit-scrollbar-track {
  background: #111;
}
.terminal-output::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

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

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

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.1s;
}

.led-off { background: #222; box-shadow: none; }
.led-green { background: #33ff33; box-shadow: 0 0 6px #33ff33; }
.led-red { background: #ff3333; box-shadow: 0 0 6px #ff3333; }
.led-amber { background: #ffb000; box-shadow: 0 0 6px #ffb000; }

.btn-retro {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 5px 10px;
  background: linear-gradient(180deg, #444 0%, #222 100%);
  color: #ccc;
  border: 1px solid #555;
  border-bottom: 2px solid #111;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.1s;
}

.btn-retro:hover {
  background: linear-gradient(180deg, #555 0%, #333 100%);
  color: #fff;
}

.btn-retro:active {
  background: linear-gradient(180deg, #222 0%, #333 100%);
  border-bottom: 1px solid #111;
  transform: translateY(1px);
}

.btn-retro.active {
  background: linear-gradient(180deg, #1a5a1a 0%, #0a3a0a 100%);
  color: var(--phosphor);
  border-color: var(--phosphor-dim);
}

.register-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--phosphor);
  background: #0a0a0a;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid #1a1a1a;
}

.flag-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: #666;
}

.flag-indicator.active { color: var(--phosphor); }

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
}

.disasm-current {
  background: rgba(51, 255, 51, 0.1);
  border-left: 2px solid var(--phosphor);
}

.hex-row {
  font-size: 11px;
  line-height: 1.6;
}

.hex-ascii {
  color: #666;
}

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

.drop-zone.dragover {
  border-color: var(--phosphor);
  background: rgba(51, 255, 51, 0.05);
}

.welcome-ascii {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  line-height: 1.2;
  color: var(--phosphor-dim);
  text-shadow: 0 0 10px var(--phosphor-glow);
}

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

.disk-active {
  animation: diskActivity 0.15s ease-in-out;
}

.status-running { color: #33ff33; }
.status-halted { color: #ff3333; }
.status-stepping { color: #ffb000; }
.status-idle { color: #666; }

@media (max-width: 1024px) {
  .debug-panel { display: none; }
  .debug-panel.show { display: block; }
}