body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(90deg, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee, #ff9a9e);
    background-size: 400% 400%;
    animation: gradient 10s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.menu {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.hamburger {
    font-size: 30px;
    cursor: pointer;
    color: #fff;
}

#songList {
    margin-top: 10px;
    list-style: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.menu.open #songList {
    transform: translateX(0);
    opacity: 1;
}

#songList li {
    padding: 10px;
    margin-bottom: 5px;
    background: #f1f1f1;
    border-radius: 5px;
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    font-size: 18px;
}

#songList li:hover {
    background: #e0e0e0;
    transform: translateX(5px);
}

.hidden {
    display: none;
}

.player-container {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px; /* Added padding for small screens */
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 15px;
    margin: 10px;
    width: 100%; /* Adjusted to full width on small screens */
    max-width: 500px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    flex-wrap: wrap; /* Added for better layout on small screens */
}

button {
    background: none;
    border: none;
    font-size: 20px;
    color: #fff;
    margin: 0 15px;
    cursor: pointer;
}

button:focus {
    outline: none;
}

button.selected {
    color: yellow;
}

.progress-container {
    width: 100%; /* Adjusted to full width on small screens */
    max-width: 500px;
    padding: 0 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#progressBar {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee);
    border-radius: 5px;
    outline: none;
    z-index: 1;
    position: relative;
    overflow: hidden;
}

#progressBar::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.progress-time {
    position: absolute;
    bottom: -20px;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    z-index: 2;
}

/* Volume Control */
.volume-control {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 20px;
    cursor: pointer;
}

.volume-control i {
    color: #fff;
    font-size: 20px;
}

.volume-control input[type="range"] {
    position: absolute;
    top: 50%;
    left: 100%;
    width: 0;
    transform: translate(0, -50%);
    transition: width 0.3s ease;
    opacity: 0;
}

.volume-control:hover input[type="range"] {
    width: 100px;
    opacity: 1;
}

.animated-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #fff;
    animation: textSlide 2s infinite alternate;
    white-space: nowrap;
    z-index: 1;
}

@keyframes textSlide {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.2); }
}

/* Media Queries for Responsiveness */

@media (max-width: 768px) {
    .player-controls {
        flex-direction: column;
        padding: 20px;
    }

    .volume-control {
        margin-left: 0;
        margin-top: 10px;
    }

    .hamburger {
        font-size: 24px;
    }

    #songList li {
        font-size: 16px;
    }

    .animated-text {
        font-size: 20px;
    }

    #progressBar::-webkit-slider-thumb {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .hamburger {
        font-size: 20px;
    }

    #songList {
        max-height: 200px;
    }

    #songList li {
        font-size: 14px;
    }

    button {
        font-size: 18px;
        margin: 0 10px;
    }

    .animated-text {
        font-size: 18px;
    }

    .progress-time {
        font-size: 12px;
    }

    .volume-control i {
        font-size: 18px;
    }
}
