@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');
:root {
    /* Typography */
    --font-family: 'Outfit', sans-serif;
    --large-text-size: 2rem;    /* 32px */
    --medium-text-size: 1.25rem; /* 20px */
    --small-text-size: 0.75rem;  /* 12px */
    --button-text-size: 0.875rem; /* 14px */

    /* Colors */
    --primary-color: hsl(273, 66%, 47%);    /* #7429C6 */
    --secondary-color: hsl(293, 75%, 62%);  /* #C951E7 */
    --accent-color: hsl(290, 53%, 27%);     /* #672171 */
    --dark-gray: hsl(218, 14%, 34%);        /* #4A5567 */
    --light-gray: hsl(215, 17%, 66%);       /* #97A3B6 */
    --dark-blue: hsl(231, 50%, 4%);         /* #030616 */
    --lightest-gray: hsl(217, 38%, 95%);    /* #F2F5F9 */
}
*{
    font-family: var(--font-family);
}
body {
    margin: 0 5rem;
    padding: 0;
    display: flex;
    height: 100vh;  
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-image: url('images/bg-guess-the-word.png');
}

.container {
    width: 400px;
    padding: 30px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    flex-direction: column;
    justify-content: center;
    background-color: hsl(227, 41%, 7%);
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1); 
}
p,.tries-txt{
    color: var(--lightest-gray);
}
.output{
    width: 100%;
    height: 8vh;
    padding: 10px;
    margin: 2rem 0;
    border-radius: 10px;
    text-align: center;
    letter-spacing: 1rem;
    color: var(--lightest-gray);
    font-size: var(--large-text-size);
    background-color: var(--dark-gray);
    box-shadow: 0px 4px 0px 0px #030616;
    border-bottom: 5px solid hsl(0, 0%, 0%);
}
.options,.tries,.tries-txt,.tries-container,
.mistakes,.actions,.dot-container,.tries-counter{
    display: flex;
    align-items: center;
}
.options{
    gap: 5px;
    margin-top: 2rem;
    margin-bottom: 5rem;
    justify-content: center;
}
.tries-container,.options,.actions{
    width: 100%;
    justify-content: space-between;
}
.tries-counter{
    gap: 10px;
    justify-content: center;
}
.actions{
    width: 80%;
}
.letter-input{
    width: 40px;
    height: 40px;
    outline: none;
    border-radius: 10px;
    font-size: 24px;
    text-align: center;
    color: var(--lightest-gray);
    border: 2px solid var(--dark-gray);
    background-color: var(--dark-blue);
}
.letter-input:focus{
    border-color: var(--secondary-color);
}
button{
    border: none; 
    text-align: center;
    border-radius: 8px;
    padding: 0.6rem 2.5rem;
    color: var(--lightest-gray); 
    font-size: var(--button-text-size); 
    background-color: var(--secondary-color);
    filter: drop-shadow(0px 3px 0px #7b248a); 
    border-bottom: 3px solid var(--accent-color);
}
.dot-container {
    gap: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
    transition: background-color 0.3s ease;
}
.game-alert {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    font-weight: bold;
    opacity: 1;
    color: var(--lightest-gray);
    transition: opacity 0.5s ease-in-out;
}

.success {
    background-color: #2ecc71; 
}

.error {
    background-color: #e74c3c; 
}

.hidden {
    opacity: 0;
    pointer-events: none;
}
.letter-input.error {
    animation: shake 0.5s ease;
    border-color: red;
}
@media (max-width: 400px) {
    body {
        margin: 0.5rem;
    }
    .container {
        width: 90%;
        padding: 15px;
    }
    .output{
        font-size: 1.5em;
        width: 95%;
    }
    .options{
        gap: 1px;
    }
    .letter-input {
        width: 25px;
        height: 25px;
        font-size: 18px;
    }
    .actions,.tries-container {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }
    .actions button{
        width: 100%;
    }
}
@keyframes resetAnimation {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.reset-animation {
    animation: resetAnimation 0.5s ease;
}

@keyframes shake {
    0% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}