/* assets/css/main.css */
/* 0. 核心重置与基准设定 */
html {
    /* 如果觉得还是大，把 100% 改为 93.75% (=15px) 或 87.5% (=14px) */
    font-size: 100%; 
    box-sizing: border-box; /* 关键：防止内边距撑大容器 */
    -webkit-text-size-adjust: 100%; /* 防止手机横屏字体突然变大 */
}

*, *::before, *::after {
    box-sizing: inherit; /* 让所有元素继承盒模型 */
}

body {
    margin: 0;
    line-height: 1.5; /* 优化行高，让文字不挤 */
    /* 如果你希望整体字体小一点，可以在这里强制指定，例如 15px */
    /* font-size: 15px; */ 
}


/* 1. 定义全局变量 (对应你原来的 PHP 变量) */
:root {
    --c-carbon-ink: #2B2B2B;      /* 碳素黑 */
    --c-newsprint-bg: #F7F7F5;    /* 清透米灰 */
    --c-cinnabar-red: #B22222;    /* 朱红 */
    --c-indigo-teal: #2F4F4F;     /* 黛蓝 */
    --c-old-book-bg: #E6E0D4;     /* 旧书纸张色 */
    --c-hover-bg-blue: #E6ECF0;   /* 淡灰蓝色 */
    
    /* 民国专栏专属色 */
    --c-roc-blue: #14283F;        /* 深黛蓝 */
    --c-london-red: #542323;      /* 伦敦红 */
    --c-roc-gold: #C5A059;        /* 鎏金 */
    
    /* 纹理定义 */
    --texture-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* 2. 全局基础样式 */
body {
    background-color: var(--c-newsprint-bg);
    color: var(--c-carbon-ink);
    font-family: "Songti SC", "Noto Serif SC", serif;
}

/* 3. 你的原始样式 (已替换变量) */

/* 桌面端菜单优化 */
.main-navigation a, .menu-item a, .nav-menu li a {
    font-weight: 700 !important;
    font-size: 16px !important;
    color: #000 !important;
    letter-spacing: 0.05em;
}

/* 移动端菜单优化 */
@media (max-width: 768px) {
    .menu-item a, .mobile-menu a, .mobile-navigation a {
        font-size: 19px !important; line-height: 2.5 !important; font-weight: 600 !important;
        padding: 15px 0 !important; border-bottom: 1px dashed #ddd;
    }
    .sub-menu a { font-size: 17px !important; padding-left: 20px !important; }
}

/* 民国专栏专属样式 */
.font-song { font-family: "Songti SC", "Noto Serif SC", serif; }
.font-calligraphy { font-family: 'Ma Shan Zheng', cursive; }
.vertical-text { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 0.15em; }

.texture-overlay { position: absolute; inset: 0; pointer-events: none; background-image: var(--texture-noise); opacity: 0.1; z-index: 1; }

.texture-chinese-window {
    position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.08;
    background-image: 
        linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%, #000),
        linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%, #000);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    mix-blend-mode: overlay;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 滤镜特效 */
.img-portrait { filter: grayscale(100%) contrast(1.1); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.group:hover .img-portrait { filter: grayscale(0%) contrast(1.05); transform: scale(1.05); }

.img-vista { filter: brightness(0.8) sepia(0.2); transition: all 0.6s ease; }
.group:hover .img-vista { filter: brightness(1.0) sepia(0); transform: scale(1.05); }

.seal-font {
    font-family: "Kaiti SC", "STKaiti", "AR PL UKai CN", "KaiTi", "楷体", "Songti SC", serif;
}

/* --- Category Archive V4 专用样式 --- */

/* 报纸风格边框 */
.shenbao-border-top { 
    border-top: 4px double var(--c-carbon-ink); 
}
.shenbao-border-bottom { 
    border-bottom: 1px solid var(--c-carbon-ink); 
}
.shenbao-divider-v { 
    border-right: 1px solid #e5e5e5; 
}

/* 移动端适配 */
@media (max-width: 768px) {
    .shenbao-divider-v { 
        border-right: none; 
        border-bottom: 1px dashed #ccc; 
        padding-bottom: 2rem; 
        margin-bottom: 2rem; 
    }
}

/* 分页样式优化 */
.pagination .page-numbers { 
    font-family: "Songti SC", serif; 
    font-weight: bold; 
    padding: 6px 12px; 
    border: 1px solid #ddd; 
    margin: 0 2px; 
    color: var(--c-carbon-ink);
}
.pagination .page-numbers.current { 
    background: var(--c-carbon-ink); 
    color: white; 
    border-color: var(--c-carbon-ink); 
}
.pagination .page-numbers:hover {
    border-color: var(--c-cinnabar-red);
    color: var(--c-cinnabar-red);
}