/*General styles*/
/*General styles*/
@font-face {
    font-family: 'Baloo2';
    src: url(./fuente/Baloo2-VariableFont_wght.ttf);
    font-weight: bold;
    font-style: bold;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden; /* Evita el desplazamiento vertical */
}

main {
    display: block;
    width: 100%;
    height: 100vh;
    margin: auto;
    overflow: hidden; /* Agrega tambiÃ©n overflow: hidden aquÃ­ */
}
.footer {
    display: flex;
    width: 100%;
    position: absolute;
    bottom: 0px;
    z-index: 0;
    height: auto;
}
.footer img {
    width: 100%;
    height: 110px;
}

/* Estilos para la pantalla de inicio */
#fullscreen-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: transparent; /* Color de fondo */
    border: none;
    color: transparent;
    padding: 20px;
    text-align: center;
    z-index: 999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}
.pantalla-inicio {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 998;
}

.logo{
    cursor: pointer;
}

#start-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    z-index: 999;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease; 
    cursor: pointer;
}

#start-image:hover{
    width: 310px;
}


#start-game-image {
    position: absolute;
    top: 28vh;
    right: -110px;
    width: 300px;
    z-index: 999;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease;
    cursor: pointer;
}
#start-game-image:hover{
    width: 310px;
}

#video-inicio {
    position: absolute;
    top: 0;
    z-index: 800;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta el tamaño del video para cubrir toda el área sin deformar */
}


#video-win,
#video-loss {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

/* Estilos para ocultar la pantalla del juego al principio */
.juego.hidden {
    display: none;
}

/*General styles end*/

.first-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: auto;
    width: 100%;
    height: calc(100% - 50px);
    background-color: #3e451c;
}

.card-width-container {
    display: flex;
    width: 80%;
    justify-content: center;
    height: 100%;
}

.cards-container {
    width: 66%;
    padding: 10px 0px;
    display: grid;
    grid-gap: 20px;
    grid-template-columns: repeat(4, 1fr);
    margin: auto;
}

figure,
figure img {
    display: inline-block;
    width: 100%;
}

figure {
    position: relative;
    transition: all ease .5s;
    transform-style: preserve-3d;
    transform: perspective(500px) rotateY(0deg);
    cursor: pointer;
    z-index: 1;
    box-shadow: 3px 3px 16px rgb(0, 0, 0, 0.6);
}

figure::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0);
    transition: 0.3s all ease;
}

figure:hover:after {
    background: rgba(255, 255, 255, 0.137);
}

figure.opened {
    transform: perspective(600px) rotateY(180deg);
}

figure .back {
    display: block;
    backface-visibility: hidden;
}

figure .searched-image {
    position: absolute;
    top: 0;
    transform: perspective(600px) rotateY(180deg);
    backface-visibility: hidden;
    height: 100%;
    overflow: hidden;
}

.logo-container {
    width: 400px;
    display: flex;
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start; /* Alinea el contenido en la parte superior */
    align-items: center;
    background-repeat: no-repeat;
    background-image: url(./img/jpg/recurso-uno.jpg);
    background-size: cover;
    background-position: right;
}

.logo {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
}


.logo img {
    padding: 60px 0px 20px 0px;
    width: 200px;
}

.time-container {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.time-container img {
    width: 120px;
}

.t-restante {
    position: absolute;
    font-size: 50px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: bold;
    color: #3e451c;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 10px 0px 0px 0px;
    text-align: center;
}

.botones-container {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    padding: 30px 0px 0px 0px;
}
/* Estilos para los botones */
.boton-iniciar,
.boton-reiniciar {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

/* Estilos para la imagen dentro de los botones */
.boton-iniciar img,
.boton-reiniciar img {
    width: 200px; /* Ajusta el ancho segÃºn sea necesario */
    height: auto; /* Mantiene la proporciÃ³n */
}
.boton-reiniciar.hidden {
    display: none;
}


.estadisticas {
    margin-bottom: 10px;
}


#message-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding: 20px;
    color: white;
    text-align: center;
    background: #000000b0;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
}
#message-text {
    font-size: 18px;
    margin-bottom: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#accept-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: absolute;
    top: calc(50% + 30px); /* Posiciona el botÃ³n 30px debajo del texto */
    left: 50%;
    transform: translateX(-50%);
}



#accept-button:hover {
    background-color: #45a049;
}


.hidden {
    display: none;
}

@media screen and (max-width: 1180px) {
    .cards-container {
        width: 74%;
    }
}
@media screen and (max-width: 990px) {
    .cards-container {
        width: 84%;
    }
}

@media screen and (max-width: 900px) {
    .cards-container {
        width: 90%;
    }
}
@media screen and (max-width: 820px) {
    .logo img {
        padding: 60px 0px 10px 0px;
        width: 140px;
    }
    .time-container img {
        width: 94px;
    }
    .botones-container {
        padding: 10px 0px 0px 0px;
    }
    .boton-iniciar img, .boton-reiniciar img {
        width: 150px;
    }
    .cards-container {
        width: 80%;
        grid-template-columns: repeat(3, 1fr);
    }
    .logo-container{
        width: 300px;
    }
}
@media screen and (max-width: 770px) {
    .cards-container {
        width: 80%;
    }
}
@media screen and (max-width: 680px) {
    .cards-container {
        width: 90%;
    }
}
@media screen and (max-width: 500px) {
    .cards-container {
        width: 80%;
        grid-template-columns: repeat(2, 1fr);
    }
}