.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.game-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.game-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.1);
}

.game-card h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.game-card p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.game-info {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.difficulty {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.stars {
    color: #f1c40f;
    font-size: 1.2rem;
}

.play-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 80%;
    max-width: 200px;
}

.play-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #2980b9, #3498db);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.level-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.level-btn {
    background: #f8f9fa;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-btn.active {
    background: #3498db;
    color: white;
}

.level-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* Estilos específicos para cada juego */
.game-card.ahorcado {
    background: linear-gradient(145deg, #ff9a9e, #fad0c4);
}

.game-card.memoria {
    background: linear-gradient(145deg, #a1c4fd, #c2e9fb);
}

.game-card.sopa-letras {
    background: linear-gradient(145deg, #84fab0, #8fd3f4);
}

.game-card.quiz {
    background: linear-gradient(145deg, #fccb90, #d57eeb);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.game-card:nth-child(2) {
    animation-delay: 0.1s;
}

.game-card:nth-child(3) {
    animation-delay: 0.2s;
}

.game-card:nth-child(4) {
    animation-delay: 0.3s;
} 