/* ============ 官网更新日志页 ============ */
.changelog-page {
    padding: 10rem 1rem 5rem;
    background: var(--gradient-subtle);
    min-height: 70vh;
}

.changelog-header {
    margin-bottom: 3rem;
}

.changelog-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.9375rem;
}

.changelog-summary i {
    color: var(--primary);
    margin-right: 0.375rem;
}

/* 左侧版本列表 + 右侧时间线 */
.changelog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: start;
}

@media (min-width: 992px) {
    .changelog-layout {
        grid-template-columns: 210px 1fr;
        gap: 2.5rem;
    }
}

.changelog-side {
    display: none;
}

@media (min-width: 992px) {
    .changelog-side {
        display: block;
        position: sticky;
        top: 7rem;
    }
}

.changelog-side-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
    padding-left: 0.875rem;
}

.changelog-nav {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e5e6eb;
}

.changelog-nav a {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.5rem 0.875rem;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--neutral);
    text-decoration: none;
    transition: var(--transition-fast);
}

.changelog-nav a:hover {
    color: var(--primary);
    background: rgba(22, 93, 255, 0.04);
}

.changelog-nav a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: rgba(22, 93, 255, 0.04);
}

.cn-version {
    font-size: 0.9375rem;
    font-weight: 600;
}

.cn-date {
    font-size: 0.75rem;
    color: var(--muted);
}

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.changelog-item {
    padding: 1.75rem 1.75rem 1.5rem;
    scroll-margin-top: 6.5rem;
}

.changelog-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px dashed #e5e6eb;
}

.changelog-item-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

.version-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--shadow-btn);
}

.channel-tag {
    padding: 0.1875rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.channel-stable {
    background: rgba(0, 180, 42, 0.1);
    color: #00b42a;
}

.channel-beta {
    background: rgba(255, 125, 0, 0.12);
    color: #ff7d00;
}

.latest-tag {
    padding: 0.1875rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(22, 93, 255, 0.1);
    color: var(--primary);
}

.changelog-date {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--muted);
    font-size: 0.9375rem;
}

/* 渲染后的 Markdown 更新内容 */
.release-notes {
    color: var(--neutral);
    font-size: 1rem;
    line-height: 1.75;
    word-break: break-word;
}

.release-notes > :first-child {
    margin-top: 0;
}

.release-notes > :last-child {
    margin-bottom: 0;
}

.release-notes h1,
.release-notes h2,
.release-notes h3,
.release-notes h4,
.release-notes h5 {
    color: var(--dark);
    font-weight: 700;
    line-height: 1.35;
    margin: 1.75rem 0 0.875rem;
}

.release-notes h1 {
    font-size: 1.5rem;
}

.release-notes h2 {
    font-size: 1.3125rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--primary);
}

.release-notes h3 {
    font-size: 1.125rem;
}

.release-notes h4,
.release-notes h5 {
    font-size: 1rem;
}

.release-notes p {
    margin: 0.75rem 0;
}

.release-notes ul,
.release-notes ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.release-notes li {
    margin: 0.375rem 0;
}

.release-notes li::marker {
    color: var(--primary);
}

.release-notes input[type="checkbox"] {
    margin-right: 0.375rem;
}

.release-notes a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(22, 93, 255, 0.3);
}

.release-notes a:hover {
    border-bottom-color: var(--primary);
}

.release-notes strong {
    color: var(--dark);
    font-weight: 600;
}

.release-notes em {
    color: var(--neutral);
}

.release-notes code {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    background: rgba(22, 93, 255, 0.08);
    color: var(--primary);
    font-family: "JetBrains Mono", Consolas, Monaco, monospace;
    font-size: 0.875em;
}

.release-notes pre {
    margin: 1rem 0;
    padding: 1rem 1.125rem;
    border-radius: 0.5rem;
    background: var(--dark);
    overflow-x: auto;
}

.release-notes pre code {
    padding: 0;
    background: none;
    color: #e5e6eb;
    font-size: 0.875rem;
    line-height: 1.6;
}

.release-notes blockquote {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-left: 3px solid var(--accent);
    background: rgba(22, 93, 255, 0.04);
    border-radius: 0 0.375rem 0.375rem 0;
}

.release-notes blockquote p {
    margin: 0;
}

.release-notes hr {
    border: 0;
    border-top: 1px solid #e5e6eb;
    margin: 1.5rem 0;
}

.release-notes img {
    max-width: 100%;
    border-radius: 0.5rem;
}

.release-notes table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9375rem;
}

.release-notes th,
.release-notes td {
    border: 1px solid #e5e6eb;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.release-notes th {
    background: #f7f8fa;
    font-weight: 600;
}

.notes-empty {
    color: var(--muted);
    margin: 0;
}

/* 版本下载入口 */
.changelog-downloads {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #e5e6eb;
}

.cd-label {
    font-size: 0.875rem;
    color: var(--muted);
}

.cd-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(22, 93, 255, 0.2);
    background: rgba(22, 93, 255, 0.04);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.cd-chip:hover {
    background: rgba(22, 93, 255, 0.1);
    box-shadow: var(--shadow-glass);
}

.cd-name {
    font-weight: 600;
}

.cd-meta {
    color: var(--muted);
    font-size: 0.75rem;
}

/* 空状态 */
.changelog-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 4rem 2rem;
    text-align: center;
}

.changelog-empty i {
    font-size: 2.5rem;
    color: var(--muted);
}

.changelog-empty p {
    margin: 0;
    color: var(--muted);
}

/* 导航当前项高亮 */
.nav-links a.active {
    color: var(--primary);
}
