:root {
    --primary: #4f46e5;
    --secondary: #8b5cf6;
    --text: #1f2937;
    --text-light: #4b5563;
    --text-muted: #9ca3af;
    --bg: #ffffff;
    --bg-light: #f9fafb;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

/* ===== 顶部导航 ===== */
.changelog-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.changelog-header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.changelog-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.changelog-brand img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.changelog-brand-text { font-weight: 700; font-size: 1.05rem; }
.changelog-brand-text em {
    font-style: normal;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 6px;
    font-size: 0.9rem;
}

.changelog-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.changelog-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f5f3ff;
}

/* ===== 页头 ===== */
.changelog-hero {
    text-align: center;
    padding: 56px 24px 40px;
    background:
        radial-gradient(600px 220px at 50% -40px, rgba(99, 102, 241, 0.15), transparent),
        var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.changelog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--primary);
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
    font-weight: 500;
}

.changelog-hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient);
}

.changelog-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.changelog-hero p {
    margin-top: 10px;
    color: var(--text-light);
    max-width: 560px;
    margin-inline: auto;
}

/* ===== 时间轴 ===== */
.changelog-main { max-width: 1080px; margin: 0 auto; padding: 40px 24px 80px; }

.timeline { position: relative; padding-left: 0; }

.timeline::before {
    content: "";
    position: absolute;
    left: 144px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, #6366f1, #8b5cf6, rgba(99, 102, 241, 0.1));
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 40px;
}

/* 左侧时间列（包含圆点） */
.timeline-date {
    width: 130px;
    text-align: right;
    padding-top: 4px;
}

.timeline-date .date { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }

.timeline-dot {
    position: absolute;
    left: 144px;
    top: 18px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
    transform: translateX(-50%);
    box-shadow: var(--shadow-sm);
}

.timeline-item:first-child .timeline-dot {
    background: var(--gradient);
    border: none;
    width: 18px;
    height: 18px;
}

/* 右侧内容 */
.timeline-card {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgb(79 70 229 / 0.18);
}

.version-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.version-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient);
}

.version-tag.latest {
    background: var(--gradient);
    box-shadow: 0 4px 10px -2px rgb(99 102 241 / 0.5);
}

.version-type {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 999px;
}

.version-title { font-size: 1.05rem; font-weight: 700; margin: 6px 0 10px; }

.timeline-card ul {
    list-style: none;
    padding: 0;
}

.timeline-card li {
    position: relative;
    padding: 3px 0 3px 22px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.timeline-card li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gradient);
}

/* 分类色块（功能/修复/优化） */
.timeline-card li .tag {
    display: inline-block;
    font-size: 0.72rem;
    padding: 1px 8px;
    border-radius: 6px;
    margin-right: 6px;
    vertical-align: 1px;
}

.tag-new { background: #ecfdf5; color: #059669; }
.tag-fix { background: #fef3c7; color: #b45309; }
.tag-opt { background: #eef2ff; color: #4f46e5; }

/* 数据加载/空态 */
.timeline-loading {
    text-align: center;
    padding: 48px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== 页脚 ===== */
.changelog-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    padding: 28px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== 响应式 ===== */
@media (max-width: 720px) {
    .timeline::before { left: 14px; }
    .timeline-dot { left: 14px; }
    .timeline-item { flex-direction: column; gap: 8px; padding-left: 32px; }
    .timeline-date { width: auto; text-align: left; margin-top: 10px; }
    .timeline-item:first-child .timeline-dot { top: 14px; }
}