body {
    font-family: Arial, sans-serif;
    background-color: #000000; /* Sets the background to black */
    color: white;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.game-screen {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    padding-bottom: 200px; /* Increased space for both containers */
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.timer {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 5px;
}

.timer-label {
    font-size: 18px;
    opacity: 0.8;
}

.timer.warning {
    color: #ff4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.question {
    font-size: 26px;
    line-height: 1.4;
    text-align: center;
    padding: 20px;
    position: fixed;
    bottom: 280px; /* Increased to provide more space above buttons */
    left: 0;
    right: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2;
    border-top: 2px solid #fd7e14;
    min-height: 100px; /* Ensure consistent height for container */
    display: flex;
    align-items: center;
    justify-content: center;
}

.buttons {
    position: fixed;
    bottom: 120px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.9);
    border-top: 2px solid #fd7e14;
    z-index: 2;
}

.answer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.score-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    text-align: center;
    border-top: 2px solid #fd7e14;
    z-index: 1;
}

.score-label {
    font-size: 20px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.score {
    font-size: 48px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.score.correct {
    color: #4CAF50;
}

.score.incorrect {
    color: #ff4444;
}

button {
    padding: 15px 30px;
    font-size: 24px;
    background-color: #fd7e14;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #e06f12;
}

.start-screen, .end-screen {
    text-align: center;
}

.start-screen p, .end-screen p {
    font-size: 18px;
}

.menu-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
}

#start-button, #study-button, #play-again {
    background-color: #fd7e14;
    color: white;
    padding: 10px 20px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#start-button:hover, #study-button:hover, #play-again:hover {
    background-color: #e06f12;
}

.hidden {
    display: none;
}

body.correct {
    background-color: #d4edda; /* Light green for correct answers */
}

body.incorrect {
    background-color: #f8d7da; /* Light red for incorrect answers */
}

.logo {
    max-width: 200px;
    width: 100%;
    margin: 20px auto;
    display: block;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .game-container {
        padding: 15px;
    }

    .game-screen {
        padding-bottom: 240px;
    }

    .question {
        font-size: 20px;
        padding: 15px;
        bottom: 320px; /* Increased spacing on mobile */
        min-height: 80px; /* Slightly smaller minimum height on mobile */
    }

    .buttons {
        bottom: 140px;
        padding: 15px;
    }

    .answer-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    button {
        width: 100%;
        padding: 16px;
        font-size: 20px;
    }

    .timer {
        font-size: 42px;
    }

    .score {
        font-size: 42px;
    }
}

.game-logo {
    max-width: 150px;
    margin: 10px auto;
}

.feedback-container {
    text-align: center;
    width: 100%;
}

.answer-feedback {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    color: white;
}

.answer-feedback.correct {
    color: #4CAF50;
}

.answer-feedback.incorrect {
    color: #ff4444;
}

.next-button {
    background-color: #fd7e14;
    color: white;
    padding: 15px 30px;
    font-size: 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.next-button:hover {
    background-color: #e06f12;
}

.menu-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    text-align: center;
    border-top: 2px solid #fd7e14;
    z-index: 1;
}

#main-menu-button {
    font-size: 24px;
    padding: 15px 30px;
}

.countdown-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    width: 100%;
    height: 100%;
    position: fixed;
    overflow: hidden;
}

.countdown-number {
    font-size: 120px;
    font-weight: bold;
    color: #fd7e14;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: countdownPulse 1s infinite;
    transform-origin: center center;
}

@keyframes countdownPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.countdown-go {
    color: #4CAF50;
    animation: goAnimation 0.5s;
}

@keyframes goAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .countdown-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .countdown-number {
        font-size: 80px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

.high-score {
    margin: 20px 0;
    text-align: center;
}

.high-score h2 {
    font-size: 24px;
    color: #fd7e14;
    margin: 0;
}

@media (max-width: 600px) {
    .high-score h2 {
        font-size: 20px;
    }
}
