/* Song list */
.song-list {
    padding: 8px;
}

.song-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.song-list-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.song-list-empty-text {
    font-size: var(--font-size-md);
    margin-bottom: 8px;
}

.song-list-empty-sub {
    font-size: var(--font-size-sm);
}

.song-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    height: var(--song-row-height);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}

.song-row:hover {
    background: var(--bg-hover);
}

.song-row.playing {
    background: var(--bg-active);
}

.song-cover {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 16px;
}

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

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-size: var(--font-size-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-heart {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    transition: all var(--transition);
    flex-shrink: 0;
    color: var(--heart-inactive);
}

.song-heart:hover {
    background: rgba(155, 89, 182, 0.15);
    color: var(--heart-active);
}

.song-heart.loved {
    color: var(--heart-active);
}

.song-duration {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 36px;
    text-align: right;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    max-width: 440px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 16px;
}

.modal-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    margin-bottom: 16px;
    transition: border-color var(--transition);
}

.modal-input:focus {
    border-color: var(--accent);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-btn {
    padding: 8px 20px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: background var(--transition);
}

.modal-btn-cancel {
    background: var(--bg-hover);
}

.modal-btn-cancel:hover {
    background: #444;
}

.modal-btn-confirm {
    background: var(--accent);
    color: white;
}

.modal-btn-confirm:hover {
    background: var(--accent-hover);
}

.modal-btn-danger {
    background: var(--danger);
    color: white;
}

.modal-btn-danger:hover {
    background: var(--danger-hover);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: calc(var(--playerbar-height) + 16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    animation: toast-in 200ms ease;
    max-width: 320px;
}

.toast.error {
    border-color: #e74c3c;
}

.toast.success {
    border-color: var(--success);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Upload */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.upload-zone-icon {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.upload-zone-text {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.upload-file-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
}

.upload-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-progress {
    width: 80px;
    height: 4px;
    background: var(--bg-hover);
    border-radius: 2px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 200ms ease;
}

.upload-file-status {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Folders */
.folder-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb-link {
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.breadcrumb-link:hover {
    color: var(--accent);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-right: 16px;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    padding: 12px 16px;
}

.folder-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.folder-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.folder-card-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.folder-card-name {
    font-size: var(--font-size-sm);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.folder-card-count {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    flex-shrink: 0;
}
