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

body {
    background: #1a1a1a;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.008) 2px, rgba(255,255,255,0.008) 4px);
    font-family: 'IBM Plex Mono', monospace;
    color: #c8b88a;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

#app {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

/* Menu Bar */
#menu-bar {
    width: 100%;
    display: flex;
    background: linear-gradient(180deg, #3d3528 0%, #2a2318 100%);
    border: 1px solid #55493a;
    border-bottom: none;
    font-size: 13px;
    z-index: 100;
    position: relative;
}

.menu-item {
    padding: 5px 14px;
    cursor: pointer;
    position: relative;
    user-select: none;
    border-right: 1px solid #55493a;
}

.menu-item:hover {
    background: #55493a;
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: -1px;
    background: #2a2318;
    border: 1px solid #55493a;
    min-width: 200px;
    z-index: 200;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.6);
}

.menu-item.active .menu-dropdown {
    display: block;
}

.menu-option {
    padding: 6px 16px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 12px;
}

.menu-option:hover {
    background: #55493a;
    color: #fff;
}

.menu-separator {
    height: 1px;
    background: #55493a;
    margin: 2px 0;
}

/* Monitor Assembly */
#monitor-assembly {
    width: 100%;
    display: flex;
    justify-content: center;
}

#monitor-bezel {
    background: linear-gradient(145deg, #d4c9a8 0%, #c8b88a 30%, #b0a070 70%, #a09060 100%);
    border-radius: 18px;
    padding: 20px 24px 12px 24px;
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.3),
        inset 0 -2px 0 rgba(0,0,0,0.15);
    width: 100%;
    max-width: 860px;
}

#monitor-brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    padding-left: 8px;
}

.ibm-logo {
    font-weight: 700;
    font-size: 22px;
    color: #2962ff;
    letter-spacing: 3px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.monitor-model {
    font-size: 11px;
    color: #5a4f3a;
    font-weight: 400;
    letter-spacing: 1px;
}

#screen-container {
    position: relative;
    background: #0a0a0a;
    border-radius: 12px;
    padding: 8px;
    box-shadow:
        inset 0 0 30px rgba(0,0,0,0.8),
        inset 0 2px 4px rgba(0,0,0,0.6);
    overflow: hidden;
}

#screen-container.crt-curve {
    border-radius: 20px;
}

#canvas {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border-radius: 6px;
    background: #000;
}

#scanline-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    pointer-events: none;
    border-radius: 6px;
    display: none;
}

#scanline-overlay.active {
    display: block;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 1px,
        rgba(0,0,0,0.15) 1px,
        rgba(0,0,0,0.15) 2px
    );
}

#screen-glare {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    pointer-events: none;
    border-radius: 6px;
    background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.04) 0%, transparent 60%);
}

.screen-glow-white {
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8), inset 0 2px 4px rgba(0,0,0,0.6), 0 0 40px rgba(180,180,200,0.08);
}

.screen-glow-green {
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8), inset 0 2px 4px rgba(0,0,0,0.6), 0 0 40px rgba(0,255,65,0.1);
}

.screen-glow-amber {
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8), inset 0 2px 4px rgba(0,0,0,0.6), 0 0 40px rgba(255,176,0,0.1);
}

#monitor-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 0 8px;
}

#monitor-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    border: 1px solid #555;
}

#monitor-led.led-on {
    background: #00ff41;
    box-shadow: 0 0 6px #00ff41;
}

#brightness-label {
    font-size: 9px;
    color: #5a4f3a;
    letter-spacing: 2px;
}

/* Control Panel */
#control-panel {
    width: 100%;
    max-width: 860px;
    background: linear-gradient(180deg, #d0c498 0%, #c4b484 50%, #b8a474 100%);
    border-radius: 0 0 8px 8px;
    padding: 10px 16px 14px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

#case-label {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
    padding-left: 4px;
}

.ibm-logo-small {
    font-weight: 700;
    font-size: 16px;
    color: #2962ff;
    letter-spacing: 2px;
}

.case-model {
    font-size: 10px;
    color: #5a4f3a;
    letter-spacing: 1px;
    font-weight: 500;
}

#controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tactile Buttons */
.tactile-btn {
    background: linear-gradient(180deg, #888 0%, #666 50%, #555 100%);
    border: none;
    border-radius: 4px;
    padding: 2px;
    cursor: pointer;
    box-shadow: 0 3px 0 #333, 0 4px 6px rgba(0,0,0,0.4);
    transition: all 0.05s;
    outline: none;
}

.tactile-btn:active {
    box-shadow: 0 1px 0 #333, 0 1px 3px rgba(0,0,0,0.4);
    transform: translateY(2px);
}

.btn-surface {
    background: linear-gradient(180deg, #777 0%, #5a5a5a 100%);
    color: #ddd;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 10px;
    border-radius: 3px;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
}

.power-btn .btn-surface {
    background: linear-gradient(180deg, #cc3333 0%, #991111 100%);
    color: #fff;
}

.power-btn.active {
    box-shadow: 0 1px 0 #333, 0 1px 3px rgba(0,0,0,0.4);
    transform: translateY(2px);
}

.power-btn.active .btn-surface {
    background: linear-gradient(180deg, #881111 0%, #660000 100%);
}

/* LED Indicators */
.led-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.led-off {
    background: #333;
}

.led-red {
    background: #ff1a1a;
    box-shadow: 0 0 6px #ff1a1a, 0 0 12px rgba(255,26,26,0.4);
}

.led-green {
    background: #00ff41;
    box-shadow: 0 0 6px #00ff41, 0 0 12px rgba(0,255,65,0.4);
}

.led-yellow {
    background: #ffcc00;
    box-shadow: 0 0 6px #ffcc00, 0 0 12px rgba(255,204,0,0.4);
}

.led-label {
    font-size: 8px;
    color: #3d3528;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Floppy Drives */
.floppy-group {
    flex-direction: column;
    gap: 3px;
}

.floppy-drive {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.floppy-slot {
    background: linear-gradient(180deg, #555 0%, #3a3a3a 100%);
    border: 1px solid #222;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    min-width: 120px;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.floppy-slot:hover {
    background: linear-gradient(180deg, #666 0%, #444 100%);
}

.floppy-slot.drag-over {
    background: linear-gradient(180deg, #556655 0%, #3a4a3a 100%);
    border-color: #00ff41;
}

.floppy-slit {
    width: 70%;
    height: 2px;
    background: #111;
    margin: 0 auto 3px auto;
    border-radius: 1px;
}

.floppy-label {
    font-size: 8px;
    color: #999;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Volume */
.volume-group {
    flex-direction: column;
    gap: 2px;
}

.vol-label {
    font-size: 8px;
    color: #3d3528;
    letter-spacing: 1px;
    font-weight: 500;
}

.retro-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 6px;
    background: linear-gradient(180deg, #333, #555);
    border-radius: 3px;
    outline: none;
    border: 1px solid #222;
}

.retro-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: linear-gradient(180deg, #aaa, #777);
    border-radius: 50%;
    border: 1px solid #555;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.retro-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: linear-gradient(180deg, #aaa, #777);
    border-radius: 50%;
    border: 1px solid #555;
    cursor: pointer;
}

/* Status Bar */
#status-bar {
    width: 100%;
    max-width: 860px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 12px;
    background: #111;
    border: 1px solid #333;
    border-top: none;
    font-size: 10px;
    color: #666;
    border-radius: 0 0 4px 4px;
}

#status-bar span {
    white-space: nowrap;
}

/* Footer */
#footer {
    margin-top: 20px;
    padding: 10px;
    text-align: center;
}

#footer a {
    color: #55493a;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
}

#footer a:hover {
    color: #c8b88a;
}

/* Modal */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#modal-overlay.hidden {
    display: none;
}

#modal {
    background: linear-gradient(180deg, #d4c9a8, #c4b484);
    border-radius: 8px;
    padding: 20px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    color: #2a2318;
}

#modal-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    color: #2962ff;
}

#modal-content {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 16px;
}

#modal-close {
    display: block;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 600px) {
    #monitor-bezel {
        padding: 12px 10px 8px 10px;
        border-radius: 10px;
    }
    
    #controls-row {
        justify-content: center;
    }
    
    .floppy-slot {
        min-width: 90px;
    }
    
    #status-bar {
        font-size: 8px;
        gap: 4px;
        padding: 4px 8px;
    }
    
    .ibm-logo {
        font-size: 18px;
    }
}