/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 字体定义 */
@font-face {
    font-family: 'SweetTwinkle';
    src: url('/fonts/SweetTwinkle.otf') format('woff1'),
         url('/fonts/my-art-font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SantaButterfly';
    src: url('/fonts/SantaButterfly.otf') format('woff2'),
         url('/fonts/my-art-font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Pilowlava-Atome';
    src: url('/fonts/Pilowlava-Atome.otf') format('woff2'),
         url('/fonts/my-art-font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #fafafa;
    color: #1e1e1e;
    line-height: 1.6;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}
header h1 {
    font-size: 3.5rem;
    font-weight: 600;
    font-family: 'Pilowlava-Atome';
    color: #1e1e1e;
}
header p {
    font-family: 'SantaButterfly';
    color: #666;
    font-size: 1.2rem;
}

/* 分类按钮 */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}
.filter-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}
.filter-btn:hover {
    background: #f0f0f0;
}
.filter-btn.active {
    background: #333;
    color: white;
    border-color: #333;
}

/* 时间轴容器 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 全局垂直线 —— 穿过圆点中心 */
.timeline::before {
    content: '';
    position: absolute;
    left: 45px;               /* 圆点中心位置 */
    top: 0;
    bottom: 0;
    width: 10px;
    background-color: #e5e7eb;
    z-index: 0;
}

/* 每个时间轴条目 —— 仅作为弹性容器，无边框背景 */
.timeline-item {
    display: flex;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

/* 左侧标记区：圆点 + 日期 */
.timeline-marker {
    width: 100px;
    text-align: center;
    background: transparent;
    position: relative;
    z-index: 2;
}

/* 圆点 */
.dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid #ffffff; /* 白色硬边，增强对比 */
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.15), /* 外部投影 */
        inset 0 -2px 4px rgba(0,0,0,0.2); /* 底部内阴影增加体积感 */
}

/* 使用径向渐变，让中心颜色略亮 */
.color-blue { 
    background: radial-gradient(circle at 35% 35%, #98c5fc, #3b82f6); 
}
.color-black { 
    background: radial-gradient(circle at 35% 35%, #7d7d7d, #1e1e1e); 
}
.color-orange { 
    background: radial-gradient(circle at 35% 35%, #ffc765, #f97316); 
}
.color-yellow { 
    background: radial-gradient(circle at 35% 35%, #f0d277, #eab308); 
}
.color-purple { 
    background: radial-gradient(circle at 35% 35%, #cc9afb, #a855f7); 
}
.color-gray { 
    background: radial-gradient(circle at 35% 35%, #b0bbd2, #6b7280); 
}
.color-green { 
    background: radial-gradient(circle at 35% 35%, #73cb94, #22c55e); 
}
.color-cyan { 
    background: radial-gradient(circle at 35% 35%, #7acbda, #06b6d4); 
}

/* 8种颜色 */
.color-blue { background-color: #3b82f6; }
.color-black { background-color: #1e1e1e; }
.color-orange { background-color: #f97316; }
.color-yellow { background-color: #eab308; }
.color-purple { background-color: #a855f7; }
.color-gray { background-color: #6b7280; }
.color-green { background-color: #22c55e; }
.color-cyan { background-color: #06b6d4; }


@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.timeline-item:hover .dot {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    animation: pulse 2s infinite ease-in-out;
}
.timeline-item[data-category="blue"]:hover .dot { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4); }
.timeline-item[data-category="black"]:hover .dot { box-shadow: 0 0 0 4px rgba(58, 58, 58, 0.4); }
.timeline-item[data-category="orange"]:hover .dot { box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.4); }
.timeline-item[data-category="yellow"]:hover .dot { box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.4); }
.timeline-item[data-category="purple"]:hover .dot { box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.4); }
.timeline-item[data-category="gray"]:hover .dot { box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.4); }
.timeline-item[data-category="green"]:hover .dot { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.4); }
.timeline-item[data-category="cyan"]:hover .dot { box-shadow: 0 0 0 4px rgba(122, 203, 218, 0.4); }

/* 日期文字 —— 胶囊样式 */
.date {
    display: block;
    font-size: 0.85rem;
    color: #333;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
    padding: 4px 12px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    line-height: 1.2;
}

/* 右侧内容区 —— 高级玻璃质感卡片 */
.timeline-content {
    flex: 1;
    margin-left: 20px;                        /* 与圆点保持间距 */
    padding: 24px 28px 24px 24px;              /* 上 右 下 左 */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: 
        0 10px 25px -8px rgba(0, 0, 0, 0.05),
        0 2px 4px 0 rgba(0, 0, 0, 0.02),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
    transition: all 0.25s ease;
}

/* 悬停时强化卡片层次 */
.timeline-item:hover .timeline-content {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 
        0 20px 30px -12px rgba(0, 0, 0, 0.1),
        0 4px 8px -2px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 0 rgba(255, 255, 255, 1);
}

/* 标题 */
.timeline-content h2 {
    margin: 0 0 5px;
    font-size: 1.2rem;
    font-weight: 600;
}
.timeline-content h2 a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.timeline-content h2 a:hover {
    text-decoration: underline;
}

/* 摘要：单行省略 + 高级配色 */
.summary {
    margin: 0 0 5px;
    color: #2e2e2e;
    line-height: 1.6;
    opacity: 0.85;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px; /* 缩小间隙，更紧凑 */
    
    width: fit-content;
    min-width: 320px;
    margin: 25px auto 45px;
    padding: 5px; /* 容器内边距一致化 */
    
    /* 配合浅色格子背景：使用高亮白，降低透明度 */
    background: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(12px) saturate(180%); 
    
    position: sticky;
    top: 25px;
    z-index: 1000;
    
    border-radius: 20px; /* 稍微减小圆角，比纯圆（50px）更有设计感 */
    /* 极细边框，增加高级感 */
    border: 1px solid rgba(255, 255, 255, 0.8); 
    
    /* 阴影改为淡蓝色系或纯中性浅灰 */
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.03),
        0 10px 30px rgba(66, 133, 244, 0.08); /* 淡淡的蓝色投影呼应背景 */
    
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.main-nav:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(66, 133, 244, 0.12);
}

/* --- 导航项：优雅简约风格 --- */

.nav-item {
    text-decoration: none;
    color: #666; /* 中性深灰文字 */
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 16px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.nav-item:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.04); /* 极其轻微的灰色 hover */
}

/* 激活状态：注入蓝色灵魂 */
.nav-item.active {
    color: #ffffff; 
    background: #0014FC; /* 这里建议用你背景格子里的那个蓝色 */
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}
/* 响应式：小屏幕时取消线条，堆叠布局 */
@media (max-width: 600px) {
    .timeline::before {
        display: none;
    }

    .timeline-item {
        flex-direction: column;
        margin-bottom: 25px;
    }

    .timeline-marker {
        width: auto;
        text-align: left;
        display: flex;
        align-items: center;
        margin-bottom: 8px;
    }

    .dot {
        margin-bottom: 0;
        margin-right: 8px;
    }

    .date {
        display: inline;
    }

    .timeline-content {
        margin-left: 0;           /* 移除左边距，卡片紧贴左侧 */
        width: 100%;
    }
}