@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-color: #1d1d1d;
    background-position: center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(./src/banner-large.png);
    background-position: center center;
    background-size: cover;
    opacity: 0.3; /* Ajustez cette valeur entre 0 et 1 pour contrôler l'opacité */
    z-index: -1;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
}

.card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    width: 300px;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
    overflow: hidden; 
}


@property --angle{
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(255, 255, 255, 0.20);
}

.album-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    
}

.album-cover-container{
    position: relative;
    margin-bottom: 20px;
    width: 300px;
    height: 300px;
}

.album-cover-container::before, .album-cover-container::after{
    display: block;
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background-image: conic-gradient(from var(--angle), transparent 50%, rgb(81, 255, 249), #e778bb);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 1;
    padding: 0px;
    border-radius: calc(0px + 10px);
    animation: 12s spin linear infinite;
    opacity: 0;
    transition: padding 300ms ease-out , opacity 300ms ease-out 300ms;
}

.album-cover-container::after{
    filter: blur(14px);
    z-index: 1;
}

/* .album-cover-container[playing]::before, .album-cover-container[playing]::after {
    opacity: 1;
} */
.album-cover-container.playing::before, .album-cover-container.playing::after {
    opacity: 1;
    padding: 3px;
    border-radius: calc(3px + 10px);
    transition: opacity 300ms ease-out, padding 300ms ease-out 300ms;
}



h2 {
    position: relative;
    margin: 0 0 10px;
    font-size: 1.5em;
    color: #fff;
    z-index: 10;
}

p {
    position: relative;
    margin: 5px 0;
    color: #ddd;
    z-index: 10;
}
.control{
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 7px;
    z-index: 10;
}

.control-progress-time{
    width: 100%;
}

.play-button {
    background: transparent;
    color: white;
    border: none;
    padding: 0px 6px 6px 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1.8rem;
    outline: none;
}

.play-button:hover {
    background: #ffffff4b;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
    cursor: pointer;
}

.progress {
    width: 0%;
    height: 100%;
    background-color: #ffffff;
    transition: width 0.1s linear;
}

.time {
    display: flex;
    justify-content: space-between;
    color: #ddd;
    font-size: 0.8em;
    margin-top: 5px;
}

canvas {
    position: absolute;
    bottom: 0; left: 0;
    pointer-events: none;
    width: 100%;
    height: 230px;
    opacity: 0.05;
}

@keyframes spin{
    from{
        --angle: 0deg;
    }
    to{
        --angle: 360deg;
    }
}