/* 主样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 主内容区域 */
.main-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* 步骤导航 */
.step-nav {
    display: flex;
    background: #f8f9fa;
    padding: 0;
    border-bottom: 1px solid #e9ecef;
}

.step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: #dee2e6;
}

.step.active {
    background: #007bff;
    color: white;
}

.step.completed {
    background: #28a745;
    color: white;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: bold;
}

.step.active .step-number,
.step.completed .step-number {
    background: rgba(255,255,255,0.3);
}

.step-title {
    font-weight: 500;
}

/* 步骤内容 */
.step-content {
    padding: 40px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.description {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* 上传区域 */
.upload-area {
    border: 3px dashed #007bff;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #0056b3;
    background: #f8f9ff;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #f8fff8;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-area p {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.file-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.file-info p {
    margin-bottom: 5px;
    color: #0066cc;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

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

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108,117,125,0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* 导航按钮 */
.navigation {
    padding: 30px 40px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navigation .btn {
    min-width: 120px;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: white;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer a {
    color: #b3d9ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.github-link:hover {
    background-color: rgba(255,255,255,0.2);
    text-decoration: none;
    transform: translateY(-2px);
}

.github-icon {
    margin-right: 2px;
    transition: transform 0.3s ease;
}

.github-link:hover .github-icon {
    transform: rotate(360deg);
}

/* 帮助文本样式 */
.help-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .step-nav {
        flex-wrap: wrap;
    }

    .step {
        flex-basis: 50%;
        padding: 15px 5px;
    }

    .step-title {
        font-size: 0.9rem;
    }

    .step-content {
        padding: 20px;
    }

    .card {
        padding: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .navigation {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .navigation .btn {
        width: 100%;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .ai-config-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .step {
        flex-basis: 100%;
    }
    
    .step-number {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
}

/* 模板选择样式 */
.template-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #2196F3;
    background-color: #f5f5f5;
}

.tab-btn.active {
    color: #2196F3;
    border-bottom-color: #2196F3;
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 创建模板页面样式 */
.custom-templates-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.custom-templates-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.create-form-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.template-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.template-card:hover {
    border-color: #2196F3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);
    transform: translateY(-2px);
}

.template-card.selected {
    border-color: #2196F3;
    background: #f3f9ff;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.template-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.template-card p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.template-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.template-badge.permanent {
    background: #e8f5e8;
    color: #2e7d32;
}

.template-badge.temporary {
    background: #fff3e0;
    color: #f57c00;
}

.btn-remove {
    background: #f44336;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.btn-remove:hover {
    background: #d32f2f;
}

/* AI配置样式 */
.ai-config-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.model-selection {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-model-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-link {
    background: none;
    color: #2196F3;
    border: none;
    text-decoration: underline;
    cursor: pointer;
}

.btn-link:hover {
    color: #1976D2;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.no-templates {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}
