body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f8f8f8;
    color: black;
}

#game-container {
    margin: 20px auto;
    width: 80%;
    max-width: 600px;
    padding: 20px;
    background: white;
    color: black;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Shadow effect */
}

#flag-grid {
    display: flex; /* Switch to flexbox for better control */
    flex-wrap: wrap; /* Allows wrapping when needed */
    justify-content: center; /* Centers flags evenly */
    gap: 15px; /* Ensures equal horizontal spacing */
    padding: 10px;
    background: white;
    border-radius: 5px;
    width: fit-content;
    margin: 0 auto; /* Centers the grid */
}

.flag {
    height: 80px !important; /* Uniform height */
    width: auto !important; /* Keeps natural width */
    max-width: 150px; /* Prevents overly wide flags */
    object-fit: contain; /* Maintains aspect ratio without cutting off */
    cursor: pointer;
    border: 2px solid transparent;
}


.flag:hover {
    border: 2px solid blue;
}

#start-button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
}

#start-button:hover {
    background-color: #218838;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#time-left, #time-label {
    transition: color 0.3s ease-in-out;
}

/* Positioning the timer at the bottom */
#time-container {
    position: fixed;
    bottom: 20px;
    width: 100%;
    text-align: center;
}
