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

body {
  background: #0a0a14;
  color: #00ff41;
  font-family: 'Share Tech Mono', monospace;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(0,255,65,0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(255,179,71,0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

#root { position: relative; z-index: 1; }

.crt-monitor {
  position: relative;
  background: #1a1a1a;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 
    0 0 0 3px #333,
    0 0 0 6px #222,
    0 0 40px rgba(0,0,0,0.8),
    inset 0 0 60px rgba(0,0,0,0.3);
}

.crt-screen {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.6);
}

.crt-screen::after {
  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 3px
  );
  pointer-events: none;
  z-index: 2;
}

.crt-screen::before {
  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;
}

.crt-screen canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.oric-key {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  padding: 6px 8px;
  min-width: 32px;
  height: 32px;
  background: linear-gradient(180deg, #e8e0d0 0%, #d4cbb8 40%, #c8bfa8 100%);
  color: #2a2a2a;
  border: 1px solid #999;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 2px 0 #998f7e,
    0 3px 3px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4);
  transition: all 0.05s ease;
  text-transform: uppercase;
  white-space: nowrap;
}

.oric-key:active, .oric-key.pressed {
  transform: translateY(2px);
  box-shadow: 
    0 0 0 #998f7e,
    0 1px 1px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
  background: linear-gradient(180deg, #d4cbb8 0%, #c8bfa8 40%, #bdb49e 100%);
}

.oric-key.wide { min-width: 52px; }
.oric-key.wider { min-width: 72px; }
.oric-key.space { min-width: 200px; flex-grow: 1; }
.oric-key.return-key { min-width: 64px; }

.debug-panel {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  line-height: 1.4;
}

.register-val {
  color: #ffb347;
  font-weight: bold;
}

.flag-on { color: #00ff41; }
.flag-off { color: #444; }

.hex-dump {
  font-size: 11px;
  line-height: 1.3;
}

.hex-addr { color: #ffb347; }
.hex-byte { color: #00ff41; }
.hex-ascii { color: #666; }

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

.blink { animation: blink 1s infinite; }

@keyframes bootFlash {
  0% { filter: brightness(3) contrast(0.5); }
  100% { filter: brightness(1) contrast(1); }
}

.boot-flash {
  animation: bootFlash 0.3s ease-out;
}

.glow-text {
  text-shadow: 0 0 8px rgba(0,255,65,0.5), 0 0 16px rgba(0,255,65,0.2);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

@media (max-width: 640px) {
  .oric-key {
    font-size: 9px;
    padding: 4px 4px;
    min-width: 24px;
    height: 26px;
  }
  .oric-key.space { min-width: 120px; }
  .oric-key.wide { min-width: 36px; }
  .oric-key.wider { min-width: 48px; }
  .crt-monitor { padding: 10px; border-radius: 12px; }
}