* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: #1a1a1a;
  font-family: 'IBM Plex Mono', monospace;
  color: #e0e0e0;
  overflow-x: hidden;
}

.ibm-stripes {
  background: repeating-linear-gradient(
    0deg,
    #2563eb 0px, #2563eb 3px,
    transparent 3px, transparent 6px
  );
  width: 60px;
  height: 36px;
  display: inline-block;
}

.crt-screen {
  position: relative;
  background: #0A0A0A;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.5);
}

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

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

.screen-reflection {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.04) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255,255,255,0.02) 100%
  );
  pointer-events: none;
  z-index: 3;
}

.screen-curvature {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.6);
  border-radius: 18px;
  pointer-events: none;
  z-index: 4;
}

.crt-glow-green {
  filter: drop-shadow(0 0 2px rgba(51, 255, 51, 0.3));
}
.crt-glow-amber {
  filter: drop-shadow(0 0 2px rgba(255, 176, 0, 0.3));
}
.crt-glow-cga {
  filter: drop-shadow(0 0 1px rgba(170, 170, 170, 0.2));
}

.power-on-anim {
  animation: crtPowerOn 0.8s ease-out forwards;
}

@keyframes crtPowerOn {
  0% { clip-path: inset(49.5% 0 49.5% 0); filter: brightness(3); }
  30% { clip-path: inset(45% 0 45% 0); filter: brightness(2); }
  60% { clip-path: inset(20% 0 20% 0); filter: brightness(1.5); }
  100% { clip-path: inset(0 0 0 0); filter: brightness(1); }
}

.floppy-slot {
  background: linear-gradient(180deg, #333 0%, #222 40%, #111 50%, #222 60%, #333 100%);
  border: 1px solid #555;
  border-radius: 2px;
  height: 8px;
  cursor: pointer;
}

.led {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.1s;
}
.led-off { background: #330000; box-shadow: none; }
.led-green { background: #00ff00; box-shadow: 0 0 6px #00ff00; }
.led-red { background: #ff0000; box-shadow: 0 0 6px #ff0000; }
.led-red-blink { animation: ledBlink 0.15s infinite alternate; }
@keyframes ledBlink {
  0% { background: #ff0000; box-shadow: 0 0 6px #ff0000; }
  100% { background: #aa0000; box-shadow: 0 0 2px #aa0000; }
}

.rocker-switch {
  position: relative;
  width: 48px; height: 24px;
  background: #444;
  border-radius: 4px;
  border: 2px solid #666;
  cursor: pointer;
  transition: all 0.15s;
  overflow: hidden;
}
.rocker-switch.on { background: #555; }
.rocker-switch .rocker-knob {
  position: absolute;
  top: 1px; width: 20px; height: 18px;
  background: linear-gradient(180deg, #ddd, #aaa);
  border-radius: 2px;
  transition: left 0.15s;
}
.rocker-switch .rocker-knob.off { left: 2px; }
.rocker-switch .rocker-knob.on { left: 24px; }

.dip-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px 4px;
  background: #222;
  border: 1px solid #555;
  border-radius: 2px;
}
.dip-toggle {
  width: 16px; height: 28px;
  background: #444;
  border: 1px solid #666;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.dip-toggle .dip-knob {
  position: absolute;
  left: 1px; right: 1px;
  height: 12px;
  background: linear-gradient(180deg, #eee, #bbb);
  border-radius: 1px;
  transition: top 0.1s;
}
.dip-toggle.on .dip-knob { top: 2px; }
.dip-toggle.off .dip-knob { top: 12px; }

.beige-panel {
  background: linear-gradient(180deg, #d4c89e, #C8B88A, #b8a878);
  border: 1px solid #a09070;
}

.noise-texture {
  position: relative;
}
.noise-texture::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

.monitor-bezel {
  background: linear-gradient(160deg, #3a3a3a, #2C2C2C, #222);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
}

.drag-over {
  border-color: #FFB000 !important;
  background: rgba(255, 176, 0, 0.1) !important;
}

@media (max-width: 768px) {
  .monitor-bezel { padding: 10px; border-radius: 16px; }
  .crt-screen { border-radius: 12px; }
}