@charset "UTF-8";

/* ===== 字体引入 ===== */
@font-face {
    font-family: 'Raleway';
    src: url('/fonts/Raleway-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'wingding';
    src: url('/fonts/wingding.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'wingding2';
    src: url('/fonts/wingding2.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'wingding3';
    src: url('/fonts/wingding3.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Webdings';
    src: url('/fonts/Webdings.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* ===== 全局 ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Raleway', Verdana, '微软雅黑';
    font-size: 14px;
    line-height: 1.8;
    background-color: #070054;
    color:#272727;
    text-shadow:
        0 0 8px rgba(255,255,255,0.6),
        0 0 8px rgba(255,255,255,0.6);
}

/* 超链接 */
a {
    text-decoration: none;
    color: #353535;
}
a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ===== 页面吸顶结构 ===== */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;   /* 保证页面至少撑满屏幕 */
}

.page-content {
    flex: 1;              /* 占满剩余空间 */
    display: flex;
    flex-direction: column;
}

/* ===== 容器 ===== */
.container {
    margin-left: 0px; 
    margin-right: 0px; 
    margin-top: 0px;
    padding-bottom: 0px;
    display: flex;
    flex-direction: column;
    background-color: #070054;
    border-radius: 0px;
    overflow: hidden;
    position: relative;
    flex: 1;                 /* ✦让 container 填满 page-content 剩余空间 */
}

/* ===== Footer ===== */
.footer {
    background-color: #23549E;
    color: #ccc;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 10px;
    font-size: 12px;
    flex-shrink: 0;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    position: relative;
    width: 100%;
    z-index: 5;
}
.footer a { color: #ccc; text-decoration: none; }
.footer-right img { height: 80px; width: 80px; margin-left: 10px;margin-top: 2px; }

/* Header */
.header {
    display: flex;
    align-items: center;
    padding: 10px;
    background-image: url('/images/tangcao_bk.png');
    background-repeat: repeat-x;
    background-position: right center;
}
.header img:last-child {
    width: 40vw;
    max-width: 400px;
    min-width: 260px;
    height: auto;
    margin-right: 10px;
}

/* ===== Main 三栏布局 ===== */
.main {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    padding: 10px;
    background-color: #E8FAFF;
    background-repeat: no-repeat;
    background-position: right bottom;
    overflow: auto;
	height: 100%
}

.catalog, .secondtxt {
    width: 340px;
    flex-shrink: 0;
    text-align: justify;
}
.content {
    flex: 1 1 auto;
    min-width: 300px;
    overflow: auto;
	word-wrap: break-word;    /* 处理长单词或没有空格的字符串 */
    word-break: break-word;   /* 兼容性更好 */
    white-space: normal;      /* 避免全部在一行显示 */
    text-align: justify;
}

/* 分割线 */
.divider {
    width: 5px;
    flex-shrink: 0;
    background-image: url('/images/dotline-5pix.png');
    background-repeat: repeat-y;
    background-position: center top;
}

/* 列表样式 */
.catalog ul {
    padding-left: 20px;
    margin: 5px 0;
}
.catalog li {
    margin: 4px 0;
}

/* 文章内容 */
.artic_content p {
    font-size: 14px;
    text-indent: 2em;
    text-align: justify;
    margin: 0 0 1em 0;
}

/* 正文容器本身不缩进 */
.artic_content {
    font-size: 14px;
    text-align: justify;
}

/* 图片样式 */
.artic_content img {
    display: block;
    margin: 0.8em auto;
    max-width: 100%;
    height: auto;
}

/* 视频样式（关键修复） */
.artic_content video {
    display: block;
    margin: 0.8em auto;
    max-width: 100%;
    height: auto;
}

/* 如果视频或图片被 p 包裹，取消该 p 的缩进 */
.artic_content p:has(img),
.artic_content p:has(video) {
    text-indent: 0;
}
/* ===== 底部导航 ===== */
.nav {
    background-color: #1983CF;
    background-image: url('/images/tangcao_bk.png');
    background-repeat: repeat-x;
    background-position: right bottom;
    height: 40px;
    color: white;
    text-align: right;
    padding: 0 10px;
    font-size: 14px;
    flex-shrink: 0;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);

    display: flex;
    align-items: center;   /* 垂直居中 */
    justify-content: flex-end; /* 保持右对齐 */
}

.nav a { color: white; margin-left: 6px; }

/* bottom-wrapper */
.bottom-wrapper { 
    display: flex; 
    flex-direction: column; 
    margin-top: auto; 
    flex-shrink: 0;
}

/* 表单控件 */
.Mybox {
    height: 20px;
    font-size: 12px;
    border: 1px solid #81DAFA !important;
    color: #003 !important;
    font-weight: bold;
    font-family: Raleway, sans-serif, "微软雅黑" !important;
    padding: 2px 4px;
    background-color: #fff;
    outline: none;
}
.Mybox:focus {
    border-color: #76A9FF;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

/* 按钮 */
.Mybutton {
    height: 23px;
    width: 50px;
    font-size: 12px;
    background-color: #B7D5FF;
    color: #003;
    border: 1px solid #76A9FF;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 4px;
    transition: background-color 0.2s;
}
.Mybutton:hover { background-color: #C9DAFF; }

/* select */
.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100px;
}
.select-wrapper select {
    width: 100%;
    padding: 2px 4px;
    border: 1px solid #81DAFA;
    background: #fff;
    appearance: none;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}
.select-wrapper::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px;
    color: #333;
}

/* 单选按钮 */
.radio-box {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 8px;
    background-color: #cce6ff;
    cursor: pointer;
    transition: 0.3s;
    font-size: 12px;
}
.radio-box:hover { background-color: #ffffff; }
.radio-box input[type="radio"] { margin-left: 6px; cursor: pointer; }

/* 内容行悬停高亮 */
.data-row {
    transition: 0.2s;
    cursor: pointer;
}
.data-row:hover { background-color: #C5E5FF; }

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-size: 13px;
    margin: 12px 0;
}
.pagination .page-item {
    padding: 2px 6px;
    border: 1px solid #bbb;
    border-radius: 3px;
    color: #333;
    font-size: 12px;
    transition: 0.15s;
}
.pagination .page-item:hover {
    background-color: #B7E9FF;
    border-color: #B7E9FF;
    color: white;
}
.pagination .page-item.current {
    background-color: #94B8FD;
    border-color: #94B8FD;
    color: white;
}

/* 表单样式 */
.Myform {
    margin:0px;
    width: 100%;
    line-height: 1.8;
}

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
    .main {
        flex-direction: column;   
        align-items: stretch;     
        gap: 10px;
        overflow-x: hidden;       
    }

    .catalog,
    .secondtxt,
    .content {
        width: 100% !important;
        min-width: 0 !important;
        flex-shrink: 1;
        overflow-x: hidden;
        text-align: justify;
    }

    .divider {
        width: 100%;
        height: 5px;
        background-repeat: repeat-x;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .container {
        height: auto;
        min-height: 100vh;   /* 保证小屏幕也撑满屏幕 */
    }
    .main {
        flex: 1 1 auto;
        overflow-y: auto;
        flex-direction: column;
        gap: 5px;
    }
    .footer-right {
        display: none;
    }
}

/* ===== 阅读模式样式 ===== */
#readModeBtn {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1000;
    padding: 8px 12px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

#readModeOverlay {
    display: none;
    position: fixed;
    top:0; left:0;
    width: 100%;
    height: 100%;
    background: #001F3F;
    color: #E0F7FA;
    overflow: auto;
    z-index: 9999;
padding: 40px 20px; /* 上下40px，左右20px，更紧凑 */
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

#readModeTitle {
    text-align: center;
    margin-top: 0;
    font-size: 2em;
    text-shadow: 0 0 4px rgba(255,255,255,0.3); /* 光晕弱一点 */
}

#readModeMeta {
    text-align: center;
    margin-bottom: 40px;
    font-size: 14px;
    color: #B0E0E6;
}

/* 文章正文 */
#readModeContent {
	text-indent: 2em; /* 首行缩进 */
    line-height: 2;
    font-size: 18px;
    width: 100%;
    max-width: 1200px; /* 最大宽度 */
    margin: 4px auto;
    text-align: justify; /* 两端对齐 */
}

#readModeContent p {
    text-indent: 2em; /* 首行缩进 */
    margin-bottom: 1em;
}

/* 文章内容图片和视频样式统一 */
#readModeContent img,
#readModeContent video {
    display: block;            /* 独占一行 */
    max-width: 100%;           /* 自适应容器宽度 */
    height: auto;              /* 高度自动 */
    margin: 0.5em auto;        /* 水平居中，段间距可调 */
    text-indent: 0;            /* 取消首行缩进 */
}


/* 关闭按钮 */
#closeReadMode {
    position: fixed;
    top: 12px;
    right: 12px;
    padding: 8px 12px;
    background: #FF4136;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 10000;
}
/*换行显示下级章节文章的作者及时间*/
.data-cell {
    display: flex;
    flex-wrap: wrap;  /* 自动换行 */
    align-items: center;
    gap: 0px;         /* 元素之间间距 */
}

.data-cell .author-time {
    flex-shrink: 0;   /* 保持最小宽度 */
	margin-top: 0px;
}
/*给文字加黑色光晕*/
.halo-subtle {
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
