body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
    margin: 0;
    overflow: hidden; /* Empêche le défilement pendant l'animation */
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 400px;
    padding: 20px;
}

.card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow: hidden;
    text-align: center;
    margin-bottom: 20px;
    position: relative; /* Pour l'animation */
    transform: translateX(0) rotate(0deg); /* Position initiale */
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.card img {
    width: 100%;
    height: 350px; /* Taille fixe pour les images */
    object-fit: cover; /* Recadrage pour remplir l'espace */
    display: block;
}

.card h2 {
    margin: 15px 0;
    color: #333;
}

.buttons {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.pass-btn, .smash-btn, #restartButton {
    padding: 12px 25px;
    font-size: 18px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.pass-btn {
    background-color: #ffcdd2;
    color: #c62828;
}

.pass-btn:hover {
    background-color: #ef9a9a;
    transform: scale(1.05);
}

.smash-btn {
    background-color: #c8e6c9;
    color: #2e7d32;
}

.smash-btn:hover {
    background-color: #a5d6a7;
    transform: scale(1.05);
}

#restartButton {
    background-color: #bbdefb;
    color: #1976d2;
    margin-top: 20px;
}

#restartButton:hover {
    background-color: #90caf9;
    transform: scale(1.05);
}

.end-screen {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.end-screen h2 {
    color: #333;
    margin-bottom: 15px;
}

.end-screen p {
    font-size: 20px;
    color: #555;
}

.hidden {
    display: none;
}

/* Animations de la carte */
.card.animate-pass {
    transform: translateX(-150%) rotate(-45deg);
    opacity: 0;
}

.card.animate-smash {
    transform: translateX(150%) rotate(45deg);
    opacity: 0;
}
