/* General Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding-bottom: 90px;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

h2 {
    color: #f0f0f0;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: 600;
}

hr {
    border: none;
    border-top: 1px solid #282828;
    margin: 40px auto;
    width: 80%;
}

/* --- Main Fixed Music Player (Status Bar) --- */
.main-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(25, 25, 25, 0.9);
    color: #fff;
    padding: 10px 15px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    z-index: 1000;
    flex-wrap: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #333;
}

/* Menghilangkan elemen album cover */
.main-cover-wrapper {
    display: none;
}

/* Informasi lagu */
.main-song-info {
    flex-grow: 1;
    text-align: left;
    min-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-song-info .main-title {
    font-size: 1.1em; /* Mengubah ukuran font agar lebih menonjol */
    font-weight: 600;
    margin: 0;
    color: #1DB954;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-song-info .main-artist {
    font-size: 0.9em; /* Mengubah ukuran font agar lebih mudah dibaca */
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bagian kontrol utama di tengah */
.main-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-grow: 3;
    min-width: 250px;
}

.progress-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.main-progress-bar {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #555;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.main-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1DB954;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.main-progress-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1DB954;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.time {
    font-size: 0.75em;
    color: #b3b3b3;
    white-space: nowrap;
}

.player-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.player-buttons button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3em;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.player-buttons button:hover {
    background-color: #444;
    color: #1DB954;
}

#playPauseBtn {
    font-size: 1.8em;
    color: #1DB954;
}

#playPauseBtn:hover {
    background-color: #444;
    color: #2ED264;
}

#repeatBtn.active {
    color: #1DB954;
}
#repeatBtn.inactive {
    color: #777;
}

/* Volume di sebelah kanan */
.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.volume-container i {
    font-size: 1em;
    color: #b3b3b3;
}

.main-volume {
    -webkit-appearance: none;
    width: 80px;
    height: 3px;
    background: #555;
    border-radius: 1.5px;
    outline: none;
    cursor: pointer;
}

.main-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1DB954;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.main-volume::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1DB954;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}


/* --- Music List Styles --- */
.music-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
}

.player-item {
    background-color: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 15px;
}

.player-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    background-color: #282828;
}

.item-cover-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    margin-bottom: 10px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.item-album-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-play-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #1DB954;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.player-item:hover .item-play-button {
    opacity: 1;
    transform: translateY(0);
}

.item-play-button:hover {
    background-color: #2ED264;
}

.player-item.playing .item-play-button {
    opacity: 1;
    transform: translateY(0);
    background-color: #1DB954;
}

.item-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #f0f0f0;
    text-align: center;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 90%;
}


/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .main-player {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .main-controls {
        flex-grow: 1;
        min-width: 100%;
        order: 3;
    }
    .main-song-info {
        order: 2;
        text-align: center;
    }
    .main-cover-wrapper {
        order: 1;
    }
    .volume-container {
        order: 4;
        justify-content: center;
        min-width: unset;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 150px;
    }
    .main-player {
        flex-direction: column;
        padding: 10px;
        gap: 15px;
    }
    .main-cover-wrapper {
        width: 60px;
        height: 60px;
        order: unset;
    }
    .main-song-info {
        text-align: center;
        min-width: unset;
        order: unset;
    }
    .main-controls {
        min-width: unset;
        width: 100%;
        order: unset;
    }
    .player-buttons {
        gap: 10px;
    }
    .player-buttons button {
        font-size: 1.3em;
        padding: 6px;
    }
    #playPauseBtn {
        font-size: 1.8em;
    }
    .volume-container {
        justify-content: center;
        width: 100%;
        order: unset;
    }
    .music-list-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        padding: 15px;
        gap: 15px;
    }
    .player-item {
        padding-bottom: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 180px;
    }
    .main-player {
        padding: 10px;
        gap: 10px;
    }
    .main-cover-wrapper {
        width: 50px;
        height: 50px;
    }
    .main-song-info .main-title {
        font-size: 0.9em;
    }
    .player-buttons button {
        font-size: 1.1em;
        padding: 5px;
    }
    #playPauseBtn {
        font-size: 1.6em;
    }
    .time {
        font-size: 0.75em;
    }
    .volume-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 5px;
    }
    .main-volume {
        width: 80%;
    }
    .music-list-container {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        padding: 10px;
        gap: 10px;
    }
}