@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

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

body {
    background: linear-gradient(135deg, #2c1810, #4a3728);
    min-height: 100vh;
    font-family: 'Courier Prime', monospace;
    color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#computer-container {
    background: linear-gradient(145deg, #e8dcc0, #d4c4a0);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.3),
        inset 0 2px 5px rgba(255,255,255,0.3);
    max-width: 900px;
    width: 100%;
}

#apple-logo {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    font-family: 'Courier Prime', monospace;
}

#monitor-bezel {
    position: relative;
    background: linear-gradient(145deg, #333333, #1a1a1a);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 
        inset 0 5px 15px rgba(0,0,0,0.7),
        0 5px 20px rgba(0,0,0,0.3);
}

#screen {
    width: 100%;
    height: auto;
    max-width: 560px;
    background: #000;
    border-radius: 8px;
    border: 2px solid #0a0a0a;
    image-rendering: pixelated;
    display: block;
    filter: 
        contrast(1.1) 
        brightness(0.9)
        blur(0.3px);
}

#scanlines {
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
    bottom: 25px;
    background: 
        linear-gradient(
            transparent 50%, 
            rgba(0, 255, 0, 0.03) 50%
        );
    background-size: 100% 4px;
    border-radius: 8px;
    pointer-events: none;
    animation: scanline-flicker 3s infinite linear;
}

#screen-reflection {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 40%;
    height: 30%;
    background: linear-gradient(
        135deg, 
        rgba(255,255,255,0.1) 0%, 
        transparent 70%
    );
    border-radius: 8px 0 50px 0;
    pointer-events: none;
}

@keyframes scanline-flicker {
    0% { opacity: 1; }
    98% { opacity: 1; }
    99% { opacity: 0.8; }
    100% { opacity: 1; }
}

#control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(145deg, #d4c4a0, #c4b490);
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.control-btn {
    background: linear-gradient(145deg, #8B4513, #A0522D);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 1px 2px rgba(255,255,255,0.3);
    transition: all 0.2s ease;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.3),
        inset 0 1px 2px rgba(255,255,255,0.3);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.2),
        inset 0 2px 5px rgba(0,0,0,0.2);
}

.control-btn.active {
    background: linear-gradient(145deg, #228B22, #32CD32);
    box-shadow: 
        0 0 15px rgba(50, 205, 50, 0.5),
        inset 0 1px 2px rgba(255,255,255,0.3);
}

label {
    display: block;
    color: #333;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 12px;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #999;
    border-radius: 3px;
    outline: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

input[type="range"]:hover {
    opacity: 1;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #8B4513;
    border-radius: 50%;
    cursor: pointer;
}

#help-panel {
    background: linear-gradient(145deg, #f5f5dc, #e5e5cc);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    color: #333;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

#help-panel h3 {
    margin-bottom: 10px;
    font-size: 14px;
}

.command-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    font-size: 12px;
    font-family: 'Courier Prime', monospace;
}

.command-list span {
    background: rgba(139, 69, 19, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

#mobile-keyboard {
    margin-top: 20px;
    background: linear-gradient(145deg, #333333, #1a1a1a);
    border-radius: 10px;
    padding: 15px;
}

.kb-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 8px;
}

.kb-key {
    background: linear-gradient(145deg, #555, #333);
    color: #00ff00;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Courier Prime', monospace;
    font-size: 12px;
    cursor: pointer;
    min-width: 35px;
    transition: all 0.1s ease;
}

.kb-key:active {
    background: linear-gradient(145deg, #333, #555);
    transform: scale(0.95);
}

#berrry-footer {
    margin-top: 30px;
    text-align: center;
    background: rgba(0,0,0,0.7);
    padding: 20px;
    border-radius: 10px;
    max-width: 900px;
    width: 100%;
}

#berrry-footer p {
    margin: 5px 0;
    font-size: 14px;
    color: #00ff00;
    font-family: 'Courier Prime', monospace;
}

#berrry-footer a {
    color: #00ff88;
    text-decoration: none;
    font-weight: bold;
}

#berrry-footer a:hover {
    color: #00ffaa;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    #computer-container {
        padding: 15px;
    }
    
    #apple-logo {
        font-size: 18px;
    }
    
    #monitor-bezel {
        padding: 15px;
    }
    
    #control-panel {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .control-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .command-list {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
        font-size: 11px;
    }
    
    #help-panel {
        padding: 10px;
    }
    
    #help-panel h3 {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #control-panel {
        grid-template-columns: 1fr;
    }
    
    .command-list {
        grid-template-columns: 1fr;
    }
    
    .kb-key {
        padding: 6px 8px;
        font-size: 11px;
        min-width: 30px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #screen {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: -moz-crisp-edges;
        image-rendering: pixelated;
    }
}