/* Style global */
body {
    font-family: Arial, sans-serif;
    background-color: #1d1d1d;
    color: #fff;
    margin: 0;
    padding: 0;
    text-align: center;
}

.library-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Grille des CD */
.cd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes */
    gap: 20px;
    margin-top: 20px;
}

.cd-item {
    cursor: pointer;
    background: #222;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

/* Animation fadeIn pour chaque élément */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cd-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
}

.cd-item img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

/* Vidéo et paroles */
.lyrics-display {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: left;
}

#cdVideo {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 10px;
}

#cdLyrics {
    font-size: 1.2rem;
    line-height: 1.5;
    white-space: pre-wrap;
    margin-top: 20px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Paroles affichées */
#cdLyrics.show {
    opacity: 1;
    transform: translateY(0);
}

/* Animation du dégradé */
#cdLyrics {
    background-image: linear-gradient(to right, #ff4081, #4caf50, #2196f3);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradientText 3s linear infinite;
}

@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Responsivité */
@media screen and (max-width: 768px) {
    .cd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .cd-grid {
        grid-template-columns: 1fr;
    }
}

/* Ajout du style pour le message d'erreur */
#videoError {
    color: red;
    font-size: 1.2rem;
    margin-top: 20px;
    font-weight: bold;
}
button {
    background-color: #222;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s ease;
    animation: fadeInButton 2s ease-in-out;
    margin-top: 10px;
}

button:hover {
    background-color: #222;
}

button a {
    color: white;
    text-decoration: none;
}
