palette {
    color: #040316; /*Texto*/
    color: #fbfbfe; /*Fondo*/
    color:#ffd900; /*Primario*/
    color: #58c8d0; /*Secundario*/
    color: #9c111f; /*Acento*/
    color: #58c8d0; /*Common item*/
    color:#27AE60; /*Rare item*/
    color: #7D3C98; /*Epic item*/
    color: #ffd900; /*Legendary item*/
    color: #9c111f; /*Mythical item*/
}
fonts {
    font-family: Poppins; /*Para títulos*/
    font-family: Nunito; /*Para cuerpo*/
    font-family: playfair-display; /*Para algún detalle*/
}
slogan {
    text-rendering:  Sabios, el que no sabe, aprende…; /*Slogan*/
    text-rendering:  Sabios, el que sabe, gana El que no sabe, aprende…; /*Slogan*/
    text-rendering:  Pon a prueba tu fe, pero no pongas a prueba a Dios;
    text-rendering:  Si no sabes la respuesta, reza un Ave María y sigue jugando;
    text-rendering: La fe es la clave, la trivia la prueba, ¡y en Sabios, tu mente se eleva!;
    text-rendering: Sabios, ¡Pero no tanto!;
}
::-webkit-scrollbar {
    display: none;
}
html {
    scrollbar-width: none;
}
body{
    text-align: center;
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(160deg, #9c111f, #c46113);
    height: 100vh;
    justify-items: center;
    align-content: center;
    margin: 0;
    -ms-overflow-style: none;
}
h1 {
    font-family: 'Poppins', sans-serif;
    color: #9c111f;
    font-size: 19vh;
    margin: auto;
}
h2 {
    font-family: 'Poppins', sans-serif;
    color: #9c111f;
    font-size: 6vh;
    margin: auto;
}
h3 {
    font-family: 'Poppins', sans-serif;
    color: #9c111f;
    font-size: 4vh;
    margin: auto;
}
h4 {
    font-family: 'Poppins', sans-serif;
    color: #9c111f;
    font-size: 25px;
    margin: auto;
}
button {
    display: block;
    width: 80%;
    margin: 10px auto;
    padding: 10px;
    font-size: 3vh;
    background-color: #ffd900;
    color: #040316;
    border: none;
    cursor: pointer;
    border-radius: 200px;
    font-weight: bold;
    font-variant-caps: all-small-caps;
    transition: ease 0.3s;
    
}
button:hover {
    background-color: #e6c000;
    transform: scale(1.03);

}

@keyframes blink {
    0% { background-color: greenyellow; transform: scale(1); }
    50% { background-color: #ffd900; transform: scale(1.03); }
    100% { background-color: greenyellow; transform: scale(1); }
}

.correct {
    animation: blink 0.4s infinite alternate;
}

#progress-bar {
    width: 100%;
    height: 15px;
    background-color: #ddd;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
}

#progress {
    height: 100%;
    background-color: #4caf50;
    transition: width 0.5s;
}

#buttons {
    margin-top: 4vh;
}

#difficulty {
    display: flex;
    width: 80%;
    margin: auto;
    font-size: 25px;
    background-color: #ffd900;
    color: #040316;
    border: none;
    cursor: pointer;
    border-radius: 200px;
    font-weight: bold;
    font-variant-caps: all-small-caps;
    transition: background 0.3s;
}
.card {
    background-color: #fafafa;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 55%;
    padding: 0% 2% 2% 2%;
    border-radius: 10px;
}
#category {
    margin: 30px 0 0 0;
    font-style: italic;
    color: #9c111f88;
}
#lives {
    font-size: 4vh;
    margin-right: 10vh;
}

#score {
    font-size: 4vh;
    margin-right: 10vh;
}

#time {
    font-size: 4vh;
}

#shop-button {
    display: none;
    position: absolute;
    top: 10px;
    right: 20px;
    width: auto;
    font-size: 30px;
    color: #040316;
    padding: 14px 19px 14px 17px;
    border-radius: 100px;
}

#stored-points {
    display: none;
    position: absolute;
    top: 10px;
    left: 20px;
    width: auto;
    font-size: 30px;
    color: #ffd900;
    padding: 14px 19px 14px 17px;
}

.modal-shop {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
    padding-top: 60px;
}

.modal-content {
    background-color: #fbfbfe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 55%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    height: 80%;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#modal-header {
    position: sticky;
    top: 0;
    background: #fbfbfe; /* Fondo igual al modal-content para evitar superposición */
    z-index: 10;
    padding: 15px;
    border-bottom: 1px solid #ddd; /* Borde entre header y contenido */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    overflow-y: auto; /* Permite el scroll en el contenedor de ítems */
    padding: 15px;
    flex-grow: 1; /* Hace que el contenedor ocupe el espacio restante */
    max-height: calc(100% - 80px); /* Limita la altura para evitar que se superponga al header */
}

.item {
    border: 3px solid #ffd900;
    border-radius: 20px;
    background-color: #58c8d0;
    padding: 10px;
    margin: 10px;
    text-align: center;
    cursor: pointer;
}

.item:hover {
    transform: translateY(-5px);
}

.item img {
    max-width: 100px;
    transition: transform 0.3s ease-in-out;
}

.item:hover img {
    transform: scale(1.1);
}

.item-info {
    margin-top: 10px;
    padding: 5px;
    border-top: 1px solid #ccc;
    transition: max-height 0.3s ease-in-out;
}

.item h3 {
    margin: 10px 0;
    font-size: 18px;
}

.item p {
    font-size: 14px;
    color: #555;
}

.item .price {
    margin-top: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #9c111f;
}

.item .buy-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #ffd900;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.item .buy-btn:hover {
    background-color: #fdb800;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    h1 {
        font-size: 10vh;
    }
    h3{
        font-size: 2vh;
    }
    .card {
        width: 85%;
    }
    #question {
        font-size: 25px;
        text-align: center;
    }
    #category {
        font-size: 25px;
    }
    .options {
        flex-direction: column;
    }
    button {
        font-size: 16px;
        padding: 10px;
    }
    #lives {
        font-size: 3vh;
        margin-right: 1vh;
    }
    
    #score {
        font-size: 3vh;
        margin-right: 1vh;
    }
    
    #time {
        font-size: 3vh;
    }

    #buttons {
        margin-top: 0vh;
    }
    .modal-content {
        width: 70%;
    }
}

/* Dispositivos medianos (tablets) */
@media (min-width: 769px) and (max-width: 1024px) {
    .question {
        font-size: 20px;
    }
    button {
        font-size: 18px;
    }
}
