/* ========================================
   GAME BOY INTERACTIVE STYLES
   ======================================== */

.gameboy-container {
    margin-top: 40px ;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    
}

/* Game Boy Body */
.gameboy {
    top: -50px;
    width: 280px;
    background: linear-gradient(145deg, #9b87f5 0%, #7c3aed 100%);
    border-radius: 15px 15px 40px 40px;
    padding: 20px;
    box-shadow: 
        0 20px 60px rgba(139, 92, 246, 0.4),
        inset 0 -5px 20px rgba(0, 0, 0, 0.2),
        inset 0 5px 10px rgba(255, 255, 255, 0.1);
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

/* Screen */
.gameboy-screen {
    background: linear-gradient(145deg, #2a2a3e, #1a1a2e);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 
        inset 0 4px 10px rgba(0, 0, 0, 0.5),
        0 2px 5px rgba(139, 92, 246, 0.3);
    margin-bottom: 15px;
}

.screen-inner {
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border-radius: 6px;
    padding: 3px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

.game-display {
    background: #1a1f2e;
    width: 100%;
    height: 200px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 2px solid #0f172a;
}

/* Game Start Screen */
.game-start {
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

.pixel-text {
    font-family: 'Space Grotesk', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #8b5cf6;
    text-shadow: 
        0 0 10px rgba(139, 92, 246, 0.8),
        0 0 20px rgba(139, 92, 246, 0.5);
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.pixel-subtitle {
    font-family: 'Space Grotesk', monospace;
    font-size: 18px;
    color: #a855f7;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.press-start {
    font-family: 'Space Grotesk', monospace;
    font-size: 12px;
    color: #c4b5fd;
    animation: blink 1.5s infinite;
    margin-top: 10px;
}

.screen-label {
    font-size: 9px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
    letter-spacing: 1px;
    font-weight: 600;
}

/* D-Pad (Croix directionnelle) */
.gameboy-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    padding: 0 10px;
}

.dpad {
    width: 80px;
    height: 80px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 0;
}

.dpad-btn {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.dpad-btn:active {
    background: linear-gradient(145deg, #0f172a, #1e293b);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
    color: #8b5cf6;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
}

.dpad-up {
    grid-column: 2;
    grid-row: 1;
    border-radius: 8px 8px 0 0;
}

.dpad-right {
    grid-column: 3;
    grid-row: 2;
    border-radius: 0 8px 8px 0;
}

.dpad-down {
    grid-column: 2;
    grid-row: 3;
    border-radius: 0 0 8px 8px;
}

.dpad-left {
    grid-column: 1;
    grid-row: 2;
    border-radius: 8px 0 0 8px;
}

.dpad-center {
    grid-column: 2;
    grid-row: 2;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border-radius: 50%;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6);
}

/* Action Buttons (A & B) */
.action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    transform: rotate(-15deg);
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #dc2626, #991b1b);
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 
        0 4px 8px rgba(220, 38, 38, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transition: all 0.1s ease;
    position: relative;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), transparent);
    pointer-events: none;
}

.action-btn:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 4px rgba(220, 38, 38, 0.3),
        inset 0 2px 5px rgba(0, 0, 0, 0.4);
}

.btn-b {
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
    box-shadow: 
        0 4px 8px rgba(251, 191, 36, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* Menu Buttons (Start & Select) */
.gameboy-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0 15px;
}

.menu-btn {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: none;
    border-radius: 20px;
    padding: 6px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: all 0.1s ease;
}

.menu-btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    color: #8b5cf6;
}

/* Speaker */
.gameboy-speaker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
    margin-top: 15px;
    padding: 0 40px;
}

.speaker-hole {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Logo */
.gameboy-logo {
    text-align: center;
    margin-top: 15px;
    font-family: 'Space Grotesk', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.logo-dot {
    color: #fbbf24;
    font-size: 12px;
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.8);
}

.logo-text {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
}

.logo-color {
    font-size: 9px;
    font-weight: 700;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

/* Game Info */
.game-info {
    display: flex;
    gap: 30px;
    justify-content: center;
    transform: translateY(-30px);
}

.info-item {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    padding: 10px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    top: -30px;
}

.info-label {
    display: block;
    font-size: 10px;
    color: rgba(139, 92, 246, 0.8);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.info-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Snake Game Elements */
.snake-pixel {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 1px;
    box-shadow: 0 0 3px rgba(16, 185, 129, 0.8);
}

.food-pixel {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.8);
    animation: pulse 0.8s infinite;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.game-over-text {
    font-family: 'Space Grotesk', monospace;
    font-size: 20px;
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
    margin-bottom: 10px;
}

.game-over-score {
    font-size: 14px;
    color: #a855f7;
    margin-bottom: 15px;
}

.restart-text {
    font-size: 11px;
    color: #c4b5fd;
    animation: blink 1.5s infinite;
}

/* Animations */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .gameboy {
        width: 260px;
    }
    
    .game-display {
        height: 180px;
    }
    
    .dpad {
        width: 70px;
        height: 70px;
    }
    
    .action-btn {
        width: 45px;
        height: 45px;
    }
}

/* Power LED indicator */
.gameboy::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 
        0 0 5px #10b981,
        0 0 10px rgba(16, 185, 129, 0.5);
    animation: pulse 2s infinite;
}