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

body {
    background: #1a1a1a;
    font-family: 'IBM Plex Mono', monospace;
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

.panel-container {
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 5%, #3a3a3a 95%, #2a2a2a 100%);
    border: 6px solid #4a90d9;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
}

.led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3d1111;
    border: 1px solid #2a0a0a;
    transition: all 0.05s;
}

.led.active {
    background: #ff2200;
    box-shadow: 0 0 8px #ff0000, 0 0 16px rgba(255,0,0,0.4), 0 0 3px #ff4444;
    border-color: #ff4444;
}

.toggle-switch {
    width: 14px;
    height: 40px;
    background: linear-gradient(90deg, #666 0%, #999 30%, #bbb 50%, #999 70%, #666 100%);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    border: 1px solid #444;
    transition: transform 0.1s;
    transform-origin: center center;
}

.toggle-switch.up {
    transform: perspective(100px) rotateX(-20deg);
}

.toggle-switch.down {
    transform: perspective(100px) rotateX(20deg);
}

.toggle-switch:hover {
    filter: brightness(1.1);
}

.momentary-switch {
    width: 20px;
    height: 20px;
    background: linear-gradient(180deg, #888 0%, #555 100%);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #333;
    transition: all 0.1s;
}

.momentary-switch:active {
    background: linear-gradient(180deg, #666 0%, #333 100%);
    transform: scale(0.9);
}

.nameplate {
    background: linear-gradient(180deg, #d0d0d0 0%, #b0b0b0 50%, #909090 100%);
    border: 1px solid #666;
    padding: 8px 20px;
    border-radius: 2px;
}

.terminal {
    background: #0a0a0a;
    color: #00ff00;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    border: 2px solid #333;
    padding: 10px;
    min-height: 150px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal::-webkit-scrollbar {
    width: 8px;
}

.terminal::-webkit-scrollbar-track {
    background: #111;
}

.terminal::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.memory-view {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    line-height: 1.4;
    background: #0d0d0d;
    color: #aaa;
    padding: 8px;
    border: 1px solid #333;
    max-height: 250px;
    overflow-y: auto;
}

.memory-view .highlight {
    background: #2a4a2a;
    color: #0f0;
}

.register-display {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
}

.drop-zone {
    border: 2px dashed #4a90d9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.drop-zone.drag-over {
    border-color: #ff2200;
    background: rgba(255, 34, 0, 0.05);
}

.status-label {
    font-family: 'Oswald', sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ccc;
}

.panel-label {
    font-family: 'Oswald', sans-serif;
    font-size: 9px;
    color: #aaa;
    letter-spacing: 0.5px;
}

@keyframes crt-flicker {
    0% { opacity: 1; }
    5% { opacity: 0.8; }
    10% { opacity: 1; }
    15% { opacity: 0.9; }
    20% { opacity: 1; }
    100% { opacity: 1; }
}

.crt-flicker {
    animation: crt-flicker 0.5s ease-in-out;
}

@keyframes led-sweep {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.power-switch {
    width: 16px;
    height: 16px;
    background: linear-gradient(180deg, #888 0%, #555 100%);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #333;
}

.power-switch.on {
    background: linear-gradient(180deg, #4a4 0%, #282 100%);
    box-shadow: 0 0 4px #0f0;
}

.speed-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4a90d9;
    cursor: pointer;
}

.tab-btn {
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #333;
    background: #222;
    color: #888;
    transition: all 0.2s;
}

.tab-btn.active {
    background: #333;
    color: #fff;
    border-color: #4a90d9;
}