.download-progress-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.download-progress-modal {
    background: var(--bg-color);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-color-secondary);
    flex-shrink: 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-content h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--font-color);
}

.close-button {
    background: none;
    border: none;
    color: var(--font-color-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: var(--bg-color-tertiary);
    color: var(--font-color);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

.download-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.download-section:last-child {
    border-bottom: none;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--font-color);
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.download-item {
    background: var(--bg-color-secondary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.download-item.active {
    border-color: var(--brand-color);
    background: var(--bg-color-tertiary);
}

.download-item.queued {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.download-item.completed {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.download-info {
    width: 100%;
}

.download-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.download-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.download-details {
    flex: 1;
    min-width: 0;
}

.download-name {
    font-weight: 500;
    color: var(--font-color);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    word-break: break-word;
}

.download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--font-color-secondary);
}

.download-status {
    font-weight: 500;
}

.download-time {
    opacity: 0.8;
}

.download-album {
    opacity: 0.7;
    font-style: italic;
}

.download-progress-info {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.progress-percentage {
    font-weight: 600;
    color: var(--brand-color);
    font-size: 0.9rem;
    min-width: 3rem;
    text-align: right;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-color-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-color), #10b981);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--font-color-secondary);
}

.empty-state h3 {
    margin: 1rem 0 0.5rem 0;
    color: var(--font-color);
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .download-progress-modal-overlay {
        padding: 0.5rem;
    }

    .download-progress-modal {
        max-height: 90vh;
        border-radius: 12px;
    }

    .modal-header {
        padding: 1rem;
    }

    .header-content h2 {
        font-size: 1.1rem;
    }

    .download-section {
        padding: 1rem;
    }

    .download-item {
        padding: 0.75rem;
    }

    .download-header {
        gap: 0.5rem;
    }

    .download-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .progress-percentage {
        font-size: 0.8rem;
        min-width: 2.5rem;
    }
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    .download-progress-modal-overlay {
        background: rgba(0, 0, 0, 0.8);
    }

    .download-item.active {
        background: rgba(59, 130, 246, 0.1);
    }

    .download-item.queued {
        background: rgba(245, 158, 11, 0.1);
    }

    .download-item.completed {
        background: rgba(16, 185, 129, 0.1);
    }
}

/* Animation for new items */
.download-item {
    animation: slideIn 0.3s ease-out;
}

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