*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    height: 100vh;
    width: 100%;
    background-color: rgb(141, 83, 189);
    display: flex;
    justify-content: center;
    align-items: center;
}
.container{
    display: flex;
    flex-direction: column;
    height: 40rem;
    width: 35rem;
    background: #ef85fb;
    border: 2px dashed black;
    position: relative;
    overflow: hidden;
}
.controls {
    height: 10%;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0 1rem;
}
.controls i{
    border-radius: 50%;
    background-color: azure;
    height: 35px;
    width: 35px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 5px 10px rgba(255, 26, 26, 0.22);
}
.controls i:first-child {
    justify-self: start;
}

.controls i:last-child {
    justify-self: end;
}
.controls i:hover{
    transform: scale(1.08);
    background-color: rgba(255, 255, 255, 9.1);
}
.avatar-contents{
    height: 60%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5%;
}
.avatar-contents img {
    height: 30rem;            /* Keep the height at 30rem */
    width: 18rem;             /* Set the width to be the same as height */
    border-radius: 50%;       /* Make it a perfect circle */
    background-color: antiquewhite;
}

.avatar-contents h2{
    height: 30%;
    width: 80%;
}
.timeline {
    width: 80%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin: 2rem auto;
    position: relative;
    cursor: pointer;
}
.player{
    height: 20%;
    width: 100%;
    text-align: center;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.player i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-left: 10px;
    margin-right: 10px;
    font-size: 1.8rem;
    cursor: pointer;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    transition: all 0.2s ease;
}


.player i:nth-child(2) {
    background-color: white;
    color: #ef85fb;
    width: 70px;
    height: 70px;
    font-size: 2rem;
}

.player i:hover {
    transform: scale(1.08);
    background-color: rgba(255, 255, 255, 0.35);
}


.player i:nth-child(2):hover {
    background-color: white;
}
/* Add these to your existing style.css */

.progress {
    background-color: #fff; /* White progress fill */
    height: 100%;
    width: 0%; /* JS will change this dynamically */
    border-radius: 10px;
    transition: width 0.1s linear;
}

/* Optional: Make the image spin when playing */
.avatar-contents img.playing {
    animation: spin 10s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* Playlist Overlay */
.playlist-container {
    position: absolute;
    top: 100%; /* Initially hidden below the card */
    left: 0;
    width: 100%;
    height: 80%; /* Covers the middle section */
    background-color: rgba(255, 255, 255, 0.95);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transition: top 0.4s ease; /* Smooth slide up effect */
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

/* Class to activate the menu */
.playlist-container.active {
    top: 20%; /* Slides up to cover everything below controls */
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: #8d53bd;
}

.playlist-header i {
    cursor: pointer;
    font-size: 1.5rem;
}

#playlist-songs {
    list-style: none;
    overflow-y: auto; /* Allow scrolling if list is long */
    height: 100%;
}

.song-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
}

.song-item:hover {
    background-color: #ef85fb;
    color: white;
}

/* Highlight the currently playing song */
.song-item.active-song {
    color: #8d53bd;
    font-weight: bold;
}