body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center; 
    min-height: 100vh;
    padding: 0; 
    margin: 0;
    box-sizing: border-box;
    background-color: #0d0d0d;
    position: relative;
    overflow-x: hidden;
}

#video-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    transform: translate(-50%, -50%);
    filter: brightness(0.4);
}

.menu-toggle-icon {
    position: fixed;
    top: 25px;
    left: 20px;
    font-size: 28px;
    color: #ff69b4;
    z-index: 101;
    cursor: pointer;
    transition: color 0.2s;
}
.menu-toggle-icon:hover { color: #ff85c1; }

#mainTitle {
    position: absolute;
    top: 25px; 
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: bold;
    color: #ff69b4; 
    margin: 0;
    padding: 0;
    z-index: 5; 
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100%;
    background-color: #1a1a1a;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
    padding: 20px 0;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}
.sidebar.open { left: 0; }
.sidebar.open ~ .menu-toggle-icon { display: none; }

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
}
.sidebar.open + .sidebar-overlay { display: block; }

.sidebar-header {
    font-size: 24px;
    font-weight: bold;
    color: #ff69b4;
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid #333;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

.close-sidebar-icon {
    font-size: 22px;
    color: #ff69b4;
    cursor: pointer;
}
.close-sidebar-icon:hover { color: #ff85c1; }

.sidebar-menu { flex-grow: 1; overflow-y: auto; }

.menu-header {
    font-size: 12px;
    color: #bbb;
    font-weight: 500;
    padding: 10px 20px 5px 20px;
    text-transform: uppercase;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ddd;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 16px;
    gap: 10px;
    justify-content: space-between; /* Membuat jarak antara teks dan angka counter */
}
.menu-item i { font-size: 18px; color: #ff69b4; }
.menu-item:hover, .menu-item.active { background-color: #333333; color: #fff; }

/* STYLE BARU UNTUK COUNTER */
.menu-count {
    font-size: 12px;
    background-color: #333;
    color: #ff69b4;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}
.menu-item.active .menu-count {
    background-color: #ff69b4;
    color: #fff;
}

/* MAIN CONTAINER */
.main-container {
    width: 100%; 
    max-width: 700px;
    min-width: 300px;
    min-height: 100vh; 
    padding: 90px 25px 25px; 
    background-color: rgba(26, 26, 26, 0.3); 
    border-radius: 0; 
    box-shadow: none; 
    display: flex;
    flex-direction: column; 
    gap: 20px;
    position: relative;
    z-index: 1;
    align-items: center; 
}

.drop-area { display: none !important; }

/* PLAYER */
.custom-player-container { width: 100%; }
.custom-player {
    background-color: #242424;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.player-info { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.player-thumbnail {
    width: 55px; height: 55px;
    background-color: #333;
    border-radius: 6px;
    display: flex; justify-content: center; align-items: center;
    overflow: hidden; position: relative; flex-shrink: 0;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.player-thumbnail video { width: 100%; height: 100%; object-fit: cover; display: none; }
.player-icon-audio { font-size: 28px; color: #ff69b4; display: block; }

/* Info Text di Player (Judul & Artis) */
.player-text-info {
    flex-grow: 1;
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.track-title {
    margin: 0; font-size: 17px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.track-artist {
    margin: 2px 0 0 0; font-size: 13px; color: #bbb;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.player-controls { display: flex; flex-direction: column; align-items: center; }
.progress-area { display: flex; align-items: center; width: 100%; gap: 10px; margin-bottom: 15px; }
.current-time, .duration-time { font-size: 13px; color: #aaaaaa; width: 45px; flex-shrink: 0; text-align: center; }
.progress-bar {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 5px; background: #444;
    border-radius: 3px; cursor: pointer; flex-grow: 1;
}
.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 12px; height: 12px; background: #ff69b4;
    border-radius: 50%; cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.control-buttons { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; justify-content: center; }
.control-buttons button {
    background: none; border: none; color: #dddddd;
    cursor: pointer; padding: 5px; font-size: 22px;
    transition: color 0.2s;
}
#repeat-button, #shuffle-button { font-size: 18px; color: #aaaaaa; }
.control-buttons button.active { color: #ff69b4 !important; }
.control-buttons button:hover { color: #ff5252; }
.play-pause-button {
    font-size: 30px; padding: 12px; border-radius: 50%;
    border: 3px solid #ff5252 !important; background-color: #333 !important;
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.7); color: #ff5252 !important;
    transition: all 0.2s;
}
.play-pause-button:hover { color: #fff !important; background-color: #444 !important; transform: scale(1.05); }
.volume-control { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.volume-control i { font-size: 18px; color: #ff69b4; flex-shrink: 0; }
#volume-slider {
    width: 80px; height: 4px; background: #444;
    -webkit-appearance: none; appearance: none;
}
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 10px; height: 10px; background: #ff69b4;
    border-radius: 50%; cursor: pointer;
}

/* SEARCH & SORT */
.search-area {
    display: flex; align-items: center; width: 100%;
    background-color: #333; border-radius: 8px;
    padding: 10px 15px; box-sizing: border-box;
}
.search-icon { color: #bbb; margin-right: 10px; }
#searchInput {
    flex-grow: 1; border: none; background: none;
    color: #fff; font-size: 16px; outline: none;
}
.sort-controls {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 0 10px 0; width: 100%; box-sizing: border-box;
}
.sort-label { font-size: 14px; color: #bbb; font-weight: 500; flex-shrink: 0; }
.sort-button {
    background: none; border: 1px solid #555; color: #bbb;
    padding: 6px 12px; border-radius: 20px; cursor: pointer;
    font-size: 13px; transition: all 0.2s;
}
.sort-button:hover { border-color: #ff69b4; color: #fff; }
.sort-button.active { background-color: #ff69b4; border-color: #ff69b4; color: white; font-weight: bold; }

/* FILE LIST */
.file-list {
    display: flex; flex-direction: column; gap: 5px;
    width: 100%; padding-top: 10px; border-top: 1px solid #333;
    flex-grow: 1; overflow-y: auto; min-height: 0; 
}
.file-item {
    display: flex; align-items: center; background-color: #1e1e1e;
    border-radius: 6px; padding: 8px 10px; gap: 12px;
    border: 1px solid transparent; transition: border 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}
.file-item:hover { background-color: #2a2a2a; }
.file-item.playing {
    border: 1px solid #ff69b4; background-color: #333333;
    box-shadow: 0 0 5px rgba(255, 105, 180, 0.3);
}
.file-item-thumbnail {
    width: 40px; height: 40px; background-color: #333;
    border-radius: 4px; display: flex; justify-content: center;
    align-items: center; overflow: hidden; flex-shrink: 0;
}
.file-item-thumbnail video { width: 100%; height: 100%; object-fit: cover; }

/* Info di File List (Judul & Artis) */
.file-item-info { 
    flex-grow: 1; text-align: left; min-width: 0; margin-right: 10px; 
    display: flex; flex-direction: column; justify-content: center;
}
.file-name {
    margin: 0; font-size: 15px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: #fff;
}
.file-artist {
    margin: 2px 0 0 0; font-size: 12px; color: #aaa;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* BUTTONS IN LIST */
.favorite-button {
    flex-shrink: 0; background: none; border: none; color: #aaa;
    cursor: pointer; font-size: 18px; transition: color 0.2s, transform 0.2s;
    padding: 0; margin-left: auto; 
}
.favorite-button i { color: inherit; }
.favorite-button.active { color: #ff5252; text-shadow: 0 0 5px rgba(255, 82, 82, 0.5); }
.favorite-button:hover { color: #ff85c1; transform: scale(1.1); }

.rename-button {
    background-color: #ff69b4; color: white; border: none;
    border-radius: 4px; padding: 5px 8px; font-size: 12px;
    cursor: pointer; margin-right: 5px; flex-shrink: 0;
    transition: background-color 0.2s, transform 0.2s;
}
.rename-button:hover { background-color: #ff85c1; transform: scale(1.05); }

.delete-button {
    background-color: #e53935; color: white; border: none;
    border-radius: 50%; width: 25px; height: 25px; font-size: 13px;
    cursor: pointer; display: flex; justify-content: center;
    align-items: center; flex-shrink: 0; margin-left: 10px;
    transition: background-color 0.2s, transform 0.2s;
}
.delete-button:hover { background-color: #ff5252; transform: scale(1.1); }

/* MODALS & TOAST */
.modal {
    display: none; position: fixed; z-index: 999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8); justify-content: center;
    align-items: center; backdrop-filter: blur(3px);
}
.modal-content {
    background: #2e2e2e; padding: 30px; border-radius: 10px;
    text-align: center; width: 90%; max-width: 350px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
}
.modal-content h3 { margin-top: 0; color: #ff69b4; }
.input-label {
    font-size: 12px; color: #aaa; font-weight: bold; 
    margin: 10px 0 5px; text-align: left;
}
#renameInput, #artistInput {
    width: 100%; padding: 10px; margin-bottom: 10px;
    border: 1px solid #ff69b4; border-radius: 4px;
    background-color: #1a1a1a; color: #fff; box-sizing: border-box;
}
.modal-buttons { margin-top: 20px; display: flex; justify-content: space-around; gap: 15px; }
.modal-buttons button {
    padding: 10px 20px; border: none; border-radius: 6px;
    font-weight: bold; cursor: pointer; flex-grow: 1;
    transition: background-color 0.2s;
}
#renameOk, #deleteOk { background-color: #ff69b4; color: white; }
#renameOk:hover, #deleteOk:hover { background-color: #ff85c1; }
#renameCancel, #deleteCancel { background-color: #555555; color: white; }
#renameCancel:hover, #deleteCancel:hover { background-color: #777777; }

#toast-container {
    position: fixed; 
    bottom: 20px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    max-width: 90%; 
    align-items: center; 
}
.toast {
    background-color: rgba(50, 50, 50, 0.95); color: white;
    padding: 12px 20px; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); font-size: 14px;
    opacity: 0; 
    transform: translateY(20px); 
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left: 5px solid #4CAF50; }
.toast.info { border-left: 5px solid #2196F3; }