/* 🌟 Style Global */
body {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    background: linear-gradient(120deg, #e6fcee, #c6e9d2, #acc4b4);
    color: #313836;
    margin: 0;
    padding: 0;
}

/* 🌟 Conteneur du jeu */
.game-container {
   display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 400px;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    margin: auto;
}

/* 🌟 Titre */
h1 {
    font-size: 24px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* 🌟 Pendu SVG */
.pendu {
    display: none;
}

/* 🌟 Parties du pendu animées */
.body-part {
    display: none !important;
}

/* 🌟 Affichage du mot */
#word-display {
    font-size: 28px;
    letter-spacing: 8px;
    font-weight: bold;
    margin: 15px 0;
    display: inline-block;
}

/* 🌟 Message de victoire ou défaite */
#message {
    font-size: 18px;
    margin: 10px 0;
    font-weight: bold;
}

/* 🌟 Clavier virtuel */
#keyboard {
    margin-top: 20px;
}

/* 🌟 Bouton Rejouer */
button {
    background: #313836;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background 0.3s;
}

button:hover {
    background: #5a6461;

}

/* 🌟 Ajout du compteur d'erreurs */
#error-counter {
    font-size: 18px;
    font-weight: bold;
    margin-top: 15px;
    color: #313836;
}

/* 🌟 Barre de progression des erreurs */
.progress-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    height: 10px;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
    position: relative; 
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #313836;
    transition: width 0.3s ease-in-out;
}

/* 🎮 Clavier virtuel amélioré */
#keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px;
}

.key {
    width: 40px; /* Augmenté */
    height: 40px; /* Augmenté */
    font-size: 20px; /* Texte plus grand */
    font-weight: bold; /* Texte en gras */
    text-align: center;
    line-height: 40px;
    background-color: #f5f5f5;
    border: 2px solid #666;
    cursor: pointer;
    border-radius: 5px;
    user-select: none;
    transition: background 0.2s, transform 0.1s;
    color: #0f2027;
}

.key:hover {
    background-color: #ddd;
    transform: scale(1.1); /* Effet d'agrandissement au survol */
}

.key.disabled {
    background-color: #888;
    border: 2px solid #555;
    color: white;
    cursor: not-allowed;
    transform: none;
}

/* 🌟 Image à dévoiler progressivement */
#photo-reveal {
    width: 300px;
    opacity: 1;
    transition: opacity 0.5s, filter 0.5s;
    display: block;
    margin: auto;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    filter: blur(20px);
}

