/* 全局样式 */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 容器样式 */
.container {
    margin-top: 50px;
    max-width: 800px;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* 卡片头部样式 */
.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 2rem 1.5rem;
}

/* 标题样式 */
.card-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

/* 卡片内容样式 */
.card-body {
    padding: 2rem 1.5rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
    background-color: #5a6268;
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.btn-outline-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(23, 162, 184, 0.3);
}

/* 按钮组样式 */
.btn-group {
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

/* 进度条样式 */
.progress {
    margin-top: 1.5rem;
    display: none;
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 状态消息样式 */
.status-message {
    margin-top: 1.5rem;
    display: none;
    border-radius: 8px;
    padding: 1rem;
    font-weight: 500;
}

/* 结果容器样式 */
.result-container {
    margin-top: 2rem;
    display: none;
}

.result-container h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #495057;
}

/* 卡片结果样式 */
.result-container .card {
    margin-bottom: 1rem;
}

/* 列表组样式 */
.list-group-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

/* 代码块样式 */
pre {
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

/* 文章内容样式 */
.article-content {
    max-height: 60vh;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.article-content h1, 
.article-content h2, 
.article-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}

.article-content p {
    margin-bottom: 1em;
}

/* 模态框样式 */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .container {
        margin-top: 20px;
        padding: 0 15px;
    }
    
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 文章展示页面样式 */
.article-container {
    max-width: 900px;
    margin: 50px auto;
}

.article-navigation {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #495057;
    text-align: center;
}

.article-meta {
    text-align: center;
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.article-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-footer {
    margin-top: 2rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 历史记录页面样式 */
.history-container {
    max-width: 1000px;
    margin: 50px auto;
}

.history-item {
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.history-item-header {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.history-item-body {
    padding: 1.5rem;
}

.history-item-footer {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #495057;
}

.history-item-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

.status-running {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}