body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    transition: background 0.5s ease;
    background: linear-gradient(120deg, #9e0c97, #24a7e4) no-repeat center
        center fixed;
    background-size: cover;
}

h1 {
    font-size: 3em;
    color: #fff;
    text-shadow: 2px 2px 0 #000, 4px 4px 0 #555, 6px 6px 0 #aaa;
    margin-bottom: 20px;
    -webkit-text-stroke: 1px black;
    color: #2575fc;
}

#definition-div {
    -webkit-text-stroke: 0.2px #296ef9;
    margin-top: 50px;
    border-radius: 5px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#definition {
    font-size: 1.3em;
    font-style: italic;
    padding: 10px;
    color: #fff;
}

#reset {
    margin-bottom: 40px !important;
}

#text-input {
    padding: 10px;
    font-size: 16px;
    margin: 10px auto;
    border: 2px solid #24a7e4;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
}

#special-message {
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-style: italic;
    color: #e4d505;
    font-size: 1.2em;
}

#text-input:focus {
    border-color: #9e0c97;
}

.container {
    margin-top: 50px;
}

input,
button {
    padding: 10px;
    font-size: 16px;
    margin: 10px;
}

button {
    cursor: pointer;
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    color: white;
    border: none;
    border-radius: 5px;
    transition: transform 0.3s;
}

button:hover {
    transform: scale(1.1);
}

#reverse-animation {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 2em;
}

.letter {
    display: inline-block;
    transform: scale(0);
    animation: pop-out 0.5s forwards ease-in-out;
}

@keyframes pop-out {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#final-word {
    font-size: 2.5em;
    margin-top: 20px;
    color: #333;
}

#result {
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
}

body.correct {
    background: linear-gradient(45deg, #11998e, #38ef7d) no-repeat center center
        fixed;
    background-size: cover;
}

body.newYear {
    background: url(https://c.tenor.com/JO3JDWVaWwAAAAAC/tenor.gif) no-repeat
        center center fixed;
    background-size: cover;
    background-color: #000;
}

body.incorrect {
    background: linear-gradient(45deg, #ff4e50, #ff0000) no-repeat center center
        fixed;
    background-size: cover;
}

.congratulations {
    font-size: 2em;
    color: gold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.failure {
    font-size: 2em;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
        padding: 10px;
    }

    h1 {
        font-size: 2em;
        -webkit-text-stroke: 0.4px black;
    }

    #text-input {
        width: 90%;
        font-size: 14px;
    }

    button {
        width: 30%;
        font-size: 14px;
    }

    #reverse-animation {
        font-size: 1.2em;
        gap: 5px;
    }

    #final-word {
        font-size: 1.5em;
    }

    #reset {
        margin-bottom: 5px !important;
    }

    #result {
        font-size: 14px;
    }

    #special-message {
        font-size: 1em;
    }

    .container {
        margin-top: 10px;
        padding: 10px;
    }

    body.newYear {
        background-size: contain;
        background-position: center;
    }

    #definition-div {
        margin-top: 20px;
        padding: 5px;
    }

    #definition {
        font-size: 1.2em;
        padding: 2px;
    }
}
