body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f4f4f4;
}

.game-container {
    text-align: center;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 400px;
}

h2 {
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    margin: 10px;
    cursor: pointer;
    background-color: #4d4bd1;
    color: white;
    border: none;
    border-radius: 5px;
}

button:hover {
    background-color: #4d4bd1;
}



/* Input alanı için stil */
input[type="text"] {
    padding: 10px;
    font-size: 16px;
    margin-bottom: 20px;
    width: 150px;
    text-transform: uppercase;
    background-color: #f4f4f4; /* Eski gri renk */
    color: #333;
}

input[type="text"]:focus {
    width: 150px;
    outline: none;
    background-color: #e0e0e0; /* Input odaklanınca biraz daha açık gri */
}

#guess-input {
    padding: 10px;
    font-size: 16px;
    margin-bottom: 20px;
    width: 150px;
    text-transform: uppercase;
}

#word-grid {
    font-size: 24px;
    margin-bottom: 20px;
    letter-spacing: 10px;
    word-wrap: break-word;
    white-space: pre-wrap; /* Bu, her kelimeyi bir alt satıra yerleştirir */
}

/* Adam Asmaca Alanı */
#hangman-container {
    margin-top: 30px; /* Kelimenin altına yerleştirmek için biraz boşluk */
    display: flex;
    justify-content: center;
    align-items: center;
}

#hangman {
    position: relative;
    width: 80px;
    height: 180px;
}

/* Adamın başı */
#head {
    width: 40px;
    height: 40px;
    border: 3px solid black;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 20px;
    display: none;
}

/* Adamın vücudu */
#body {
    width: 2px;
    height: 60px;
    background-color: black;
    position: absolute;
    top: 50px;
    left: 39px;
    display: none;
}

/* Kollar */
#left-arm, #right-arm {
    width: 40px;
    height: 2px;
    background-color: black;
    position: absolute;
    top: 60px;
    display: none;
}

#left-arm {
    transform: rotate(-45deg);
    transform-origin: right;
    left: 0;
}

#right-arm {
    transform: rotate(45deg);
    transform-origin: left;
    right: 0;
}

/* Bacaklar */
#left-leg, #right-leg {
    width: 2px;
    height: 40px;
    background-color: black;
    position: absolute;
    top: 110px;
    display: none;
}

/* Bacakları daha yakın yapıyoruz */
#left-leg {
    transform: rotate(45deg);
    transform-origin: top;
    left: 35px;  /* Kollar gibi yakın yapmak için bu değeri daha da küçülttük */
}

#right-leg {
    transform: rotate(-45deg);
    transform-origin: top;
    right: 35px; /* Aynı şekilde bacağı sağa yaklaştırdık */
}

/* Kullanıcıya kalan tahmin hakkını gösteren metin */
#attempts-left {
    font-size: 16px;
    margin-top: 10px;
}

/* Sonuç metni (Kazandınız/Kaybettiniz) */
#result {
    font-size: 18px;
    margin-top: 20px;
}

/* Tahmin edilen harflerin gösterilmesi */
#guessed-letters {
    font-size: 16px;
    margin-top: 10px;
}

/* Yeni oyun butonu */
#new-game-container button {
    margin-top: 20px;
}

/* Kategori seçimi için stil */
#category-container {
    margin-bottom: 20px;
}

#category-container button {
    padding: 10px 20px;
    font-size: 16px;
    margin: 5px;
    cursor: pointer;
    background-color: #4d4bd1;
    color: white;
    border: none;
    border-radius: 5px;
}

#category-container button:hover {
    background-color: #4d4bd1;
}

/* Kategori adı üst kısımda */
#category-display {
    margin-top: 20px;
    font-size: 15px;
    font-weight: bold;
    color: #ff0000;
}

/* Mobil uyum için stil */
@media (max-width: 600px) {
    .game-container {
        width: 100%;
        padding: 15px;
    }

    #word-grid {
        font-size: 20px;
    }

    #guessed-letters {
        font-size: 16px;
    }

    #hangman {
        width: 70px;
        height: 160px;
    }

    #head {
        width: 35px;
        height: 35px;
    }

    #body {
        width: 6px;
        height: 50px;
    }

    #left-arm, #right-arm {
        width: 30px;
        height: 6px;
    }

    #left-leg, #right-leg {
        width: 30px;
        height: 6px;
    }
}
