/* 智能下载弹窗样式 */
.smart-download-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.smart-download-overlay.active {
    opacity: 1;
    visibility: visible;
}

.smart-download-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transition: all 0.3s ease;
}

.smart-download-overlay.active .smart-download-modal {
    transform: translate(-50%, -50%) scale(1);
}

.smart-download-header {
    padding: 24px 24px 0;
    text-align: center;
}

.smart-download-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.smart-download-icon.checking {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.smart-download-icon.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.smart-download-icon.warning {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.smart-download-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0 0 8px;
}

.smart-download-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.smart-download-content {
    padding: 24px;
}

.user-info-card {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.user-info-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 12px;
}

.user-info-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.user-info-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.user-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.user-info-item:last-child {
    margin-bottom: 0;
}

.user-info-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.user-info-value {
    font-size: 14px;
    color: white;
    font-family: 'Consolas', monospace;
}

.route-test-list {
    margin: 20px 0;
}

.route-test-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.route-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.route-status.testing {
    background: #3b82f6;
    animation: pulse 1.5s infinite;
}

.route-status.success {
    background: #22c55e;
}

.route-status.failed {
    background: #ef4444;
}

.route-status.pending {
    background: #6b7280;
}

.route-info {
    flex: 1;
}

.route-name {
    font-size: 14px;
    font-weight: 500;
    color: white;
}

.route-detail {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.route-result {
    font-size: 12px;
    font-weight: 500;
}

.route-result.success {
    color: #22c55e;
}

.route-result.failed {
    color: #ef4444;
}

.route-result.testing {
    color: #3b82f6;
}

.smart-download-actions {
    padding: 0 24px 24px;
}

.smart-download-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.smart-download-button:last-child {
    margin-bottom: 0;
}

.smart-download-button.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.smart-download-button.primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
}

.smart-download-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.smart-download-button.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

.progress-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    overflow: hidden;
    margin-top: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-fill.success {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.countdown-text {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 12px;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .smart-download-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .smart-download-header,
    .smart-download-content,
    .smart-download-actions {
        padding-left: 16px;
        padding-right: 16px;
    }
}