/**
 * 长河志时间线应用样式文件
 * 包含全局样式、时间线组件、筛选栏、侧边栏及响应式设计
 */

/* ===== 重置样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 主题变量 ===== */
:root {
    /* 背景色 */
    --bg-primary: #F0F4F7;
    --bg-secondary: #E8EEF3;
    --bg-left: #E8EEF3;
    /* 卡片 */
    --card-bg: #FFFBF5;
    --card-bg-hover: #FFF3E6;
    /* 导航栏 */
    --nav-primary: #C85A5A;
    --nav-text: #FFFFFF;
    --nav-input-bg: #F8F3F3;
    --nav-border: #D9B8B8;
    /* 边框与强调色 */
    --border-color: #B8D0D8;
    --accent-primary: #72A8B8;
    --accent-secondary: #4899A8;
    --accent-light: #B8D0D8;
    /* 文字颜色 */
    --text-primary: #2D3F46;
    --text-secondary: #40545C;
    --text-muted: #70868F;
    /* 时间线 */
    --timeline-line: #72A8B8;
    --timeline-dot: #4899A8;
    --timeline-dot-empty: #B8D0D8;
    --timeline-line-fake: #ed902d;
    /* 空状态 */
    --empty-card-bg: #E6EDF2;
    --empty-card-text: #70868F;
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 2px 8px rgba(114, 168, 184, 0.12);
    --shadow-lg: 0 4px 12px rgba(114, 168, 184, 0.18);
    --shadow-hover: 0 6px 20px rgba(114, 168, 184, 0.22);
    /* 字体 */
    --font-heading: 'Noto Serif SC', serif;
    --font-body: 'Noto Sans SC', sans-serif;
}

/* ===== 页面基础布局 ===== */
body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

/* ===== 页头 ===== */
.header {
    text-align: center;
    padding: 100px 20px 32px;
    background: var(--nav-primary);
    border-bottom: 1px solid var(--nav-border);
}

.header h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--nav-text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== 主内容区 ===== */
.main-content {
    padding: 0;
    flex: 1;
    width: 100%;
    background-color: var(--bg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ===== 时间线容器 ===== */
.timeline-container {
    width: 100%;
    position: relative;
    min-height: 100%;
}

/* 时间线左侧背景色块 */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 35vw;
    height: 100%;
    background-color: var(--bg-left);
    z-index: 0;
}

/* 时间线垂直线 */
.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 35vw;
    width: 4px;
    background: var(--timeline-line);
    z-index: 1;
}

/* 时间线节点列表 */
.timeline-nodes {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* 单个时间节点 */
.timeline-node {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100px;
}

.timeline-node:hover {
    transform: translateX(4px);
}

/* 年份显示 */
.node-year {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    width: calc(35vw - 12px);
    flex-shrink: 0;
    text-align: right;
    padding-right: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: center;
}

/* 节点圆点容器 */
.node-dot-wrapper {
    position: absolute;
    left: 35vw;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* 节点圆点 */
.node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--timeline-dot);
    border: 2px solid var(--timeline-dot);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* 空年份圆点样式 */
.node-dot.empty {
    width: 10px;
    height: 10px;
    background: transparent;
    border: 2px solid var(--timeline-dot-empty);
    opacity: 0.7;
}

.node-dot.empty::before {
    display: none;
}

/* 空年份圆点悬停效果 */
.timeline-node:hover .node-dot.empty {
    width: 12px;
    height: 12px;
    border-color: var(--timeline-dot);
    opacity: 1;
    box-shadow: none;
}

/* 圆点悬停与激活效果 */
.timeline-node:hover .node-dot,
.timeline-node.active .node-dot {
    width: 16px;
    height: 16px;
    border-color: var(--timeline-dot);
    box-shadow: 0 0 0 6px rgba(114, 168, 184, 0.2);
}

.node-dot::before {
    display: none;
}

/* ===== 卡片区域 ===== */
.node-cards {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-left: 24px;
    flex: 1;
    flex-wrap: wrap;
    align-items: flex-start;
    align-self: center;
    max-width: calc(65vw - 40px);
}

/* 事件卡片 */
.node-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    display: flex;
    gap: 0;
    align-items: flex-start;
    max-width: 500px;
    align-self: flex-start;
    overflow: hidden;
}

/* 空年份卡片 */
.node-card.empty-card {
    background: var(--empty-card-bg);
    border: 1px solid var(--border-color);
    opacity: 0.7;
    min-height: 40px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* 空年份文字 */
.empty-year-text {
    font-size: 0.75rem;
    color: var(--empty-card-text);
    font-weight: 400;
    text-align: center;
    padding: 4px 8px;
}

/* 卡片悬停效果 */
.node-card:hover {
    background: var(--card-bg-hover);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-primary);
    opacity: 1;
    transform: translateY(-3px);
}

/* 按 rank 等级区分卡片背景色 */
.node-card.rank-1 { background: rgba(255, 50, 50, 0.2); border-color: rgba(255, 50, 50, 0.5); }
.node-card.rank-2 { background: rgba(255, 215, 0, 0.2); border-color: rgba(255, 215, 0, 0.5); }
.node-card.rank-3 { background: rgba(30, 144, 255, 0.2); border-color: rgba(30, 144, 255, 0.5); }
.node-card.rank-4 { background: rgba(192, 192, 192, 0.25); border-color: rgba(192, 192, 192, 0.6); }

.node-card.rank-1:hover { background: rgba(255, 50, 50, 0.3); }
.node-card.rank-2:hover { background: rgba(255, 215, 0, 0.3); }
.node-card.rank-3:hover { background: rgba(30, 144, 255, 0.3); }
.node-card.rank-4:hover { background: rgba(192, 192, 192, 0.35); }

/* 空卡片悬停效果 */
.timeline-node:hover .node-card.empty-card {
    opacity: 0.8;
    border-color: var(--accent-primary);
    border-style: solid;
}

.timeline-node:hover .empty-year-text {
    color: var(--text-secondary);
}

/* 激活卡片样式 */
.timeline-node.active .node-card.active-card {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
    opacity: 1;
}

/* 卡片图片 */
.card-image {
    width: 100px;
    height: 100px;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

/* 卡片内容 */
.card-content {
    flex: 1;
    min-width: 180px;
    padding: 14px 14px 14px 12px;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.card-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* 隐藏控件 */
.controls {
    display: none;
}

.scroll-hint {
    display: none;
}

/* ===== 筛选栏 ===== */
.filter-bar {
    background: var(--nav-primary);
    border-bottom: 1px solid var(--nav-border);
    padding: 12px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 站点Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 站点标语 */
.site-slogan {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #FFFFFF;
    font-weight: 400;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
}

.logo-image {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
}

/* 筛选容器 */
.filter-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.source-select-wrapper {
    flex-shrink: 0;
}

.mode-toggle {
    display: flex;
    background: var(--nav-input-bg);
    border-radius: 10px;
    padding: 3px;
    border: 2px solid var(--nav-border);
    flex-shrink: 0;
}

.mode-btn {
    padding: 8px 18px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);
}

.mode-btn:hover {
    color: var(--text-secondary);
}

.mode-btn.active {
    background: var(--accent-primary);
    color: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

/* 数据源选择器 */
.source-select {
    padding: 12px 32px 12px 14px;
    border: 2px solid var(--nav-border);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--nav-input-bg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: var(--font-body);
    font-weight: 500;
    min-width: 140px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2340545C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.source-select:hover {
    border-color: var(--accent-primary);
    background-color: var(--nav-input-bg);
}

.source-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(114, 168, 184, 0.2);
}

/* 标签筛选选择器 */
.filter-select-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    flex: 1;
}

/* 筛选输入框 */
.filter-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--nav-border);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: var(--nav-input-bg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.filter-input:hover {
    border-color: var(--accent-primary);
    background: var(--nav-input-bg);
}

.filter-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(114, 168, 184, 0.2);
}

.filter-input::placeholder {
    color: var(--text-muted);
}

/* 选中状态 */
.filter-input.has-value {
    border-color: var(--accent-primary);
    background: var(--nav-input-bg);
}

/* 下拉箭头 */
.filter-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.filter-select-wrapper.open .filter-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* ===== 标签下拉菜单 ===== */
.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--nav-input-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--nav-border);
    max-height: 400px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
}

.filter-select-wrapper.open .filter-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 下拉菜单头部 */
.filter-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.filter-dropdown-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-dropdown-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 下拉菜单内容区 */
.filter-dropdown-content {
    padding: 12px;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

/* 自定义滚动条 */
.filter-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.filter-dropdown-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.filter-dropdown-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.filter-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 标签项 */
.filter-item {
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    gap: 8px;
    white-space: nowrap;
}

.filter-item:hover {
    background: var(--accent-light);
    border-color: var(--accent-primary);
}

/* 激活标签 */
.filter-item.active {
    background: var(--accent-primary);
    color: var(--text-secondary);
    border-color: var(--accent-primary);
    font-weight: 500;
}

.filter-item-name {
    flex-shrink: 0;
}

.filter-item-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.6);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.filter-item.active .filter-item-count {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-secondary);
}

/* 清除按钮 */
.filter-clear {
    padding: 12px 20px;
    background: var(--nav-input-bg);
    border: 2px solid var(--nav-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-clear:hover {
    background: var(--nav-input-bg);
    border-color: var(--accent-primary);
    color: var(--text-secondary);
}

.filter-clear span {
    font-weight: 500;
}

/* ===== 侧边栏 ===== */
.sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--card-bg);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(114, 168, 184, 0.15);
    display: flex;
    flex-direction: column;
}

/* 显示侧边栏 */
.sidebar.show {
    right: 0;
}

/* 关闭按钮 */
.sidebar-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.sidebar-close:hover {
    background: var(--accent-primary);
    color: var(--nav-text);
    border-color: var(--accent-primary);
}

/* 侧边栏内容 */
.sidebar-content {
    flex: 1;
    padding: 60px 24px 24px;
    overflow-y: auto;
}

.sidebar-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    object-position: left;
    border-radius: 12px;
    margin-bottom: 20px;
}

.sidebar-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    line-height: 1.3;
}

/* 日期标签 */
.sidebar-date {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    background: var(--bg-secondary);
    padding: 5px 12px;
    border-radius: 6px;
    margin-right: 8px;
    border: 1px solid var(--border-color);
}

/* 作者标签 */
.sidebar-author {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    background: var(--card-bg);
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* 元数据区域 */
.sidebar-meta {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* 标签列表 */
.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sidebar-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* 描述文字 */
.sidebar-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* ===== 侧边栏遮罩 ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    pointer-events: none;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===== 时间切片模式容器 ===== */
.slice-container {
    padding: 40px 20px 120px;
    min-height: 100vh;
}

.slice-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
}

.slice-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.slice-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.slice-empty-text {
    font-size: 1rem;
    margin-bottom: 8px;
}

.slice-empty-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== 时间滑杆容器 ===== */
.time-slider-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 20px 30px;
    z-index: 90;
    box-shadow: 0 -4px 20px rgba(114, 168, 184, 0.15);
}

.time-slider-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.time-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.time-slider-year {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--nav-primary);
    letter-spacing: -1px;
}

.time-slider-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.time-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-secondary);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--nav-primary);
    border-radius: 50%;
    cursor: grab;
    border: 4px solid #FFFFFF;
    box-shadow: 0 2px 10px rgba(200, 90, 90, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(200, 90, 90, 0.5);
}

.time-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
}

.time-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--nav-primary);
    border-radius: 50%;
    cursor: grab;
    border: 4px solid #FFFFFF;
    box-shadow: 0 2px 10px rgba(200, 90, 90, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(200, 90, 90, 0.5);
}

.time-slider::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
}

.time-slider-ticks {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    height: 16px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.time-slider-tick {
    width: 1px;
    height: 8px;
    background: var(--border-color);
}

.time-slider-tick.major {
    height: 16px;
    background: var(--accent-primary);
}

.time-slider-markers {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.time-slider-marker {
    font-size: 0.7rem;
    color: var(--text-muted);
    transform: translateX(-50%);
}

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== 响应式设计 ===== */

/* 中等屏幕 (≤1080px) */
@media (max-width: 1080px) {
    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .filter-bar {
        padding: 12px 15px;
    }

    .filter-container {
        gap: 8px;
    }

    .site-logo {
        display: none;
    }

    .site-slogan {
        display: none;
    }

    .source-select {
        padding: 10px 28px 10px 12px;
        font-size: 0.8rem;
        min-width: 110px;
    }

    .filter-select-wrapper {
        max-width: 100%;
    }

    .filter-input {
        padding: 10px 36px 10px 14px;
        font-size: 0.85rem;
    }

    .filter-clear {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .main-content {
        padding: 30px 15px 60px;
    }

    .timeline-container {
        padding-left: 0;
    }

    .timeline-line {
        left: 35vw;
    }

    .timeline-node {
        min-height: 80px;
    }

    .node-year {
        width: calc(35vw - 10px);
        font-size: 0.85rem;
        padding-right: 10px;
    }

    .node-dot-wrapper {
        left: 35vw;
    }

    .node-cards {
        margin-left: 18px;
    }

    .node-card {
        overflow: hidden;
    }

    .card-image {
        width: 72px;
        height: 72px;
    }

    .card-content {
        padding: 10px 10px 10px 10px;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .card-date {
        font-size: 0.7rem;
    }

    .sidebar {
        width: 300px;
        right: -300px;
    }

    .sidebar-content {
        padding: 50px 20px 20px;
    }

    .sidebar-name {
        font-size: 1.4rem;
    }

    .sidebar-description {
        font-size: 0.9rem;
    }

    .sidebar-image {
        max-height: 300px;
    }

    .mode-toggle {
        padding: 2px;
    }

    .mode-btn {
        padding: 7px 14px;
        font-size: 0.8rem;
    }

    .slice-container {
        padding: 35px 20px 110px;
    }

    .slice-cards {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 18px;
    }

    .time-slider-ticks,
    .time-slider-markers {
        display: none;
    }
}

/* 小屏幕 (≤480px) */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6rem;
    }

    .filter-bar {
        padding: 10px 10px;
    }

    .filter-container {
        gap: 6px;
    }

    .source-select {
        padding: 8px 24px 8px 10px;
        font-size: 0.75rem;
        min-width: 90px;
    }

    .filter-select-wrapper {
        max-width: 100%;
        flex: 1;
    }

    .filter-input {
        padding: 8px 32px 8px 12px;
        font-size: 0.8rem;
    }

    .filter-clear {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .main-content {
        padding: 20px 10px 40px;
    }

    .timeline-container {
        padding-left: 0;
    }

    .timeline-line {
        left: 35vw;
    }

    .timeline-node {
        min-height: 70px;
    }

    .node-year {
        width: calc(35vw - 8px);
        font-size: 0.75rem;
        padding-right: 8px;
    }

    .node-dot-wrapper {
        left: 35vw;
    }

    .node-cards {
        margin-left: 14px;
    }

    .node-card {
        overflow: hidden;
    }

    .card-image {
        width: 52px;
        height: 52px;
    }

    .card-content {
        padding: 8px 8px 8px 8px;
    }

    .card-title {
        font-size: 0.85rem;
    }

    .card-date {
        font-size: 0.65rem;
    }

    .sidebar {
        width: 260px;
        right: -260px;
    }

    .sidebar-content {
        padding: 45px 16px 16px;
    }

    .sidebar-name {
        font-size: 1.2rem;
    }

    .sidebar-description {
        font-size: 0.85rem;
    }

    .sidebar-image {
        max-height: 250px;
    }

    .mode-toggle {
        padding: 2px;
    }

    .mode-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .slice-container {
        padding: 30px 15px 100px;
    }

    .slice-cards {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .time-slider-container {
        padding: 15px 20px;
    }

    .time-slider-year {
        font-size: 1.5rem;
    }

    .time-slider-count {
        font-size: 0.8rem;
    }

    .time-slider-ticks,
    .time-slider-markers {
        display: none;
    }
}