* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Estilos Header */
body {
    background-color: #333;
    color: white;
    min-height: 100vh;
    padding: 20px;
}

header {
    height: 75px;
    border-bottom: 1px solid white;
    margin: 10px;
    margin-bottom: 50px;
    background-color: #222; 
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.left, .center, .right {
    display: flex;
    align-items: center;
}

.center {
    gap: 10px;
}

.titulo {
    font-size: 25px;
    padding: 10px;
    color: white;
}

.navegation-var img {
    max-width: 50px;
    min-width: 50px;
}

.boton-reiniciar {
    padding: 10px 15px;
    font-size: 16px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.boton-reiniciar:hover {
    background-color: #777;
}

/* Estilos del juego */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 15px;
    margin-bottom: 30px;
}

.card {
    position: relative;
    height: 150px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    overflow: hidden;
}

.card-front {
    background-color: #555;
    color: transparent;
}

.card-back {
    background-color: #808080;
    color: white;
    transform: rotateY(180deg);
}

.card-image {
    width: 100px; 
    height: auto;  
    object-fit: contain;  
}

/* Estilos para el modal de victoria */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #444;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
}

.modal-text {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ddd;
}

.modal-button {
    padding: 10px 20px;
    background-color: #13a18c;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-button:hover {
    background-color: #13a18c;
}

.movements-counter {
    font-size: 20px;
    color: white;
}
