body {
    background: linear-gradient(-45deg, #000000, #240046, #7b2cbf, #000000);
    background-size: 400% 400%;
    animation: bougeLeFond 10s ease infinite;
    min-height: 100vh; /* Assure que le fond prend toute la hauteur de l'écran */
    color: white; /* Texte en blanc pour être lisible sur le violet */
    font-family: 'Montserrat', sans-serif; /* Police plus stylée */
    text-align: center; /* Centre tout le contenu de la page */
    margin: 0;
    display: flex; /* Pour centrer la carte verticalement et horizontalement */
    flex-direction: column; /* Empile les éléments verticalement */
    gap: 50px; /* Espace entre le profil et les animés */
    padding: 50px 0; /* Marge en haut et en bas pour scroller */
    justify-content: center;
    align-items: center;
    overflow-x: hidden; /* Empêche les scrollbars horizontales à cause des particules */
}

h1 {
    text-transform: uppercase;
    text-shadow: 2px 2px 0px #4B0082; /* Une petite ombre portée foncée */
}

/* --- FLIP CARD (PHOTO PROFIL) --- */
.flip-container {
    background-color: transparent;
    max-width: 300px; /* Taille max de la photo */
    perspective: 1000px; /* Donne l'effet de profondeur 3D */
    cursor: pointer;
    margin: 0 auto;
}

.flipper {
    position: relative;
    width: 100%;
    transition: transform 0.8s; /* Durée de l'animation */
    transform-style: preserve-3d;
}

.flip-container:hover .flipper {
    transform: rotateY(180deg); /* Retourne la carte */
}

.front, .back {
    width: 100%;
    backface-visibility: hidden; /* Cache le dos quand on est face */
    border-radius: 15px;
}

.front img {
    width: 100%;
    display: block;
    border-radius: 15px;
    border: 5px solid white; /* Ajoute un cadre blanc */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* Ajoute une ombre pour du relief */
}

.back {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transform: rotateY(180deg);
    background-color: #240046; /* Fond violet sombre */
    color: white;
    border: 5px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-weight: bold;
    font-size: 1.2em;
}

.pnl-ref {
    font-size: 1.2em;
    font-weight: bold;
    letter-spacing: 3px; /* Espacement des lettres style PNL */
    color: #00d2ff; /* Cyan néon pour contraster avec le violet */
    text-shadow: 0 0 10px #00d2ff, 0 0 20px #00d2ff; /* Effet de lueur */
}

.card {
    background: rgba(255, 255, 255, 0.1); /* Fond blanc très transparent */
    backdrop-filter: blur(10px); /* Effet de flou derrière la carte */
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Bordure subtile */
    max-width: 500px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5); /* Ombre portée profonde */
}

/* --- RESEAUX SOCIAUX --- */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.social-btn {
    text-decoration: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-btn:hover { transform: translateY(-3px); }
.insta { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.snap { background: #FFFC00; color: black; text-shadow: none; }
.tiktok { background: linear-gradient(45deg, #00f2ea, #ff0050); }
.insta:hover, .snap:hover, .tiktok:hover {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* --- SECTION ANIMÉS --- */
.anime-section, .games-section {
    width: 90%;
    max-width: 800px;
}

.anime-grid, .games-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.anime-card, .games-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 200px;
    transition: transform 0.3s, background 0.3s;
}

.anime-card:hover, .games-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.anime-card img, .games-card img {
    width: 100%;
    height: 150px; /* Hauteur fixe pour que toutes les cartes soient égales */
    object-fit: cover; /* L'image remplit la zone sans être déformée */
    border-radius: 10px;
    margin-bottom: 10px;
}

/* --- STYLE LECTEUR MUSIQUE (WIDGET) --- */

.music-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column; /* Empile l'image et le lecteur verticalement */
    align-items: center;
    background: rgba(0, 0, 0, 0.8); /* Fond sombre */
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.cover-art {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    border: 2px solid #00d2ff;
    margin-bottom: 15px;
    object-fit: cover;
}

/* --- CONTROLES MUSIQUE PERSO --- */
.custom-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.control-btn, #volume-icon {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    text-shadow: 0 0 10px #00d2ff;
    transition: transform 0.2s;
}

.control-btn:hover, #volume-icon:hover {
    transform: scale(1.2);
}

.volume-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

#volume-slider {
    width: 0; /* Caché par défaut */
    opacity: 0;
    transition: all 0.4s ease; /* Animation fluide */
    accent-color: #00d2ff; /* Couleur du curseur */
    height: 5px;
    cursor: pointer;
}

/* Affiche la barre quand on passe la souris sur l'icône ou la barre elle-même */
.volume-wrapper:hover #volume-slider {
    width: 100px;
    opacity: 1;
}

@keyframes bougeLeFond {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* --- PARTICULES SOURIS --- */
.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    pointer-events: none; /* Permet de cliquer à travers les particules */
    box-shadow: 0 0 10px #00d2ff, 0 0 20px #00d2ff; /* Lueur cyan */
    animation: fallAndFade 1s linear forwards;
    z-index: 9999;
}

@keyframes fallAndFade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 50px) scale(0); /* Tombe vers le bas et rétrécit */
    }
}

/* --- ANIMATION CLICK JEUX --- */
.games-card.clicked {
    animation: rebond 0.4s ease;
}

@keyframes rebond {
    0% { transform: translateY(-5px); }
    50% { transform: translateY(-20px); } /* Saute plus haut */
    100% { transform: translateY(-5px); }
}