/* Cargar la fuente para el texto */
@font-face {
    font-family: "LabelFont";
    src: url("fonts/label-font.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Aplicar estilos */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background-image: url("images/fondo.webp"); /* Ruta de la imagen */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
}

/* Título del juego */
h1 {
    font-size: 24px;
    margin-top: 10px;
    color: #333;
}

/* Pantalla de bienvenida */
#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#welcome-screen img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    cursor: pointer;
}

/* Pantalla de fin del juego */
#game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#game-over-screen img {
    max-width: 100%;
    max-height: 100%;
    width: 1080px;
    height: 1920px;
    object-fit: contain;
    border-radius: 10px;
    margin: auto;
    display: block;
}

/* Tablero del juego */
#memory-game {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    width: 90%;
    height: 70%;
    margin: auto;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    justify-content: center;
}

/* Tarjetas */
.card {
    background-image: url("images/back.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
    width: 100%;
    height: 100%;
}

.card img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: none;
}

.card.flip img {
    display: block;
}

/* Centrar la última fila con solo 2 tarjetas */
#memory-game .last-row {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: span 3;
}

.last-row .card {
    width: calc(33.33% - 10px); /* Ajusta el ancho de las tarjetas para que queden centradas */
    margin: 0 15px;
}
