* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #2d2d2d;
    font-family: Arial, sans-serif;
    color: white;
}

.game-container {
    text-align: center;
    color: white;
    position: relative;
    padding: 20px;
    /* Added padding for better spacing on smaller screens */
}

#gameCanvas {
    border: 3px solid #ffffff;
    background-color: #1a1a1a;
    image-rendering: pixelated;
}

.hidden {
    display: none;
}

#gameOverScreen, #gameOverScreen2, #correctAnswerScreen3 {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 10px;
}

#question,
#score {
    margin-bottom: 10px;
    font-size: 1.2em;
    /* Reduced font size for smaller devices */
}

button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: #ff6600;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #ff8533;
}

/* Responsive Design */
@media (max-width: 600px) {

    #question,
    #score {
        font-size: 1em;
        /* Further reduce font size on small screens */
    }

    button {
        padding: 8px 16px;
        /* Smaller button padding on small screens */
        font-size: 0.9em;
        /* Smaller font size for buttons */
    }
}

/* Crackers CSS */
#crackerContainer {
    padding-left: 130px;
}
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Cracker particle styling */
.particle {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.8;
    animation: explode 1s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: scale(2) translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: scale(1) translate(var(--x), var(--y));
        opacity: 0;
    }
}

/* After Win Animation CSS */
@keyframes scaleUp {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Confetti effect */
.confetti {
    position: fixed;
    top: -10px;
    width: 10px;
    height: 10px;
    background-color: red;
    opacity: 0.7;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}