@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;900&family=Noto+Sans+JP:wght@400;700&family=Merriweather:wght@400;700;900&display=swap');

:root {
    --bg-color: #fff8f3;
    --snd-bg-color: #ffffff;
    --accent-bg: #1a1a1a;
    --accent-alt: #a4161a;
    --text-color: #2c2c2c;
    --text-light: #ffffff;
    --btn-text: #ffffff;
    --hover-shadow: rgba(0, 0, 0, 0.1);
    --highlight: #F54A2F;

    --card-bg: #F5E9D7;
    --dragon-red: #C0392B;
    --card-text: #4A4A4A;
    --decorative-blue: #A3B1B8;
}



body {
    background: var(--card-bg);
    color: var(--accent-alt);
    font-family: 'Merriweather', serif;
}

main {
    width: 730px;
    margin: 100px auto 50px;
    display: flex;
    align-items: center;
}

.section1 {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0 10px 10px 10px;
    border-radius: 8px;
}

h1 {
    text-align: center;
}

button {
    height: 100px;
    width: 100px;
    font-size: 40px;
    color: black;
    font-weight: bold;
}

button:hover {
    cursor: pointer;
}

#btn-reiniciar {
    width: 100%;
    padding: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    background-color: var(--accent-alt);
    color: var(--btn-text);
    border: none;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 10px var(--hover-shadow);
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

#btn-reiniciar:hover {
    background-color: var(--highlight);
    transform: scale(1.03);
    box-shadow: 0 6px 14px var(--hover-shadow);
    cursor: pointer;
}

.section2 {
    background-color: rgba(255, 255, 255, 0.2);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    width: 250px;
    height: 400px;
    padding: 0 20px;
}

.estadisticas {
    border: 1px solid white;
    height: 105px;
    border-radius: 8px;
    padding: 8px 20px;
    box-sizing: border-box;
}

footer p {
    font-size: 1.4rem;
    text-align: center;
}


/* ====== MEDIA QUERIES ====== */

/* 📱 Móviles (hasta 600px) */
@media (max-width: 600px) {
    main {
        flex-direction: column;
        width: 90%;
        margin: 5vh auto;
        gap: 4vh;
    }

    .section1,
    .section2 {
        width: 100%;
        padding: 4%;
        border-radius: 2vw;
    }

    h1 {
        font-size: 6vw;
    }

    button {
        height: 18vw;
        width: 18vw;
        font-size: 5vw;
    }

    /* 🖼️ Imágenes dentro de botones */
    button img {
        width: 14vw;
        height: auto;
        border-radius: 1vw;
    }

    #btn-reiniciar {
        font-size: 4.5vw;
        padding: 3.5vw;
        border-radius: 3vw;
    }

    .estadisticas {
        font-size: 3.5vw;
        padding: 4%;
    }

    footer p {
        font-size: 4vw;
        padding: 2vw;
    }

    #loading-overlay,
    #lose-overlay,
    #win-overlay,
    #memoriza-overlay {
        font-size: 4.5vw;
        padding: 0;
        border-radius: 3vw;
        line-height: 1.5;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #loading-overlay strong,
    #lose-overlay strong,
    #win-overlay strong,
    #memoriza-overlay strong {
        font-size: 5vw;
        display: block;
        margin-bottom: 2vw;
    }
}

/* 💻 Tablets (601px a 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
    main {
        width: 85%;
        margin: 8vh auto;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4%;
    }

    .section1 {
        flex: 1 1 60%;
        padding: 3%;
        border-radius: 1.5vw;
    }

    .section2 {
        flex: 1 1 35%;
        height: auto;
        padding: 3%;
    }

    h1 {
        font-size: 3.5vw;
    }

    button {
        height: 12vw;
        width: 12vw;
        font-size: 3.5vw;
    }

    /* 🖼️ Imágenes dentro de botones */
    button img {
        width: 9vw;
        height: auto;
        border-radius: 0.8vw;
    }

    #btn-reiniciar {
        font-size: 2.5vw;
        padding: 2vw;
    }

    .estadisticas {
        font-size: 2vw;
        padding: 3%;
    }

    footer p {
        font-size: 2.4vw;
    }

    /* 🎯 Overlays */
    #loading-overlay,
    #lose-overlay,
    #win-overlay,
    #memoriza-overlay {
        font-size: 2.8vw;
        padding: 6vw 6vw;
        border-radius: 2vw;
        line-height: 1.5;
    }

    #loading-overlay strong,
    #lose-overlay strong,
    #win-overlay strong,
    #memoriza-overlay strong {
        font-size: 3vw;
        display: block;
        margin-bottom: 1.5vw;
    }
}

/* 🖥️ Computadores (más de 1024px) */
@media (min-width: 1025px) {
    main {
        width: 70%;
        margin: 10vh auto 5vh;
    }

    h1 {
        font-size: 2vw;
    }

    button {
        height: 8vw;
        width: 8vw;
        font-size: 2vw;
    }

    /* 🖼️ Imágenes dentro de botones */
    button img {
        width: 6vw;
        height: auto;
        border-radius: 0.6vw;
    }

    #btn-reiniciar {
        font-size: 1.2vw;
        padding: 1vw;
    }

    .estadisticas {
        font-size: 1vw;
    }

    footer p {
        font-size: 1.2vw;
    }

    /* 🎯 Overlays */
    #loading-overlay,
    #lose-overlay,
    #win-overlay,
    #memoriza-overlay {
        font-size: 1.4vw;
        padding: 5vw 5vw;
        border-radius: 1vw;
        line-height: 1.5;
    }

    #loading-overlay strong,
    #lose-overlay strong,
    #win-overlay strong,
    #memoriza-overlay strong {
        font-size: 1.6vw;
        display: block;
        margin-bottom: 1vw;
    }
}