/* ===== CSS 自定义属性（CSS变量）定义 ===== */
:root {
    /* --- 核心色板 (Google Material Design Green) --- */
    --c-p: #2e7d32;           /* 主色 - 森林绿 */
    --c-p-dark: #1b5e20;      /* 深绿 - 悬停态 */
    --c-p-light: #e8f5e9;     /* 浅绿 - 背景/高亮 */
    --c-p-fade: rgba(46, 125, 50, 0.08); /* 透明主色 */
    
    /* --- 界面色板 --- */
    --c-bg: #86add3;          /* 全局背景 - 极淡灰 */
    --c-sur: #edf5e7;         /* 表面 - 纯白 */
    --c-txt: #1a202c;         /* 正文 - 深灰黑 */
    --c-txt-sec: #4a5568;     /* 次级文字 - 蓝灰 */
    --c-bor: #e2e8f0;         /* 边框 - 淡银 */
    --c-accent: #f0f9ff;      /* 强调背景色 - 浅蓝灰 */
    
    /* --- 渐变彩色 --- */
    --gradient-blue: rgba(56, 189, 248, 0.1);
    --gradient-purple: rgba(139, 92, 246, 0.1);
    --gradient-pink: rgba(236, 72, 153, 0.05);
    
    /* --- 阴影 --- */
    --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 5px 15px rgba(0,0,0,0.02);
    --shadow-float: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-nav: 0 4px 20px rgba(0,0,0,0.03);
    --shadow-code: 0 4px 20px rgba(0, 0, 0, 0.3);
    
    /* --- 尺寸 --- */
    --radius: 10px;
    --radius-sm: 6px;
    --nav-height: 64px;
    
    /* 字体栈 */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== 全局重置和基础样式 ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 24px); 
}

body {
    font-family: var(--font-stack);
    background: var(--c-bg);
    color: var(--c-txt);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 自定义滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--c-bor); }
::-webkit-scrollbar-thumb { background: var(--c-txt-sec); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-txt); }

/* ===== 链接样式 ===== */
a {
    color: var(--c-p);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}
a:hover { 
    color: var(--c-p-dark); 
}

/* ===== 导航栏样式 (玻璃拟态) ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%; height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: var(--shadow-nav);
    z-index: 1000;
}

.nav-container {
    width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px;
    height: 100%;
    display: flex; justify-content: space-between; align-items: center;
}
.logo img {
    width: 40px; /* 响应式宽度 */
    height: auto;
    object-fit: contain; /* 保持比例 */
    align-self: bottom; /* 额外的垂直居中 */
}

.logo a {
    font-size: 1.25rem;
    font-weight: 700;
     background: linear-gradient(135deg, #2980b9 0%, #f1c40f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #2980b9;
    display: flex; align-items: center; gap: 10px;
    letter-spacing: -0.5px;
}
.logo i { color: var(--c-p); font-size: 1.2em; }

.nav-links {
    display: flex; gap: 32px; list-style: none;
}

.nav-links a {
    color: var(--c-txt-sec);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 8px 0;
}

/* 导航下划线动画 */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--c-p);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}
.nav-links a:hover::after, 
.nav-links a.active::after { 
    width: 100%; 
}
.nav-links a:hover, 
.nav-links a.active { 
    color: var(--c-p); 
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: clamp(1.2rem, 1.3vw, 1.4rem);
    color: var(--c-txt);
    cursor: pointer;
    padding: clamp(6px, 0.5vw, 8px);
    border-radius: 4px;
}
.mobile-menu-btn:hover { 
    background: rgba(0,0,0,0.05); 
}

/* ===== 主容器样式 ===== */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + clamp(20px, 2vw, 32px)) clamp(16px, 2vw, 24px) clamp(40px, 3.5vw, 60px);
    position: relative;
    z-index: 1;
}

/* ===== 头部卡片样式 ===== */
.header-card {
    background: var(--c-sur);
    border: 1px solid var(--c-bor);
    border-radius: var(--radius);
    padding: clamp(25px, 3vw, 40px);
    margin-bottom: clamp(25px, 2.5vw, 40px);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.header-card h1 {
    font-size:clamp(1.8rem, 3.1vw, 4.5rem);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 1vw, 12px);
    padding: 6px 12px;
    margin-bottom: clamp(6px, 1vw, 8px);

    color: var(--c-txt-sec);
}

.header-card .subtitle {
    font-size: clamp(0.82rem, 1.1vw, 1.1rem);
    color: #2980b9;
    max-width: 700px;
    margin-bottom: clamp(16px, 1.5vw, 24px);
    font-weight: 500;
    /* 渐变下划线 */
    text-decoration: underline;
    text-decoration-color: rgba(41, 128, 185, 0.3);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: text-decoration-color 0.3s ease;
}
.api-meta { 
    display: inline-flex; align-items: center; gap: 12px;
    padding: 6px 6px; background: rgba(255, 47, 47, 0.12); border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem; color: rgba(44, 53, 65, 0.52) ; border: 1px solid transparent;
}
/* 下载按钮样式 */
.download-btn {
 display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 8px);
    background: var(--c-p);
    color: white;
    padding: clamp(10px, 1.4vw, 14px) clamp(8px, 2.8vw, 28px);
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    font-size: clamp(0.9em, 1.1vw, 1.1em);
    position: absolute;
    right: clamp(20px, 3vw, 30px);
    bottom: clamp(10px, 3vw, 30px);
    box-shadow: 0 6px 0 #1b5e20,
                0 8px 20px rgba(46, 125, 50, 0.3);
    transform: translateY(0);
}

.download-btn:hover {
 transform: translateY(-2px);
    box-shadow: 0 8px 0 #1b5e20,
                0 12px 25px rgba(46, 125, 50, 0.4);
}

.download-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1b5e20;
}

/* ===== 移动端分类栏样式 ===== */
.mobile-category-bar {
    display: none;
    width: clamp(55px, 5vw, 60px);
    background: var(--c-sur);
    border-right: 1px solid var(--c-bor);
    flex-shrink: 0;
    flex-direction: column;
    padding: clamp(12px, 1vw, 15px) 0;
    position: sticky;
    top: calc(var(--nav-height) + clamp(15px, 1.5vw, 20px));
    height: fit-content;
    border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: var(--shadow-card);
    z-index: 900;
}

.mobile-category-tabs {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.5vw, 8px);
}

.mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3px, 0.3vw, 4px);
    padding: clamp(10px, 1vw, 12px) 0;
    margin: 0 0 0 clamp(6px, 0.5vw, 8px); /* 顺序：上 右 下 左 */
    border-radius:  var(--radius) 0 0 var(--radius); /* 左上和左下圆角 */
    color: var(--c-txt-sec);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(0.65rem, 0.7vw, 0.7rem);
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: 
        2px 0 8px rgba(var(--tab-color-rgb, 25, 118, 210), 0.4), /* 右侧光 */
        -1px 0 4px rgba(var(--tab-color-rgb, 25, 118, 210), 0.2); /* 左侧微弱光 */
    background-color: rgba(var(--tab-color-rgb, 25, 118, 210), 0.08);
}
.mobile-tab:hover {
    background-color: rgba(var(--tab-color-rgb, 25, 118, 210), 0.15);
    color: var(--c-p);
    box-shadow: 
        2px 0 8px rgba(var(--tab-color-rgb, 25, 118, 210), 0.4), /* 右侧光 */
        -1px 0 4px rgba(var(--tab-color-rgb, 25, 118, 210), 0.2); /* 左侧微弱光 */
}

/* 修改移动端标签激活状态 */
.mobile-tab.active {
    background: linear-gradient(135deg, var(--tab-color, var(--c-p)), color-mix(in srgb, var(--tab-color, var(--c-p)) 80%, white));
    color: white;
    box-shadow: 
        2px 0 8px rgba(var(--tab-color-rgb, 25, 118, 210), 0.4), /* 右侧光 */
        -1px 0 4px rgba(var(--tab-color-rgb, 25, 118, 210), 0.2); /* 左侧微弱光 */

}

.mobile-tab.active i {
    color: white !important;
}

.mobile-tab i {
    font-size: clamp(1.2rem, 1.3vw, 1.4rem);
    margin-bottom: clamp(3px, 0.3vw, 4px);
}

/* ===== 博客布局样式 ===== */
.blog-layout {
    display: grid;
    gap: clamp(25px, 2.5vw, 40px);
    animation: fadeInUp 0.5s ease forwards;
}

.blog-main {
    min-width: 0;
    background: var(--c-sur);
    border: 1px solid var(--c-bor);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.article-list-container {
    display: flex;
    min-height: 500px;
}

.article-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== 介绍内容区域样式 ===== */
.intro-content {
    padding: clamp(25px, 3vw, 40px);
    line-height: 1.7;
    max-width: 100%;
    box-sizing: border-box;
}

.intro-section {
    margin-bottom: clamp(25px, 2.5vw, 40px);
}

.intro-section h2 {
    color:  #1b3d6f;
    margin: 0 0 clamp(20px, 2vw, 25px) 0;
    font-size: clamp(1.2rem, 1.9vw, 1.55rem);
    padding-bottom: clamp(12px, 1vw, 16px);
    border-bottom: 1px solid var(--c-bor);
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 12px);
    font-weight: 600;
}

.intro-section h2 i {
    color:  #1b3d6f;
    font-size: 0.8em;
    opacity: 0.9;
}
.intro-section h2 strong {
    font-weight: 800;
    color: #346cc2;
    background-color: rgba(52, 152, 219, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}
.intro-section p strong {
    font-weight: 600;
    color: #346cc2;
    background-color: rgba(52, 152, 219, 0.2);
    padding: 2px 2px;
    border-radius: 4px;
}
.intro-section h3 strong {
    font-weight: 800;
    color: #2a7e3b;
    padding: 2px 2px;
}

.intro-section h3 {
    color: var(--c-txt);
    margin: clamp(20px, 2vw, 30px) 0 clamp(15px, 1.2vw, 18px) 0;
    font-size: clamp(1.1rem, 1.3vw, 1.25rem);
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 10px);
    font-weight: 600;
    position: relative;
    padding-left: clamp(12px, 1vw, 16px);
}

.intro-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: clamp(4px, 0.5vw, 6px);
    bottom: clamp(4px, 0.5vw, 6px);
    width: 4px;
    background: var(--c-p);
    border-radius: 2px;
}

.intro-section p {
    margin-bottom: clamp(2px, 1.2vw, 4px);
    color: var(--c-txt-sec);
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 2.2;
    font-weight: 400;
}

.core-phrase {
    text-align: center;
    font-size: clamp(1.1rem, 1.2vw, 1.3rem);
    margin: clamp(5x, 1.5vw, 20px) 0;
    font-weight: 600;
    color: var(--c-p);
    line-height: 1.6;
    padding: clamp(15px, 1.5vw, 20px);
    background: linear-gradient(135deg, var(--gradient-blue), var(--gradient-purple));
    border: 1px solid rgba(46, 125, 50, 0.1);
}

.intro-section ul, 
.intro-section ol {
    margin: clamp(20px, 2vw, 25px) 0;
    padding-left: clamp(20px, 2vw, 24px);
    color: var(--c-txt-sec);
}

.intro-section li {
    margin-bottom: clamp(10px, 0.8vw, 12px);
    font-size: clamp(0.95rem, 1vw, 1rem);
    line-height: 1.7;
}

.intro-section li strong {
    color: var(--c-txt);
    font-weight: 600;
}

/* ===== 特性网格布局 ===== */
.features-grid {
    display: grid;
    gap: clamp(12px, 1.5vw, 18px); /* 缩小卡片间距 */
    margin: clamp(18px, 2vw, 22px) 0;
    /* 降低最小宽度，允许更紧凑排列 */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.feature-card {
    background: linear-gradient(145deg, var(--c-sur), #f8fafc); /* 微妙渐变 */
    border: 1.5px solid var(--c-bor); /* 加粗边框 */
    border-radius: calc(var(--radius) - 2px); /* 稍小的圆角 */
    padding: clamp(16px, 2vw, 20px) clamp(14px, 1.8vw, 18px); /* 减少水平内边距 */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); /* 更快的缓动曲线 */
    position: relative;
    overflow: hidden;
    /* 更精细的阴影：减少模糊，增加Y轴偏移 */
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.04);
}


.feature-card:hover {
    transform: translateY(-6px); /* 悬浮时上移更多 */
    border-color: var(--c-p);
    /* 悬浮时阴影更明显，且带主色光晕 */
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(var(--c-p-rgb, 46, 125, 50), 0.1); /* 外发光边框 */
}

.feature-card:hover::before {
    opacity: 1; /* 悬浮时装饰条更鲜明 */
}

.feature-card h4 {
    color: var(--c-txt);
    margin-bottom: clamp(10px, 0.9vw, 12px); /* 减小标题与正文间距 */
    font-size: clamp(1.00rem, 1.1vw, 1.2rem); /* 微调字体大小 */
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.6vw, 8px);
    font-weight: 700; /* 介于600和700之间 */
    line-height: 1.3;
}

.feature-card h4 i {
    color: var(--c-p);
    font-size: 1.05em;
    filter: saturate(1.2); /* 轻微增加图标饱和度 */
}

.feature-card p {
    margin: 0;
    color: var(--c-txt-sec);
    line-height: 1.65; /* 微调行高使文本更紧凑 */
    font-size: clamp(0.82rem, 0.95vw, 0.98rem); /* 略微缩小正文字号 */
    letter-spacing: -0.01em; /* 轻微字符间距 */
}

/* ===== 代码块样式 (Modern API 风格) - 使用 Highlight.js 替代 Prism ===== */
.code-block-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    margin: clamp(18px, 1.5vw, 24px) 0;
    box-shadow: var(--shadow-code);
    background: #282c34;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.code-block {
    background: transparent !important;
    margin: 0 !important;
    border-radius: 0 !important;
    font-size: clamp(0.85rem, 0.9vw, 0.95rem) !important;
    line-height: 1.6 !important;
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace !important;
    display: block;
    overflow-x: auto;
    width: 100%;
    padding: 0;
}
.code-block::-webkit-scrollbar {
    height: 8px;
}
.code-block::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}
.code-block::-webkit-scrollbar-track {
    background: #282c34;
}
.code-header {
    background: #21252b;
    color: #e0e0e0;
    padding: clamp(10px, 1vw, 12px) clamp(15px, 1.5vw, 20px);
    font-size: clamp(0.85rem, 0.9vw, 0.9rem);
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

/* 模拟红黄绿按钮 */
.code-header-left {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.5vw, 8px);
    position: relative;
    padding-left: clamp(45px, 3.5vw, 54px);
}
.code-header-left::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(8px, 0.8vw, 10px);
    height: clamp(8px, 0.8vw, 10px);
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 18px 0 0 #ffbd2e, 36px 0 0 #27c93f;
}
.code-header-left i { display: none; }
.code-header-left span { 
    padding: 0 clamp(12px, 1vw, 16px); 
    color: #46cdc6; 
    font-size: clamp(0.9rem, 1vw, 1rem); 
    font-weight: bold; 
    font-family: 'Fira Code', monospace; 
}

/* 渐变彩色复制按钮 */
.copy-btn {
    background: linear-gradient(135deg, var(--gradient-blue), var(--gradient-purple));
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border-radius: 4px;
    padding: clamp(5px, 0.5vw, 6px) clamp(10px, 1vw, 12px);
    cursor: pointer;
    font-size: clamp(0.8rem, 0.85vw, 0.85rem);
    font-weight: 500;
    transition: all 0.2s ease-out;
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.4vw, 6px);
    position: relative;
    overflow: hidden;
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #38bdf8, #8b5cf6, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.copy-btn:hover {
    background: linear-gradient(135deg, 
        rgba(56, 189, 248, 0.15), 
        rgba(139, 92, 246, 0.15)
    );
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.15);
    transform: translateY(-1px);
}

.copy-btn:hover::before {
    opacity: 1;
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

.copy-btn.copied i::before {
    content: "\f00c";
}
.download-btn, .pa2d-download-btn {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 8px);
    background: var(--c-p);
    color: white;
    padding: clamp(10px, 1.4vw, 14px) clamp(8px, 2.8vw, 28px);
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    font-size: clamp(0.9em, 1.1vw, 1.1em);
    cursor: pointer;
    box-shadow: 0 6px 0 #1b5e20,
                0 8px 20px rgba(46, 125, 50, 0.3);
    transform: translateY(0);
}

.pa2d-download-btn {
    position: relative;
    background: linear-gradient(135deg, #1e1e1e, #3a3a3a);
    box-shadow: 0 6px 0 #0d0d0d,
                0 8px 20px rgba(30, 30, 30, 0.3);
    width: 100%;
    justify-content: center;
    margin-top: 15px;
}

.pa2d-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #0d0d0d,
                0 12px 25px rgba(30, 30, 30, 0.4);
    background: linear-gradient(135deg, #2a2a2a, #464646);
}

.pa2d-download-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #0d0d0d;
}
/* Highlight.js 代码高亮样式 */
.hljs {
    background: transparent !important;
    padding: 0px !important;
    border-radius: 0 !important;
    overflow-x: auto !important;
    white-space: pre !important;
    word-wrap: normal !important;
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace !important;
    text-shadow: none !important;
    font-size: clamp(0.85rem, 0.9vw, 0.95rem) !important;
    line-height: 1.6 !important;
    display: block !important;
}

/* 行号和代码块的样式调整 - 与 shape_api.html 保持一致 */
.hljs-ln-line {
    line-height: 1.6 !important;
}

.hljs-ln-numbers {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-align: right;
    color: #97b148;
    border-right: 2px solid rgba(136, 141, 151, 0.2);
    padding: 0 clamp(8px, 1vw, 12px) 0 clamp(6px, 0.7vw, 8px) !important;
    vertical-align: top;
    background-color: rgba(74, 81, 94, 0.2) !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

.hljs-ln-code {
    padding-left: clamp(8px, 0.8vw, 10px) !important;
    padding-top: 3px !important;
    padding-bottom: 5px !important;
}

/* ===== 提示框样式 ===== */
.tip {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.1);
    padding: clamp(20px, 2vw, 25px);
    margin: clamp(20px, 2vw, 25px) 0;
    border-radius: var(--radius);
    color: #1e3a8a;
}

.tip p,
.tip ul,
.tip ol {
    margin: 0 0 clamp(10px, 0.8vw, 12px) 0;
    color: #1e3a8a;
    font-weight: 500;
    line-height: 1.6;
}

.tip p:last-child,
.tip ul:last-child,
.tip ol:last-child {
    margin-bottom: 0;
}

.tip p strong,
.tip li strong {
    color: #2563eb;
}

.tip ul,
.tip ol {
    padding-left: clamp(20px, 2vw, 24px);
}

.tip li {
    margin-bottom: clamp(6px, 0.6vw, 8px);
    font-size: clamp(0.95rem, 1vw, 1rem);
}

.tip li:last-child {
    margin-bottom: 0;
}

/* ===== 需求网格布局 ===== */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(15px, 1.5vw, 20px);
    margin: clamp(20px, 2vw, 25px) 0;
}

.requirement-item {
    background: linear-gradient(135deg, var(--gradient-blue), var(--gradient-purple));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: clamp(20px, 2vw, 24px);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.requirement-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}

.requirement-item h4 {
    color: var(--c-p);
    margin-bottom: clamp(10px, 0.8vw, 12px);
    font-size: clamp(1.1rem, 1.15vw, 1.2rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 0.6vw, 8px);
    font-weight: 600;
}

.requirement-item p {
    margin: 0;
    color: var(--c-txt-sec);
    line-height: 1.6;
}

/* ===== 文章列表样式 ===== */
.article-list {
    flex: 1;
    padding: clamp(20px, 2vw, 25px);
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(15px, 1.5vw, 20px);
}

.article-card {
    background: var(--c-sur);
    border: 1px solid var(--c-bor);
    border-radius: var(--radius);
    padding: clamp(22px, 2.5vw, 28px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.5s ease forwards;
    cursor: pointer;
}

/* 文章卡片顶部装饰线 */
.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--c-p);
    opacity: 0.8;
}

.article-card-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 文章卡片颜色变体 */
.article-card.color-1 { border-left: 4px solid #2e7d32; }
.article-card.color-2 { border-left: 4px solid #ff8f00; }
.article-card.color-3 { border-left: 4px solid #7b1fa2; }
.article-card.color-4 { border-left: 4px solid #388e3c; }

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
    border-color: var(--c-p);
}

.article-card.hidden {
    display: none;
}

.article-card h3 {
    margin-bottom: clamp(12px, 1vw, 15px);
    font-size: clamp(1.2rem, 1.3vw, 1.4rem);
    line-height: 1.4;
    color: var(--c-txt);
    word-break: break-word;
    overflow-wrap: break-word;
    transition: color 0.2s ease;
    font-weight: 600;
}

.article-card:hover h3 {
    color: var(--c-p);
}

.article-snippet {
    font-size: clamp(0.95rem, 1vw, 1rem);
    color: var(--c-txt-sec);
    line-height: 1.7;
    margin: 0;
    flex-grow: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}
.article-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
}

/* ===== 侧边栏样式 ===== */
.blog-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + clamp(20px, 2vw, 32px));
    height: fit-content;
    background: var(--c-sur);
    border: 1px solid var(--c-bor);
    border-radius: var(--radius);
    padding: clamp(20px, 2vw, 24px);
    box-shadow: var(--shadow-card);
    order: -1;
}

.sidebar-section {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: clamp(15px, 1.2vw, 18px) 0;
}

.sidebar-title {
    font-size: clamp(1.1rem, 1.15vw, 1.2rem);
    font-weight: 600;
    color: var(--c-p);
    margin-bottom: clamp(15px, 1.2vw, 18px);
    border-bottom: 1px solid var(--c-bor);
    padding-bottom: clamp(10px, 0.8vw, 12px);
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 10px);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: clamp(6px, 0.5vw, 8px);
}

.category-list li a {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 10px);
    padding: clamp(10px, 1vw, 12px) clamp(12px, 1.2vw, 14px);
    color: var(--c-txt-sec);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: clamp(0.95rem, 1vw, 1rem);
    cursor: pointer;
    border: 1px solid transparent;
    border-left: 4px solid transparent; /* 添加左侧边框 */
}

/* 目录栏颜色应用 */
.category-list li a {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 10px);
    padding: clamp(10px, 1vw, 12px) clamp(12px, 1.2vw, 14px);
    color: var(--c-txt-sec);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: clamp(0.95rem, 1vw, 1rem);
    cursor: pointer;
    border: 1px solid transparent;
    border-left: 4px solid transparent;
    /* 添加默认半透明背景 */
    background-color: rgba(var(--category-color-rgb, 25, 118, 210), 0.08);
    box-shadow: 
        2px 0 8px rgba(var(--category-color-rgb, 25, 118, 210), 0.4), /* 右侧光 */
        -1px 0 4px rgba(var(--category-color-rgb, 25, 118, 210), 0.2); /* 左侧微弱光 */

}

.category-list li a:hover {
    background-color: rgba(var(--category-color-rgb, 25, 118, 210), 0.15);
    color: var(--c-p);
    border-left-color: var(--category-color);
    box-shadow: 
        2px 0 8px rgba(var(--category-color-rgb, 25, 118, 210), 0.4), /* 右侧光 */
        -1px 0 4px rgba(var(--category-color-rgb, 25, 118, 210), 0.2); /* 左侧微弱光 */

}
.category-list li a.active {
    background-color: var(--category-color, var(--c-p));
    color: white;
    font-weight: 500;
    border-left-color: var(--category-color);
    box-shadow: 
        2px 0 8px rgba(var(--category-color-rgb, 25, 118, 210), 0.4), /* 右侧光 */
        -1px 0 4px rgba(var(--category-color-rgb, 25, 118, 210), 0.2); /* 左侧微弱光 */

}

/* 图标颜色 */
.category-list li a i {
    width: 18px;
    text-align: center;
    color: var(--icon-color, var(--c-txt-sec));  /* 使用CSS变量 */
    font-size: clamp(0.95rem, 1vw, 1rem);
    transition: color 0.3s ease;
}

.category-list li a:hover i {
    color: var(--category-color);
}

.category-list li a.active i {
    color: white !important;  /* 确保激活状态下是白色 */
}

/* ===== 页脚样式 ===== */
.footer {
    width: 100%;
    text-align: center;
    padding: clamp(40px, 3.5vw, 60px) 0;
    border-top: 1px solid var(--c-bor);
    color: var(--c-txt-sec);
    background: var(--c-sur);
    margin-top: clamp(60px, 5vw, 80px);
    box-shadow: inset 0 1px 0 var(--c-bor);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 2vw, 24px);
}

.footer-links {
    margin-bottom: clamp(15px, 1.5vw, 20px);
    display: flex;
    justify-content: center;
    gap: clamp(20px, 2vw, 25px);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--c-txt-sec);
    font-weight: 500;
    padding: clamp(6px, 0.5vw, 8px) clamp(12px, 1.2vw, 16px);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--c-p);
    background: var(--c-p-light);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: clamp(15px, 1.5vw, 20px);
        box-shadow: var(--shadow-float);
        border-top: 1px solid rgba(226, 232, 240, 0.6);
        z-index: 1001;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links li {
        margin: clamp(8px, 0.8vw, 10px) 0;
    }
    
    .container {
        padding: calc(var(--nav-height) + clamp(15px, 1.5vw, 20px)) clamp(12px, 1.2vw, 16px) clamp(30px, 2.5vw, 40px);
    }
    
    .blog-layout {
        display: flex;
        gap: 0;
    }
    
    .blog-main {
        padding: 0;
        flex: 1;
        min-width: 0;
        border-radius: 0 var(--radius) var(--radius) 0;
    }
    
    .mobile-category-bar {
        display: flex;
    }
    
    .blog-sidebar {
        display: none;
    }
    
    .article-list {
        padding: clamp(15px, 1.5vw, 20px);
        gap: clamp(15px, 1.5vw, 18px);
        grid-template-columns: 1fr;
    }
    
    .intro-content {
        padding: clamp(20px, 2vw, 25px);
    }
    
    .header-card {
        padding: clamp(25px, 2.5vw, 30px) clamp(20px, 2vw, 25px);
        margin-bottom: clamp(25px, 2.5vw, 30px);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .code-block-wrapper {
        margin: clamp(12px, 1.2vw, 15px) 0;
        max-width: 100%;
        overflow-x: auto;
        border-radius: var(--radius-sm);
        width: 100%;
    }
    
    .code-block {
        width: 100% !important;
        min-width: 0 !important;
    }
    
    .hljs {
        padding: 0px !important;
        overflow-x: auto !important;
        white-space: pre !important;
        word-wrap: normal !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    .intro-content, 
    .article-content-area {
        overflow-x: hidden;
    }
        
    .code-header {
        padding: clamp(8px, 1vw, 10px) clamp(12px, 1.2vw, 15px);
        flex-direction: row;
        gap: clamp(8px, 0.8vw, 10px);
        align-items: center;
    }
    
    .code-header-left {
        flex: 1;
        min-width: 0;
    }
    
    .copy-btn {
        align-self: auto;
        flex-shrink: 0;
    }
    
    .download-btn {
        position: static;
        margin-top: clamp(12px, 1.2vw, 15px);
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 1025px) {
    .blog-layout {
        grid-template-columns: 280px 1fr;
        gap: clamp(25px, 2.5vw, 30px);
    }
    
    .blog-sidebar {
        padding: clamp(18px, 1.8vw, 20px);
        top: calc(var(--nav-height) + clamp(25px, 2.5vw, 32px));
    }
    
    .article-list {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: clamp(20px, 2vw, 25px);
        padding: clamp(20px, 2vw, 25px);
    }
    
    .intro-content {
        padding: clamp(35px, 3vw, 40px);
    }
    
    .header-card {
        padding: clamp(35px, 3vw, 40px);
    }
    
    .mobile-category-bar {
        display: none;
    }
    
    .nav-links {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
}