/* general_page页面专用样式 */

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

.general-page-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.general-page-layout {
    margin-bottom: 0;
}

.general-page-title {
    color: #000;
    margin-bottom: 20px;
    text-align: left;
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #1a73e8;
}

.general-page-right-column {
    position: sticky;
    top: 120px;
}

/* 横向排列的文章信息样式 */
.article-info-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.info-left {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    flex: 1;
    align-items: center;
}

.info-right {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.info-label {
    color: #1a73e8;
    font-weight: 500;
    white-space: nowrap;
}

.info-value {
    color: #333;
    font-weight: 400;
}

.general-page-link {
    font-size: 12px !important;
    padding: 2px 10px !important;
    margin-left: 0 !important;
    border: 1px solid #1a73e8 !important;
    border-radius: 4px !important;
    background: #fff !important;
    transition: background 0.2s, color 0.2s !important;
    margin-top: 8px !important;
}
.general-page-link:hover {
    background: #1a73e8 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* 文章摘要样式 */
.article-summary {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.summary-title {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.summary-content {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.summary-placeholder {
    color: #999;
    font-style: italic;
    margin: 0;
}

/* 文章目录样式 - 添加滚动条 */
.toc-content {
    color: #1a73e8;
    line-height: 1.6;
    font-size: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* 自定义滚动条样式 */
.toc-content::-webkit-scrollbar {
    width: 6px;
}

.toc-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.toc-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.toc-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 8px;
    padding-left: 0;
    list-style: none;
}

.toc-item.toc-h1 {
    padding-left: 0;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 10px;
}

.toc-item.toc-h2 {
    padding-left: 20px;
    font-weight: 500;
    font-size: 12px;
    margin-bottom: 6px;
    position: relative;
}

/* 为h2添加左侧装饰线 */
.toc-item.toc-h2::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    width: 8px;
    height: 1px;
    background-color: #1a73e8;
    transform: translateY(-50%);
}

.toc-link {
    color: #1a73e8;
    text-decoration: none;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: inherit;
    line-height: 1.4;
    border: 1px solid transparent;
}

.toc-link:hover {
    color: #1557b0;
    background-color: #e8f0fe;
    text-decoration: none;
    border-color: #1a73e8;
}

.toc-link.active {
    color: #1557b0;
    background-color: #e8f0fe;
    border-color: #1a73e8;
    font-weight: 500;
}

.toc-placeholder {
    color: #999;
    font-style: italic;
    margin: 0;
}

.general-page-article-content {
    padding: 0;
}

.general-page-article-text {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

/* 为文章中的标题添加顶部间距，避免被固定导航栏遮盖 */
.general-page-article-text h1,
.general-page-article-text h2 {
    scroll-margin-top: 150px; /* 确保滚动定位时标题不被遮盖 */
    padding-top: 15px;
    margin-top: 25px;
    position: relative;
}

.general-page-article-text h1:first-child,
.general-page-article-text h2:first-child {
    margin-top: 0;
}

/* 为标题添加视觉指示器 */
.general-page-article-text h1::before,
.general-page-article-text h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #1a73e8, transparent);
    opacity: 0.3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .general-page-right-column {
        position: static;
        margin-bottom: 30px;
    }
    
    .general-page-title {
        font-size: 1.5rem;
        text-align: left;
    }
    
    /* 移动端文章信息样式调整 */
    .article-info-horizontal {
        flex-direction: column;
        gap: 15px;
        padding: 12px;
        align-items: flex-start;
    }
    
    .info-left {
        gap: 12px;
        align-items: flex-start;
    }
    
    .info-right {
        margin-left: 0;
        justify-content: flex-start;
        align-items: flex-start;
    }
    
    .info-item {
        font-size: 13px;
    }
    
    /* 移动端摘要样式调整 */
    .article-summary {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .summary-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .summary-content {
        font-size: 13px;
    }
    
    .toc-content {
        max-height: 300px;
    }
    
    .toc-item.toc-h2 {
        padding-left: 15px;
    }
    
    .toc-item.toc-h2::before {
        left: 5px;
        width: 6px;
    }
    
    .general-page-article-content {
        padding: 0;
    }
} 