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

:root {
  --crt-green: #33FF33;
  --crt-amber: #FFB000;
  --crt-white: #E0E0E0;
  --bg-dark: #0A0A0A;
  --bg-navy: #0C0C3E;
  --bg-panel: #111133;
  --border-bios: #3333AA;
  --highlight-yellow: #FFFF00;
  --text-dim: #666699;
}

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

/* Scanline overlay */
.scanlines {
  position: relative;
}
.scanlines::after {
  content: '';
  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
  );
  pointer-events: none;
  z-index: 10;
}

/* CRT monitor effect */
.crt-screen {
  border-radius: 12px;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.6),
    0 0 20px rgba(51,255,51,0.15),
    0 0 60px rgba(51,255,51,0.05);
  position: relative;
  overflow: hidden;
}

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

/* Text glow effect */
.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-white {
  text-shadow: 0 0 5px rgba(224,224,224,0.5), 0 0 10px rgba(224,224,224,0.2);
}

/* Beveled 3D buttons */
.btn-bevel {
  border: 2px outset #888;
  background: linear-gradient(180deg, #C0C0C0 0%, #808080 100%);
  color: #000;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.05s;
}

.btn-bevel:active {
  border-style: inset;
  background: linear-gradient(180deg, #808080 0%, #C0C0C0 100%);
}

.btn-bevel:hover {
  background: linear-gradient(180deg, #D0D0D0 0%, #909090 100%);
}

.btn-power-on {
  background: linear-gradient(180deg, #44CC44 0%, #228822 100%);
  color: #fff;
  border-color: #66EE66 #116611 #116611 #66EE66;
}

.btn-power-off {
  background: linear-gradient(180deg, #CC4444 0%, #882222 100%);
  color: #fff;
  border-color: #EE6666 #661111 #661111 #EE6666;
}

.btn-reset {
  background: linear-gradient(180deg, #CCCC44 0%, #888822 100%);
  color: #000;
  border-color: #EEEE66 #666611 #666611 #EEEE66;
}

/* BIOS panel border */
.bios-panel {
  border: 2px solid var(--border-bios);
  background: rgba(10,10,30,0.9);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

/* Register flash animation */
@keyframes regFlash {
  0% { background-color: rgba(255,255,0,0.4); }
  100% { background-color: transparent; }
}

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

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

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

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

.led-active {
  animation: ledBlink 0.3s linear infinite;
}

/* Power-on bloom */
@keyframes powerOnBloom {
  0% { filter: brightness(3) contrast(0.5); opacity: 0; }
  30% { filter: brightness(2) contrast(0.7); opacity: 0.7; }
  100% { filter: brightness(1) contrast(1); opacity: 1; }
}

.power-on-bloom {
  animation: powerOnBloom 1.5s ease-out;
}

/* Floppy drive slot styling */
.floppy-slot {
  border: 3px solid #555;
  background: linear-gradient(180deg, #2A2A2A 0%, #1A1A1A 50%, #2A2A2A 100%);
  border-radius: 4px;
  position: relative;
}

.floppy-slot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transform: translateY(-50%);
}

/* HDD bay styling */
.hdd-bay {
  border: 3px solid #444;
  background: linear-gradient(180deg, #222 0%, #181818 100%);
  border-radius: 4px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0A0A1A;
}
::-webkit-scrollbar-thumb {
  background: #3333AA;
  border: 1px solid #5555CC;
}
::-webkit-scrollbar-corner {
  background: #0A0A1A;
}

/* RAM slider retro styling */
input[type="range"].retro-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  background: linear-gradient(90deg, #222 0%, #333 100%);
  border: 2px inset #666;
  border-radius: 0;
  outline: none;
}

input[type="range"].retro-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 26px;
  background: linear-gradient(180deg, #DDD 0%, #888 100%);
  border: 2px outset #AAA;
  cursor: pointer;
}

input[type="range"].retro-slider::-moz-range-thumb {
  width: 18px;
  height: 26px;
  background: linear-gradient(180deg, #DDD 0%, #888 100%);
  border: 2px outset #AAA;
  cursor: pointer;
  border-radius: 0;
}

/* Turbo LED */
@keyframes turboLed {
  0%, 80% { background: #00FF00; box-shadow: 0 0 6px #00FF00; }
  85%, 95% { background: #005500; box-shadow: none; }
}

.turbo-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #005500;
  display: inline-block;
}

.turbo-led.active {
  animation: turboLed 2s linear infinite;
}

/* Hex dump highlight colors */
.hex-ivt { color: #FF6666; }
.hex-code { color: #66FF66; }
.hex-stack { color: #66CCFF; }
.hex-unused { color: #666; }
.hex-ip { background: rgba(255,255,0,0.3); }

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .desktop-three-panel {
    flex-direction: column !important;
  }
}

/* Collapsible section */
.collapsible-header {
  cursor: pointer;
  user-select: none;
}

.collapsible-header:hover {
  background: rgba(51,51,170,0.3);
}

/* Toast notification */
@keyframes toastIn {
  0% { transform: translateY(-20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-20px); opacity: 0; }
}

.toast {
  animation: toastIn 0.3s ease-out;
}

.toast-exit {
  animation: toastOut 0.3s ease-in;
}