body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures the body takes the full height of the viewport */
    margin: 0;
}

footer {
    margin-top: auto; /* Pushes the footer to the bottom */
}

#quiz-container {
    width: 95%;
    max-width: 800px; /* Increased max width */
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    padding: 40px; /* Increased padding */
    text-align: center;
}

#question {
    font-size: 2em;
    margin-bottom: 25px;
}

#image-space {
    height: 150px;
    margin-bottom: 20px;
    background-color: #eaeaea;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 1.2em;
}

#answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px; /* Increased gap between cards */
    margin-bottom: 20px;
}

.answer-card {
    background: #ffe4b5; /* Light honey color */
    border: 2px solid #d2a679; /* Muted brown for contrast */
    border-radius: 15px;
    padding: 20px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.answer-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transform: skewX(-45deg);
    transition: left 0.3s ease;
}

.answer-card:hover::after {
    left: 100%;
}

.answer-card:hover {
    background: #ffd27f; /* Slightly darker honey color */
    transform: scale(1.1) rotate(1deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.answer-card.selected {
    pointer-events: none;
}

#timer-bar {
    height: 15px;
    width: 100%;
    background-color: green;
    border-radius: 7px;
    transition: width 0.1s linear, background-color 0.1s linear;
}

/* Styling for the results */
#results {
    font-size: 1.2em;
    margin-top: 20px;
}

button:not(.sidebar-hamburger):not(.sidebar-lang button) {
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:not(.sidebar-hamburger):not(.sidebar-lang button):hover {
    background: #0056b3;
}

.correct-effect {
    animation: correct-pulse 0.5s ease-in-out;
}

.wrong-effect {
    animation: wrong-shake 0.5s ease-in-out;
}

.correct-answer {
    animation: correct-glow 1s ease-in-out;
}

.wrong-answer {
    animation: wrong-fade 0.5s ease-in-out, shake 0.5s ease-in-out;
}

@keyframes correct-pulse {
    0% {
        transform: scale(1);
        background-color: #d4edda;
    }
    50% {
        transform: scale(1.1);
        background-color: #c3e6cb;
    }
    100% {
        transform: scale(1);
        background-color: #d4edda;
    }
}

@keyframes wrong-shake {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    50% {
        transform: translateX(5px);
    }
    75% {
        transform: translateX(-5px);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes correct-glow {
    0% {
        box-shadow: 0 0 10px #28a745;
    }
    50% {
        box-shadow: 0 0 20px #28a745;
    }
    100% {
        box-shadow: 0 0 10px #28a745;
    }
}

@keyframes wrong-fade {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
    }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* Styling for the start and end screens */
#start-screen, #end-screen {
    position: fixed; /* Ensures they are above all content and not affected by layout */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none; /* Initially hidden */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    padding: 40px;
    text-align: center;
    max-width: 600px;
}

#start-screen.active, #end-screen.active {
    display: flex; /* Show the active screen */
}

#end-screen {
    position: absolute; /* Position relative to the nearest positioned ancestor */
    top: 100%; /* Places it directly below the quiz container */
    left: 50%;
    transform: translateX(-50%);
}

#start-screen h1, #end-screen h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #333;
}

#start-screen p, #end-screen p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #555;
}

#start-screen button, #end-screen button {
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 15px 30px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.3s ease;
}

#start-screen button:hover, #end-screen button:hover {
    background: #0056b3;
}
