:root {
    --ocean-blue: #0077be;
    --light-blue: #87ceeb;
    --coral: #ff7f7f;
    --gold: #ffd700;
    --white: #ffffff;
    --dark-blue: #003366;
    --bubble-color: rgba(255, 255, 255, 0.8);
}

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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--ocean-blue) 100%);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

#game-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Styles des menus */
.menu-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90vw;
    backdrop-filter: blur(10px);
}

.menu-content h1 {
    font-size: 2.5rem;
    color: var(--ocean-blue);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-content h2 {
    font-size: 2rem;
    color: var(--ocean-blue);
    margin-bottom: 20px;
}

.menu-content p {
    font-size: 1.2rem;
    color: var(--dark-blue);
    margin-bottom: 15px;
    line-height: 1.4;
}

.instructions {
    background: rgba(135, 206, 235, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid var(--ocean-blue);
}

.instructions p {
    margin: 8px 0;
    font-size: 1rem;
}

/* Boutons */
.game-btn {
    background: linear-gradient(135deg, var(--coral), #ff6b6b);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.game-btn:active {
    transform: translateY(-1px);
}

.game-btn.secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.game-btn.secondary:hover {
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}

/* Interface de jeu */
#game-interface {
    width: 100%;
    height: 100vh;
    position: relative;
}

#game-hud {
    position: absolute;
    top: 10px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

#score {
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--dark-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hud-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hud-btn:hover {
    transform: scale(1.1);
    background: var(--white);
}

/* Canvas */
#gameCanvas {
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, 
        var(--light-blue) 0%, 
        var(--ocean-blue) 50%, 
        var(--dark-blue) 100%);
    display: block;
}

/* Contrôles tactiles */
.touch-control {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.touch-hint {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--dark-blue);
    animation: bounce 2s infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* États d'affichage */
.hidden {
    display: none !important;
}

/* Score display */
#score-display {
    background: rgba(135, 206, 235, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

#score-display p {
    font-size: 1.5rem;
    margin: 10px 0;
}

#final-score, #best-score {
    font-weight: bold;
    color: var(--coral);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .menu-content {
        padding: 30px 20px;
    }
    
    .menu-content h1 {
        font-size: 2rem;
    }
    
    .game-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
        margin: 8px;
    }
    
    #score {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
    
    .hud-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

/* Orientation paysage forcée sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .menu-content {
        padding: 20px;
        max-width: 80vh;
    }
    
    .menu-content h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .instructions {
        padding: 15px;
        margin: 15px 0;
    }
    
    .game-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}