body {
    background-color: #ffebf0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.game-container {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(255, 117, 140, 0.2);
    width: 380px; /* Taille fixe pour garder la grille stable */
}

h1 { color: #ff758c; margin-bottom: 5px; font-size: 24px; }
p { color: #888; margin-bottom: 25px; font-size: 14px; }

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
    justify-items: center;
}

.card {
    width: 75px;
    height: 75px;
    background-color: #ff758c;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.card.flipped {
    background-color: #fff;
    border: 3px solid #ff758c;
    transform: rotateY(180deg);
    cursor: default;
}

.play-again-btn {
    background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(255, 117, 140, 0.4);
    transition: all 0.3s ease;
}

.play-again-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 117, 140, 0.6);
}

.hidden { display: none; }