:root {
  --bg: #0a0a0a;
  --phosphor: #33ff33;
  --phosphor-dim: #1a8c1a;
  --amber: #ffaa00;
  --amber-dim: #7a5200;
  --border: #333333;
  --cyan: #00ffff;
  --magenta: #ff00ff;
  --error: #ff3333;
  --panel-bg: #0f0f0f;
}

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

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

#root { min-height: 100vh; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: var(--amber-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

.crt-terminal {
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(51, 255, 51, 0.08), inset 0 0 60px rgba(0,0,0,0.5);
}

.crt-terminal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 2;
}

.crt-terminal::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 3;
}

.terminal-text {
  color: var(--phosphor);
  text-shadow: 0 0 5px rgba(51, 255, 51, 0.5), 0 0 10px rgba(51, 255, 51, 0.2);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-all;
}

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

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

.retro-btn {
  background: transparent;
  border: 2px solid var(--amber);
  color: var(--amber);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.retro-btn:hover:not(:disabled) {
  background: var(--amber);
  color: var(--bg);
}

.retro-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.retro-btn.active {
  background: var(--amber);
  color: var(--bg);
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--amber-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn:hover { color: var(--amber); }
.tab-btn.active { color: var(--amber); border-bottom-color: var(--amber); }

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.flag-on { color: var(--phosphor); text-shadow: 0 0 4px var(--phosphor); }
.flag-off { color: #333; }

.mem-system { background: rgba(255, 170, 0, 0.1); }
.mem-tpa { background: rgba(51, 255, 51, 0.05); }
.mem-bdos { background: rgba(0, 255, 255, 0.08); }
.mem-bios { background: rgba(255, 0, 255, 0.08); }

.disk-sector {
  width: 10px; height: 10px;
  border: 1px solid #222;
  display: inline-block;
  transition: background 0.3s;
}

.disk-sector.active {
  background: var(--phosphor);
  box-shadow: 0 0 4px var(--phosphor);
}

.speed-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: #333;
  border-radius: 2px;
  outline: none;
}

.speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--amber);
  border-radius: 50%;
  cursor: pointer;
}

@media (max-width: 768px) {
  .main-layout { flex-direction: column !important; }
  .terminal-panel, .inspector-panel { width: 100% !important; }
}