/* 页面通用样式 */

/* 页面标题 */
.page-header {
    padding: 140px 0 60px;
    background: linear-gradient(180deg, #fefefe 0%, #f0f4f8 100%);
    text-align: center;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.page-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* 页面内容 */
.page-content {
    padding: 60px 0 100px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
}

/* 目录 */
.toc {
    position: relative;
}

.toc-sticky {
    position: sticky;
    top: 100px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.toc-sticky h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.toc-sticky ul {
    list-style: none;
}

.toc-sticky li {
    margin-bottom: 8px;
}

.toc-sticky a {
    display: block;
    padding: 8px 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.toc-sticky a:hover {
    color: var(--primary-color);
    background: var(--bg-tertiary);
}

/* 主要内容 */
.main-content {
    min-width: 0;
}

.content-section {
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.content-section h2 i {
    color: var(--primary-color);
}

.content-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 16px;
}

.content-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.content-section p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

/* 信息框 */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 10px;
    margin: 24px 0;
}

.info-box i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box p {
    margin: 0;
}

.info-blue {
    background: rgba(0, 102, 255, 0.08);
    border: 1px solid rgba(0, 102, 255, 0.2);
}

.info-blue i {
    color: var(--primary-color);
}

.info-green {
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.info-green i {
    color: var(--secondary-color);
}

.info-yellow {
    background: rgba(255, 107, 53, 0.08);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.info-yellow i {
    color: var(--accent-color);
}

.info-box code {
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* FAQ 样式 */
.faq-list {
    margin: 32px 0;
}

.faq-item {
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: var(--bg-tertiary);
}

.faq-question i {
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid var(--border-color);
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 16px 0;
}

/* 案例卡片 */
.case-card-simple {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--transition-normal);
}

.case-card-simple:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.case-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.case-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50%;
}

.case-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.case-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.case-prompt {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--secondary-color);
    overflow-x: auto;
}

/* 代码组 */
.code-group {
    margin: 24px 0;
    background: var(--bg-dark);
    border-radius: 12px;
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-lang {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.1);
}

.copy-btn.copied {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.code-group pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-group code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.7;
    color: #e2e8f0;
}

/* 响应式 */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 40px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-description {
        font-size: 1rem;
    }
}