/* General Body & Font Styles */
body {
    background-color: #3a4750;
    color: #eeeeee;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    text-align: center;
}

h1 {
    margin-bottom: 0;
}

/* Main Game Container */
.game-container {
    padding: 20px 30px;
    position: relative;
    margin: auto;
    width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hangman Figure Styling */
.hangman-figure {
    fill: transparent;
    stroke: #eeeeee;
    stroke-width: 4px;
    stroke-linecap: round;
}

.figure-part {
    /* Hide body parts initially */
    display: none;
}

/* Hidden Word Display */
#word-display {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.letter {
    border-bottom: 3px solid #d95763;
    display: inline-flex;
    font-size: 30px;
    align-items: center;
    justify-content: center;
    margin: 0 3px;
    height: 50px;
    width: 25px;
}

/* On-screen Keyboard */
#keyboard {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    max-width: 500px;
}

.key {
    font-size: 16px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background-color: #d95763;
    color: #eeeeee;
    border: none;
    border-radius: 5px;
}

.key:disabled {
    background-color: #8c8c8c;
    cursor: not-allowed;
}

/* Popup Container and Box */
.popup-container {
    background-color: rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    /* Hide popup initially */
    display: none; 
    align-items: center;
    justify-content: center;
}

.popup {
    background: #303841;
    border-radius: 5px;
    box-shadow: 0 15px 10px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

#play-again-btn {
    cursor: pointer;
    background-color: #d95763;
    color: #eeeeee;
    border: 0;
    margin-top: 20px;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 5px;
}

#play-again-btn:focus {
    outline: 0;
}

/* Add these styles to the end of style.css */

/* Utility class to hide elements */
.hidden {
    display: none !important;
}

/* Setup Container Styles */
#setup-container {
    text-align: center;
}

#word-input-container input {
    display: block;
    margin: 10px auto;
    padding: 10px;
    width: 250px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.mode-btn {
    cursor: pointer;
    background-color: #d95763;
    color: #eeeeee;
    border: 0;
    margin: 10px;
    padding: 12px 20px;
    font-size: 18px;
    border-radius: 5px;
}

.mode-btn.secondary {
    background-color: #555;
}

.button-group {
    margin-top: 10px;
}