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

body {
    background: linear-gradient(45deg, #2c2c2c, #1a1a1a);
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
}

.monitor-container {
    perspective: 1000px;
    margin: 20px;
}

.monitor-housing {
    background: linear-gradient(145deg, #e8e8e8, #d4d4d4);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        inset 5px 5px 10px rgba(0,0,0,0.1),
        inset -5px -5px 10px rgba(255,255,255,0.7),
        0 20px 40px rgba(0,0,0,0.3);
    position: relative;
    transform: rotateY(-2deg) rotateX(1deg);
}

.monitor-brand {
    position: absolute;
    top: 15px;
    left: 30px;
    font-family: 'Arial Black', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #666;
    letter-spacing: 1px;
}

.power-led {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #666;
    transition: all 0.3s ease;
}

.power-led.on {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00, inset 0 0 5px rgba(255,255,255,0.5);
}

.screen-wrapper {
    position: relative;
    background: #000;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.8),
        inset 0 0 40px rgba(0,0,0,0.4);
}

#crtScreen {
    background: #000;
    border-radius: 10px;
    display: block;
    border: 3px solid #333;
    box-shadow: 
        0 0 20px rgba(0,255,0,0.1),
        inset 0 0 30px rgba(0,0,0,0.5);
    filter: brightness(1.0) contrast(1.0);
    transition: filter 0.2s ease;
}

.screen-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(
        45deg,
        transparent 48%,
        rgba(255,255,255,0.02) 49%,
        rgba(255,255,255,0.02) 51%,
        transparent 52%
    );
    background-size: 3px 3px;
    border-radius: 10px;
    pointer-events: none;
}

.control-panel {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.power-btn, .mode-btn {
    background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    box-shadow: 
        3px 3px 6px rgba(0,0,0,0.2),
        inset 1px 1px 2px rgba(255,255,255,0.7);
    transition: all 0.1s ease;
    letter-spacing: 0.5px;
}

.power-btn {
    background: linear-gradient(145deg, #ff6b6b, #e74c3c);
    color: white;
    min-width: 80px;
}

.power-btn:active, .mode-btn:active {
    transform: translateY(1px);
    box-shadow: 
        1px 1px 3px rgba(0,0,0,0.3),
        inset 2px 2px 4px rgba(0,0,0,0.2);
}

.adjustment-panel {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
}

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

.knob-group label {
    font-size: 10px;
    font-weight: bold;
    color: #666;
    letter-spacing: 1px;
}

.knob {
    width: 60px;
    height: 20px;
    appearance: none;
    background: linear-gradient(90deg, #ccc, #fff, #ccc);
    border-radius: 10px;
    outline: none;
    border: 2px solid #999;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.2);
}

.knob::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff, #ddd);
    border: 2px solid #999;
    cursor: pointer;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.knob::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff, #ddd);
    border: 2px solid #999;
    cursor: pointer;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.footer {
    margin-top: 30px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.footer a {
    color: #4a90e2;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .monitor-housing {
        transform: none;
        padding: 20px;
        margin: 10px;
    }
    
    #crtScreen {
        width: 100%;
        height: auto;
        max-width: 600px;
        max-height: 450px;
    }
    
    .control-panel {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .adjustment-panel {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .power-btn, .mode-btn {
        padding: 10px 16px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .monitor-housing {
        padding: 15px;
    }
    
    .monitor-brand {
        font-size: 12px;
        top: 10px;
        left: 20px;
    }
    
    .power-led {
        top: 15px;
        right: 20px;
        width: 10px;
        height: 10px;
    }
    
    .screen-wrapper {
        padding: 15px;
        margin: 15px 0;
    }
}

/* Additional CRT glow effect */
#crtScreen {
    position: relative;
}

#crtScreen::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: radial-gradient(circle, rgba(0,255,0,0.05) 0%, transparent 70%);
    border-radius: 15px;
    pointer-events: none;
    z-index: -1;
}

/* Vintage monitor styling touches */
.monitor-housing::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    border-radius: 20px 20px 0 0;
}

.monitor-housing::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 20px;
    right: 20px;
    height: 8px;
    background: linear-gradient(145deg, #bbb, #999);
    border-radius: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}