/* AI编辑模态框基础样式 */
.ai-edit-modal-content {
    max-width: 95vw;
    width: min(1200px, 95vw);
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 2.5vh auto;
    position: relative;
}

/* 模态框头部 */
.ai-edit-modal-header {
    flex-shrink: 0;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.ai-edit-modal-header h2 {
    margin: 0;
    color: white;
    font-size: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    padding-right: 50px;
}

.ai-edit-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 18px;
    color: white;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.3s;
    z-index: 1000;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模态框主体 */
.ai-edit-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: #f8f9fa;
}

.ai-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    height: 100%;
    min-height: 0;
}

/* 左侧面板 */
.ai-current-preview {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: white;
    max-height: 180px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ai-current-preview pre {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #666;
    white-space: pre-wrap;
    line-height: 1.4;
}

/* AI编辑指令区域 */
.ai-edit-prompt {
    width: 100%;
    height: 160px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    resize: vertical;
    line-height: 1.5;
    background: white;
    transition: border-color 0.3s ease;
}

.ai-edit-prompt:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ai-edit-tip {
    margin-top: 10px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 6px;
    font-size: 13px;
    color: #1565c0;
}

/* 按钮区域 */
.ai-edit-buttons {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.ai-edit-button-group {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

/* AI生成结果区域 */
.ai-edit-result {
    flex: 1;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    min-height: 500px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ai-edit-result-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-style: italic;
    font-size: 16px;
}

.ai-edit-result-loading i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #dee2e6;
}

/* 模态框底部 */
.ai-edit-modal-footer {
    flex-shrink: 0;
    padding: 20px 25px;
    border-top: 1px solid #dee2e6;
    background: white;
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

/* 按钮样式 */
.ai-edit-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-edit-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-edit-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.5);
}

.ai-edit-btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.ai-edit-btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
}

.ai-edit-btn-info {
    background: #17a2b8;
    color: white;
    border: none;
}

.ai-edit-btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

/* 加载动画 */
@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ai-edit-loading-bar {
    width: 200px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.ai-edit-loading-bar-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    animation: loading 2s ease-in-out infinite;
}

/* 响应式样式 */
@media (max-width: 1200px) {
    .ai-edit-modal-content {
        width: 95vw !important;
        margin: 2vh auto !important;
    }
    .ai-edit-grid {
        gap: 20px !important;
    }
}

@media (max-width: 1024px) {
    .ai-edit-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    .ai-edit-modal-content {
        width: 98vw !important;
        margin: 1vh auto !important;
        max-height: 98vh !important;
    }
    .ai-edit-modal-body {
        padding: 15px !important;
    }
}

@media (max-width: 768px) {
    .ai-edit-modal-content {
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    .ai-edit-modal-header h2 {
        font-size: 16px !important;
        padding-right: 40px !important;
    }
    .ai-edit-modal-footer {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 15px !important;
    }
    .ai-edit-modal-footer > div:first-child {
        text-align: center !important;
    }
    .ai-edit-modal-body {
        padding: 10px !important;
    }
    .ai-edit-grid {
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    .ai-edit-modal-header {
        padding: 15px !important;
    }
    .ai-edit-modal-header h2 {
        font-size: 14px !important;
    }
    .ai-edit-modal-body {
        padding: 8px !important;
    }
    .ai-edit-grid > div > div {
        padding: 10px !important;
    }
    .ai-edit-prompt {
        min-height: 100px !important;
    }
    .ai-current-preview {
        max-height: 120px !important;
    }
} 