/* ==========================================
   全局样式文件 - global.css
   引入路径: assets/css/global.css
   ========================================== */

/* --- 1. Section 间距调整（更紧凑的布局）--- */
.section-spacing {
    padding-top: 4rem;      /* py-16 */
    padding-bottom: 4rem;
}

@media (min-width: 1024px) {
    .section-spacing {
        padding-top: 5rem;  /* lg:py-20 */
        padding-bottom: 5rem;
    }
}

@media (min-width: 1536px) {
    .section-spacing {
        padding-top: 7rem;  /* 2xl:py-28 */
        padding-bottom: 7rem;
    }
}

/* --- 2. 文章内容排版样式（通用）--- */
.article-content {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #334155;
    line-height: 1.8;
}

/* 标题层级样式 */
.article-content h1 {
    font-size: 2.25rem !important;     /* 36px */
    font-weight: 800 !important;
    color: #1a1d21 !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.2 !important;
}

.article-content h2 {
    font-size: 1.875rem !important;    /* 30px */
    font-weight: 800 !important;
    color: #1a1d21 !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.3 !important;
}

.article-content h3 {
    font-size: 1.5rem !important;      /* 24px */
    font-weight: 700 !important;
    color: #1a1d21 !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.4 !important;
}

.article-content h4 {
    font-size: 1.25rem !important;     /* 20px */
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
}

.article-content h5 {
    font-size: 1.125rem !important;    /* 18px */
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
}

.article-content h6 {
    font-size: 1rem !important;        /* 16px */
    font-weight: 600 !important;
    color: #334155 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
}

/* 段落样式 */
.article-content p {
    margin-bottom: 1.25rem !important;
    line-height: 1.85 !important;
}

/* 列表样式 */
.article-content ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.article-content ol {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.article-content li {
    margin-bottom: 0.5rem !important;
}

/* 引用块样式 */
.article-content blockquote {
    border-left: 4px solid #137fec !important;
    background-color: #f8fafc !important;
    padding: 1rem 1.5rem !important;
    margin: 1.5rem 0 !important;
    font-style: italic !important;
    color: #475569 !important;
}

/* 链接样式 */
.article-content a {
    color: #137fec !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    transition: color 0.2s !important;
}

.article-content a:hover {
    color: #0e62b8 !important;
}

/* 图片样式 */
.article-content img {
    border-radius: 8px !important;
    margin: 2rem auto !important;
    max-width: 100% !important;
    height: auto !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* 代码块样式 */
.article-content code {
    background-color: #f1f5f9 !important;
    padding: 0.125rem 0.375rem !important;
    border-radius: 4px !important;
    font-size: 0.875em !important;
    color: #0f172a !important;
}

.article-content pre {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    padding: 1rem 1.5rem !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    margin: 1.5rem 0 !important;
}

.article-content pre code {
    background-color: transparent !important;
    padding: 0 !important;
    color: inherit !important;
}

/* --- 3. 纸张背景效果 --- */
.paper-effect {
    position: relative;
    background: linear-gradient(to bottom, #ffffff 0%, #fefefe 50%, #f9fafb 100%);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 6px rgba(0, 0, 0, 0.03),
        0 12px 24px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
}

/* 纸张边缘装饰 */
.paper-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #137fec 0%, #3b82f6 50%, #60a5fa 100%);
    border-radius: 1rem 1rem 0 0;
}

/* 纸张微妙纹理 */
.paper-texture {
    background-image: 
        linear-gradient(to bottom, #ffffff 0%, #fefefe 50%, #fafafa 100%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
}

/* --- 4. 表格通用样式 --- */
.article-content table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    margin: 2rem 0 !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #fff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.article-content th,
.article-content td {
    padding: 12px 16px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.95rem !important;
    color: #475569 !important;
    text-align: left !important;
}

.article-content thead th,
.article-content tr:first-child td {
    background-color: #f8fafc !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.article-content tbody tr:hover {
    background-color: #f8fafc !important;
}
