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

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, #81d4fa 0%, #ffcc80 100%);
    /* Fondo más colorido */
    color: #424242;
    /* Texto más oscuro para legibilidad */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 800px;
    width: 100%;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 111, 97, 0.2);
    /* Sombra de color coral */
    overflow: hidden;
    padding: 30px;
    position: relative;
}

.screen {
    text-align: center;
    transition: all 0.3s ease;
}

h1 {
    color: #ff6f61;
    /* Coral */
    margin-bottom: 20px;
    font-size: 2.2rem;
}

h2 {
    color: #ff6f61;
    /* Coral */
    margin-bottom: 15px;
    font-size: 1.6rem;
}

p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #424242;
}

.btn {
    background-color: #4db6ac;
    /* Teal */
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 10px;
}

.btn-primary {
    background-color: #4db6ac;
    /* Teal */
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #ff8a65;
    /* Naranja claro al pasar el mouse */
}

.hidden {
    display: none;
}

/* Pantalla de inicio */
#start-screen {
    padding: 20px;
}

.animated-flags {
    margin: 20px 0;
    height: 120px;
    overflow: hidden;
    position: relative;
}

.flag-animation {
    max-width: 100%;
    animation: float 3s infinite ease-in-out;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.config-section {
    background-color: #f5f7fa;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80%;
    height: 10px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    margin-bottom: 10px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #3f72af;
    cursor: pointer;
}

#countries-value {
    font-weight: bold;
    color: #3f72af;
    font-size: 1.2rem;
}

/* Pantalla de juego */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.score-container {
    font-size: 1.2rem;
    font-weight: bold;
    color: #3f72af;
}

.progress-container {
    flex-grow: 1;
    margin-left: 20px;
}

#progress-text {
    text-align: right;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.progress-bar {
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background-color: #3f72af;
    width: 0%;
    transition: width 0.3s ease;
}

.game-area {
    margin: 30px 0;
}

#flag-container {
    margin-bottom: 20px;
}

#flag-image {
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.option-btn {
    background-color: #f5f7fa;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    background-color: #e9ecef;
}

.option-btn.correct {
    background-color: #a8e6cf;
    border-color: #1b998b;
}

.option-btn.incorrect {
    background-color: #ffaaa5;
    border-color: #ff8b94;
}

/* Pantalla de resultados */
#result-screen {
    padding: 30px 20px;
}

.result-details {
    margin: 30px 0;
}

.stars-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.stars-row {
    display: flex;
    justify-content: center;
    font-size: 2.5rem;
    color: #ffc107;
}

.result-message {
    margin-top: 15px;
    font-size: 1.1rem;
    color: #555;
}

.buttons-container {
    margin-top: 30px;
}

/* Estilos responsivos */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    #options-container {
        grid-template-columns: 1fr;
    }

    #flag-image {
        max-width: 250px;
    }
}