/* Reset and basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Full viewport height */
    flex-direction: column;
    padding: 20px; /* Optional padding to prevent content from touching edges */
    box-sizing: border-box;
    overflow: hidden; /* Prevents overflow if any content exceeds viewport */
}

/* Header */
header {
    width: 100%;
    max-width: 1200px;
    background-color: #4a90e2;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 1.5em;
    position: relative;
    box-sizing: border-box;
    border-radius: 10px 10px 0 0;
}



/* Container layout */
.container {
    display: grid;
    grid-template-areas:
        "sidebar main-content";
    grid-template-columns: 250px 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background: #333;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 10px;
}

.sidebar button {
    width: 100%;
    padding: 10px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s;
}

.sidebar button:hover {
    background-color: #357abd;
}

/* Main Content */
.main-content {
    grid-area: main-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid black;
}

#question-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#question {
    font-size: 3em;
    font-weight: bold;
    padding: 20px;
    background: #e9e9e9;
    border-radius: 5px;
}

#answer {
    padding: 10px;
    font-size: 1em;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#question-container button {
    padding: 10px 20px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
}

#question-container button:hover {
    background-color: #357abd;
}

/* Control Buttons */
.control-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.control-buttons button {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.control-buttons button:hover {
    background-color: #555;
}

/* Progress Bar */
#progress {
    display: flex;
    gap: 10px; /* Increased gap for a larger view */
    justify-content: center;
    padding: 10px 0;
}

.progress-bar {
    width: 20px; /* Increased size of progress bar */
    height: 50px; /* Increased height */
    background-color: #ddd;
    border-radius: 3px;
}

.progress-bar.filled {
    background-color: #4caf50;
}

/* Festive Popup */
.festive-popup {
    background: linear-gradient(to right, #ff4b5c, #f0b93d);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: festive-animation 1.5s infinite alternate;
}

.festive-popup h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.festive-popup p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.festive-popup button {
    padding: 10px 20px;
    background-color: #fff;
    color: #333;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.festive-popup button:hover {
    background-color: #4caf50;
}

@keyframes festive-animation {
    0% {
        background-color: #ff4b5c;
        transform: scale(1);
    }
    100% {
        background-color: #f0b93d;
        transform: scale(1.1);
    }
}

/* Feedback Message */
#feedback {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    background-color: #f44336; /* Red background for incorrect answer */
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    position: absolute;
    top: 20px;
    width: 100%;
    max-width: 400px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0; /* Initially hidden */
    transition: opacity 0.5s ease;
}

/* When feedback is shown */
#feedback.show {
    opacity: 1; /* Show the feedback */
}

/* Footer */
footer {
    width: 100%;
    max-width: 1200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 15px;
    font-size: 1em;
    border-radius: 0 0 10px 10px;
    margin-top: 20px;
    box-sizing: border-box;
}

/* Example media query for mobile devices */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr; /* Stack sidebar and main content on top of each other */
    }

    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }

    .main-content {
        width: 100%;
    }

    /* Adjust font sizes for smaller screens */
    #question {
        font-size: 2em;
    }

    #answer {
        font-size: 1em;
    }
}
