body {
    font-family: 'Outfit', 'Noto Serif SC', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(251, 191, 36, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 侧边栏与主区 */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 折叠侧边栏 */
body.sidebar-collapsed .sidebar {
    width: 80px;
    padding: 2rem 0.8rem;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 2rem;
    right: -15px;
    background: #111827;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle-btn:hover {
    color: #ffffff;
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* 品牌 */
.sidebar-brand {
    margin-bottom: 2.5rem;
    transition: all 0.3s ease;
}

.sidebar-brand h1 {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Noto Serif SC', serif;
    background: linear-gradient(to right, #ffffff, var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.sidebar-brand p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

body.sidebar-collapsed .sidebar-brand {
    text-align: center;
    margin-bottom: 2rem;
}
body.sidebar-collapsed .sidebar-brand h1 { font-size: 1.2rem; }
body.sidebar-collapsed .sidebar-brand p { display: none; }

/* 导航 */
.nav-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: auto;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.tab-btn i {
    font-size: 1.1rem;
    width: 20px;
    flex-shrink: 0;
}

.tab-btn.active {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

body.sidebar-collapsed .tab-btn {
    justify-content: center;
    padding: 0.8rem 0;
    gap: 0;
}
body.sidebar-collapsed .tab-btn span { display: none; }

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.2rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}
body.sidebar-collapsed .sidebar-footer p:first-child { display: none; }

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 控制区 */
.controls-panel {
    background: rgba(17, 24, 39, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 0;
    backdrop-filter: blur(12px);
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 250px;
    opacity: 1;
    overflow: hidden;
}

.controls-panel.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.filter-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-filter {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filter.active {
    background: var(--accent-blue);
    color: #ffffff;
}

.btn-filter:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 320px;
}

.search-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    padding: 0.6rem 1rem 0.6rem 2.4rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: all 0.3s ease;
}

.search-box input:focus { outline: none; border-color: var(--accent-gold); }
.search-box i { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--text-secondary); font-size: 0.88rem; }

.stats { font-size: 0.85rem; color: var(--text-secondary); }

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.2rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 230px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-blue);
    opacity: 0.8;
}

.card.type-major::before { background: var(--major-color); }
.card.type-minor::before { background: var(--minor-color); }

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 12px var(--accent-glow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.card-title { font-size: 1.35rem; font-weight: 700; color: #ffffff; }
.badge { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 9999px; }
.badge-major { background: rgba(245, 158, 11, 0.15); color: var(--major-color); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-minor { background: rgba(16, 185, 129, 0.15); color: var(--minor-color); border: 1px solid rgba(16, 185, 129, 0.2); }

.card-visual {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.6rem;
    background: rgba(251, 191, 36, 0.04);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border-left: 2px solid var(--accent-gold);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.6rem;
}
.card-footer span i { margin-right: 0.3rem; }

/* ==================== 历史时间线（避碰自适应） ==================== */
.timeline-container {
    background: rgba(13, 20, 35, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    overflow-x: auto;
    position: relative;
    cursor: grab; /* 默认抓取手势，指示可以拖拽 */
    user-select: none; /* 防止拖拽时误选中文本 */
    transition: border-color 0.3s ease;
}
.timeline-container:active {
    cursor: grabbing; /* 按下时变为抓紧手势 */
}
/* ==================== 新增：常驻浮动控制栏样式 ==================== */
.timeline-floating-toolbar {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 100; /* 确保悬浮在所有条块 and 轴线之上 */
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    background: rgba(15, 23, 42, 0.75); /* 深色磨砂玻璃 */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px; /* 极具科技感的胶囊圆角 */
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-floating-tool {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.25s ease;
}

.btn-floating-tool i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.btn-floating-tool:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.btn-floating-tool:hover i {
    transform: scale(1.1);
}

/* 激活状态 */
.btn-floating-tool.active {
    color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.08) !important;
    border: 1px solid rgba(251, 191, 36, 0.18) !important;
}

.tool-divider {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 0.15rem;
}

/* 全屏模式下的胶囊控制栏微调 */
.fullscreen-mode .timeline-floating-toolbar {
    top: 24px;
    right: 32px;
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
}
.timeline-scroll-area {
    min-width: 1100px;
    width: 100%; /* 允许被 zoom 覆盖宽度 */
    position: relative;
    padding-bottom: 1rem;
    transition: zoom 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 平滑等比变焦过渡 */
}

/* 轨道行 */
.timeline-track-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    padding: 0.8rem 0;
    z-index: 5;
}

.timeline-track-label {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding-right: 0.4rem;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    background: #080c14; /* 盖住背景层色带 */
    z-index: 6;
    box-sizing: border-box;
}

.timeline-track-label.israel { color: #10b981; }
.timeline-track-label.judah { color: #3b82f6; }
.timeline-track-label.gentiles { color: #f59e0b; }
.timeline-track-label.exile { color: #8b5cf6; }

/* 容纳时间条的容器，高度由 JS 动态计算设定 */
.timeline-bars-container {
    margin-left: 80px; /* 物理对齐 80px 底图，消除 flexbox 对齐误差 */
    position: relative;
    transition: height 0.3s ease;
    z-index: 5;
}

/* 时间线条状物 */
.timeline-bar {
    position: absolute;
    height: 38px; /* 稍微加高，提供更好的纵向空间展示文本 */
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 左对齐 */
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease, top 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.4rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    z-index: 8;
}
/* 君王时期条块专用样式，以虚边框与半透明度区别于实色先知 */
.timeline-bar.king-bar {
    box-shadow: none;
    font-style: italic;
    font-weight: 600;
    z-index: 7; /* 略低于先知的 z-index 8 */
}

.timeline-bar.king-bar.track-israel {
    background: rgba(16, 185, 129, 0.04);
    border: 1px dashed rgba(16, 185, 129, 0.45);
    color: #10b981;
}
.timeline-bar.king-bar.track-israel:hover {
    background: rgba(16, 185, 129, 0.18);
    border-style: solid;
    border-color: rgba(16, 185, 129, 0.8);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    transform: scaleY(1.03);
}

.timeline-bar.king-bar.track-judah {
    background: rgba(59, 130, 246, 0.04);
    border: 1px dashed rgba(59, 130, 246, 0.45);
    color: #60a5fa;
}
.timeline-bar.king-bar.track-judah:hover {
    background: rgba(59, 130, 246, 0.18);
    border-style: solid;
    border-color: rgba(59, 130, 246, 0.8);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
    transform: scaleY(1.03);
}
/* 条状物悬浮微光与发光阴影 */
.timeline-bar.track-israel { background: var(--track-israel); border: 1px solid var(--track-israel-border); }
.timeline-bar.track-israel:hover { box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); z-index: 10; transform: scaleY(1.05); }

.timeline-bar.track-judah { background: var(--track-judah); border: 1px solid var(--track-judah-border); }
.timeline-bar.track-judah:hover { box-shadow: 0 0 12px rgba(59, 130, 246, 0.5); z-index: 10; transform: scaleY(1.05); }

.timeline-bar.track-gentiles { background: var(--track-gentiles); border: 1px solid var(--track-gentiles-border); }
.timeline-bar.track-gentiles:hover { box-shadow: 0 0 12px rgba(245, 158, 11, 0.5); z-index: 10; transform: scaleY(1.05); }

.timeline-bar.track-exile { background: var(--track-exile); border: 1px solid var(--track-exile-border); }
.timeline-bar.track-exile:hover { box-shadow: 0 0 12px rgba(139, 92, 246, 0.5); z-index: 10; transform: scaleY(1.05); }

/* ==================== 新增：帝国霸权更替背景条带样式 ==================== */
.timeline-empires-bg {
    position: absolute;
    top: 50px;
    left: 80px;
    right: 0;
    bottom: 35px;
    z-index: 0; /* 置于比时期色带更底层的背景 */
    pointer-events: none;
    display: flex;
}

.empire-zone {
    height: 100%;
    display: flex;
    align-items: flex-end; /* 使文本贴在年代刻度上方 */
    justify-content: center;
    position: relative;
    border-right: 1px double rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
    padding-bottom: 2rem;
}

.empire-zone span {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.08); /* 极淡水印文字 */
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: color 0.3s ease;
}

/* 悬停帝国区域文字变亮交互 */
.empire-zone:hover span {
    color: rgba(255, 255, 255, 0.18);
}

.empire-assyria {
    width: 52.89%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.008) 0%, rgba(255, 255, 255, 0.002) 100%);
}

.empire-babylon {
    width: 16.22%;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.015) 0%, rgba(239, 68, 68, 0.003) 100%);
}

.empire-persia {
    width: 30.89%;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.01) 0%, rgba(251, 191, 36, 0.002) 100%);
}

/* ==================== 新增：时期背景阴影色带样式 ==================== */
.timeline-zones-bg {
    position: absolute;
    top: 50px; /* 避开顶部时期色块标签 */
    left: 80px; /* 精确避开左侧轨道标签 80px */
    right: 0;
    bottom: 35px; /* 避开底部刻度 */
    z-index: 1; /* 最底层 */
    pointer-events: none;
    opacity: 0;
    display: block;
    transition: opacity 0.3s ease;
}
.timeline-zones-bg.active { opacity: 1; }

.zone-bg {
    height: 100%;
    position: absolute;
    top: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.zone-bg-pre {
    left: 0;
    width: 58.67%; /* 850 BC - 586 BC */
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.01) 100%);
    border-right: 1px dashed rgba(59, 130, 246, 0.15);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.zone-bg-exilic {
    left: 58.67%;
    width: 10.66%; /* 586 BC - 538 BC */
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.02) 100%);
    border-right: 1px dashed rgba(239, 68, 68, 0.2);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.zone-bg-post {
    left: 69.33%;
    width: 30.67%; /* 538 BC - 400 BC */
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.05) 0%, rgba(251, 191, 36, 0.01) 100%);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 悬停时期高亮高对比样式 */
.zone-bg-pre.highlighted {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.03) 100%);
    border-right-color: rgba(59, 130, 246, 0.5);
}
.zone-bg-exilic.highlighted {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.18) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-right-color: rgba(239, 68, 68, 0.6);
}
.zone-bg-post.highlighted {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.03) 100%);
}

/* ==================== 新增：特定年份垂直投影带样式 ==================== */
.hover-range-spotlight-wrapper {
    position: absolute;
    top: 50px;
    bottom: 35px;
    left: 80px; /* 精确对齐轨道内容起点 */
    right: 0;
    z-index: 2; /* 处在背景层 */
    pointer-events: none;
}

.hover-range-spotlight {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px dashed rgba(255, 255, 255, 0.12);
    border-right: 1px dashed rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.01);
}
.hover-range-spotlight.active {
    opacity: 1;
}

/* ==================== 新增：时间轴全屏沉浸模式样式 ==================== */
.tab-content#tabContentTimeline.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #06090e; /* 纯深黑背景 */
    padding: 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.tab-content#tabContentTimeline.fullscreen-mode .timeline-controls-header {
    margin-bottom: 1.2rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.tab-content#tabContentTimeline.fullscreen-mode .timeline-container {
    flex-grow: 1;
    height: calc(100vh - 120px) !important; /* 动态撑满除了控制头以外的高度 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.01);
}

/* ==================== 新增：时期分界线样式 ==================== */
.timeline-dividers {
    position: absolute;
    top: 50px; /* 彻底避开上方时期标签（38px 高度 + 间距） */
    left: 80px; /* 精确对齐轨道内容起点 */
    right: 0;
    bottom: 35px;
    z-index: 3; /* 在条块下方，背景色块上方 */
    pointer-events: none;
    display: flex; /* 让垂直线自然排列 */
    opacity: 0;
    display: block;
    transition: opacity 0.3s ease;
}
.timeline-dividers.active { opacity: 1; }

.timeline-divider-line {
    position: absolute;
    width: 0;
    height: 100%;
    top: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.2); /* 升级为 2px 实线 */
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.15));
}
.divider-line-586 {
    left: 58.67%;
    border-left: 2px solid rgba(239, 68, 68, 0.6) !important;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.4));
}
.divider-line-538 {
    left: 69.33%;
    border-left: 2px solid rgba(251, 191, 36, 0.6) !important;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4));
}

.divider-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    white-space: nowrap;
    font-weight: 700;
    z-index: 4;
    background: rgba(15, 23, 42, 0.9); /* 深色背景，防止背景穿透 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.divider-label:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
    border-color: rgba(251, 191, 36, 0.7) !important;
    background: rgba(24, 32, 55, 0.98);
}

.divider-label-586 {
    background: rgba(239, 68, 68, 0.18) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}
.divider-label-538 {
    background: rgba(251, 191, 36, 0.18) !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
    color: #fbbf24 !important;
}

/* 视图切换按钮样式 */
.timeline-controls-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 250px;
    opacity: 1;
    overflow: hidden;
}

.timeline-controls-header.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
}

/* 页头下拉折叠拉手 */
.header-pull-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 16px;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--card-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin: 0 auto 2rem auto;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.65rem;
    transition: all 0.3s ease;
    z-index: 15;
    position: relative;
    backdrop-filter: blur(8px);
}

.header-pull-tab:hover {
    color: var(--accent-gold);
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.header-pull-tab.collapsed {
    margin: 0 auto 2rem auto;
}

.timeline-views-menu {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.btn-toggle-option {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-toggle-option.active {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-gold);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.1);
}

.btn-toggle-option:hover:not(.active) {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

/* 悬浮提示 Tooltip */
.tooltip {
    position: absolute;
    background: rgba(10, 15, 26, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    z-index: 60;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    line-height: 1.45;
}
.tooltip.active { opacity: 1; visibility: visible; }

/* 年代轴刻度 */
.timeline-axis {
    display: flex;
    margin-left: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 0.8rem;
    position: relative;
    height: 35px;
    background: #080c14; /* 挡住背景层色带 */
    z-index: 6;
}

.axis-tick {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.axis-tick::before {
    content: "";
    position: absolute;
    top: -0.8rem;
    left: 50%;
    width: 1px;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
}

/* 历史时期大背景划分线 */
.period-zone-labels {
    display: flex;
    margin-left: 80px;
    margin-bottom: 1.2rem;
    position: relative;
    height: 38px;
    z-index: 6;
    background: #080c14;
    align-items: center;
}

.period-zone-lbl {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transform: translate(-50%, -50%);
    top: 50%;
    white-space: nowrap;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.period-zone-lbl.pre {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.period-zone-lbl.exilic {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.period-zone-lbl.post {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* 侧滑抽屉面板 */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.drawer-overlay.active { opacity: 1; visibility: visible; }

.drawer {
    position: fixed;
    top: 0;
    right: -600px;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    background-color: var(--drawer-bg);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 101;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}
.drawer-overlay.active + .drawer { transform: translateX(-600px); }

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.drawer-title { font-size: 1.8rem; font-weight: 700; font-family: 'Noto Serif SC', serif; color: #ffffff; }

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.btn-close:hover { color: #ffffff; background: rgba(255, 255, 255, 0.1); }

.drawer-body { display: flex; flex-direction: column; gap: 1.8rem; padding-bottom: 1.5rem; }
.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    padding-bottom: 0.3rem;
}
.section-content { font-size: 0.92rem; color: var(--text-primary); line-height: 1.6; }

.verse-card {
    background: rgba(251, 191, 36, 0.04);
    border-left: 3px solid var(--accent-gold);
    padding: 0.8rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 0.6rem;
    font-style: italic;
    font-size: 0.88rem;
}

.outline-item { padding-left: 0.8rem; margin-bottom: 0.5rem; position: relative; font-size: 0.88rem; }
.outline-item::before { content: "•"; position: absolute; left: 0; color: var(--accent-blue); }
.outline-level-1 { font-weight: 700; color: #ffffff; margin-top: 0.8rem; padding-left: 0; }
.outline-level-1::before { content: ""; }

.no-results { text-align: center; padding: 3rem; color: var(--text-secondary); grid-column: 1 / -1; }

/* ==================== 新增：Tab 3 学习导引样式 ==================== */
.guide-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.2rem;
}

.guide-period-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2.2rem;
    position: relative;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.guide-period-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.guide-period-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.guide-period-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guide-period-badge.pre { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }
.guide-period-badge.exilic { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.guide-period-badge.post { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.25); }

.guide-period-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.guide-period-title {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Noto Serif SC', serif;
    color: #ffffff;
    margin-bottom: 0.8rem;
}

.guide-period-desc {
    font-size: 0.92rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.guide-context-block {
    border-left: 2px solid rgba(255, 255, 255, 0.05);
    padding-left: 1.2rem;
    margin-bottom: 1.5rem;
}

.guide-context-block strong {
    font-size: 0.92rem;
    color: #ffffff;
    display: block;
    margin-bottom: 0.4rem;
}

.guide-context-block p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.guide-chips-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* 先知跳转芯片 */
.guide-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.guide-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.guide-chip.track-israel { border-color: rgba(16, 185, 129, 0.25); color: #10b981; }
.guide-chip.track-israel:hover { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.5); }

.guide-chip.track-judah { border-color: rgba(59, 130, 246, 0.25); color: #60a5fa; }
.guide-chip.track-judah:hover { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.5); }

.guide-chip.track-gentiles { border-color: rgba(245, 158, 11, 0.25); color: #f59e0b; }
.guide-chip.track-gentiles:hover { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.5); }

.guide-chip.track-exile { border-color: rgba(139, 92, 246, 0.25); color: #a78bfa; }
.guide-chip.track-exile:hover { background: rgba(139, 92, 246, 0.08); border-color: rgba(139, 92, 246, 0.5); }

/* 响应式调整 */
@media (max-width: 900px) {
    body { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--card-border); padding: 1.5rem; }
    .sidebar-toggle-btn { display: none; }
    .nav-tabs { flex-direction: row; overflow-x: auto; }
    .tab-btn { padding: 0.6rem 1rem; }
    .main-content { padding: 1.5rem; }
    .drawer-overlay.active + .drawer { transform: translateX(-100%); }
    .drawer { max-width: 100%; right: -100%; }
}

/* ==================== 动态主题切换样式定义 ==================== */
/* 2. 🏛️ 古卷羊皮纸主题 (典雅学术风) */
body.theme-scroll {
    --bg-color: #12100e;
    --sidebar-bg: rgba(24, 21, 18, 0.97);
    --card-bg: rgba(28, 25, 22, 0.65);
    --card-border: rgba(196, 164, 124, 0.15);
    --text-primary: #f5efe6;
    --text-secondary: #c4b5a3;
    --accent-gold: #d97706;
    --accent-blue: #c4a47c;
    --accent-glow: rgba(217, 119, 6, 0.15);
    --drawer-bg: rgba(20, 18, 15, 0.98);
    
    --track-israel: rgba(20, 110, 80, 0.12);
    --track-israel-border: rgba(20, 110, 80, 0.45);
    --track-judah: rgba(30, 90, 140, 0.12);
    --track-judah-border: rgba(30, 90, 140, 0.45);
    --track-gentiles: rgba(150, 80, 30, 0.12);
    --track-gentiles-border: rgba(150, 80, 30, 0.45);
    --track-exile: rgba(110, 60, 130, 0.12);
    --track-exile-border: rgba(110, 60, 130, 0.45);

    --major-color: #d97706;
    --minor-color: #c4a47c;
}
body.theme-scroll .timeline-track-label {
    background: #12100e;
}
body.theme-scroll .timeline-axis,
body.theme-scroll .period-zone-labels {
    background: #12100e;
}

/* 3. 🌋 黑曜岩熔岩主题 (悲壮历史风) */
body.theme-crimson {
    --bg-color: #0c0a0a;
    --sidebar-bg: rgba(20, 16, 16, 0.96);
    --card-bg: rgba(26, 20, 20, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #fce7e7;
    --text-secondary: #fca5a5;
    --accent-gold: #f59e0b;
    --accent-blue: #ef4444;
    --accent-glow: rgba(239, 68, 68, 0.15);
    --drawer-bg: rgba(15, 12, 12, 0.98);
    
    --track-israel: rgba(16, 120, 80, 0.12);
    --track-israel-border: rgba(16, 120, 80, 0.45);
    --track-judah: rgba(220, 50, 50, 0.12);
    --track-judah-border: rgba(220, 50, 50, 0.45);
    --track-gentiles: rgba(217, 119, 6, 0.12);
    --track-gentiles-border: rgba(217, 119, 6, 0.45);
    --track-exile: rgba(109, 40, 217, 0.12);
    --track-exile-border: rgba(109, 40, 217, 0.45);

    --major-color: #ef4444;
    --minor-color: #f59e0b;
}
body.theme-crimson .timeline-track-label {
    background: #0c0a0a;
}
body.theme-crimson .timeline-axis,
body.theme-crimson .period-zone-labels {
    background: #0c0a0a;
}

/* 4. 🪐 星尘迷雾主题 (浪漫幻想风) */
body.theme-nebula {
    --bg-color: #0b0816;
    --sidebar-bg: rgba(18, 13, 35, 0.96);
    --card-bg: rgba(22, 17, 43, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f5f3ff;
    --text-secondary: #d8b4fe;
    --accent-gold: #ec4899;
    --accent-blue: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.15);
    --drawer-bg: rgba(13, 10, 26, 0.98);
    
    --track-israel: rgba(13, 148, 136, 0.12);
    --track-israel-border: rgba(13, 148, 136, 0.45);
    --track-judah: rgba(139, 92, 246, 0.12);
    --track-judah-border: rgba(139, 92, 246, 0.45);
    --track-gentiles: rgba(236, 72, 153, 0.12);
    --track-gentiles-border: rgba(236, 72, 153, 0.45);
    --track-exile: rgba(59, 130, 246, 0.12);
    --track-exile-border: rgba(59, 130, 246, 0.45);

    --major-color: #8b5cf6;
    --minor-color: #ec4899;
}
body.theme-nebula .timeline-track-label {
    background: #0b0816;
}
body.theme-nebula .timeline-axis,
body.theme-nebula .period-zone-labels {
    background: #0b0816;
}

/* 折叠侧边栏下主题组件微调 */
body.sidebar-collapsed .sidebar-theme-selector h3 {
    text-align: center;
    font-size: 0.65rem;
}
body.sidebar-collapsed .sidebar-theme-selector h3 span {
    display: none;
}
body.sidebar-collapsed #themeButtons {
    grid-template-columns: 1fr !important;
}
body.sidebar-collapsed .theme-btn span {
    display: none;
}
body.sidebar-collapsed .theme-btn {
    font-size: 0.95rem !important;
    padding: 0.4rem 0 !important;
}

/* ==================== 5. 📄 象牙圣经纸主题 (明亮典雅纸张感) ==================== */
body.theme-paper {
    --bg-color: #fbf9f5;
    --sidebar-bg: #f2ede2;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --text-primary: #1e1b18;
    --text-secondary: #6b6359;
    --accent-gold: #b45309;
    --accent-blue: #2563eb;
    --accent-glow: rgba(180, 83, 9, 0.1);
    --drawer-bg: rgba(253, 251, 247, 0.98);
    
    --track-israel: rgba(16, 185, 129, 0.06);
    --track-israel-border: rgba(16, 185, 129, 0.35);
    --track-judah: rgba(59, 130, 246, 0.06);
    --track-judah-border: rgba(59, 130, 246, 0.35);
    --track-gentiles: rgba(245, 158, 11, 0.06);
    --track-gentiles-border: rgba(245, 158, 11, 0.35);
    --track-exile: rgba(139, 92, 246, 0.06);
    --track-exile-border: rgba(139, 92, 246, 0.35);

    --major-color: #d97706;
    --minor-color: #10b981;
}

body.theme-paper .timeline-track-label {
    background: #fbf9f5;
    color: #4b5563;
    border-right-color: rgba(0, 0, 0, 0.12);
}
body.theme-paper .timeline-axis,
body.theme-paper .period-zone-labels {
    background: #fbf9f5;
    border-top-color: rgba(0, 0, 0, 0.12);
}
body.theme-paper .sidebar-toggle-btn {
    background: #f2ede2;
    border-color: rgba(0, 0, 0, 0.1);
    color: #6b6359;
}
body.theme-paper .sidebar-toggle-btn:hover {
    color: #1e1b18;
}
body.theme-paper .sidebar-brand h1 {
    background: linear-gradient(to right, #1e1b18, #b45309);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.theme-paper .tab-btn {
    color: #6b6359;
}
body.theme-paper .tab-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.03);
    color: #1e1b18;
}
body.theme-paper .tab-btn.active {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.25);
}
body.theme-paper .controls-panel {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
body.theme-paper .btn-group {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.04);
}
body.theme-paper .btn-filter {
    color: #6b6359;
}
body.theme-paper .btn-filter.active {
    background: #b45309;
    color: #ffffff;
}
body.theme-paper .search-box input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1e1b18;
}
body.theme-paper .search-box input:focus {
    border-color: #b45309;
}
body.theme-paper .search-box i {
    color: #6b6359;
}
body.theme-paper .card-title {
    color: #1e1b18;
}
body.theme-paper .card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
body.theme-paper .card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}
body.theme-paper .timeline-container {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
}
body.theme-paper .timeline-floating-toolbar {
    background: rgba(253, 251, 247, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
body.theme-paper .btn-floating-tool {
    color: #6b6359;
}
body.theme-paper .btn-floating-tool:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1e1b18;
}
body.theme-paper .btn-floating-tool.active {
    background: rgba(180, 83, 9, 0.08) !important;
    border-color: rgba(180, 83, 9, 0.18) !important;
    color: #b45309 !important;
}
body.theme-paper .timeline-empires-bg {
    opacity: 0.28;
}
body.theme-paper .empire-zone span {
    color: rgba(0, 0, 0, 0.08);
}
body.theme-paper .empire-zone:hover span {
    color: rgba(0, 0, 0, 0.25);
}
body.theme-paper .timeline-divider-line {
    border-left-color: rgba(0, 0, 0, 0.08) !important;
}
body.theme-paper .timeline-divider-line.divider-line-586 {
    border-left-color: rgba(239, 68, 68, 0.5) !important;
}
body.theme-paper .timeline-divider-line.divider-line-538 {
    border-left-color: rgba(217, 119, 6, 0.5) !important;
}
body.theme-paper .divider-label {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e1b18;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
body.theme-paper .divider-label:hover {
    border-color: #b45309 !important;
    background: #ffffff;
}
body.theme-paper .divider-label-586 {
    background: rgba(239, 68, 68, 0.07) !important;
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}
body.theme-paper .divider-label-538 {
    background: rgba(217, 119, 6, 0.07) !important;
    color: #b45309 !important;
    border-color: rgba(217, 119, 6, 0.3) !important;
}
body.theme-paper .tooltip {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e1b18;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
body.theme-paper .drawer {
    border-left-color: rgba(0, 0, 0, 0.08);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
}
body.theme-paper .drawer-title {
    color: #1e1b18;
}
body.theme-paper .drawer-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.theme-paper .section-title {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}
body.theme-paper .outline-level-1 {
    color: #1e1b18;
}
body.theme-paper .timeline-bar {
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
body.theme-paper .timeline-bar.king-bar.track-israel {
    background: rgba(16, 185, 129, 0.04);
    color: #047857;
}
body.theme-paper .timeline-bar.king-bar.track-judah {
    background: rgba(59, 130, 246, 0.04);
    color: #1d4ed8;
}

/* ==================== 6. 🏛️ 圣殿白大理石主题 (明亮极简风) ==================== */
body.theme-marble {
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.06);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-gold: #b45309;
    --accent-blue: #1d4ed8;
    --accent-glow: rgba(29, 78, 216, 0.08);
    --drawer-bg: rgba(255, 255, 255, 0.98);
    
    --track-israel: rgba(16, 185, 129, 0.06);
    --track-israel-border: rgba(16, 185, 129, 0.35);
    --track-judah: rgba(59, 130, 246, 0.06);
    --track-judah-border: rgba(59, 130, 246, 0.35);
    --track-gentiles: rgba(245, 158, 11, 0.06);
    --track-gentiles-border: rgba(245, 158, 11, 0.35);
    --track-exile: rgba(139, 92, 246, 0.06);
    --track-exile-border: rgba(139, 92, 246, 0.35);

    --major-color: #1d4ed8;
    --minor-color: #0d9488;
}

body.theme-marble .timeline-track-label {
    background: #f8fafc;
    color: #475569;
    border-right-color: rgba(0, 0, 0, 0.08);
}
body.theme-marble .timeline-axis,
body.theme-marble .period-zone-labels {
    background: #f8fafc;
    border-top-color: rgba(0, 0, 0, 0.08);
}
body.theme-marble .sidebar-toggle-btn {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    color: #475569;
}
body.theme-marble .sidebar-toggle-btn:hover {
    color: #0f172a;
}
body.theme-marble .sidebar-brand h1 {
    background: linear-gradient(to right, #0f172a, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.theme-marble .tab-btn {
    color: #475569;
}
body.theme-marble .tab-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.02);
    color: #0f172a;
}
body.theme-marble .tab-btn.active {
    background: rgba(29, 78, 216, 0.06);
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.2);
}
body.theme-marble .controls-panel {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
body.theme-marble .btn-group {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.03);
}
body.theme-marble .btn-filter {
    color: #475569;
}
body.theme-marble .btn-filter.active {
    background: #1d4ed8;
    color: #ffffff;
}
body.theme-marble .search-box input {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}
body.theme-marble .search-box input:focus {
    border-color: #1d4ed8;
}
body.theme-marble .search-box i {
    color: #475569;
}
body.theme-marble .card-title {
    color: #0f172a;
}
body.theme-marble .card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
body.theme-marble .card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}
body.theme-marble .timeline-container {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.02);
}
body.theme-marble .timeline-floating-toolbar {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}
body.theme-marble .btn-floating-tool {
    color: #475569;
}
body.theme-marble .btn-floating-tool:hover {
    background: rgba(0, 0, 0, 0.03);
    color: #0f172a;
}
body.theme-marble .btn-floating-tool.active {
    background: rgba(29, 78, 216, 0.06) !important;
    border-color: rgba(29, 78, 216, 0.15) !important;
    color: #1d4ed8 !important;
}
body.theme-marble .timeline-empires-bg {
    opacity: 0.25;
}
body.theme-marble .empire-zone span {
    color: rgba(0, 0, 0, 0.07);
}
body.theme-marble .empire-zone:hover span {
    color: rgba(0, 0, 0, 0.2);
}
body.theme-marble .timeline-divider-line {
    border-left-color: rgba(0, 0, 0, 0.06) !important;
}
body.theme-marble .timeline-divider-line.divider-line-586 {
    border-left-color: rgba(239, 68, 68, 0.45) !important;
}
body.theme-marble .timeline-divider-line.divider-line-538 {
    border-left-color: rgba(217, 119, 6, 0.45) !important;
}
body.theme-marble .divider-label {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    color: #0f172a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}
body.theme-marble .divider-label:hover {
    border-color: #1d4ed8 !important;
    background: #ffffff;
}
body.theme-marble .divider-label-586 {
    background: rgba(239, 68, 68, 0.06) !important;
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}
body.theme-marble .divider-label-538 {
    background: rgba(217, 119, 6, 0.06) !important;
    color: #b45309 !important;
    border-color: rgba(217, 119, 6, 0.25) !important;
}
body.theme-marble .tooltip {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    color: #0f172a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
body.theme-marble .drawer {
    border-left-color: rgba(0, 0, 0, 0.06);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}
body.theme-marble .drawer-title {
    color: #0f172a;
}
body.theme-marble .drawer-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
body.theme-marble .section-title {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}
body.theme-marble .outline-level-1 {
    color: #0f172a;
}
body.theme-marble .timeline-bar {
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
body.theme-marble .timeline-bar.king-bar.track-israel {
    background: rgba(16, 185, 129, 0.04);
    color: #047857;
}
body.theme-marble .timeline-bar.king-bar.track-judah {
    background: rgba(59, 130, 246, 0.04);
    color: #1d4ed8;
}

/* ==================== 亮色主题文字对比度校正强化 ==================== */
/* 1. 顶轨里程碑默认颜色与修饰类定义 */
.divider-label {
    color: rgba(255, 255, 255, 0.95);
}
.divider-label.divider-label-586 {
    color: #f87171 !important;
}
.divider-label.divider-label-538 {
    color: #fbbf24 !important;
}
.divider-label.divider-label-516 {
    color: #34d399 !important;
}
.divider-label.divider-label-458 {
    color: #93c5fd !important;
}
.divider-label.divider-label-444 {
    color: #c084fc !important;
}

/* 2. 📄 象牙纸张 (theme-paper) 亮色文字重写 */
body.theme-paper .divider-label {
    color: #1e1b18 !important;
    background: #ffffff !important;
}
body.theme-paper .divider-label.divider-label-586 {
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}
body.theme-paper .divider-label.divider-label-538 {
    color: #b45309 !important;
    border-color: rgba(217, 119, 6, 0.4) !important;
}
body.theme-paper .divider-label.divider-label-516 {
    color: #047857 !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}
body.theme-paper .divider-label.divider-label-458 {
    color: #1d4ed8 !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}
body.theme-paper .divider-label.divider-label-444 {
    color: #6d28d9 !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
}

body.theme-paper .timeline-bar {
    color: #1e1b18 !important;
}
body.theme-paper .timeline-bar.track-israel {
    color: #047857 !important;
}
body.theme-paper .timeline-bar.track-judah {
    color: #1d4ed8 !important;
}
body.theme-paper .timeline-bar.track-gentiles {
    color: #b45309 !important;
}
body.theme-paper .timeline-bar.track-exile {
    color: #6d28d9 !important;
}

/* 3. ✨ 圣殿白瓷 (theme-marble) 亮色文字重写 */
body.theme-marble .divider-label {
    color: #0f172a !important;
    background: #ffffff !important;
}
body.theme-marble .divider-label.divider-label-586 {
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}
body.theme-marble .divider-label.divider-label-538 {
    color: #b45309 !important;
    border-color: rgba(217, 119, 6, 0.4) !important;
}
body.theme-marble .divider-label.divider-label-516 {
    color: #047857 !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}
body.theme-marble .divider-label.divider-label-458 {
    color: #1d4ed8 !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}
body.theme-marble .divider-label.divider-label-444 {
    color: #6d28d9 !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
}

body.theme-marble .timeline-bar {
    color: #0f172a !important;
}
body.theme-marble .timeline-bar.track-israel {
    color: #047857 !important;
}
body.theme-marble .timeline-bar.track-judah {
    color: #1d4ed8 !important;
}
body.theme-marble .timeline-bar.track-gentiles {
    color: #b45309 !important;
}
body.theme-marble .timeline-bar.track-exile {
    color: #6d28d9 !important;
}

/* ==================== 新增：新约与使徒行传时间轴样式 ==================== */

/* 1. 新约轨道行文字标签色 */
.timeline-track-label.nt-travels { color: #60a5fa; }
.timeline-track-label.nt-gospels { color: #2dd4bf; }
.timeline-track-label.nt-paul { color: #a78bfa; }
.timeline-track-label.nt-general { color: #fbbf24; }

/* 2. 新约事件 Bar 配色与悬停发光 (暗色模式) */
.timeline-bar.nt_track_travels { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.45); border-radius: 20px !important; }
.timeline-bar.nt_track_travels:hover { box-shadow: 0 0 15px rgba(59, 130, 246, 0.6); z-index: 10; transform: scaleY(1.05); }

.timeline-bar.nt_track_gospels { background: rgba(20, 184, 166, 0.12); border: 1px solid rgba(20, 184, 166, 0.45); border-radius: 20px !important; }
.timeline-bar.nt_track_gospels:hover { box-shadow: 0 0 15px rgba(20, 184, 166, 0.6); z-index: 10; transform: scaleY(1.05); }

.timeline-bar.nt_track_paul { background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.45); border-radius: 20px !important; }
.timeline-bar.nt_track_paul:hover { box-shadow: 0 0 15px rgba(139, 92, 246, 0.6); z-index: 10; transform: scaleY(1.05); }

.timeline-bar.nt_track_general { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.45); border-radius: 20px !important; }
.timeline-bar.nt_track_general:hover { box-shadow: 0 0 15px rgba(245, 158, 11, 0.6); z-index: 10; transform: scaleY(1.05); }

/* 3. 亮色模式下新约 Bar 字体颜色强化 (theme-paper) */
body.theme-paper .timeline-bar.nt_track_travels { color: #1d4ed8 !important; }
body.theme-paper .timeline-bar.nt_track_gospels { color: #0d9488 !important; }
body.theme-paper .timeline-bar.nt_track_paul { color: #6d28d9 !important; }
body.theme-paper .timeline-bar.nt_track_general { color: #b45309 !important; }

/* 4. 亮色模式下新约 Bar 字体颜色强化 (theme-marble) */
body.theme-marble .timeline-bar.nt_track_travels { color: #1d4ed8 !important; }
body.theme-marble .timeline-bar.nt_track_gospels { color: #0d9488 !important; }
body.theme-marble .timeline-bar.nt_track_paul { color: #6d28d9 !important; }
body.theme-marble .timeline-bar.nt_track_general { color: #b45309 !important; }

/* 5. 圣殿对比色块专用样式 */
.timeline-bar.temple-bar {
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    justify-content: center; /* 圣殿名字居中 */
    border-style: solid;
}
.timeline-bar.temple-bar.solomon {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}
.timeline-bar.temple-bar.solomon:hover {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}
.timeline-bar.temple-bar.zerubbabel {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.15) 0%, rgba(217, 119, 6, 0.05) 100%);
    border: 1px solid rgba(217, 119, 6, 0.5);
    color: #fde047;
}
.timeline-bar.temple-bar.zerubbabel:hover {
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.4);
    background: rgba(217, 119, 6, 0.25);
    color: #ffffff;
}
.timeline-bar.temple-bar.herod {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.18) 0%, rgba(251, 191, 36, 0.06) 100%);
    border: 1px solid rgba(251, 191, 36, 0.55);
    color: #fbbf24;
}
.timeline-bar.temple-bar.herod:hover {
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.28);
    color: #ffffff;
}

/* 6. 亮色模式下圣殿色块字色重写 */
body.theme-paper .timeline-bar.temple-bar.solomon { color: #b91c1c !important; }
body.theme-paper .timeline-bar.temple-bar.zerubbabel { color: #b45309 !important; }
body.theme-paper .timeline-bar.temple-bar.herod { color: #ca8a04 !important; }

body.theme-marble .timeline-bar.temple-bar.solomon { color: #b91c1c !important; }
body.theme-marble .timeline-bar.temple-bar.zerubbabel { color: #b45309 !important; }
body.theme-marble .timeline-bar.temple-bar.herod { color: #ca8a04 !important; }

/* 7. 新约重大事件里程碑穿透垂直线 (淡化虚线，高亮红线) */
.timeline-dividers .timeline-divider-line.nt-divider {
    border-left-style: dashed;
    border-left-width: 1px;
    border-left-color: rgba(255, 255, 255, 0.08) !important;
}
.timeline-dividers .timeline-divider-line.nt-divider-70 {
    border-left: 2px solid rgba(239, 68, 68, 0.65) !important;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.4));
}

/* 8. 亮色模式下新约里程碑穿透垂直线 */
body.theme-paper .timeline-dividers .timeline-divider-line.nt-divider {
    border-left-color: rgba(0, 0, 0, 0.06) !important;
}
body.theme-paper .timeline-dividers .timeline-divider-line.nt-divider-70 {
    border-left-color: rgba(239, 68, 68, 0.6) !important;
}
body.theme-marble .timeline-dividers .timeline-divider-line.nt-divider {
    border-left-color: rgba(0, 0, 0, 0.05) !important;
}
body.theme-marble .timeline-dividers .timeline-divider-line.nt-divider-70 {
    border-left-color: rgba(239, 68, 68, 0.55) !important;
}

/* 9. 新约里程碑修饰类 */
.divider-label.divider-label-nt {
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa !important;
}
.divider-label.divider-label-nt-70 {
    background: rgba(239, 68, 68, 0.18) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}
body.theme-paper .divider-label.divider-label-nt {
    color: #1d4ed8 !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}
body.theme-paper .divider-label.divider-label-nt-70 {
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}
body.theme-marble .divider-label.divider-label-nt {
    color: #1d4ed8 !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}
body.theme-marble .divider-label.divider-label-nt-70 {
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

/* 10. 科普卡片微调 */
.guide-period-card.nt-card {
    border-color: rgba(96, 165, 250, 0.15);
}
.guide-period-card.nt-card:hover {
    border-color: rgba(96, 165, 250, 0.35);
}
.nt-card .guide-period-badge.nt {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}
body.theme-paper .nt-card .guide-period-badge.nt {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}
body.theme-marble .nt-card .guide-period-badge.nt {
    background: rgba(29, 78, 216, 0.06);
    color: #1d4ed8;
}


/* 11. 同期宣教旅程与书卷高光联动 (双向串联聚光灯效果) */
.timeline-bar.dim-epoch {
    opacity: 0.12 !important;
    filter: grayscale(0.7) blur(0.3px) !important;
    transition: opacity 0.2s ease, filter 0.2s ease !important;
}

.timeline-bar.highlight-epoch {
    opacity: 1 !important;
    filter: none !important;
    box-shadow: 0 0 15px currentColor !important;
    transform: scale(1.03) !important;
    z-index: 15 !important;
    transition: all 0.2s ease !important;
}
