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

body {
  background: #0a0a0a;
  color: #c8b88a;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 10px;
}

#monitor-frame {
  background: linear-gradient(145deg, #d4c89a, #b0a070);
  border-radius: 18px;
  padding: 20px 24px 12px 24px;
  margin-top: 16px;
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  position: relative;
}

#monitor-label {
  text-align: center;
  color: #4a4230;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

#screen-container {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    inset 0 0 40px rgba(0,0,0,0.8),
    inset 0 0 4px rgba(0,0,0,1);
  border: 3px solid #2a2520;
}

#canvas {
  display: block;
  image-rendering: pixelated;
  width: 720px;
  height: 400px;
  background: #000;
}

#scanline-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0,0,0,0.15) 1px,
    rgba(0,0,0,0.15) 2px
  );
  pointer-events: none;
  z-index: 2;
}

#focus-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  color: #33ff33;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 3;
  cursor: pointer;
}

#drive-bay {
  display: flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 8px;
}

#floppy-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #4a4230;
}

#floppy-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  display: inline-block;
  transition: background 0.1s;
}

#floppy-led.active {
  background: #ff3333;
  box-shadow: 0 0 6px #ff3333;
}

#floppy-led.loaded {
  background: #33ff33;
  box-shadow: 0 0 4px #33ff33;
}

#controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  background: linear-gradient(145deg, #d4c89a, #b8a878);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  flex-wrap: wrap;
  justify-content: center;
}

#controls button {
  background: linear-gradient(180deg, #e8dcc0, #c8b88a);
  border: 1px solid #9a8a60;
  border-radius: 4px;
  padding: 6px 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #3a3020;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.5);
  white-space: nowrap;
}

#controls button:hover {
  background: linear-gradient(180deg, #f0e8d0, #d4c89a);
}

#controls button:active {
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
  transform: translateY(1px);
}

#controls button.active {
  background: linear-gradient(180deg, #a0d0a0, #70b070);
  color: #1a3a1a;
}

#volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #3a3020;
}

#vol-slider {
  width: 60px;
  accent-color: #8a7a50;
}

#speed-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #3a3020;
  background: #1a1a1a;
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid #333;
}

#speed-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
  display: inline-block;
}

#speed-led.on {
  background: #33ff33;
  box-shadow: 0 0 4px #33ff33;
}

#speed-value {
  color: #33ff33;
  font-size: 11px;
}

#debug-panel {
  margin-top: 12px;
  background: #0a1a0a;
  border: 1px solid #1a3a1a;
  border-radius: 8px;
  padding: 12px;
  width: 720px;
  max-width: 95vw;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

#debug-panel h3 {
  color: #33ff33;
  font-size: 11px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#debug-panel pre {
  color: #22cc22;
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.4;
  white-space: pre;
  overflow: hidden;
}

#mobile-notice {
  display: none;
  color: #888;
  font-size: 11px;
  margin-top: 8px;
  text-align: center;
}

footer {
  margin-top: 20px;
  padding: 12px;
  text-align: center;
}

footer a {
  text-decoration: none;
  font-size: 13px;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  #canvas {
    width: 100%;
    height: auto;
  }
  #monitor-frame {
    padding: 12px;
    width: 95vw;
  }
  #debug-panel {
    grid-template-columns: 1fr;
  }
  #mobile-notice {
    display: block;
  }
}