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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: grid;
    grid-template-columns: 40% 60%;
    height: 100vh;
    gap: 1px;
    background: #000;
}

/* Browser Pane */
.browser-pane {
    background: #2a2a2a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mode-selector {
    display: flex;
    gap: 5px;
    padding: 15px;
    background: #1a1a1a;
    border-bottom: 1px solid #000;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    background: #3a3a3a;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.mode-btn:hover {
    background: #4a4a4a;
}

.mode-btn.active {
    background: #0066cc;
    color: white;
}

.controls {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid #000;
}

#filter-input {
    flex: 1;
    padding: 8px 12px;
    background: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    font-size: 14px;
}

#clear-btn {
    padding: 8px 16px;
    background: #3a3a3a;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#clear-btn:hover {
    background: #4a4a4a;
}

.breadcrumb {
    padding: 10px 15px;
    background: #1a1a1a;
    border-bottom: 1px solid #000;
    display: flex;
    align-items: center;
    gap: 10px;
}

#back-btn {
    padding: 6px 12px;
    background: #3a3a3a;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#back-btn:hover {
    background: #4a4a4a;
}

#current-path {
    font-size: 14px;
    color: #999;
}

.item-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.item {
    padding: 12px;
    margin-bottom: 5px;
    background: #3a3a3a;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.item:hover {
    background: #4a4a4a;
}

.item.active {
    background: #0066cc;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.item-subtitle {
    font-size: 13px;
    color: #999;
}

.item.folder .item-title::before {
    content: "📁 ";
}

.item-play-btn {
    padding: 8px 16px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s;
    flex-shrink: 0;
}

.item-play-btn:hover {
    background: #0080ff;
}

.item.folder .item-play-btn {
    display: none;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Player Pane */
.player-pane {
    background: #2a2a2a;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
}

.cover-art {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    margin: 0 auto 20px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    color: #666;
    font-size: 16px;
}

.track-info {
    text-align: center;
    margin-bottom: 30px;
}

#track-title {
    font-size: 24px;
    margin-bottom: 10px;
}

#track-artist {
    font-size: 18px;
    color: #999;
    margin-bottom: 5px;
}

#track-album {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

#track-details {
    font-size: 14px;
    color: #666;
}

.player-controls {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

#current-time,
#total-time {
    font-size: 13px;
    color: #999;
    min-width: 40px;
}

#seek-bar {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #3a3a3a;
    border-radius: 3px;
    outline: none;
}

#seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #0066cc;
    border-radius: 50%;
    cursor: pointer;
}

#seek-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #0066cc;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.button-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.button-controls button {
    flex: 1;
    padding: 12px;
    background: #3a3a3a;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s;
}

#play-pause-btn {
    font-size: 20px;
    font-weight: bold;
}

.button-controls button:hover:not(:disabled) {
    background: #0066cc;
}

.button-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-control label {
    font-size: 14px;
    color: #999;
}

#volume-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #3a3a3a;
    border-radius: 3px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #0066cc;
    border-radius: 50%;
    cursor: pointer;
}

#volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #0066cc;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.album-tracks {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
}

.album-tracks h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.track-item {
    padding: 8px 12px;
    margin-bottom: 3px;
    background: #2a2a2a;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.track-item:hover {
    background: #3a3a3a;
}

.track-item.active {
    background: #0066cc;
}

.track-item .track-number {
    width: 30px;
    color: #999;
    flex-shrink: 0;
}

.track-item .track-title-text {
    flex: 1;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-item .track-play-btn {
    padding: 4px 12px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s;
    flex-shrink: 0;
}

.track-item .track-play-btn:hover {
    background: #0080ff;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}
