:root {
    --bg-color: #050505;
    --card-bg: #111111;
    --sidebar-bg: #0a0a0a;
    --primary-color: #D4AF37; /* Gold */
    --text-color: #EEEEEE;
    --text-muted: #888888;
    --border-color: #333333;
    --accent-white: #FFFFFF;
    
    --sidebar-width: 250px;
    --player-height: 90px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

/* Loading Bar */
#loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
    z-index: 9999;
}

/* Batch Toolbar */
.batch-toolbar {
    position: fixed;
    bottom: var(--player-height);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
    z-index: 95;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.batch-toolbar.visible {
    transform: translateX(-50%) translateY(-20px);
}

.batch-actions {
    display: flex;
    gap: 10px;
}

/* Layout */
.app-container {
    display: flex;
    height: calc(100vh - var(--player-height));
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-section h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.album-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.album-item {
    padding: 10px 15px;
    cursor: pointer;
    color: var(--text-muted);
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.album-item:hover {
    color: var(--text-color);
    background: #1a1a1a;
}

.album-item.active {
    color: var(--primary-color);
    background: #1a1a1a;
    border-left-color: var(--primary-color);
}

.btn-text {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    padding: 10px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-text:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    gap: 30px;
    overflow: hidden;
    background: var(--bg-color);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 4px;
    width: 400px;
    gap: 10px;
    color: var(--text-muted);
}

.search-bar:focus-within {
    border-color: var(--primary-color);
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-color);
    width: 100%;
    outline: none;
    font-size: 1rem;
}

.actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.download-group {
    display: flex;
    gap: 0;
}

.download-group input {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-right: none;
    padding: 10px 15px;
    border-radius: 4px 0 0 4px;
    color: var(--text-color);
    outline: none;
    width: 250px;
}

.download-group input:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 0 4px 4px 0; /* Attach to input */
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-upload { 
    background: #222; 
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    color: var(--text-color);
    padding: 10px 15px; 
    cursor: pointer; 
    transition: border 0.2s;
}
.btn-upload:hover { border-color: var(--primary-color); }

.btn-icon-round {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-round:hover, .btn-icon-round.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Song List */
.song-list-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 10;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    font-size: 0.9rem;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}

tbody tr {
    border-bottom: 1px solid #1a1a1a;
    transition: background 0.1s;
}

tbody tr:hover {
    background: #1a1a1a;
}

tbody tr.selected {
    background: #1a1a1a;
    color: var(--primary-color);
}

tbody tr.selected td:first-child {
    border-left: 3px solid var(--primary-color);
}
tbody tr.selected-batch {
    background: rgba(212, 175, 55, 0.1);
}

/* Checkboxes */
.checkbox-wrapper-custom {
    position: relative;
    cursor: pointer;
    width: 18px;
    height: 18px;
}
.checkbox-wrapper-custom input {
    opacity: 0;
    width: 0;
    height: 0;
}
.custom-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 1px solid var(--text-muted);
    border-radius: 2px;
}
.checkbox-wrapper-custom:hover input ~ .custom-checkmark {
    border-color: var(--primary-color);
}
.checkbox-wrapper-custom input:checked ~ .custom-checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.custom-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-wrapper-custom input:checked ~ .custom-checkmark:after {
    display: block;
}
.checkbox-wrapper-custom .custom-checkmark:after {
    left: 6px;
    top: 2px;
    width: 3px;
    height: 8px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


.action-btn-small {
    background: none;
    border: 1px solid transparent; 
    color: var(--text-muted);
    cursor: pointer;
    margin-right: 5px;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s;
}
.action-btn-small:hover { color: var(--text-color); border-color: var(--border-color);}

.action-btn-danger {
    background: none;
    border: 1px solid transparent;
    color: #ff4d4d;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
}
.action-btn-danger:hover {
    background: rgba(255, 77, 77, 0.1);
}


/* Player Bar */
.player-bar {
    height: var(--player-height);
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.now-playing {
    width: 250px;
}

.track-title {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.track-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.player-controls-container {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 30px;
}

.btn-control {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-control:hover { color: var(--text-color); }

.btn-control.play-btn {
    background: var(--primary-color);
    color: #000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.btn-control.play-btn:hover {
    transform: scale(1.05);
}

.btn-control.active {
    color: var(--primary-color);
}

.progress-area {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.progress-bar-wrapper {
    flex: 1;
    height: 2px;
    background: #333;
    cursor: pointer;
    position: relative;
    padding: 8px 0;
}

.progress-fill {
    height: 2px;
    background: var(--primary-color);
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar-wrapper:hover .progress-fill::after {
    opacity: 1;
}

/* Toast */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: #111;
    color: white;
    padding: 15px 25px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.toast .fa-circle-check { color: var(--primary-color); }
.toast.error { border-left-color: #ff4d4d; }
.toast.error .fa-circle-exclamation { color: #ff4d4d; }

/* Context Menu */
#contextMenu, #queueSidebar { display: none; } /* Managed by JS/Other styles */

.context-menu {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 5px 0;
    min-width: 200px;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.menu-item {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.menu-item:hover { background: #222; }
.menu-item i { color: var(--primary-color); width: 20px; text-align: center; }

/* Submenu */
.submenu {
    display: none;
    position: absolute;
    left: 100%; top: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
}
.menu-item:hover .submenu { display: block; }