:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1a1a2e;
  --border: #30363d;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --green: #00ff41;
  --amber: #ffb000;
  --red: #ff6b6b;
  --blue: #58a6ff;
  --magenta: #d2a8ff;
  --cyan: #56d4dd;
}

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 13px;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

.glow-green { text-shadow: 0 0 8px rgba(0, 255, 65, 0.5), 0 0 20px rgba(0, 255, 65, 0.2); }
.glow-amber { text-shadow: 0 0 8px rgba(255, 176, 0, 0.5); }
.glow-red { text-shadow: 0 0 8px rgba(255, 107, 107, 0.5); }

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes flash-amber {
  0% { background: rgba(255, 176, 0, 0.3); }
  100% { background: transparent; }
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

.terminal-area {
  position: relative;
  background: #0a0a0a;
}

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

.cursor-blink {
  animation: blink 530ms step-end infinite;
}

.reg-flash {
  animation: flash-amber 0.5s ease-out;
}

.status-running {
  animation: pulse-green 1.2s ease-in-out infinite;
}

.drop-zone {
  border: 2px dashed var(--border);
  transition: all 0.2s;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--green);
  background: rgba(0, 255, 65, 0.05);
}

.drop-zone.loaded {
  border-color: var(--green);
  border-style: solid;
}

.btn-retro {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 3px;
}

.btn-retro:hover {
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.btn-green { border-color: var(--green); color: var(--green); }
.btn-green:hover { background: rgba(0, 255, 65, 0.1); box-shadow: 0 0 12px rgba(0, 255, 65, 0.4); }
.btn-amber { border-color: var(--amber); color: var(--amber); }
.btn-amber:hover { background: rgba(255, 176, 0, 0.1); box-shadow: 0 0 12px rgba(255, 176, 0, 0.4); }
.btn-red { border-color: var(--red); color: var(--red); }
.btn-red:hover { background: rgba(255, 107, 107, 0.1); box-shadow: 0 0 12px rgba(255, 107, 107, 0.4); }

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

.panel-header {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

input[type="text"], input[type="number"], select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 3px;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--green);
}

.mode-badge {
  padding: 4px 12px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
}

.mode-m { background: rgba(255, 107, 107, 0.2); color: var(--red); border: 1px solid var(--red); }
.mode-s { background: rgba(88, 166, 255, 0.2); color: var(--blue); border: 1px solid var(--blue); }
.mode-u { background: rgba(0, 255, 65, 0.2); color: var(--green); border: 1px solid var(--green); }

@media (max-width: 1200px) {
  .main-layout { flex-direction: column !important; }
  .left-panel, .center-panel, .right-panel { width: 100% !important; max-width: 100% !important; }
}