/* =============================================
 * global.css —— I²CTC 玩家首页 全局样式【合并完整版】
 * 主题：dark-theme(深灰) / dark-theme-c(棕调) / dark-theme-b(蓝调)
 * 合并说明：
 * 1. 保留原有悬浮抽屉式TOC（右侧fixed弹出目录）
 * 2. 新增 page‑toc 页面内两栏静态目录组件（重命名避免class冲突）
 * 3. 新增 nav-card 导航卡片网格组件
 * 4. site‑nav.css 保持独立文件，未合并进来
 * ============================================= */
/* ========== 嵌入一级顶部导航（取自nav.html，移除二级导航，适配深色主题） ========== */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.nav-page-container {
    width:100%;
    max-width:960px;
    margin:0 auto;
}
.navbar {
    width:100%;
    max-width:960px;
    height:100px;
    background-color:#3a2610;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 20px;
    box-shadow:0 2px 4px rgba0,0,0,0.25;
}
.site-title {
    color:#FFFFFF;
}
.site-title h1 {
    font-size:28px;
    font-weight:bold;
    letter-spacing:1px;
    white-space:nowrap;
}
.site-title a {
    font-size:16px;
    font-weight:normal;
    margin-left:12px;
    text-decoration:underline;
    color:#ffdd00; /* 修改：统一项目主题黄色链接，替换原白色 */
}
.site-title a:visited{
    color:#ffdd00;
}
.site-title a:hover{
    color:#fff280;
}
/* ---------- 导航与正文之间浅色分割线 ---------- */
.nav-divider {
    max-width:960px;
    margin:0 auto;
    height:1px;
    background-color:rgba255,255,255,0.22; /* 浅色半透明白分割线，适配深色背景 */
}


/* ---------- 基础复位：清除body默认内外边距 ---------- */
body {
    margin: 0;
    padding: 0;
}
/* ----------【原有组件】目录组件：右侧悬浮抽屉TOC（fixed弹出） ---------- */
.toc-wrapper { position: relative; }
.toc {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 260px;
    max-height: 85vh;
    overflow-y: auto;
    background: #222222;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    color: #fff;
    z-index: 900;
    transform: translateX(calc(100% + 12px));
    transition: transform 0.25s ease;
}
.toc.open { transform: translateX(0); }
.toc-title {
    font-weight: bold;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #444;
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 4px 0; }
.toc a { color: #ffdd00; text-decoration: none; }
.toc a:visited { color: #ffdd00; }
.toc a:hover { color: #fff280; text-decoration: underline; }
.toc a:active { color: #ffffff; }
.toc a.active { color: #ffcc44; font-weight: bold; }
.toc-item-h1 { padding-left: 0px; }
.toc-item-h1 a { font-size: 15px; }
.toc-item-h2 { padding-left: 16px; }
.toc-item-h2 a { font-size: 14px; }
.toc-item-h3 { padding-left: 32px; }
.toc-item-h3 a { font-size: 13px; }
.toc-toggle {
    position: fixed;
    z-index: 901;
    top: 1rem;
    right: 1rem;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px 10px;
}
/* 大屏 >=1300px：悬浮目录直接显示，隐藏切换按钮 */
@media (min-width: 1300px) {
    .toc { transform: translateX(0); }
    .toc-toggle { display: none; }
}
/* ----------【原有组件】深色主题：body页面根容器三套主题 ---------- */
body.dark-theme  { background: #2c2c2c; color: #ffffff; line-height: 1.7; }
body.dark-theme-c { background: #1a1a1a; color: #ffffff; line-height: 1.7; } /* 外层深黑，正文卡片棕色 */
body.dark-theme-b { background: #1A497A; color: #ffffff; line-height: 1.7; }
/* ----------【原有组件】深色主题内全局超链接统一黄色样式 ---------- */
body.dark-theme a, body.dark-theme-c a, body.dark-theme-b a { color: #ffdd00; text-decoration: none; }
body.dark-theme a:visited, body.dark-theme-c a:visited, body.dark-theme-b a:visited { color: #ffdd00; }
body.dark-theme a:hover, body.dark-theme-c a:hover, body.dark-theme-b a:hover { color: #fff280; text-decoration: underline; }
body.dark-theme a:active, body.dark-theme-c a:active, body.dark-theme-b a:active { color: #ffffff; }
/* ----------【原有组件】iframe容器：居中、和正文宽度对齐 ---------- */

/* ===== 新增iframe样式 ===== */
.iframe-wrap{
    width:100%;
    max-width:960px;
    margin:0 auto;
}
#main-frame{
    width:100%;
    border:none;
    min-height: calc(100vh - 160px);
    background: #222;
}

/* md导航链接样式 */
.md-nav-link{
    font-size:16px;
    color:#ffdd00;
    text-decoration: underline;
    cursor:pointer;
    margin:0 12px;
}
.md-nav-link:hover{
    color:#fff280;
}

/* ----------【原有组件】全局a标签兜底（非主题模式下） ---------- */
a {
    color: #ffdd00 ;
    text-decoration: none ;
}
/* ----------【原有组件】#content iframe高度控制 ---------- */
#content {
    display:block;
    width:100%;
    height:125px;   /* 高度 */
    border:none;
    margin:0;
    overflow:hidden;
}
/* ----------【原有组件】main.toc-content 正文卡片容器，多主题变体 ---------- */
main.toc-content {
    display:block;
    width:100%;
    margin-top:0;
    border-radius: 8px;
    max-width: 960px;
    margin: 0 auto;
    /* 上改成0，左右1rem，底部2rem */
    padding: 0 1rem 2rem;
    box-sizing: border-box;
    background: #632000;
    color: #ffffff;
    line-height: 1.7;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}
/* 正文卡片追加class切换背景色，其余样式全部继承 */
main.toc-content.b {
    background:  #1A497A;
}
main.toc-content.it {
    background: #2c2c2c;
}
main.toc-content.gr {
    background: #1D6F06;
}
main.toc-content.nv {
    background: #7f1cad;
}
/* === 新增维权5个阶段class，沿用你这套选择器结构 === */
main.toc-content.ws1 {
    background: #326496; /*一期投诉，最浅*/
}
main.toc-content.ws2 {
    background: #1A497A; /*二期举报，和 .b 完全同色，复用基准*/
}
main.toc-content.ws3 {
    background: #12385F; /*市级*/
}
main.toc-content.ws4 {
    background: #0B2744; /*省级*/
}
main.toc-content.ws5 {
    background: #071A30; /*国家层级，最深*/
}
/* === 预留另外两大顶层板块（项目业务、归档史料），保持命名风格一致 === */
main.toc-content.proj {
    background: #283822;  /*项目业务，深墨绿*/
}
main.toc-content.arc {
    background: #382430;  /*归档史料，暗紫褐*/
}
/* 正文卡片内部文字元素兜底颜色 */
main.toc-content h1, main.toc-content h2, main.toc-content h3,
main.toc-content h4, main.toc-content p, main.toc-content li,
main.toc-content td, main.toc-content th, main.toc-content dd, main.toc-content dt {
    color: #ffffff;
}
/* ==========新增：正文卡片内原生ul/ol列表缩进，不碰伪元素、不干扰右侧悬浮TOC========== */
main.toc-content ul {
  margin: 0.8em 0;
  list-style-position: outside;
  padding-left: 1.6em;
}
main.toc-content ol {
  margin: 0.8em 0;
  padding-left: 1.6em;
}
/* ----------【原有组件】代码块code/pre，深色主题 +正文卡片适配 ---------- */
body.dark-theme code, body.dark-theme-c code, body.dark-theme-b code,
main.toc-content code {
    background-color: rgba(0,0,0,0.35);
    color: #f8f8f2;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: Consolas, Menlo, monospace;
    font-size: 0.92em;
}
body.dark-theme pre, body.dark-theme-c pre, body.dark-theme-b pre,
main.toc-content pre {
    background-color: rgba(0,0,0,0.45);
    color: #f8f8f2;
    border-radius: 6px;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: Consolas, Menlo, monospace;
    font-size: 0.92em;
    line-height: 1.55;
    border: 1px solid rgba(255,255,255,0.12);
}
body.dark-theme pre code, body.dark-theme-c pre code, body.dark-theme-b pre code,
main.toc-content pre code { background: transparent; padding: 0; border-radius: 0; }
/* ----------【原有组件】浅色模式兜底code/pre（无dark‑theme类时生效） ---------- */
pre { background: #f4f4f4; color: #222; border-radius: 6px; padding: 14px 16px; overflow-x: auto; font-family: Consolas, Menlo, monospace; border: 1px solid #ddd; }
code { background: #eee; padding: 0.15em 0.4em; border-radius: 4px; }
pre code { background: transparent; padding: 0; }
/* ----------【原有组件】正文卡片内表格样式 ---------- */
main.toc-content table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
main.toc-content th, main.toc-content td { border: 1px solid rgba(255,255,255,0.25); padding: 8px 12px; }
main.toc-content th { background: rgba(0,0,0,0.3); font-weight: bold; }
main.toc-content tr:nth-child(even) td { background: rgba(0,0,0,0.1); }
/* ----------【原有组件】顶部标签页导航 nav-tab / nav-tab-y （页面内局部标签） ---------- */
/* 导航容器 */
.nav-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #3b1200;   /* 和 iframe 背景一致 */
}
/* 默认标签样式（nav-tab） */
.nav-tab,
.nav-tab-y {
    display: inline-block;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 5px 5px 0 0;
    transition: background 0.2s, color 0.2s;
    line-height: 1.6;
}
/* —— 未选中标签（nav-tab）：深色底 + 黄色字 —— */
.nav-tab {
    background: #4a1800;
    color: #ffdd00;
    border: 1px solid #ffdd00;
    border-bottom: none;
}
.nav-tab:hover {
    background: #5a1e00;
    color: #fff280;
}
/* —— 当前激活标签（nav-tab-y）：黄色底 + 深色字 —— */
.nav-tab-y {
    background: #ffdd00;
    color: #3b1200;
    border: 1px solid #ffdd00;
    border-bottom: none;
    font-weight: bold;
}
.nav-tab-y:hover {
    background: #fff280;
    color: #3b1200;
}
/* —— 访问过的链接保持颜色 —— */
.nav-tab:visited {
    color: #ffdd00;
}
.nav-tab-y:visited {
    color: #3b1200;
}
/* ===================================================================== */
/* ============【新增合并进来】页面内两栏静态目录 page‑toc 组件 =========== */
/* 说明：与旧悬浮TOC class重命名隔离，可页面内部做侧边固定目录，不冲突 */
/* ===================================================================== */
/* 图片靠右、文字环绕类 */ 
.img-right { float: right; margin: 0 0 1rem 1rem; 
max-width: 460px; height: auto; } /* 清除浮动，防止父容器高度塌陷 */ 
.clearfix::after { content: ""; display: block; clear: both; } 
.wrap { max-width: 800px; margin: 2rem auto; padding: 0 1rem; } 
/* ---------- page‑toc 两栏外层包装容器 ---------- */
.page-toc-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap:20px;
  background:#632000;
  padding:16px;
  border-radius:8px;
}
/* ---------- page‑toc 侧边栏目录（sticky跟随滚动） ---------- */
.page-toc {
  position: sticky;
  top:80px;
  height: calc(100vh - 100px);
  overflow-y:auto;
  border:1px solid #555555;
  border-radius:8px;
  padding:12px;
  background:#382214;
}
/* ---------- page‑toc 目录标题 ---------- */
.page-toc-title {
  font-weight:bold;
  margin-bottom:12px;
  padding-bottom:8px;
  border-bottom:1px solid #444444;
}
/* ---------- page‑toc 目录列表ul id选择器 ---------- */
#page-toc-list {
  list-style:none;
  padding:0;
  margin:0;
}
#page-toc-list li {
  margin:6px 0;
}
/* ---------- page‑toc 移动端折叠切换按钮 ---------- */
.page-toc-toggle {
  display:none;
  padding:8px 12px;
  font-size:1rem;
  cursor:pointer;
  margin-bottom:10px;
  background:#4b2b18;
  color:#fff;
  border:1px solid #666;
  border-radius:4px;
}
/* ---------- page‑toc 右侧正文占位容器 ---------- */
.page-toc-content {
}
/* ----------【新增合并进来】导航卡片网402414格组件 nav‑card ---------- */
/* 卡片外层容器 */
.card-nav-wrap{
  margin:1rem 0 2.5rem;
}
/* 自动填充网格布局，最小270px卡片宽度 */
.card-nav-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill,minmax(270px,1fr));
  gap:18px;
}
/* 单张导航卡片 */
.nav-card{
  border:1px solid #583824;
  border-radius:8px;
  padding:16px;
  scroll-margin-top:80px;
  background:#402414;
}
.nav-card h4{
  margin:0 0 8px 0;
  font-size:1.08rem;
}
.nav-card p{
  margin:0;
  font-size:0.92rem;
  color:#dddddd;
  line-height:1.55;
}
/* hover高亮边框与发光效果 */
.nav-card:hover{
  border-color:#ffaa44;
  box-shadow:0 2px 10px rgba(255,170,68,0.20);
}
/* ---------- page‑toc + nav‑card 移动端768px适配 ---------- */
@media(max-width:768px){
  /* 两栏变单栏 */
  .page-toc-wrapper{
    grid-template-columns:1fr;
  }
  /* 显示折叠按钮 */
  .page-toc-toggle {
    display:block;
  }
  /* 取消sticky，改为普通静态布局 */
  .page-toc{
    position:static;
    height:auto;
    overflow:hidden;
  }
  /* collapsed类折叠隐藏目录列表 */
  .page-toc.collapsed #page-toc-list{
    display:none;
  }


}