/* AI 加载遮罩层 */
.ai-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    border-radius: 12px; /* 适配圆角 */
}

/* 加载内容容器 */
.ai-loading-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%; /* 适配移动端 */
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* 加载图标 */
.ai-loading-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

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

/* 标题 */
.ai-loading-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

/* 进度条容器 */
.ai-progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.ai-progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.ai-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    min-width: 45px;
}

/* 阶段文本 */
.ai-loading-stage {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    min-height: 24px;
    animation: fadeInOut 1s ease;
}

/* 剩余时间 */
.ai-loading-time {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

/* 提示文字 */
.ai-loading-tip {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* 取消按钮 */
.ai-loading-cancel {
    padding: 10px 30px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-loading-cancel:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* 错误状态 */
.ai-error {
    padding: 40px;
    text-align: center;
}

.ai-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.ai-error-message {
    font-size: 20px;
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 10px;
}

.ai-error-detail {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.ai-retry-btn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.ai-retry-btn:hover {
    background: #5568d3;
}

/* 淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

