/* ===== 项目日志时间线(左右交替圆角卡片) ===== */
.timeline {
  position: relative;
  max-width: 920px;
  margin: 8px auto 0;
  padding: 20px 0 40px;
}
/* 中轴线 */
.timeline::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(var(--primary), var(--accent));
  opacity: 0.5;
}

.tl-item { position: relative; width: 50%; padding: 14px 44px; box-sizing: border-box; }
/* 左侧卡片(奇数):贴近中轴右对齐 */
.tl-item:nth-child(odd) { left: 0; text-align: right; }
/* 右侧卡片(偶数) */
.tl-item:nth-child(even) { left: 50%; text-align: left; }

/* 中轴节点(圆角小方块) */
.tl-node {
  position: absolute; top: 26px; width: 14px; height: 14px;
  border-radius: 5px; background: var(--primary);
  border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--primary);
  z-index: 2;
}
.tl-item:nth-child(odd) .tl-node { right: -7px; }
.tl-item:nth-child(even) .tl-node { left: -7px; }
.tl-item[data-type="build"] .tl-node { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tl-item[data-type="planned"] .tl-node { background: var(--text-dim); box-shadow: 0 0 0 2px var(--text-dim); }

/* 圆角长方形卡片 */
.tl-card {
  display: inline-block; text-align: left; width: 100%;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.tl-card:hover { transform: translateY(-4px); border-color: var(--primary); }
/* 顶部彩条(按类型着色) */
.tl-card::before {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--primary);
}
.tl-item[data-type="build"] .tl-card::before { background: var(--accent); }
.tl-item[data-type="planned"] .tl-card::before { background: var(--text-dim); }

.tl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.tl-badge {
  font-size: 0.68rem; font-weight: 700; padding: 2px 9px; border-radius: 20px;
  letter-spacing: 0.5px;
}
.tl-badge--release { background: rgba(0,185,107,0.15); color: var(--primary); }
.tl-badge--build { background: rgba(245,166,35,0.16); color: var(--accent); }
.tl-badge--planned { background: rgba(134,144,156,0.16); color: var(--text-secondary); }
.tl-version { font-weight: 800; font-size: 0.95rem; color: var(--text); }
.tl-date { margin-left: auto; font-size: 0.78rem; color: var(--text-dim); font-family: var(--font-mono); }

.tl-title { font-size: 1.02rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.tl-items { list-style: none; padding: 0; margin: 0; }
.tl-items li {
  position: relative; padding-left: 16px; margin-bottom: 6px;
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.55;
}
.tl-items li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 2px; background: var(--primary); opacity: 0.7;
}
.tl-item[data-type="build"] .tl-items li::before { background: var(--accent); }
.tl-item[data-type="planned"] .tl-items li::before { background: var(--text-dim); }

/* 入场动画 */
.tl-item { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.tl-item.in { opacity: 1; transform: translateY(0); }

/* 加载 / 错误态 */
.tl-status { text-align: center; color: var(--text-secondary); padding: 40px 0; font-size: 0.95rem; }

/* ===== 响应式:单侧堆叠 ===== */
@media (max-width: 768px) {
  .timeline::before { left: 18px; }
  .tl-item, .tl-item:nth-child(odd), .tl-item:nth-child(even) {
    width: 100%; left: 0; text-align: left; padding: 12px 0 12px 46px;
  }
  .tl-item:nth-child(odd) .tl-node, .tl-item:nth-child(even) .tl-node { left: 11px; right: auto; }
  .tl-date { margin-left: auto; }
}
