:root {
    --beige: #C8C0B0;
    --charcoal: #2C2C2C;
    --ibm-blue: #0530AD;
}

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

body {
    background: #111;
    font-family: 'IBM Plex Sans', sans-serif;
    color: #ccc;
    overflow-x: hidden;
    min-height: 100vh;
}

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

.crt-screen {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.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::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 4;
}

.monitor-bezel {
    background: linear-gradient(170deg, #D0C8B8 0%, #B8B0A0 30%, #A89888 70%, #988878 100%);
    border-radius: 24px;
    padding: 28px 32px 36px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -2px 4px rgba(0,0,0,0.2);
    position: relative;
}

.monitor-bezel::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.15);
    pointer-events: none;
}

.screen-glow-green { box-shadow: 0 0 60px rgba(51,255,51,0.15), 0 0 120px rgba(51,255,51,0.05); }
.screen-glow-amber { box-shadow: 0 0 60px rgba(255,176,0,0.15), 0 0 120px rgba(255,176,0,0.05); }
.screen-glow-color { box-shadow: 0 0 60px rgba(100,100,255,0.1), 0 0 120px rgba(100,100,255,0.05); }

.pinstripe {
    background: repeating-linear-gradient(0deg, #2C2C2C, #2C2C2C 2px, #333 2px, #333 4px);
}

.chunky-btn {
    position: relative;
    border: none;
    border-radius: 4px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.1s ease;
    padding: 8px 16px;
}

.chunky-btn:active { transform: translateY(2px); }
.chunky-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chunky-btn:disabled:active { transform: none; }

.chunky-btn-red {
    background: linear-gradient(180deg, #e83030 0%, #b01010 100%);
    color: white;
    box-shadow: 0 3px 0 #800000, 0 4px 8px rgba(0,0,0,0.3);
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.chunky-btn-red:active { box-shadow: 0 1px 0 #800000, 0 2px 4px rgba(0,0,0,0.3); }

.chunky-btn-yellow {
    background: linear-gradient(180deg, #f0c020 0%, #c09010 100%);
    color: #333;
    box-shadow: 0 3px 0 #906800, 0 4px 8px rgba(0,0,0,0.3);
}
.chunky-btn-yellow:active { box-shadow: 0 1px 0 #906800; }

.chunky-btn-gray {
    background: linear-gradient(180deg, #888 0%, #666 100%);
    color: white;
    box-shadow: 0 3px 0 #444, 0 4px 8px rgba(0,0,0,0.3);
}
.chunky-btn-gray:active { box-shadow: 0 1px 0 #444; }

.chunky-btn-blue {
    background: linear-gradient(180deg, #2060d0 0%, #0530AD 100%);
    color: white;
    box-shadow: 0 3px 0 #021878, 0 4px 8px rgba(0,0,0,0.3);
}

.led { width: 8px; height: 8px; border-radius: 50%; display: inline-block; transition: all 0.15s; }
.led-off { background: #333; box-shadow: inset 0 1px 2px rgba(0,0,0,0.5); }
.led-red { background: #ff2020; box-shadow: 0 0 6px #ff2020, 0 0 12px rgba(255,32,32,0.4); }
.led-green { background: #20ff20; box-shadow: 0 0 6px #20ff20, 0 0 12px rgba(32,255,32,0.4); }
.led-amber { background: #ffaa00; box-shadow: 0 0 6px #ffaa00, 0 0 12px rgba(255,170,0,0.4); }
@keyframes blink-led { 0%,100%{opacity:1} 50%{opacity:0.3} }
.led-blink { animation: blink-led 0.3s ease-in-out infinite; }

.drive-slot {
    background: linear-gradient(180deg, #444 0%, #333 100%);
    border: 2px solid #222;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

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

.drive-slot.has-disk::before { display: none; }

.hex-dump {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    line-height: 1.5;
    color: #88cc88;
}

.knob-container { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.knob {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #888 0%, #555 50%, #777 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    cursor: pointer;
    position: relative;
}

.knob::after {
    content: '';
    position: absolute;
    top: 5px; left: 50%;
    width: 2px; height: 9px;
    background: white;
    transform: translateX(-50%);
    border-radius: 1px;
}

@keyframes crt-on {
    0% { transform: scaleY(0.005) scaleX(0.8); filter: brightness(10); }
    20% { transform: scaleY(0.005) scaleX(0.8); filter: brightness(5); }
    40% { transform: scaleY(1) scaleX(1); filter: brightness(2); }
    100% { transform: scaleY(1) scaleX(1); filter: brightness(1); }
}
.crt-poweron { animation: crt-on 0.6s ease-out forwards; }

@keyframes crt-off {
    0% { transform: scaleY(1) scaleX(1); filter: brightness(1); }
    40% { transform: scaleY(0.005) scaleX(0.8); filter: brightness(10); }
    100% { transform: scaleY(0) scaleX(0); filter: brightness(0); }
}
.crt-poweroff { animation: crt-off 0.4s ease-in forwards; }

.toggle-switch {
    width: 48px; height: 24px;
    border-radius: 12px;
    background: #333;
    border: 2px solid #555;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}
.toggle-switch.on { background: #0530AD; border-color: #0740CC; }
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #eee, #bbb);
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle-switch.on::after { left: 26px; }

.tooltip { position: relative; }
.tooltip .tooltip-text {
    visibility: hidden; opacity: 0;
    position: absolute; bottom: 120%; left: 50%;
    transform: translateX(-50%);
    background: #222; color: #ffd;
    padding: 8px 12px; border-radius: 6px;
    font-size: 12px; white-space: nowrap;
    transition: opacity 0.2s;
    z-index: 100; border: 1px solid #444;
}
.tooltip:hover .tooltip-text { visibility: visible; opacity: 1; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

.drop-zone {
    border: 2px dashed #555;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: #0530AD;
    background: rgba(5,48,173,0.1);
}

.panel {
    background: linear-gradient(180deg, #222 0%, #1a1a1a 100%);
    border: 1px solid #333;
    border-radius: 8px;
}