* {
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    margin: 0;
    background: #0a0a0f;
}

.front-panel {
    background: linear-gradient(180deg, #3a3a3e 0%, #2d2d31 50%, #252528 100%);
    border: 6px solid #4488cc;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    padding: 20px 30px;
}

.led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.05s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.led-off {
    background: radial-gradient(circle at 40% 40%, #6a1111, #3a0000);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.led-on {
    background: radial-gradient(circle at 40% 40%, #ff4444, #cc0000);
    box-shadow: 0 0 6px 2px rgba(255,0,0,0.6), 0 0 12px 4px rgba(255,0,0,0.3), inset 0 -1px 2px rgba(0,0,0,0.3);
}

.toggle-switch {
    width: 14px;
    height: 36px;
    background: linear-gradient(180deg, #888 0%, #666 100%);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    border: 1px solid #444;
    transition: transform 0.1s ease;
    user-select: none;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 8px;
    background: linear-gradient(180deg, #ccc, #999);
    border-radius: 2px;
    left: 0;
    transition: top 0.1s ease;
}

.toggle-up::after {
    top: 1px;
}

.toggle-down::after {
    top: 26px;
}

.toggle-center::after {
    top: 13px;
}

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

.panel-label {
    font-family: 'Oswald', sans-serif;
    color: #ddd;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.diagonal-line {
    position: absolute;
    height: 1px;
    background: #aaa;
    transform-origin: left center;
}

.mits-logo {
    font-family: 'Oswald', sans-serif;
    color: #ccc;
    font-size: 14px;
    letter-spacing: 2px;
}

.terminal {
    background: #0a0a0a;
    color: #33ff33;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    border: 2px solid #1a3a1a;
    border-radius: 4px;
    padding: 12px;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    box-shadow: inset 0 0 20px rgba(0,255,0,0.03);
}

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

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

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

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

.hex-dump .pc-highlight {
    background: rgba(68, 136, 204, 0.3);
    color: #fff;
}

.register-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.register-box {
    background: #1a1a22;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 6px 10px;
    text-align: center;
}

.register-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
}

.register-value {
    font-size: 14px;
    color: #4488cc;
    font-weight: 700;
}

.btn {
    padding: 6px 14px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #1a1a22;
    color: #ddd;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn:hover {
    background: #2a2a32;
    border-color: #4488cc;
}

.btn-run {
    background: #1a3a1a;
    border-color: #2a5a2a;
    color: #4f4;
}

.btn-run:hover {
    background: #2a4a2a;
}

.btn-stop {
    background: #3a1a1a;
    border-color: #5a2a2a;
    color: #f44;
}

.btn-stop:hover {
    background: #4a2a2a;
}

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

.drop-zone:hover, .drop-zone.drag-over {
    border-color: #4488cc;
    background: rgba(68,136,204,0.05);
}

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

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

@media (max-width: 768px) {
    .front-panel {
        padding: 10px 12px;
        border-width: 4px;
        overflow-x: auto;
    }
    
    .panel-label {
        font-size: 7px;
    }
    
    .led {
        width: 8px;
        height: 8px;
    }
    
    .toggle-switch {
        width: 10px;
        height: 28px;
    }
}