body {
    background-color: rgba(0, 0, 0, 0);
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#cards {
    position: relative;
    width: 350px; /* Taille de ta carte */
    height: 500px;
    perspective: 1000px; /* Pour un effet 3D lors du slide */
}

.card-container {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s;
    opacity: 0;
}

/* Conteneur principal */
.card-flip-container {
    perspective: 1000px;
    width: 350px;
    height: 500px;
}

/* La carte qui va tourner */
.card-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Classe pour déclencher le retournement */
.card-flipper.flipped {
    transform: rotateY(180deg);
}

/* Faces avant et arrière */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Cache l'autre face pendant la rotation */
    border-radius: 15px;
    overflow: hidden;
}

.card-back {
    background-color: #333;
    z-index: 2; /* Le dos est au-dessus */
}

.card-front {
    transform: rotateY(180deg); /* La face est déjà retournée en attente */
}

/* État Initial : Caché à droite */
.slide-in {
    transform: translateX(150%) rotate(10deg);
    opacity: 0;
}

/* État Actif : Centré et visible */
.slide-active {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
}

/* État Final : Disparition vers la gauche */
.slide-out {
    transform: translateX(-150%) rotate(-10deg);
    opacity: 0;
}

/* Styles des images de cartes */
.card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.holo-5star .card-image {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8)) brightness(1.1);
    border: 2px solid gold;
}

.holo-6star .card-image {
    filter: drop-shadow(0 0 25px rgba(0, 191, 255, 1)) brightness(1.2);
    animation: pulse-glow 2s infinite alternate;
    border: 2px solid cyan;
}

@keyframes pulse-glow {
    from { filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6)); }
    to { filter: drop-shadow(0 0 30px rgba(0, 191, 255, 1)); }
}


#overlay-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#user-title {
    font-family: 'Poppins', sans-serif; /* Un font moderne et gras */
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    font-size: 32px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s ease-out;
}

#user-title.visible {
    opacity: 1;
    transform: translateY(0);
}

#username {
    color: #ffd700; /* Couleur dorée pour le nom */
    font-weight: bold;
}
