/* --- CSS STYLES (Base) --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #2c3e50;
    color: #ecf0f1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 10px;
}

.container {
    background-color: #34495e;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    text-align: center;
    max-width: 650px;
    width: 90%;
}

h1 {
    color: #e67e22;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hangman-draw {
    margin-bottom: 20px;
}

.word-display {
    font-size: 2em;
    letter-spacing: 5px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    min-height: 40px; 
    word-break: break-all;
}

.message {
    height: 30px;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 1.2em;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.key {
    background-color: #fff;
    color: #2c3e50;
    border: none;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.key:hover {
    background-color: #ecf0f1;
    transform: scale(1.1);
}

.key:disabled {
    background-color: #95a5a6;
    color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

#reset-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    display: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s;
}
#reset-btn:hover {
    background-color: #2ecc71;
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
        max-width: 550px;
    }
    h1 {
        font-size: 1.8rem;
    }
    .word-display {
        font-size: 1.8em;
    }
}

@media (max-width: 500px) {
    body {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
        min-height: auto;
    }
    .container {
        width: 95%;
        max-width: 100%;
        padding: 20px 15px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    }
    h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
        margin-bottom: 15px;
    }
    .word-display {
        font-size: 1.6em;
        letter-spacing: 4px;
        min-height: 35px; 
    }
    .keyboard {
        gap: 8px;
        margin-bottom: 20px;
    }
    .key {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
        .message {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
    #reset-btn {
        padding: 10px 20px;
        font-size: 1em;
    }
}

@media (max-width: 350px) {
    .container {
        padding: 15px 10px;
    }
    h1 {
        font-size: 1.3rem;
    }
    .word-display {
        font-size: 1.4em;
        letter-spacing: 3px;
    }
    .key {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
    }
    .keyboard {
        gap: 5px;
    }
}