/* General Styles  */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&display=swap');
body {
    font-family: 'Fredoka', sans-serif;
    text-align: center;
    background: #ff6f61 url(../images/emoji-background.png);
    /* background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    background-image: url(../images/emoji-background.png);
    background-repeat: repeat;
    background-size: auto; */
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background: linear-gradient(135deg, #FF6F61, #FFCC5C);
    color: white;
    padding: 20px;
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 20px 20px;

 }

button {
    background: #ffcc5c;
    border: none;
    padding: 12px 24px;
    font-size: 20px;
    margin: 10px;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.2s, background 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

button:hover {
    background: #ffb347;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#emoji-display {
    font-size: 60px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 20px;
    width: fit-content;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#user-guess {
    padding: 12px;
    font-size: 20px;
    border-radius: 12px;
    border: 2px solid #ffcc5c;
    width: 80%;
    text-align: center;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
    background-color: #fff;
    margin: 10px auto; /* Center the input field */
    display: block; /* Center the input field */
}

#user-guess:focus {
    border-color: #ff6f61;
    box-shadow: 0 0 10px rgba(255, 111, 97, 0.5);
    background-color: #fff7f5;
}

#user-guess::placeholder {
    color: #ccc; /* Placeholder text color */
    opacity: 1; /* Ensure placeholder text is fully opaque */
}

#feedback {
    font-size: 22px;
    font-weight: bold;
    margin-top: 10px;
    transition: all 0.3s ease-in-out;
}

.correct {
    color: green;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.wrong {
    color: red;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

#score {
    font-size: 26px;
    font-weight: bold;
    background: #ffcc5c;
    padding: 10px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* #score-text, #timer{
    background: #ffcc5c;
    border: none;
    padding: 12px 24px;
    font-size: 20px;
    margin: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: inline-block;
} */

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    max-width: 80%;
}

.modal-content {
    font-size: 20px;
}

.close {
    font-size: 28px;
    cursor: pointer;
    color: red;
    font-weight: bold;
}

/* Message Modal */
#message-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    max-width: 80%;
    z-index: 1000;
    text-align: center; /* Center the text inside the modal */
}

#message-modal .modal-content {
    font-size: 20px;
    text-align: center;
}

#message-modal .close {
    font-size: 28px;
    cursor: pointer;
    color: red;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Confetti animation for correct answer */
.confetti {
    position: fixed;
    top: 0;
    left: 50%;
    width: 10px;
    height: 10px;
    background: gold;
    opacity: 0.7;
    border-radius: 50%;
    animation: confetti-fall 1.5s linear infinite;
}

@keyframes confetti-fall {
    0% { transform: translateY(0) translateX(0); opacity: 1; }
    100% { transform: translateY(100vh) translateX(calc(-50vw + 100 * var(--x))); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        font-size: 24px;
        padding: 15px;
    }
    button {
        font-size: 18px;
        padding: 10px;
    }
    #emoji-display {
        font-size: 50px;
    }
}

/* 480px */
@media (max-width: 480px) {
    header {
        font-size: 20px;
        padding: 10px;
    }
    button {
        font-size: 16px;
        padding: 8px;
    }
    #emoji-display {
        font-size: 40px;
    }
}