/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    background-size: 400% 400%;
    animation: rainbowBg 10s ease infinite;
    overflow: hidden;
    height: 100vh;
}

@keyframes rainbowBg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Screens système */
.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

.screen.overlay {
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

/* Écran de démarrage */
.title-container {
    text-align: center;
    margin-bottom: 3rem;
}

.game-title {
    font-size: 3rem;
    color: #fff;
    text-shadow: 
        4px 4px 0px #000,
        8px 8px 0px rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
    animation: titleBounce 2s ease-in-out infinite;
}

@keyframes titleBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

.game-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Boutons de jeu */
.game-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    padding: 15px 30px;
    margin: 10px;
    background: linear-gradient(45deg, #ff4757, #ff3838);
    color: white;
    border: 4px solid #000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 100;
    pointer-events: auto;
}

.game-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.game-btn:hover:before {
    left: 100%;
}

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

.game-btn.secondary {
    background: linear-gradient(45deg, #5f27cd, #341f97);
}

.game-btn.danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.game-btn.pulse {
    animation: pulse 2s infinite;
}

.game-btn.disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.5;
}

.game-btn.mini {
    font-size: 0.8rem;
    padding: 8px 12px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Écran de sélection des personnages */
.select-container {
    max-width: 1200px;
    width: 90%;
    text-align: center;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.select-title {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 1rem;
}

.select-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 2rem;
}

.character-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.character-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 4px solid #000;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 10;
}

.character-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.character-card.selected {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    transform: scale(1.05);
    animation: selectedGlow 1s ease-in-out infinite alternate;
}

@keyframes selectedGlow {
    0% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
    100% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.8); }
}

.character-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #000;
    pointer-events: none;
}

.character-avatar img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    pointer-events: none;
}

.hamster-body {
    display: none;
    /* Corps masqué car l'image remplit maintenant tout le rond */
}

.hamster-body.sam { background: linear-gradient(45deg, #8B4513, #D2691E); }
.hamster-body.bruce { background: linear-gradient(45deg, #CD853F, #F4A460); }
.hamster-body.fiona { background: linear-gradient(45deg, #DEB887, #F5DEB3); }
.hamster-body.steven { background: linear-gradient(45deg, #696969, #A9A9A9); }
.hamster-body.wendy { background: linear-gradient(45deg, #BC8F8F, #D2B48C); }
.hamster-body.marie { background: linear-gradient(45deg, #8B4513, #CD853F); }

.character-card h3 {
    font-size: 1rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 8px;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
}

.character-power {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    font-style: italic;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
}

.select-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Écran de jeu */
#gameScreen {
    flex-direction: column;
}

.game-ui {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(90deg, #2c3e50, #3498db);
    border-bottom: 4px solid #000;
    color: white;
    z-index: 100;
}

.character-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.character-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #000;
}

.power-indicator {
    margin-top: 5px;
}

.cooldown-bar {
    width: 100px;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 2px;
}

.cooldown-bar .cooldown-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    width: 0%;
    transition: width 0.1s linear;
}

.ui-center {
    text-align: center;
}

.score, .level, .lives {
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin: 0 10px;
}

#gameCanvas {
    border: 4px solid #000;
    background: #2c3e50;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.controls-hint {
    margin-top: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-size: 0.8rem;
    text-align: center;
}

/* Écrans overlay */
.pause-container, .gameover-container, .leaderboard-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 6px solid #000;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
    max-width: 500px;
    width: 90%;
}

.leaderboard-container {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.pause-container h2, .gameover-container h2, .leaderboard-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
}

.pause-stats, .final-stats {
    margin: 20px 0;
    font-size: 0.9rem;
}

.pause-stats p, .final-stats p {
    margin: 5px 0;
}

.score-input {
    margin: 20px 0;
}

.score-input input {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    padding: 10px;
    border: 3px solid #000;
    border-radius: 5px;
    margin: 10px;
    text-align: center;
}

.pause-actions, .gameover-actions, .leaderboard-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* Leaderboard */
.leaderboard-list {
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #000;
    border-radius: 8px;
    font-size: 0.8rem;
}

.leaderboard-entry.top3 {
    background: linear-gradient(45deg, #f39c12, #e74c3c);
}

.leaderboard-entry .rank {
    font-weight: bold;
    width: 30px;
}

.leaderboard-entry .player-info {
    flex: 1;
    text-align: left;
    margin: 0 10px;
}

.leaderboard-entry .score {
    font-weight: bold;
}

/* Effets spéciaux */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.flash {
    animation: flash 0.2s ease-in-out 3;
}

/* Contrôles mobiles */
.mobile-controls {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 20px;
    z-index: 1000;
    pointer-events: none;
}

.mobile-controls * {
    pointer-events: all;
}

.mobile-joystick {
    position: relative;
}

.joystick-outer {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.joystick-inner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff4757, #ff3838);
    border: 2px solid #fff;
    position: absolute;
    transition: all 0.1s ease;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.power-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    border: 3px solid #000;
    color: white;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.power-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.pause-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #5f27cd, #341f97);
    border: 3px solid #000;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.pause-btn:active {
    transform: scale(0.95);
}

/* Détection mobile */
@media (max-width: 768px) and (pointer: coarse) {
    .mobile-controls {
        display: flex;
    }
    
    .controls-hint {
        display: none;
    }
    
    #gameCanvas {
        touch-action: none;
    }
}



/* Cache les contrôles mobiles sur desktop */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Contrôles mobiles */
.mobile-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    display: none;
    pointer-events: none;
    z-index: 100;
}

/* Joystick virtuel */
.mobile-joystick {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 120px;
    height: 120px;
    pointer-events: all;
}

.joystick-outer {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 215, 0, 0.5);
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.joystick-inner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
    cursor: pointer;
    position: relative;
}

.joystick-inner:active {
    transform: scale(0.9);
}

/* Boutons d'action mobiles */
.mobile-actions {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: all;
}

.action-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(255, 215, 0, 0.5);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    font-family: 'Press Start 2P', monospace;
    padding: 0;
}

.action-btn:active {
    transform: scale(0.9);
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
}

.btn-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.btn-label {
    font-size: 0.4rem;
    line-height: 1;
    text-align: center;
}

.power-btn {
    border-color: #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3);
}

.power-btn:active {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
}

/* États du joystick */
.joystick-active .joystick-outer {
    border-color: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
}

.joystick-active .joystick-inner {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* Popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 3px solid #ffd700;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: popupAppear 0.3s ease-out;
}

@keyframes popupAppear {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.popup-header h3 {
    font-size: 1.3rem;
    color: #ffd700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.popup-character-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #ffd700;
    object-fit: cover;
}

.popup-body {
    text-align: center;
    margin-bottom: 1.5rem;
}

.popup-body p {
    font-size: 0.8rem;
    color: white;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.popup-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.popup-actions .game-btn {
    flex: 1;
    max-width: 150px;
}

.close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #c0392b;
    transform: rotate(90deg);
}

/* Popup d'aide */
.help-popup {
    max-width: 600px;
}

.help-content {
    text-align: left;
}

.help-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #ffd700;
}

.help-section h4 {
    font-size: 1rem;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.help-section p {
    font-size: 0.7rem;
    color: white;
    line-height: 1.5;
    margin: 0;
}

/* Page de confirmation */
.confirm-container {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    max-width: 500px;
    width: 90%;
}

.confirm-title {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.confirm-character {
    margin-bottom: 3rem;
}

.confirm-character-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #ffd700;
    margin-bottom: 1rem;
    object-fit: cover;
}

.confirm-character h3 {
    font-size: 1.5rem;
    color: #ffd700;
    margin-bottom: 1rem;
}

.confirm-power {
    font-size: 1rem;
    color: white;
    margin-bottom: 0;
}

.confirm-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.confirm-actions .game-btn {
    flex: 1;
    max-width: 200px;
}

/* Info de sélection */
.character-info-display {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.character-info-display p {
    font-size: 0.7rem;
    color: #ffd700;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    /* Afficher les contrôles mobiles */
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-controls {
        display: block;
    }
    
    /* Popups sur mobile */
    .popup-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .popup-header h3 {
        font-size: 1.1rem;
    }
    
    .popup-character-image {
        width: 60px;
        height: 60px;
    }
    
    .popup-body p {
        font-size: 0.7rem;
    }
    
    .popup-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .popup-actions .game-btn {
        max-width: none;
    }
    
    .help-section h4 {
        font-size: 0.9rem;
    }
    
    .help-section p {
        font-size: 0.6rem;
    }
    
    /* Responsive pour écran de confirmation */
    .confirm-container {
        width: 95%;
        padding: 1.5rem;
    }
    
    .confirm-title {
        font-size: clamp(1.2rem, 4vw, 2rem);
    }
    
    .confirm-character-image {
        width: clamp(100px, 25vw, 150px);
        height: clamp(100px, 25vw, 150px);
    }
    
    .confirm-character h3 {
        font-size: clamp(0.8rem, 3vw, 1.5rem);
    }
    
    .confirm-power {
        font-size: clamp(0.6rem, 2.5vw, 1rem);
    }
    
    .confirm-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .confirm-actions .game-btn {
        max-width: none;
    }
    
    /* Canvas responsive */
    #gameCanvas {
        max-width: 100%;
        max-height: calc(100vh - 200px);
        width: 100vw !important;
        height: calc(100vh - 100px) !important;
        border-radius: 10px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    /* Interface de jeu responsive */
    .game-ui {
        padding: 0.5rem;
        font-size: 0.6rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .ui-left, .ui-center, .ui-right {
        flex: 1;
        min-width: 100px;
    }
    
    /* Contrôles mobiles responsive */
    .mobile-joystick {
        width: clamp(100px, 20vw, 120px);
        height: clamp(100px, 20vw, 120px);
        bottom: clamp(15px, 3vw, 20px);
        left: clamp(15px, 3vw, 20px);
    }
    
    .joystick-outer {
        width: 100%;
        height: 100%;
    }
    
    .joystick-inner {
        width: clamp(40px, 8vw, 50px);
        height: clamp(40px, 8vw, 50px);
    }
    
    .mobile-actions {
        bottom: clamp(15px, 3vw, 20px);
        right: clamp(15px, 3vw, 20px);
        gap: clamp(10px, 2vw, 15px);
    }
    
    .action-btn {
        width: clamp(60px, 12vw, 70px);
        height: clamp(60px, 12vw, 70px);
    }
    
    .btn-icon {
        font-size: clamp(1rem, 2.5vw, 1.2rem);
    }
    
    .btn-label {
        font-size: clamp(0.3rem, 0.8vw, 0.4rem);
    }
}

/* Très petits écrans (moins de 400px) */
@media (max-width: 400px) {
    .character-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .mobile-joystick {
        width: 90px;
        height: 90px;
        bottom: 10px;
        left: 10px;
    }
    
    .joystick-inner {
        width: 35px;
        height: 35px;
    }
    
    .mobile-actions {
        bottom: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .action-btn {
        width: 55px;
        height: 55px;
    }
    
    .btn-icon {
        font-size: 0.9rem;
    }
    
    .btn-label {
        font-size: 0.25rem;
    }
    
    .confirm-actions {
        gap: 0.5rem;
    }
}

/* Très grands écrans */
@media (min-width: 1200px) {
    .game-title {
        font-size: 3.5rem;
    }
    
    .character-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .mobile-controls {
        display: none !important;
    }
    
    /* Responsive pour tous les éléments */
    .game-title {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
        padding: 0 1rem;
    }
    
    .game-subtitle {
        font-size: clamp(0.8rem, 3vw, 1rem);
        padding: 0 1rem;
    }
    
    .game-btn {
        font-size: clamp(0.6rem, 2.5vw, 0.8rem);
        padding: clamp(0.8rem, 3vw, 1rem);
        margin: 0.5rem;
    }
    
    /* Écran de sélection responsive */
    .select-container {
        width: 95%;
        padding: 1rem;
    }
    
    .select-title {
        font-size: 1.8rem;
    }
    
    .character-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .character-card {
        padding: 10px;
        min-height: 140px;
    }
    
    .character-card h3 {
        font-size: 0.75rem;
        margin-bottom: 5px;
        line-height: 1.1;
    }
    
    .character-power {
        font-size: 0.65rem;
        line-height: 1.1;
    }
    
    .character-avatar {
        width: clamp(80px, 15vw, 100px);
        height: clamp(80px, 15vw, 100px);
    }
    }
    
    .game-ui {
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .ui-center, .ui-right {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 20px;
    }
    
    .score, .level, .lives {
        font-size: 0.8rem;
    }
    
    .controls-hint {
        font-size: 0.7rem;
    }
    
    .pause-container, .gameover-container, .leaderboard-container {
        padding: 20px;
        margin: 20px;
    }
    
    .pause-actions, .gameover-actions, .leaderboard-actions {
        flex-direction: column;
    }
}

/* Curseurs spéciaux */
body {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='24' viewport='0 0 100 100' style='fill:black;font-size:14px;'><text y='20'>🐹</text></svg>"), auto;
}

.game-btn {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='24' viewport='0 0 100 100' style='fill:black;font-size:14px;'><text y='20'>👆</text></svg>"), pointer;
}