@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.game-container {
    background-color: white;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    text-align: center;
}

h1 {
    color: #2c3e50;
    margin-top: 0;
}

.score-container {
    font-size: 1.2rem;
    font-weight: 600;
    color: #34495e;
}

#flag-container {
    margin: 20px 0;
    min-height: 150px; /* Reserve space for the flag */
}

#flag-container img {
    max-width: 100%;
    height: 150px;
    border: 3px solid #ecf0f1;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 20px 0;
}

.option-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.option-button:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.option-button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* --- Feedback Styles --- */
.correct {
    background-color: #2ecc71;
}

.incorrect {
    background-color: #e74c3c;
}

#feedback-text {
    font-size: 1.2rem;
    font-weight: 600;
    min-height: 30px; /* Reserve space for the message */
    margin-top: 20px;
}

#next-button {
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#next-button:hover {
    background-color: #8e44ad;
}

.hidden {
    display: none;
}

/* Styling for new game controls */
.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

#region-select, #restart-button {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #ecf0f1;
    cursor: pointer;
}

#restart-button {
    background-color: #f39c12;
    color: white;
    border-color: #f39c12;
    transition: background-color 0.3s ease;
}

#restart-button:hover {
    background-color: #e67e22;
}

/* Updated Score Container Styling */
.score-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #ecf0f1;
    padding: 10px;
    border-radius: 8px;
    margin: 20px 0;
}

.score-container p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #34495e;
}

/* Styling for updated game controls */
.game-controls {
    flex-wrap: wrap; /* Allow controls to wrap on small screens */
}
.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.control-group label {
    font-weight: 600;
    color: #34495e;
}

/* Toggle Switch Styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #e74c3c; /* Red for challenge mode */
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* Timer Styling */
#timer-container {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e74c3c;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* Styling for Hint Button */
#hint-button {
    background-color: #2ecc71;
    color: white;
    border: none;
    transition: background-color 0.3s ease;
}

#hint-button:hover:not(:disabled) {
    background-color: #27ae60;
}

#hint-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#hints-remaining {
    font-weight: 600;
    color: #34495e;
}