/* ===== 时间轴页面 ===== */
.timeline-page {
  padding: 60px 24px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.timeline-header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInUp 0.6s ease forwards;
}

.timeline-header > * {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}
.timeline-header > *:nth-child(1) { animation-delay: 0s; }
.timeline-header > *:nth-child(2) { animation-delay: 0.1s; }

/* 类别筛选 */
.timeline-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

.timeline-filter {
  padding: 8px 18px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-filter .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.timeline-filter:hover { border-color: var(--accent-bronze); color: var(--text-primary); }
.timeline-filter.active { background: var(--accent-gold); color: #1a1a1a; border-color: var(--accent-gold); }
.timeline-filter.active .dot { background: #1a1a1a !important; }

.dot-war { background: #c96e6e; }
.dot-phil { background: #6e96c9; }
.dot-tech { background: #6ec9a0; }
.dot-culture { background: #c9a06e; }
.dot-politics { background: #a06ec9; }

/* 时间轴主体 */
.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom,
    transparent 0%,
    var(--accent-gold) 5%,
    var(--accent-gold) 95%,
    transparent 100%
  );
  transform: translateX(-50%);
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: flex-start;
}

.timeline-item:nth-child(even) .tl-content-area {
  order: 1;
}
.timeline-item:nth-child(even) .tl-marker-area {
  order: 2;
}
.timeline-item:nth-child(even) .tl-date-area {
  order: 3;
  text-align: left;
}

.timeline-item:nth-child(odd) .tl-content-area {
  order: 3;
}
.timeline-item:nth-child(odd) .tl-marker-area {
  order: 2;
}
.timeline-item:nth-child(odd) .tl-date-area {
  order: 1;
  text-align: right;
}

.tl-date-area {
  padding-top: 4px;
}

.tl-year {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.tl-era-label {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.tl-marker-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.tl-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  background: var(--bg-primary);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.timeline-item:hover .tl-marker {
  background: var(--accent-gold);
  box-shadow: 0 0 16px rgba(201,169,110,0.4);
  transform: scale(1.2);
}

.tl-content-area {
  cursor: pointer;
}

.tl-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: all var(--transition-fast);
}

.tl-card:hover {
  border-color: var(--accent-bronze);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tl-card-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tl-card-type .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.tl-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tl-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tl-card-tags {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}

/* 时段聚焦指示器 */
.timeline-eras {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease 0.25s forwards;
  opacity: 0;
}

.timeline-era-btn {
  padding: 6px 16px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.timeline-era-btn:hover {
  border-color: var(--accent-bronze);
  color: var(--text-primary);
}

.timeline-era-btn.active {
  background: var(--accent-gold);
  color: #1a1a1a;
  border-color: var(--accent-gold);
}

@media (max-width: 768px) {
  .timeline-line {
    left: 24px;
  }
  .timeline-item {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }
  .tl-date-area {
    display: none;
  }
  .timeline-item:nth-child(odd) .tl-content-area,
  .timeline-item:nth-child(even) .tl-content-area {
    order: 2;
  }
  .timeline-item:nth-child(odd) .tl-marker-area,
  .timeline-item:nth-child(even) .tl-marker-area {
    order: 1;
  }
  .timeline-item:nth-child(odd) .tl-date-area,
  .timeline-item:nth-child(even) .tl-date-area {
    display: none;
  }
  .tl-card {
    padding: 16px;
  }
  .tl-card h3 { font-size: 14px; }
}
