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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: #cccccc;
}

.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 30px;
    margin-bottom: 30px;
    align-items: start;
}

.left-panel, .right-panel {
    background: #f5f5dc;
    color: #333;
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #8b7355;
    box-shadow: 
        inset 2px 2px 0px #ffffff,
        inset -2px -2px 0px #8b7355,
        4px 4px 8px rgba(0, 0, 0, 0.3);
}

.left-panel h3, .right-panel h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #2d2d2d;
    border-bottom: 2px solid #8b7355;
    padding-bottom: 5px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2d2d2d;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 5px;
    border: 2px inset #cccccc;
    background: #ffffff;
    font-family: inherit;
}

.control-group select {
    padding: 8px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.monitor-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.monitor-bezel {
    background: linear-gradient(145deg, #3a3a3a, #1a1a1a);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    position: relative;
}

.screen-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

#vgaCanvas {
    display: block;
    background: #000;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    position: relative;
    z-index: 1;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    pointer-events: none;
    z-index: 2;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
    animation: scanlineMove 0.1s linear infinite;
}

.screen-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(ellipse at center, rgba(0, 255, 0, 0.3) 0%, transparent 70%);
    border-radius: 15px;
    opacity: 0.6;
    z-index: 0;
}

.monitor-base {
    width: 200px;
    height: 50px;
    background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
    border-radius: 0 0 20px 20px;
    margin-top: -10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.bottom-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    background: #f5f5dc;
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #8b7355;
    box-shadow: 
        inset 2px 2px 0px #ffffff,
        inset -2px -2px 0px #8b7355,
        4px 4px 8px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
    align-items: center;
}

.bottom-controls .control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.bottom-controls label {
    color: #2d2d2d;
    font-weight: bold;
    white-space: nowrap;
}

.bottom-controls input[type="range"] {
    width: 120px;
}

.retro-button {
    padding: 10px 20px;
    background: linear-gradient(145deg, #6a6a6a, #4a4a4a);
    border: 2px outset #8a8a8a;
    color: #ffffff;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.1s;
}

.retro-button:hover {
    background: linear-gradient(145deg, #7a7a7a, #5a5a5a);
}

.retro-button:active {
    border: 2px inset #8a8a8a;
    background: linear-gradient(145deg, #4a4a4a, #6a6a6a);
}

.power-btn {
    background: linear-gradient(145deg, #6a6a6a, #4a5568);
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid #444;
    color: #999;
}

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

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

/* Animations */
@keyframes scanlineMove {
    0% { transform: translateY(0px); }
    100% { transform: translateY(4px); }
}

@keyframes degauss {
    0% { transform: scale(1) skew(0deg); }
    25% { transform: scale(1.02) skew(1deg); }
    50% { transform: scale(0.98) skew(-1deg); }
    75% { transform: scale(1.01) skew(0.5deg); }
    100% { transform: scale(1) skew(0deg); }
}

@keyframes powerOn {
    0% { 
        transform: scale(0.1);
        opacity: 0;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes powerOff {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    100% { 
        transform: scale(0.1);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .left-panel, .right-panel {
        order: 2;
    }
    
    .monitor-container {
        order: 1;
    }
    
    #vgaCanvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .bottom-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .bottom-controls .control-group {
        flex-direction: column;
        text-align: center;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .monitor-bezel {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .left-panel, .right-panel {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
}