/* =========================================
   上帝视角编年史 (History Page) 专属样式
   ========================================= */

:root {
    --axis-color: #d1d5db;
    --epoch-bg: #3e322c;
}

/* =========================================
   时间线主轴
   ========================================= */
.timeline {
    position: relative;
    margin-top: 30px;
}

/* 大屏中轴线：绝对居中 */
.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--axis-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    z-index: 0;
}

/* =========================================
   纪元分隔符 (黑色胶囊标签)
   ========================================= */
.epoch-marker {
    position: relative;
    z-index: 2;
    text-align: center;
    margin: 50px 0;
}

.epoch-marker span {
    background: var(--epoch-bg);
    color: #fff;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    letter-spacing: 3px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 2px solid var(--bg-color);
}

/* =========================================
   节点容器 (大屏左右各占50%)
   ========================================= */
.time-node {
    padding: 10px 20px;
    position: relative;
    width: 50%;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.time-node.show {
    opacity: 1;
    transform: translateY(0);
}

/* 强制左侧节点靠左，右侧节点靠右 */
.time-node.left { left: 0; }
.time-node.right { left: 50%; }

/* =========================================
   节点圆点 (绝对跨在中轴线上)
   ========================================= */
.time-node::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    /* 因为卡片宽度是50%，所以卡片的边缘就在50%处。
       左卡片：圆圈在它右边边缘（left: 100%）
       右卡片：圆圈在它左边边缘（left: 0） */
    background-color: var(--bg-color);
    border: 3px solid var(--primary);
    top: 30px;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s;
}

/* 左侧卡片的圆圈：定在卡片的右侧，向左偏移自身一半 */
.time-node.left::after {
    left: 100%;
    margin-left: -8px;
}

/* 右侧卡片的圆圈：定在卡片的左侧，向左偏移自身一半 */
.time-node.right::after {
    left: 0;
    margin-left: -8px;
}

.time-node:hover::after {
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

/* =========================================
   内容卡片
   ========================================= */
.content {
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(100, 80, 60, 0.06);

    position: relative;
}

/* 卡片指示小三角 */
.content::before {
    content: " ";
    height: 0;
    position: absolute;
   /*  top: 50px; */
    width: 0;
    z-index: 1;
    border: 10px solid transparent;
}

.time-node.left .content::before { 
    right: -20px; 
    border-left-color: var(--bg-color); 
}
.time-node.right .content::before { 
    left: -20px; 
    border-right-color: var(--bg-color); 
}

/* =========================================
   文本排版
   ========================================= */
.time-date {
    font-family: monospace;
    color: var(--primary);
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 8px;
    display: inline-block;
    padding: 2px 8px;
    background: rgba(217, 119, 87, 0.1);
    border-radius: 4px;
}

.content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-main);
}

.content p {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.highlight {
    color: var(--primary);
    font-weight: bold;
}

/* =========================================
   手机端适配 (单侧时间线)
   ========================================= */
@media screen and (max-width: 768px) {
    /* 轴线移到左侧 */
    .timeline::before { 
        left: 20px; 
        margin-left: -1px;
    }
    
    /* 所有节点占满全宽，靠左 */
    .time-node { 
        width: 100%; 
        padding-left: 40px; 
        padding-right: 10px; 
        margin-bottom: 10px; 
    }
    .time-node.right { 
        left: 0; 
    }
    
    /* 圆点统一对齐到左侧轴线上 */
    .time-node.left::after,
    .time-node.right::after {
        left: 20px; 
        margin-left: -8px; 
        top: 30px; 
    }
    
    /* 小三角统一指向左侧 */
    .time-node.left .content::before,
    .time-node.right .content::before { 
        left: -20px; 
        right: auto;
        border-right-color: var(--bg-color); 
        border-left-color: transparent; 
    }
    
    /* 纪元标签靠左对齐 */
    .epoch-marker { 
        text-align: left; 
        margin-left: 5px; 
    }
}