@charset "UTF-8";

/* ==========================
   朗读进度条样式
========================== */
.read-aloud-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8f5f0 0%, #f0ebe3 100%);
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8e0d5;
}

.read-aloud-progress-bar {
    flex: 1;
    height: 6px;
    background: #e0d8cf;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.read-aloud-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a96e 0%, #d4af37 50%, #c9a96e 100%);
    border-radius: 3px;
    transition: width 0.1s linear;
    position: relative;
}

.read-aloud-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #8b5a2b;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(139, 90, 43, 0.5);
}

.read-aloud-language {
    font-size: 12px;
    color: #6b5344;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.read-aloud-controls {
    display: flex;
    gap: 5px;
}

.read-aloud-btn {
    padding: 4px 8px;
    border: 1px solid #d4c8b8;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    color: #5d4037;
    transition: all 0.2s;
}

.read-aloud-btn:hover {
    background: #c9a96e;
    border-color: #b8956e;
    color: white;
}

.read-aloud-btn.active {
    background: #8b5a2b;
    border-color: #8b5a2b;
    color: white;
}

.read-aloud-speed {
    font-size: 11px;
    color: #8a7355;
    padding: 2px 6px;
    background: rgba(139, 90, 43, 0.1);
    border-radius: 4px;
}

/* 音量控制样式 */
.read-aloud-volume-control {
    display: flex;
    align-items: center;
    gap: 4px;
}
 
.volume-icon {
    font-size: 14px;
}
 
.volume-slider {
    width: 50px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 2px;
    cursor: pointer;
}
 
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #c9a96e;
    border-radius: 50%;
    cursor: pointer;
}
 
.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #c9a96e;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}
 
/* 速度选择样式 */
.read-aloud-speed-select {
    padding: 3px 8px;
    border: 1px solid #d4c8b8;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    min-width: 60px;
}
 
.read-aloud-speed-select:focus {
    outline: none;
    border-color: #c9a96e;
}





/* ==========================
   关键词高亮 · 8类统一配色（三模式自动适配）
========================== */
/* 人物 */
.keyword-type-person {
  /* background: linear-gradient(108deg, rgba(203, 92, 131, 0.15) 0%, rgba(186, 104, 153, 0.08) 100%); */
  color: #0064ff !important;
  text-decoration: underline wavy #e74c3c 1px;  /* 波浪线 */
  text-underline-offset: 3px; /* 让波浪线离文字远一点，更美观 */
  border-bottom: none !important;
  /* background: unset !important; */
}

/* 地名 */
.keyword-type-place {
  /* background: linear-gradient(135deg, rgba(76, 128, 69, 0.15) 0%, rgba(52, 100, 48, 0.08) 100%); */
  /* border-bottom: 1px solid rgba(76, 128, 69, 0.5); */
  color: #ad064c !important;
  text-decoration: underline double rgb(33 101 95) 1px;/* 双实线 */
  text-underline-offset: 3px; /* 双实线离文字远一点，更美观 */
  border-bottom: none !important;
  /* background: unset !important; */
}


/* 等级(君、臣) - 橙色虚线（替代波浪） */
.key-type-grade {
    border-bottom: 2px dashed #f39c12;
    /* background: unset !important; */
}

/* 数量 - 青绿色双下划线 */
.key-type-number {
    border-bottom: 2px double #1abc9c;
    /* background: unset !important; */
}

/* 身份(天子 、诸侯  status) - 蓝色下划线 */
.key-type-status {
 border-bottom: 1px solid #b50808;
 color: #5c3521 !important;
}

/* 礼仪(名、分、礼) - 蓝色双下划线 */
.key-type-ceremony {
  color: #50025f !important;
  text-decoration: underline double rgb(1, 163, 69) 1px;/* 双实线 */
  text-underline-offset: 3px; /* 双实线离文字远一点，更美观 */
  border-bottom: none !important;
}

.key-type-astronomy {
    border-bottom: 2px solid #f1c40f;
}

/* 官职 */
.keyword-type-title {
  /* background: linear-gradient(145deg, rgba(0, 60, 100, 0.15) 0%, rgba(30, 90, 130, 0.08) 100%); */
  /* border-bottom: 1px solid rgba(0, 60, 100, 0.5); */
  color: #000000 !important;

  /* 双实线 */
  text-decoration: underline double rgb(119 91 205) 1px;
  text-underline-offset: 3px; /* 双实线离文字远一点，更美观 */
  border-bottom: none !important;
  /* background: unset !important; */
}

/* 典籍 */
.keyword-type-book {
   font-size: 18px;
   font-weight: 500;
   color: #2E8B57 !important;
}

/* 机构 */
.keyword-type-organization {
  /* background: #dfe5c1; */
  border-bottom: 4px double rgb(0 0 0 / 50%);
  color: #000000 !important;
  /* background: unset !important; */
}

/* 事件 */
.keyword-type-event {
  background: linear-gradient(135deg, rgba(50, 120, 138, 0.15) 0%, rgba(40, 100, 118, 0.08) 100%);
  border-bottom: 1px solid rgba(50, 120, 138, 0.5);
  color: #204a52;
}

/* 时间 - 青绿色下划线 */
.keyword-type-time {
  /* background: linear-gradient(88deg, rgba(80, 40, 90, 0.15) 0%, rgba(100, 50, 110, 0.08) 100%); */
  border-bottom: 2px solid #4ab7a2 !important;
  color: #3d1f47 !important;
  /* background: unset !important; */
}

/* 国家 */
.keyword-type-country {
    color: #810aff !important;
    text-decoration: underline double rgb(192, 0, 112) 1px;/* 双实线 */
    text-underline-offset: 3px; /* 双实线离文字远一点，更美观 */
    border-bottom: none !important;
    font-weight: bolder;
    color: #b12626 !important;
    font-size: 20px !important;
}
/* 天文(星、月、日、天干地支) - 黄色下划线 */
.key-type-astronomy {
    border-bottom: 2px solid #f1c40f;
}

/* 家族/氏族 - 蓝色双下划线 */
.key-type-clan {
  color: #50025f !important;
  text-decoration: underline double rgb(1, 163, 69) 1px;/* 双实线 */
  text-underline-offset: 3px; /* 双实线离文字远一点，更美观 */
  border-bottom: none !important;
}

/* 河流 - 蓝色双下划线 */
.key-type-river {
  color: #019c0e !important;
  text-decoration: underline double rgb(1, 4, 163) 1px;/* 双实线 */
  text-underline-offset: 3px; /* 双实线离文字远一点，更美观 */
  border-bottom: none !important;
}



/* 护眼模式适配 */
.eye-mode .keyword-type-person {
  background: linear-gradient(108deg, rgba(203,92,131,0.12) 0%, rgba(186,104,153,0.06) 100%);
}
.eye-mode .keyword-type-place {
  background: linear-gradient(135deg, rgba(76,128,69,0.12) 0%, rgba(52,100,48,0.06) 100%);
}
.eye-mode .keyword-type-title {
  background: linear-gradient(145deg, rgba(0,60,100,0.12) 0%, rgba(30,90,130,0.06) 100%);
}
.eye-mode .keyword-type-book {
  background: linear-gradient(306deg, rgba(210,140,80,0.12) 0%, rgba(180,110,60,0.06) 100%);
}
.eye-mode .keyword-type-org {
  background: linear-gradient(135deg, rgba(220,90,120,0.12) 0%, rgba(190,70,100,0.06) 100%);
}
.eye-mode .keyword-type-event {
  background: linear-gradient(135deg, rgba(50,120,138,0.12) 0%, rgba(40,100,118,0.06) 100%);
}
.eye-mode .keyword-type-time {
  background: linear-gradient(88deg, rgba(80,40,90,0.12) 0%, rgba(100,50,110,0.06) 100%);
}
.eye-mode .keyword-type-country {
  background: linear-gradient(135deg, rgba(148,86,53,0.12) 0%, rgba(120,70,40,0.06) 100%);
}

/* 夜间模式适配 */
.night-mode .keyword-type-person {
  background: linear-gradient(108deg, rgba(203,92,131,0.25) 0%, rgba(186,104,153,0.15) 100%);
  border-bottom-color: rgba(203,92,131,0.7);
  color: #f8b8d0;
}
.night-mode .keyword-type-place {
  background: linear-gradient(135deg, rgba(76,128,69,0.25) 0%, rgba(52,100,48,0.15) 100%);
  border-bottom-color: rgba(76,128,69,0.7);
  color: #a8d89f;
}
.night-mode .keyword-type-title {
  background: linear-gradient(145deg, rgba(0,60,100,0.25) 0%, rgba(30,90,130,0.15) 100%);
  border-bottom-color: rgba(0,60,100,0.7);
  color: #82b8e6;
}
.night-mode .keyword-type-book {
  background: linear-gradient(306deg, rgba(210,140,80,0.25) 0%, rgba(180,110,60,0.15) 100%);
  border-bottom-color: rgba(210,140,80,0.7);
  color: #f2c499;
}
.night-mode .keyword-type-org {
  background: linear-gradient(135deg, rgba(220,90,120,0.25) 0%, rgba(190,70,100,0.15) 100%);
  border-bottom-color: rgba(220,90,120,0.7);
  color: #f4a2b8;
}
.night-mode .keyword-type-event {
  background: linear-gradient(135deg, rgba(50,120,138,0.25) 0%, rgba(40,100,118,0.15) 100%);
  border-bottom-color: rgba(50,120,138,0.7);
  color: #86d0dc;
}
.night-mode .keyword-type-time {
  background: linear-gradient(88deg, rgba(80,40,90,0.25) 0%, rgba(100,50,110,0.15) 100%);
  border-bottom-color: rgba(80,40,90,0.7);
  color: #c8a2d8;
}
.night-mode .keyword-type-country {
  background: linear-gradient(135deg, rgba(148,86,53,0.25) 0%, rgba(120,70,40,0.15) 100%);
  border-bottom-color: rgba(148,86,53,0.7);
  color: #d8b098;
}

/* 标注画布 */
.annotation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
    z-index: 1;
}
.annotation-canvas.disabled { pointer-events: none; }
.annotation-canvas.enabled { pointer-events: auto; }

/* 资治通鉴介绍页面 */
.zztj-intro {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--zj-spacing-xxl) 0;
}
.zztj-manuscript {
    text-align: center;
    margin-bottom: var(--zj-spacing-xxl);
}
.zztj-manuscript img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--el-border-radius-base);
    box-shadow: var(--el-box-shadow-light);
    transition: var(--el-transition-all);
}
.zztj-manuscript p {
    margin-top: var(--zj-spacing-sm);
    font-size: var(--el-font-size-small);
    color: var(--text-secondary);
    font-style: italic;
}
.zztj-stats {
    text-align: center;
    font-size: var(--el-font-size-large);
    margin-bottom: var(--zj-spacing-xxl);
    padding: var(--zj-spacing-md);
    background-color: var(--control-bg);
    border-radius: var(--zj-border-radius);
    border: 1px solid var(--border);
    transition: var(--el-transition-all);
}
.zztj-section {
    margin-bottom: var(--zj-spacing-xxl);
    padding: var(--zj-spacing-lg);
    background-color: var(--bg-content);
    border-radius: var(--zj-border-radius);
    border: 1px solid var(--border);
    transition: var(--el-transition-all);
    /* margin-left:8%;
    margin-right:15%; */
}
.zztj-section h2 {
    margin-bottom: var(--zj-spacing-md);
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--zj-spacing-sm);
}
.zztj-section p {
    margin-bottom: var(--zj-spacing-md);
    line-height: 1.8;
    color: var(--text-primary);
}

.zztj-signature {
    margin-top: var(--zj-spacing-lg);
    padding-top: var(--zj-spacing-md);
    border-top: 1px solid var(--border);
    font-size: var(--el-font-size-small);
    color: var(--text-secondary);
    font-style: italic;
}
.zztj-quote {
    text-align: center;
    padding: var(--zj-spacing-xxl);
    background-color: var(--control-bg);
    border-radius: var(--zj-border-radius);
    border: 1px solid var(--border);
    margin-top: var(--zj-spacing-xxl);
    transition: var(--el-transition-all);
}
.zztj-quote p {
    margin-bottom: var(--zj-spacing-md);
    font-size: var(--el-font-size-medium);
    line-height: 1.8;
    color: var(--text-primary);
}
.zztj-quote .author {
    margin-top: var(--zj-spacing-md);
    font-style: italic;
    color: var(--text-secondary);
}

/* 内容区域 */
#contentArea {
    position: relative;
    overflow: auto;
}

/* 标注头部 */
.annotation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-bottom: 15px; */
    padding: 5px 0;
    /* border-top: 1px dashed #DCDCDC; */
}
.header-left { height: 0px; }
.header-right { display: flex; }
.annotation-label {
    font-weight: 900;
    font-size: 20px;
}
.annotation-btn {
    border: 1px solid var(--border);
    border-radius: var(--el-border-radius-base);
    cursor: pointer;
    font-size: var(--el-font-size-base);
    transition: var(--el-transition-all);
    margin-left: var(--zj-spacing-xs);
    background-color: var(--control-bg);
    color: var(--text-primary);
}
.annotation-btn:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--el-box-shadow-light);
    border-color: var(--accent);
}

/* 全屏弹框 - 古典书卷风格 */
.fullscreen-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.5) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
.popup-content {
    background: linear-gradient(180deg, #fdfbf7 0%, #f5f0e6 100%);
    width: 85%;
    max-width: 900px;
    height: 82%;
    border-radius: 8px;
    padding: 35px 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 60px rgba(139, 90, 43, 0.03);
    border: 1px solid #d4c8b8;
}
.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #c9a96e 20%, #d4af37 50%, #c9a96e 80%, transparent 100%);
}
.popup-content h3 {
    margin-top: 0;
    color: #5d4037;
    font-size: 22px;
    margin-bottom: 25px;
    font-family: 'LXGW WenKai', 'KaiTi', serif;
    letter-spacing: 2px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #d4c8b8;
}
.analysis-content, .inspiration-content {
    line-height: 2.1;
    color: #4a3728;
    font-family: 'LXGW WenKai', 'KaiTi', serif;
    letter-spacing: 0.5px;
}

/* 浮动心得按钮 */
.insight-float-btn {
    position: fixed;
    bottom: 50%;
    left: 19%;
    background-color: var(--control-bg);
    color: var(--text-primary);
    padding: 19px 2px;
    border: 1px solid var(--border);
    border-radius: var(--el-border-radius-circle);
    width: 65px;
    height: 65px;
    font-size: var(--el-font-size-base);
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--el-box-shadow-light);
    z-index: var(--el-index-top);
    transition: var(--el-transition-all);
}
.insight-float-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--el-box-shadow);
    background-color: var(--control-hover);
    color: var(--accent);
    border-color: var(--accent);
}

/* 心得感悟弹窗 */
.insight-modal {
    display: none;
    position: fixed;
    z-index: var(--el-index-popper);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--el-overlay-color-lighter);
}
.insight-modal-content {
    background-color: var(--bg-content);
    margin: 20% auto;
    padding: var(--zj-spacing-md);
    border: 1px solid var(--border);
    width: 80%;
    max-width: 600px;
    border-radius: var(--zj-border-radius);
    box-shadow: var(--el-box-shadow);
    transition: var(--el-transition-all);
}
.insight-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--zj-spacing-md);
    padding-bottom: var(--zj-spacing-sm);
    border-bottom: 1px solid var(--border);
}
.insight-modal-header h3 {
    margin: 0;
    color: var(--accent);
    font-size: var(--el-font-size-large);
}
.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--el-transition-color);
}
.close-btn:hover { color: var(--text-primary); }
.current-content {
    margin-bottom: var(--zj-spacing-md);
    padding: var(--zj-spacing-md);
    background-color: var(--control-bg);
    border-radius: var(--el-border-radius-base);
    transition: var(--el-transition-all);
}
.current-content h4, .insight-input h4 {
    margin-top: 0;
    margin-bottom: var(--zj-spacing-sm);
    color: var(--text-primary);
    font-size: var(--el-font-size-medium);
}
#insightContent {
    width: 100%;
    padding: var(--zj-spacing-sm);
    border: 1px solid var(--border);
    border-radius: var(--el-border-radius-base);
    resize: vertical;
    font-size: var(--el-font-size-base);
    line-height: 1.5;
    background-color: var(--control-bg);
    color: var(--text-primary);
    transition: var(--el-transition-all);
}
.insight-modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--zj-spacing-md);
    gap: var(--zj-spacing-sm);
}
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--el-border-radius-base);
    cursor: pointer;
    font-size: var(--el-font-size-base);
    transition: var(--el-transition-all);
}
.btn-primary {
    background-color: var(--accent);
    color: white;
}
.btn-primary:hover {
    background-color: var(--zj-color-accent-dark);
    box-shadow: var(--el-box-shadow-light);
}
.btn-secondary {
    background-color: var(--control-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background-color: var(--control-hover);
    color: var(--accent);
    border-color: var(--accent);
}

/* 全局基础样式 */
body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}
.app { background-color: var(--bg-main); }

/* 顶部导航 */
.top-bar {
    background-color: #2c3e2f;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="%23d4af37" fill-opacity="0.1" fill-rule="evenodd"/%3E%3C/svg%3E');
}
.top-bar .logo h1 { color: var(--accent); }
.top-bar .logo p { color: var(--text-secondary); }
.nav a {
    color: var(--text-primary);
    background-color: var(--control-bg);
    border-radius: 5px;
    text-align: center;
    padding: 2px 10px;
    font-size: 17px;
}
.nav a:hover {
    color: var(--accent);
    background-color: var(--control-hover);
}

/* 控制栏 */
.control-group span { color: var(--text-primary); }
.mode-btn {
    background-color: var(--control-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    border-radius: 20px;
    /* width: 100px; */
}
.mode-btn:hover, .mode-btn.active {
    background-color: var(--control-hover);
    color: var(--accent);
    border-color: var(--accent);
}

/* 设置面板 */
.settings-panel {
    background-color: var(--bg-content);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.setting-item label { color: var(--text-primary); }
#fontSizeSlider, #widthSlider, #lineHeightSlider {
    background-color: var(--control-bg);
    accent-color: var(--accent);
}
#fontFamilySelect, #bgColorPicker {
    background-color: var(--control-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* 主内容区 */
.main { background-color: var(--bg-main); }

/* 侧边栏 */
.sidebar-left {
    background-color: var(--bg-content);
    border-right: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.sidebar-left h3 { color: var(--accent); }
.sidebar-right {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 350px;
    min-width: 350px;
    max-width: 60%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-header h3 { color: var(--accent); }

/* 文章内容 */
#article-container {
    background-color: var(--bg-content);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 分页控件 */
.pagination-controls {
     display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px;
    border-radius: 10px;
}
.pagination-controls .prev-btn,
.pagination-controls .next-btn {
    min-width: 70px;
    height: 36px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, #8b5a2b 0%, #6d4421 100%);
    color: #faf0e6;
    font-size: 14px;
    font-family: 'LXGW WenKai', 'KaiTi', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(139, 90, 43, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}
.pagination-controls .prev-btn:hover,
.pagination-controls .next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 90, 43, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(145deg, #9b6a3b 0%, #7d5431 100%);
}
.pagination-controls .prev-btn:active,
.pagination-controls .next-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(139, 90, 43, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.pagination-controls .prev-btn:disabled,
.pagination-controls .next-btn:disabled {
    background: linear-gradient(145deg, #a09080 0%, #807060 100%);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}
.pagination-controls #pageInfo {
    font-size: 14px;
    color: #5d4037;
    font-family: 'LXGW WenKai', 'KaiTi', serif;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 6px 12px;
    background: rgba(255, 250, 240, 0.95);
    border-radius: 6px;
    border: 1px solid rgba(139, 90, 43, 0.3);
    min-width: 60px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.pagination-controls .prev-btn::before {
    content: '‹';
    margin-right: 4px;
    font-size: 18px;
    font-weight: bold;
}
.pagination-controls .next-btn::after {
    content: '›';
    margin-left: 4px;
    font-size: 18px;
    font-weight: bold;
}
.night-mode .pagination-controls {
    background: linear-gradient(145deg, #2a2520 0%, #353028 100%);
    border-color: #5a4737;
}
.night-mode .pagination-controls .prev-btn,
.night-mode .pagination-controls .next-btn {
    background: linear-gradient(145deg, #4a3728 0%, #3a2718 100%);
    color: #e8d8b8;
}
.night-mode .pagination-controls .prev-btn:hover,
.night-mode .pagination-controls .next-btn:hover {
    background: linear-gradient(145deg, #5a4738 0%, #4a3728 100%);
}
.night-mode .pagination-controls #pageInfo {
    background: rgba(40, 35, 30, 0.95);
    color: #d4c4a8;
    border-color: rgba(212, 175, 55, 0.3);
}

/* 年份标题 */
.year-title {
    font-size: var(--el-font-size-extra-large);
    font-weight: bold;
    margin-bottom: var(--zj-spacing-md);
    color: var(--text-primary);
    transition: var(--el-transition-all);
}

/* 古风译文 */
.vernacular {
    font-size: var(--el-font-size-medium);
    padding: 28px 35px;
    margin: var(--zj-spacing-sm) 0;
    margin-bottom: var(--zj-spacing-lg);
    white-space: pre-wrap;
    border-radius: 6px;
    transition: var(--el-transition-all);
    position: relative;
    border: 1px solid #e8dcc8;
}
.vernacular::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #c9a96e 15%, #d4af37 50%, #c9a96e 85%, transparent 100%);
}
.vernacular::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #8b7355 15%, #a69076 50%, #8b7355 85%, transparent 100%);
}
.vernacular-text {
    line-height: 2.1;
    color: #4a3728;
    font-family: 'LXGW WenKai', 'KaiTi', 'STKaiti', serif;
    letter-spacing: 0.5px;
}

/* 注释模块 */
.annotation-section {
    font-size: var(--el-font-size-medium);
    border: 1px solid var(--border);
    padding: var(--zj-spacing-sm) var(--zj-spacing-md);
    margin: var(--zj-spacing-sm) 0;
    margin-bottom: var(--zj-spacing-lg);
    background-color: var(--control-bg);
    border-radius: var(--el-border-radius-base);
    transition: var(--el-transition-all);
}
.annotation-title { margin-bottom: var(--zj-spacing-sm); }
.annotation-content {
    line-height: 2;
    color: var(--text-primary);
}
.annotation-item {
    display: block;
    margin-bottom: var(--zj-spacing-xs);
    text-indent: -1.5em;
    padding-left: 1.5em;
}
.annotation-item:last-child { margin-bottom: 0; }
.annotation-number {
    font-weight: bold;
    color: var(--color-primary);
    margin-right: 0.3em;
}
.annotation-keyword {
    font-weight: bold;
    color: var(--color-primary);
    margin-right: 0.2em;
}
.annotation-colon {
    color: var(--text-regular);
    margin-right: 0.2em;
}
.annotation-explanation { color: var(--text-regular); }

/* 关键词样式 */
.keyword-index {
    font-size: 7px !important;
    font-weight: normal;
    color: #666;
    margin-left: 1px;
}
.keyword-char-with-pinyin {
    display: inline-block;
    margin: 0 1px;
}
.keyword-pinyin {
    font-size: 12px !important;
    color: #e50000;
    display: block;
    line-height: 1;
    height: 10px;
}
.original-text-content,
.simplified-text-content {
    user-select: text;
    cursor: text;
}
.keyword-highlight-context {
  cursor: pointer;
  border-radius: var(--el-border-radius-small);
  padding: 0;
  margin: 0;
  margin-left: 2px;
  transition: var(--el-transition-all);
  /* border-bottom: 1px dashed #940d0d; */
  /* border-bottom: 1px solid #790a0a; */
  /* background-color: #eef7ee; */
  color: var(--text-primary);
}

.keyword-highlight-context:hover {
  background-color: var(--el-color-success-light-9);
  transform: translateY(-1px);
  background: #ffff00;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  filter: brightness(1.08);
}
.keyword-highlight-general {
    cursor: pointer;
    border-radius: 4px;
    margin-top: 3px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 17px;
}
.keyword-highlight-general:hover {
   box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
   filter: brightness(1.08);
}
.keyword-highlight-general.entity-highlight,.keyword-highlight-context.entity-highlight {
    background: #ffff00 !important;
    outline: 1px solid #070707;
    outline-offset: -1px;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5), 0 2px 8px rgba(0, 0, 0, 0.1);
}
.simplified-text,.original-text {
  font-size: var(--el-font-size-large);
  margin-bottom: var(--zj-spacing-xxl);
  margin-top: var(--zj-spacing-xxxl);
  color: var(--text-primary);
}
.original-text-content,.simplified-text-content {
  margin-top: var(--zj-spacing-sm);
  line-height: 1.8;
  color: var(--text-primary);
}

/* 地图疆域高亮 */
.territory-polygon.highlighted {
    stroke-width: 4px !important;
    stroke-dasharray: 5, 5 !important;
    fill-opacity: 0.5 !important;
}

/* 卷详情目录 */
.volume-detail .chapter-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
}
.volume-detail .chapter-item {
    padding: 8px 12px;
    border-radius: var(--zj-border-radius);
    background-color: var(--control-bg);
    transition: var(--el-transition-all);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.volume-detail .chapter-item:hover { background-color: var(--control-hover); }
.volume-detail .chapter-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: var(--el-border-radius-base);
    background-color: var(--bg-content);
    transition: var(--el-transition-all);
}
.volume-detail .chapter-link:hover {
    background-color: var(--accent);
    color: white;
}

/* 古风模态弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(4px);
}
.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.modal-box {
    background: linear-gradient(180deg, #fdfbf7 0%, #f5f0e6 100%);
    border: 2px solid #8b7355;
    border-radius: 10px;
    width: 90%;
    max-width: 480px;
    padding: 35px 25px 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 40px rgba(139, 115, 85, 0.04);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    font-family: 'LXGW WenKai', 'KaiTi', serif;
}
.modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #c9a96e 20%, #d4af37 50%, #c9a96e 80%, transparent 100%);
}
.modal-overlay.show .modal-box { transform: scale(1); }
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 1px solid #8b7355;
    background: linear-gradient(145deg, #f5f0e6 0%, #ebe5dc 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6b533c;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.modal-close:hover {
    background: linear-gradient(145deg, #8b7355 0%, #6b533c 100%);
    color: #faf8f3;
    transform: rotate(90deg);
}
.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #5d4a3a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 40px;
    border-bottom: 1px dashed #d4c8b8;
    padding-bottom: 12px;
    letter-spacing: 1px;
}
.modal-title.error { color: #8b3a3a; }
.modal-title.success { color: #5a6b3a; }
.modal-title.warning { color: #8b733a; }
.modal-title.info { color: #3a5a7b; }
.modal-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
}
.modal-icon.error {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b3a3a'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E") no-repeat center;
    background-size: 100%;
}
.modal-icon.success {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 24 24' fill='%235a6b3a'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") no-repeat center;
    background-size: 100%;
}
.modal-icon.warning {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b733a'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h-2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E") no-repeat center;
    background-size: 100%;
}
.modal-icon.info {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233a5a7b'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm0-4h-2V7h2v8z'/%3E%3C/svg%3E") no-repeat center;
    background-size: 100%;
}
.modal-content {
    font-size: 16px;
    color: #4a3728;
    margin-bottom: 22px;
    line-height: 2;
    text-align: left;
}
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.modal-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid #8b7355;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'LXGW WenKai', 'KaiTi', serif;
    letter-spacing: 1px;
}
.modal-btn.default {
    background: linear-gradient(145deg, #f5f0e6 0%, #ebe5dc 100%);
    color: #6b533c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.modal-btn.default:hover {
    background: linear-gradient(145deg, #ebe5dc 0%, #d4c8b8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.modal-btn.primary {
    background: linear-gradient(145deg, #8b7355 0%, #6b533c 100%);
    color: #faf8f3;
    box-shadow: 0 3px 12px rgba(139, 115, 85, 0.3);
}
.modal-btn.primary:hover {
    background: linear-gradient(145deg, #9b8365 0%, #7b634c 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(139, 115, 85, 0.4);
}
.story-detail-title {
    font-size: 20px;
    font-weight: bold;
    color: #8b5a2b;
}

/* 原文顶部按钮 */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: transparent;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.action-btn:hover {
    color: #333;
    background: #f5f5f5;
}
.collect-btn { color: #999 !important; }
.collect-btn i {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: url("static/icons/collect-empty.svg") no-repeat center;
    background-size: contain;
}
.collect-btn.active { color: var(--theme-color, #ff6b6b) !important; }
.collect-btn.active i {
    background: url("static/icons/collect-fill.svg") no-repeat center;
    background-size: contain;
}
.map-btn i, .ancient-btn i, .tag-btn i {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: #666;
    border-radius: 2px;
}
.toolbar-buttons { align-items: center; gap: 10px; }

/* 段落收藏按钮 */
.paragraph-collect-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.paragraph-collect-btn__icon {
    width: 18px;
    height: 18px;
    fill: #999;
    transition: fill 0.2s ease;
}
.paragraph-collect-btn.active .paragraph-collect-btn__icon {
    fill: var(--theme-color, #ff6b6b);
}
.paragraph-collect-btn:hover .paragraph-collect-btn__icon { fill: #666; }
.paragraph-collect-btn {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.custom-btn.map-btn {
    background-color: var(--el-color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 1px 10px;
    cursor: pointer;
    font-size: 13px;
}
.custom-btn.map-btn:hover {
    background-color: var(--el-color-primary-light-5);
    color: #070707;
    padding: 4px 10px;
}
.custom-btn.ancient-btn {
    background-color: #f5e7d3;
    color: #333;
    border: none;
    border-radius: 4px;
    padding: 1px 10px;
    cursor: pointer;
}
.custom-btn.ancient-btn:hover {
    background-color: #4d320d;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
}

/* 朗读段落按钮 - 国风金色版 */
/* 朗读段落按钮 - 优化版 */
.custom-btn.read-aloud-btn {
    background-color: var(--el-color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 1px 10px;
    cursor: pointer;
    font-size: 13px;
}
.custom-btn.read-aloud-btn:hover {
    background-color: var(--el-color-primary-light-5);
    color: #070707;
    padding: 4px 10px;
}

/* 沙盘地图 */
.normal-mode #sandboxContainer,
.normal-mode .sandbox-layer-panel {
    background-color: #fff;
}
.sandbox-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
}
.sandbox-toolbar { flex-shrink: 0; }
.sandbox-btn {
    background: #2a64c8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 6px;
    cursor: pointer;
    font-family: 'LXGW WenKai', serif;
    font-size: 14px;
}
.sandbox-btn:hover { background: #1d4faa; }
.sandbox-btn-now {
    background: #409EFF;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 6px;
    padding-right: 9px;
    cursor: pointer;
    font-family: 'LXGW WenKai', serif;
    font-size: 14px;
    margin-top: 3px;
}
.sandbox-btn-now:hover { background: #399b8e; }
.sandbox-btn-ancient {
    background: #000000b3;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 3px 3px;
    padding-right: 6px;
    cursor: pointer;
    font-family: 'LXGW WenKai', serif;
    font-size: 14px;
}
.sandbox-btn-ancient:hover { background: #437770; }
#sandboxMap {
    margin-left: 10px;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 古代地图控制面板 */
.ancient-map-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #f5f0e1 0%, #e8d8b8 100%);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 300px;
    border: 2px solid #8b5a2b;
    font-family: 'LXGW WenKai', 'SimSun', serif;
}
.ancient-map-controls .title {
    margin-bottom: 15px;
    font-weight: bold;
    color: #5d4037;
    font-size: 16px;
    text-align: center;
    border-bottom: 1px solid #d4af37;
    padding-bottom: 8px;
}
.ancient-map-controls .form-group { margin-bottom: 12px; }
.ancient-map-controls .form-group label {
    font-size: 13px;
    color: #5d4037;
    display: block;
    margin-bottom: 5px;
}
.ancient-map-controls .form-group select {
    width: 100%;
    padding: 6px;
    border: 1px solid #8b5a2b;
    border-radius: 6px;
    background: #fffef9;
    color: #3d2b1f;
}
.ancient-map-controls .map-info-panel {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 6px;
    font-size: 12px;
    color: #5d4037;
}
.ancient-map-controls .opacity-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.ancient-map-controls .opacity-control label {
    font-size: 13px;
    color: #5d4037;
}
.ancient-map-controls .opacity-control .opacity-value {
    font-size: 13px;
    color: #8b5a2b;
    font-weight: bold;
}
.ancient-map-controls .opacity-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #d4af37;
    outline: none;
}
.ancient-map-controls .btn {
    width: 100%;
    padding: 6px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 8px;
}
.ancient-map-controls .btn-legend {
    background: #8b5a2b;
    color: #f5f0e1;
}
.ancient-map-controls .btn-calibrate {
    background: #4a7c59;
    color: white;
}
.ancient-map-controls .btn-reset {
    background: #904d33;
    color: white;
}
.ancient-map-controls .calibration-panel {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d4af37;
}
.ancient-map-controls .calibration-info {
    font-size: 12px;
    color: #5d4037;
    margin-bottom: 8px;
    text-align: center;
}
.ancient-map-controls .calibration-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.ancient-map-controls .calibration-buttons button {
    padding: 5px;
    background: #f5f0e1;
    border: 1px solid #8b5a2b;
    border-radius: 4px;
    cursor: pointer;
    color: #5d4037;
}

/* 图例面板 */
.legend-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, #f5f0e1 0%, #e8d8b8 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 2px solid #8b5a2b;
    font-family: 'LXGW WenKai', 'SimSun', serif;
    min-width: 220px;
}
.legend-panel .title {
    font-weight: bold;
    color: #5d4037;
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #d4af37;
    padding-bottom: 8px;
}
.legend-panel .legend-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.legend-panel .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.legend-panel .legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
}
.legend-panel .legend-text { color: #5d4037; }
.legend-panel .tips {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #d4af37;
    font-size: 12px;
    color: #8b5a2b;
}
.legend-panel .tips ul {
    margin: 0;
    padding-left: 15px;
}
.legend-panel .btn-close {
    margin-top: 15px;
    width: 100%;
    padding: 6px;
    background: #8b5a2b;
    color: #f5f0e1;
    border: none;
    cursor: pointer;
}

/* 地名标签 */
.place-label {
    background: rgba(171, 195, 201, 0.95);
    border: 1px solid #ff7b00;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    font-family: 'LXGW WenKai', 'SimSun', serif;
    color: #ff3c00;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    white-space: nowrap;
}

/* 地图全屏模态框 */
#mapModal {
    display: none;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    overflow: hidden;
}
#modalMap {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: unset !important;
    max-height: unset !important;
}
.close-map-btn {
    position: fixed;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 99999;
    user-select: none;
}
.close-map-btn:hover { color: #ccc; }
.control-group-show {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 章节信息 */
.chapter-info {
    margin-top: var(--zj-spacing-xs);
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px;
}
.chapter-info h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent);
}
.chapter-info p {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: bolder;
    padding-bottom: 10px;
    white-space: pre-wrap;
}
.chapter-info .title {
    font-size: 18px;
    font-weight: bold;
    color: #8c5c2c;
}
.chapter-info .content {
    background: #fbf8f1;
    border-left: 4px solid #b98c54;
    border-radius: 4px;
    line-height: 1.8;
    white-space: pre-wrap;
    margin-bottom: 20px;
    padding: 10px 10px;
    padding-top: 15px;
}

/* 古本弹窗 - 古风优化版 */
.guben-modal {
    position: fixed;
    top: 0px;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgb(165 152 140 / 20%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
}
.guben-modal.show {
    opacity: 1;
    visibility: visible;
}
.guben-modal.show #gubenImageContainer {
    transform: scale(1);
}
#gubenImageContainer {
    position: relative;
    width: 75%;
    height: 80%;
    background: linear-gradient(313deg, #fef8eb 0%, #f5ede0 50%, #efe5d0 100%);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(139, 90, 43, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    padding: 19px;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid #8b5a2b;
}
#gubenImageContainer::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    pointer-events: none;
}
#gubenImageContainer::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    border: 1px dashed rgba(139, 90, 43, 0.2);
    border-radius: 12px;
    pointer-events: none;
}
#gubenHighlightLine {
    position: absolute;
    top: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 5%,
        rgba(212, 175, 55, 0.9) 10%,
        rgba(238, 197, 100, 0.95) 50%,
        rgba(212, 175, 55, 0.9) 90%,
        transparent 95%
    );
    cursor: col-resize;
    z-index: 10;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5), 0 0 30px rgba(212, 175, 55, 0.3);
    transform: translateX(-50%);
    transition: box-shadow 0.3s ease;
}
#gubenHighlightLine:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.7), 0 0 40px rgba(212, 175, 55, 0.4);
}
#gubenHighlightLine::after {
    content: "阅读器";
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    writing-mode: vertical-rl;
    font-size: 13px;
    color: #8b4513;
    background: linear-gradient(180deg, #faf0e6 0%, #f5e6d3 100%);
    padding: 8px 4px;
    border-radius: 4px;
    border: 1px solid #cd853f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-family: 'LXGW WenKai', 'KaiTi', serif;
    letter-spacing: 2px;
}
#lineSquareMark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 2px solid #d4af37;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    pointer-events: none;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(212, 175, 55, 0); }
}
.guben-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 12px 24px;
    background: linear-gradient(180deg, transparent 0%, rgba(139, 90, 43, 0.15) 100%);
}
#gubenZoomLevel {
    font-size: 13px;
    color: #6b4423;
    font-family: 'LXGW WenKai', serif;
    background: rgba(255, 250, 240, 0.9);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(139, 90, 43, 0.3);
}
#gubenPageInfo {
    font-size: 16px;
    color: #5d4037;
    font-family: 'LXGW WenKai', 'KaiTi', serif;
    font-weight: bold;
    letter-spacing: 2px;
    background: linear-gradient(145deg, #f5f0e1 0%, #e8d8b8 100%);
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid #cd853f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#gubenPrevBtn, #gubenNextBtn {
    position: relative;
    background: linear-gradient(145deg, #8b5a2b 0%, #6d4421 100%);
    color: #faf0e6;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'LXGW WenKai', 'KaiTi', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
}
#gubenPrevBtn::before {
    content: '‹';
    margin-right: 4px;
    font-size: 16px;
}
#gubenNextBtn::after {
    content: '›';
    margin-left: 4px;
    font-size: 16px;
}
#gubenPrevBtn:hover, #gubenNextBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 90, 43, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(145deg, #9b6a3b 0%, #7d5431 100%);
}
#gubenPrevBtn:active, #gubenNextBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.guben-controls-left {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 20;
}
.guben-controls-left button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #cd853f;
    background: linear-gradient(145deg, #faf0e6 0%, #e8d8b8 100%);
    color: #5d4037;
    font-size: 23px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(139, 90, 43, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.guben-controls-left button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 90, 43, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    background: linear-gradient(145deg, #fffaf0 0%, #f0e6d8 100%);
}
.guben-controls-left button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(139, 90, 43, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
#gubenModalClose {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #cd853f;
    background: linear-gradient(145deg, #d4a574 0%, #c4956a 100%);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.3);
    z-index: 30;
}
#gubenModalClose:hover {
    transform: rotate(90deg) scale(1.1);
    background: linear-gradient(145deg, #e4b584 0%, #d4a57a 100%);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.4);
}
.night-mode #gubenImageContainer {
    background: linear-gradient(145deg, #1a1510 0%, #252018 50%, #1f1a12 100%);
    border-color: #4a3728;
}
.night-mode #gubenImageContainer::before { border-color: rgba(212, 175, 55, 0.2); }
.night-mode #gubenImageContainer::after { border-color: rgba(139, 90, 43, 0.3); }
.night-mode #gubenHighlightLine::after {
    background: linear-gradient(180deg, #2a2520 0%, #353028 100%);
    color: #ffd700;
    border-color: #5a4737;
}
.night-mode #gubenPageInfo {
    background: linear-gradient(145deg, #2a2520 0%, #353028 100%);
    color: #e8d8b8;
    border-color: #5a4737;
}
.night-mode #gubenZoomLevel {
    background: rgba(40, 35, 30, 0.9);
    color: #d4c4a8;
    border-color: rgba(212, 175, 55, 0.3);
}
.night-mode .guben-footer {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}
.night-mode .guben-controls-left button {
    background: linear-gradient(145deg, #2a2520 0%, #353028 100%);
    color: #d4c4a8;
    border-color: #5a4737;
}
.night-mode .guben-controls-left button:hover {
    background: linear-gradient(145deg, #3a3530 0%, #454038 100%);
}

/* 搜索框 */
.search-wrapper {
    height: 30px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, -0.05);
    border: 1px solid #c9a96e;
    border-radius: 7px;
    margin-right: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.search-input {
    border: none;
    background: transparent;
    outline: none;
    padding: 1px 12px;
    font-size: 17px;
    width: 200px;
    color: #4a3728;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
}
.search-input::placeholder { color: #999; }
.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover,
.search-input:-webkit-autofill:focus,
.search-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.95) inset !important;
    -webkit-text-fill-color: #4a3728 !important;
    background-color: transparent !important;
}
.search-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    font-size: 16px;
    color: #c9a96e;
    transition: color 0.2s;
}
.search-btn:hover { color: #a88a56; }

/* 搜索弹窗 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.search-modal-content {
    background: #fdf9e8;
    border: 2px solid #c9a96e;
    width: 60%;
    max-height: 80vh;
    overflow: hidden;
    border-radius: 5px;
}
.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f5efe0, #f0e8d8);
    border-bottom: 1px solid #c9a96e;
}
.search-modal-header h3 {
    margin: 0;
    font-family: "STKaiti", "KaiTi", serif;
    color: #4a3728;
}
.search-modal-header .close-btn {
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
}
.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 6px;
}
.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px dashed #e0d8c8;
    cursor: pointer;
    transition: background 0.2s;
}
.search-result-item:hover { background: rgba(201, 169, 110, 0.1); }
.result-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #c9a96e;
    color: white;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    margin-right: 10px;
}
.result-info {
    color: #999;
    font-size: 12px;
    margin-right: 10px;
}
.result-preview {
    margin: 5px 0 0 34px;
    font-family: "STKaiti", "KaiTi", serif;
    color: #4a3728;
    font-size: 14px;
    line-height: 1.6;
}
.result-preview mark { background: #f2c94c; padding: 0 2px; }
.highlighted {
    background: rgba(242, 201, 76, 0.3) !important;
    animation: highlight-pulse 2s ease-out;
}

/* 跑马灯 */
.marquee-box {
    overflow: hidden;
    white-space: nowrap;
    border-radius: 5px;
    box-shadow: 8px 8px 16px #000000, -8px -8px 16px #ffffff;
    background-image: linear-gradient(142deg, #8daed5, #e1a7a7);
    margin-bottom: 20px;
    color: #0029ff;
    transition: all 0.9s ease;
    text-align: center;
    font-size: 25px;
}
.marquee-box:hover {
    cursor: pointer;
    transform: scale(1.03);
    background-image: linear-gradient(145deg, #03b6f1, #330d71);
}
.marquee-box:hover .marquee-content { color: #ffffff; }
.marquee-content {
    display: inline-block;
    font-size:inherit;
    font-weight: bold;
    color: inherit;
    animation: marquee 12s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 搜索关键词高亮 */
.search-keyword-highlight {
    background-color: #ffeb3b !important;
    color: #c62828 !important;
    font-weight: bold !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    animation: keywordPulse 1s ease-in-out infinite !important;
    box-shadow: 0 0 10px 2px rgba(255, 235, 59, 0.5) !important;
}
.keyword-highlight-context.search-keyword-highlight,
.keyword-highlight-general.search-keyword-highlight {
    background-color: #ffeb3b !important;
    color: #c62828 !important;
    font-weight: bold !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    animation: keywordPulse 1s ease-in-out infinite !important;
    box-shadow: 0 0 10px 2px rgba(255, 235, 59, 0.5) !important;
    text-decoration: underline !important;
    text-decoration-color: #c62828 !important;
}


@keyframes keywordPulse {
    0%, 100% {
        background-color: #ffeb3b;
        box-shadow: 0 0 0 0 rgba(255, 235, 59, 0.7);
    }
    50% {
        background-color: #fff176;
        box-shadow: 0 0 15px 4px rgba(255, 235, 59, 0.6);
    }
}

/* 搜索关键词高亮 */
.search-highlight {
    background-color: rgba(255, 235, 59, 0.2) !important;
    border-left: 4px solid #ff9800 !important;
    transition: all 0.3s ease;
}


/* 备案信息 */
.beian-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--zj-spacing-xs);
    margin-top: var(--zj-spacing-xs);
}
.beian-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 2px 8px;
    border-radius: var(--el-border-radius-small);
    transition: all 0.3s ease;
}
.beian-link:hover {
    background-color: var(--control-hover);
    color: var(--accent);
    transform: translateY(-1px);
}
.beian-img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}
.beian-separator {
    color: var(--text-secondary);
    margin: 0 2px;
}


/* 页脚 */
.footer {
    background-color: var(--bg-content);
    color: var(--text-secondary);
    border-top: 3px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    padding: 5px 0 !important;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2px var(--zj-spacing-lg) !important;
    text-align: center;
    line-height: 1.2;
}
.footer-legal {
    margin-top: 0 !important;
    font-size: var(--el-font-size-small);
}
.footer-legal p {
    margin: 1px 0 !important;
    padding: 0;
}