/* ============================================
   Fin-Agent - Spider Config Page Styles
   爬虫配置页面样式
   ============================================ */

.config-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    font-size: 1rem;
    color: var(--text-secondary, #666);
}

.config-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* 信息卡片 */
.info-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.info-icon svg {
    width: 28px;
    height: 28px;
}

.info-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-content p {
    margin-bottom: 0.75rem;
    opacity: 0.95;
}

.info-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-content li {
    padding: 0.25rem 0;
    opacity: 0.9;
}

.info-content li::before {
    content: "→ ";
    margin-right: 0.5rem;
}

/* 配置区块 */
.config-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2 svg {
    width: 20px;
    height: 20px;
}

.section-description {
    color: var(--text-secondary, #666);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* 配置列表 */
.config-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-item {
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
}

.config-item:hover {
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.config-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.config-item-title {
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
    flex: 1;
}

.config-item-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .config-item-body {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
}

.form-group small {
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
}

.form-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: var(--text-tertiary, #999);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary, #666);
    font-size: 0.95rem;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary-color, #667eea);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover, #5568d3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-primary, #1a1a1a);
}

.btn-secondary:hover {
    background: var(--bg-tertiary, #e8e8e8);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary, #666);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-secondary, #f5f5f5);
    color: var(--danger-color, #ef4444);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* 使用指南 */
.usage-guide {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.guide-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color, #667eea);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1.1rem;
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary, #666);
    margin-bottom: 0.5rem;
}

.step-content code {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    color: var(--primary-color, #667eea);
}

/* Checkbox 样式 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color, #667eea);
}

/* 响应式 */
@media (max-width: 768px) {
    .config-page {
        padding: 1rem;
    }

    .config-actions {
        flex-direction: column;
    }

    .config-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .info-card {
        flex-direction: column;
    }

    .guide-step {
        flex-direction: column;
        gap: 1rem;
    }
}
