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

.gameboy-shell {
    background: linear-gradient(135deg, #8E9AAF 0%, #6B8CAE 100%);
    border-radius: 12px 12px 40px 12px;
    padding: 20px;
    box-shadow: 
        inset 0 0 0 4px #7A869A,
        0 8px 20px rgba(0,0,0,0.3),
        0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    width: 300px;
    margin: 0 auto;
}

.gameboy-logo {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 10px;
    color: #2D3748;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.gameboy-screen-bezel {
    background: #1A202C;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 30px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
    position: relative;
}

.gameboy-screen-area {
    position: relative;
    display: flex;
    justify-content: center;
}

.gameboy-screen {
    background: #9BBB0F;
    width: 480px;
    height: 432px;
    image-rendering: pixelated;
    border-radius: 4px;
    box-shadow: 
        inset 0 0 0 2px #8BAC0F,
        0 2px 4px rgba(0,0,0,0.3);
}

.power-led {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4A5568;
    transition: all 0.3s ease;
}

.power-led.on {
    background: #48BB78;
    box-shadow: 0 0 8px #48BB78;
}

.gameboy-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dpad-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.dpad {
    position: relative;
    width: 100%;
    height: 100%;
}

.dpad-btn {
    position: absolute;
    background: #2D3748;
    border: none;
    color: #A0AEC0;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.1s ease;
    user-select: none;
}

.dpad-btn:active {
    background: #1A202C;
    transform: translateY(1px);
}

.dpad-up, .dpad-down {
    width: 24px;
    height: 32px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
}

.dpad-up { top: 0; }
.dpad-down { bottom: 0; }

.dpad-left, .dpad-right {
    width: 32px;
    height: 24px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 4px;
}

.dpad-left { left: 0; }
.dpad-right { right: 0; }

.dpad-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #2D3748;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 
        0 4px 0 #5A1A1A,
        0 4px 8px rgba(0,0,0,0.3);
}

.btn-a {
    background: #E53E3E;
    color: white;
}

.btn-b {
    background: #9C1A1A;
    color: white;
}

.action-btn:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0 #5A1A1A,
        0 2px 4px rgba(0,0,0,0.3);
}

.start-select {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.small-btn {
    background: #4A5568;
    border: none;
    color: #E2E8F0;
    padding: 4px 12px;
    border-radius: 12px;
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.small-btn:active {
    background: #2D3748;
    transform: translateY(1px);
}

.speaker-grille {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
    padding: 8px;
}

.speaker-hole {
    width: 4px;
    height: 4px;
    background: #2D3748;
    border-radius: 50%;
}

.power-switch {
    position: absolute;
    top: 20px;
    right: 20px;
}

.power-btn {
    background: #4A5568;
    border: none;
    color: #E2E8F0;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.power-btn.on {
    background: #48BB78;
    color: white;
}

.power-btn.off {
    background: #E53E3E;
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .gameboy-shell {
        width: 280px;
        padding: 16px;
    }
    
    .gameboy-screen {
        width: 320px;
        height: 288px;
    }
    
    .dpad-container {
        width: 60px;
        height: 60px;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
}

/* Pixel-perfect styling */
* {
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}