/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 纸张基础样式：横线底色 */
body {
    background-color: #fbfaf6;
    background-image: repeating-linear-gradient(
        transparent 0,
        transparent 31px,
        #d1d5db 31px,
        #d1d5db 32px
    );
    background-size: 100% 32px;
    line-height: 32px;

    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1f2937;
    font-size: 16px;

    padding: 24px 64px 40px;
    max-width: 960px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

/* ========== 页眉模块：文字样式前置 ========== */
.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding-bottom: 14px;
    margin-bottom: 32px;

    /* 线段状虚线：背景渐变实现，左右缩进与黑方块分离 */
    background-image: repeating-linear-gradient(
        90deg,
        #111827 0,
        #111827 8px,
        transparent 8px,
        transparent 14px
    );
    background-size: calc(100% - 60px) 2px;
    background-position: center bottom;
    background-repeat: no-repeat;
}

/* 左侧文字：灰色斜体，字号14px */
.header-left {
    color: #6b7280;
    font-style: italic;
}

/* H0NC 2026 logo：文字大小与左侧14px文字匹配，2px黑边框 */
.honc-logo {
    height: 30px;
    width: auto;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
    vertical-align: middle;
    object-fit: contain;
}

/* ========== 页眉装饰：加宽黑方块 ========== */
.note-header::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 24px;
    height: 12px;
    background-color: #111827;
}

.note-header::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 24px;
    height: 12px;
    background-color: #111827;
}

/* ========== 正文样式 ========== */
.note-content p:empty,
.note-entry p:empty {
    height: 32px;
}

.entry-link {
    text-decoration: none;
    color: #1e3a8a;
    border-bottom: 1px dashed #6b7280;
    padding: 0 2px;
    font-size: 17px;
}
.entry-link:hover {
    background-color: #eff6ff;
}

/* ========== 页脚模块：调整布局+新增导航 ========== */
.note-footer {
    margin-top: 64px;
    padding-top: 14px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;

    /* 线段状虚线移至页脚顶部 */
    background-image: repeating-linear-gradient(
        90deg,
        #111827 0,
        #111827 8px,
        transparent 8px,
        transparent 14px
    );
    background-size: calc(100% - 60px) 2px;
    background-position: center top;
    background-repeat: no-repeat;
}

/* 页脚黑方块：移至虚线顶部外侧，文字整体位于方块下方 */
.note-footer::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    width: 24px;
    height: 12px;
    background-color: #111827;
}

.note-footer::after {
    content: '';
    position: absolute;
    top: -6px;
    right: 0;
    width: 24px;
    height: 12px;
    background-color: #111827;
}

/* 左下角导航栏：深蓝色圆角按钮 */
.footer-nav {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.footer-nav a {
    text-decoration: none;
    background-color: #1e3a8a;
    color: #ffffff;
    padding: 6px 18px;
    border-radius: 6px;
    font-weight: 500;
    line-height: 1.5;
    transition: background-color 0.2s ease;
}

.footer-nav a:hover {
    background-color: #1e40af;
    color: #ffffff;
}

/* 右下角页脚文字 */
.footer-copyright {
    font-size: 14px;
    color: #374151;
}

.footer-honc {
    color: #1e3a8a;
    font-weight: 700;
}

/* 正文内容美化 */
.content-header {
    color: #1b439a9f;
    font-style: italic;
    font-size: 50px;
}

.subtitle h1 {
    font-size: 14px;
    color: #6b7280;
}

.note-list {
    text-decoration: none;
    color: #ff0000;
    border-bottom: 0px dashed #0055ff;
    padding: 0 2px;
    font-size: 17px;
}

.note-list:hover {
    background-color: #0000001f;
}

/* 正文插图统一样式 */
.content-img {
    margin: 0;
    border: 5px solid #9ca3af;
    box-sizing: border-box;
    max-width: 210px;
    width: 100%;
    height: auto;
    display: block;
}

/* 正文深红色圆角按钮 */
.content-buttion {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    font-size: 14px;
}

.content-buttion a {
    text-decoration: none;
    background-color: #8a1e1e;
    color: #ffffff;
    padding: 6px 18px;
    border-radius: 6px;
    font-weight: 500;
    line-height: 1.5;
    transition: background-color 0.2s ease;
}

.content-buttion a:hover {
    background-color: #af1e1e;
    color: #ffffff;
}

/* 试题图片样式 */
.test-img-pre {
    margin: 10px;
    border: 2px solid #9ca3af;
    box-sizing: border-box;
    max-width: 170px;
    width: 100%;
    height: auto;
    display: block;
}

.test-img {
    margin: 2px;
    border: 1px solid #9ca3af;
    box-sizing: border-box;
    max-width: 680px;
    width: 100%;
    height: auto;
    display: block;
}

/* 年鉴表全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", SimSun, sans-serif;
    background-color: #fff;
    color: #222;
    line-height: 1.8;
    padding: 30px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 页面标题 */
.page-title {
    font-size: 40px;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    border-bottom: 2px solid #5b5b5b;
    padding-bottom: 12px;
}

/* 大章节标题 */
.chapter-title {
    font-size: 20px;
    font-weight: bold;
    margin: 35px 0 15px;
    padding-left: 8px;
    border-left: 4px solid #14366097;
}

/* 段落通用间距 */
.content-p {
    margin: 10px 0;
    font-size: 16px;
    text-align: left;
    color: #170537;
}

/* 时间专用样式：蓝色加粗 */
.time-text {
    color: #0d1929;
    font-weight: 700;
}

/* 关键词链接（人名/地点/事件）预留接口 */
.keyword-link {
    color: #26439b;
    text-decoration: underline;
    font-size: 16px;
    text-decoration-color: #a60909; /* 下划线 */
    text-decoration-thickness: 1.5px;
    cursor: pointer;
}

/* 链接悬浮效果 */
.keyword-link:hover {
    color: #a60909;
    font-size: 24px;
    text-decoration-color: #26439b;
}



/* ========== 移动端响应式适配：按钮与布局优化 ========== */
/* 平板及以下（700px 以内）：释放宽度 + 支持自动换行 */
@media (max-width: 700px) {
    /* 缩减页面左右内边距，从根源增加按钮可用宽度 */
    body {
        padding: 20px 24px 32px;
    }

    /* 页脚导航按钮组：允许换行，调整间距与内边距 */
    .footer-nav {
        flex-wrap: wrap;
        gap: 10px 12px;
    }
    .footer-nav a {
        padding: 8px 14px;
        font-size: 14px;
    }

    /* 正文按钮组：允许换行，保留右对齐逻辑 */
    .content-buttion {
        flex-wrap: wrap;
        gap: 10px 12px;
        justify-content: flex-end;
    }
    .content-buttion a {
        padding: 8px 14px;
        font-size: 14px;
    }
}

/* 手机窄屏（200px 以内）：重排布局 + 等分按钮宽度 */
@media (max-width: 200px) {
    /* 进一步收窄页面边距，适配手机屏幕 */
    body {
        padding: 16px 16px 24px;
    }

    /* 同步适配页眉页脚装饰，避免虚线与黑方块错位 */
    .note-header,
    .note-footer {
        background-size: calc(100% - 40px) 2px;
    }
    .note-header::before,
    .note-header::after,
    .note-footer::before,
    .note-footer::after {
        width: 18px;
        height: 10px;
    }

    /* 页脚整体改为垂直排布，导航在上、版权在下 */
    .note-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .footer-nav {
        justify-content: center;
        gap: 8px 10px;
    }
    .footer-nav a {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
        font-size: 13px;
        min-width: calc(50% - 5px);
    }
    .footer-copyright {
        text-align: center;
        font-size: 13px;
    }

    /* 正文按钮：窄屏下等分宽度，避免单行文本拥挤 */
    .content-buttion {
        justify-content: stretch;
    }
    .content-buttion a {
        flex: 1;
        text-align: center;
        padding: 10px 10px;
        font-size: 13px;
        min-width: calc(50% - 5px);
    }
}