body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0; background-color: #121212; color: #ffffff;
    display: flex; height: 100vh; overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: 300px; height: 100vh; background-color: #000;
    border-right: 1px solid #282828; flex-shrink: 0;
    display: flex; flex-direction: column; position: relative;
}

.sidebar-header { padding: 10px 0; background-color: #000; z-index: 20; }
.search-container { padding: 10px 15px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.input-wrapper { position: relative; width: 100%; display: flex; align-items: center; }

#search-input {
    width: 100%; padding: 12px 35px 12px 15px;
    border: none; border-radius: 8px; background-color: #242424;
    color: #ffffff; outline: none; font-size: 16px; 
}

#clear-search { position: absolute; right: 12px; color: #b3b3b3; cursor: pointer; font-size: 20px; display: none; }
.util-btn { width: calc(100% - 30px); margin: 0 15px; background: #242424; color: #1ed760; border: none; padding: 8px; border-radius: 6px; cursor: pointer; font-size: 0.85em; font-weight: bold; }

.playlist-tabs { display: flex; gap: 20px; padding: 10px 20px; border-bottom: 1px solid #282828; }
.tab { font-size: 0.8em; color: #b3b3b3; cursor: pointer; font-weight: bold; padding-bottom: 5px; }
.tab.active { color: #1ed760; border-bottom: 2px solid #1ed760; }

#track-list-container { flex-grow: 1; overflow-y: auto; padding-bottom: 180px; scroll-behavior: smooth; }
.song-item { display: flex; padding: 15px 20px; cursor: pointer; align-items: center; border-bottom: 1px solid #1a1a1a; }
.song-item.active { background-color: #282828; color: #1ed760; }
.song-item-info { flex-grow: 1; overflow: hidden; pointer-events: none; }
.song-item-info strong { display: block; font-size: 0.95em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-item-info span { font-size: 0.85em; color: #b3b3b3; }

/* --- Player Bar --- */
.player-bar {
    position: fixed; bottom: 0; left: 300px; right: 0;
    height: 160px; background-color: #050505; border-top: 1px solid #282828;
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 20px; z-index: 1000;
}

.meta-display { text-align: center; margin-bottom: 12px; }
#current-song-title { font-size: 0.95em; font-weight: bold; color: #fff; margin: 0; }
#current-artist-name { font-size: 0.85em; color: #b3b3b3; margin: 4px 0 0 0; }

.button-group { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; }
.control-btn { background: none; border: none; color: #b3b3b3; cursor: pointer; font-size: 1.6em; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.shuffle-btn.active { color: #1ed760; text-shadow: 0 0 10px rgba(30, 215, 96, 0.8); background: rgba(30, 215, 96, 0.1); }
.play-pause-btn { background: #fff; color: #000; width: 50px; height: 50px; }
.like-btn.liked { color: #1ed760; }

#progress-bar-container { width: 100%; max-width: 500px; height: 5px; background: #4f4f4f; border-radius: 3px; cursor: pointer; }
#progress-bar { height: 100%; width: 0; background: #1ed760; border-radius: 3px; }

.volume-container { position: absolute; right: 40px; display: flex; align-items: center; gap: 10px; width: 120px; }
#volume-slider { width: 100%; accent-color: #1ed760; cursor: pointer; }

/* Sync Overlay */
#sync-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 2000; display: none; flex-direction: column; align-items: center; justify-content: center; }
.sync-card { background: #181818; padding: 25px; border-radius: 12px; width: 85%; max-width: 320px; text-align: center; }
.sync-btn-large { width: 100%; padding: 14px; margin: 8px 0; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 1em; }
.btn-copy { background: #1ed760; color: #000; }
.btn-paste { background: #333; color: #fff; }

@media (max-width: 768px) {
    .sidebar { width: 100%; }
    .player-bar { left: 0; }
    .volume-container { display: none; }
}