@charset "utf-8";

:root {
    --history-bg: #fdfeff;
    --history-ink: #00054f;
    --history-text: #465b75;
    --history-muted: #62758e;
    --history-blue: #0875fd;
    --history-line: #e4e9f0;
    --history-card: #f5fafe;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--history-bg);
}

body.upgrade-history-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--history-bg);
    color: var(--history-text);
    font-family: "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", "Heiti SC", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.upgrade-history-page a,
.upgrade-history-page button,
.upgrade-history-page select {
    font: inherit;
}

.upgrade-history-page a {
    text-decoration: none;
}

.upgrade-history-page svg {
    display: block;
}

.history-header {
    height: 90px;
    border-bottom: 1px solid #e3eaf5;
    background: var(--history-bg);
}

.history-header__inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.history-back {
    position: absolute;
    top: 50%;
    left: 25px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
    color: #465b75;
    font-size: 15px;
    font-weight: 400;
    line-height: 20px;
    transform: translateY(-50%);
    transition: color 0.2s ease;
}

.history-back:hover {
    color: #0875fd;
}

.history-back svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.history-brand {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    transform: translate(-50%, -50%);
}

.history-brand img {
    display: block;
    width: 210px;
    height: auto;
}

.history-main {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 62px 0 145px;
}

.history-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.history-intro__copy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.history-intro__copy > div {
    transform: translateY(-8px);
}

.history-intro__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 50%;
    background: #f1f7fd;
    color: #0875fd;
}

.history-intro__icon svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: translateX(1px);
}

.history-intro h1 {
    margin: 0;
    color: var(--history-ink);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: 0;
}

.history-intro p {
    margin: 10px 0 0;
    color: var(--history-text);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.55;
}

.history-filter {
    position: relative;
    display: block;
    width: 140px;
    height: 50px;
    flex: 0 0 140px;
    margin-top: 7px;
}

.history-filter select {
    width: 100%;
    height: 100%;
    padding: 0 42px 0 20px;
    border: 1px solid #e5e9ef;
    border-radius: 12px;
    outline: none;
    appearance: none;
    background: #fff;
    color: #17233b;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.history-filter select:hover,
.history-filter select:focus {
    border-color: #b7d7fc;
    box-shadow: 0 2px 8px rgba(11, 111, 229, 0.08);
}

.history-filter__chevron {
    position: absolute;
    top: 50%;
    right: 18px;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #5d6f86;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transform: translateY(-50%);
}

.history-layout {
    display: grid;
    grid-template-columns: 329px minmax(0, 1fr);
    column-gap: 81px;
    margin-top: 49px;
}

.version-timeline {
    position: relative;
    min-width: 0;
    transform: translateY(-9px);
}

.version-timeline::before {
    position: absolute;
    top: 34px;
    bottom: 3px;
    left: 48px;
    width: 1px;
    background: var(--history-line);
    content: "";
}

.version-list {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    list-style: none;
}

.version-item {
    position: relative;
    height: 123px;
}

.version-item[hidden] {
    display: none;
}

.version-item > a {
    position: relative;
    display: block;
    width: 316px;
    height: 100%;
    margin-left: 13px;
    padding-left: 72px;
    color: inherit;
    border-radius: 16px;
}

.version-item.is-selected > a {
    height: 110px;
    margin-top: 0;
    margin-bottom: -10px;
    background: linear-gradient(90deg, #f4f9fe 0%, #f5f9fe 62%, #f8fbff 100%);
}

.version-item > a:hover {
    background: #f8fbff;
}

.version-item.is-selected > a:hover {
    background: linear-gradient(90deg, #f1f8fe 0%, #f7fbff 58%, #fafeff 100%);
}

.version-item__dot {
    position: absolute;
    top: calc(50% - 15px);
    left: 35px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #aab2c8;
    transform: translate(-50%, -50%);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.version-item.is-selected .version-item__dot {
    width: 13px;
    height: 13px;
    background: #0a78fc;
    box-shadow: none;
}

.version-item > a:hover .version-item__dot {
    background: #8094ae;
}

.version-item.is-selected > a:hover .version-item__dot {
    background: #0a78fc;
}

.version-item__content {
    position: absolute;
    top: 50%;
    left: 73.5px;
    display: block;
    transform: translateY(-50%);
}

.version-item__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 28px;
    white-space: nowrap;
}

.version-item__heading strong {
    color: #3d3e52;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.version-item.is-selected .version-item__heading {
    gap: 22px;
}

.version-item.is-selected .version-item__heading strong,
.version-item.is-selected time {
    color: #0844d5;
}

.version-item.is-selected .version-item__heading strong {
    font-size: 22px;
}

.version-item.is-selected time {
    color: #0673fd;
}

.version-item time {
    display: block;
    margin-top: 8px;
    color: var(--history-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.version-badge--latest {
    background: #e2faee;
    color: #19c571;
}

.version-badge--current {
    background: #f6f7f9;
    color: #536075;
}

.version-badge[hidden] {
    display: none;
}

.version-empty {
    margin: 0 0 0 13px;
    padding: 32px;
    border: 1px dashed #dbe5f2;
    border-radius: 16px;
    color: var(--history-muted);
    text-align: center;
}

.version-empty[hidden] {
    display: none;
}

.release-notes {
    position: relative;
    width: 100%;
    max-width: 689px;
    min-width: 0;
    margin-top: 0;
    scroll-margin-top: 24px;
}

.release-meta {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    height: 112px;
    gap: 36px;
    padding-top: 31px;
}

.release-meta__title {
    min-width: 0;
    transform: translateX(1.5px);
}

.release-meta__heading {
    display: flex;
    align-items: center;
    gap: 40px;
    min-height: 39px;
}

.release-meta__heading h2 {
    margin: 0;
    color: #3d3e52;
    font-size: 33px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
}

.release-meta__title > time {
    display: block;
    margin-top: 8px;
    color: #727fa2;
    font-size: 18px;
    line-height: 1.5;
}

.release-download {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 274px;
    padding-top: 9px;
}

.release-download > span {
    color: var(--history-muted);
    font-size: 14px;
    line-height: 1;
}

.release-download__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 156px;
    height: 49px;
    border: 1.5px solid #6aafff;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 0 0 1px rgba(0, 140, 255, 0.08), 0 1px 2px rgba(71, 151, 255, 0.1);
    color: #008cff;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.release-download__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
}

.release-download__links .release-download__button {
    width: auto;
    min-width: 128px;
    padding: 0 18px;
}

.release-download__button:hover {
    border-color: #4b9dff;
    background: #f4f9ff;
    box-shadow: 0 3px 9px rgba(27, 119, 235, 0.14);
    color: #007ee8;
}

.release-download__button:active {
    transform: translateY(1px);
}

.release-download__button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.release-sections {
    margin-top: 32px;
}

.release-section {
    position: relative;
    height: 163px;
    margin-bottom: 30px;
    padding-top: 18px;
}

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

.release-section::before {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 294px;
    border-radius: 32px 0 0 32px;
    content: "";
    pointer-events: none;
}

.release-section--new::before {
    background: linear-gradient(90deg, rgba(250, 249, 255, 0.35) 0%, #f9f8ff 42%, #f9f8ff 100%);
}

.release-section--optimized::before {
    background: linear-gradient(90deg, rgba(248, 252, 255, 0.25) 0%, #f7fbff 42%, #f7fbff 100%);
}

.release-section--fixed::before {
    background: linear-gradient(90deg, rgba(250, 255, 251, 0.25) 0%, #f9fffb 42%, #f9fffb 100%);
}

.release-section__heading,
.release-list {
    position: relative;
    z-index: 1;
}

.release-section__heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.release-section__heading h3 {
    margin: 0;
    color: #3d3e52;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
}

.release-section__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
}

.release-section__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.release-section--new .release-section__icon {
    background: #f2f0fd;
    color: #5c4ffe;
}

.release-section--new .release-section__icon svg {
    transform: translateX(1px);
}

.release-section--optimized .release-section__icon {
    background: #ebf7ff;
    color: #198fff;
}

.release-section--fixed .release-section__icon {
    background: #e6faee;
    color: #19c571;
}

.release-list {
    margin: 7px 0 0;
    padding: 0;
    list-style: none;
}

.release-list li {
    position: relative;
    padding-left: 28px;
    color: var(--history-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
}

.release-list li::before {
    position: absolute;
    top: 11px;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.release-section--new .release-list {
    color: #6558db;
}

.release-section--optimized .release-list {
    color: #148de8;
}

.release-section--fixed .release-list {
    color: #20ae5c;
}

.release-list li {
    color: var(--history-text);
}

@media (max-width: 1199px) {
    .history-main {
        width: auto;
        max-width: none;
        margin: 0 40px;
    }

    .history-layout {
        grid-template-columns: 310px minmax(0, 1fr);
        column-gap: 56px;
    }

    .version-item > a {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .history-main {
        margin: 0 24px;
        padding-top: 48px;
    }

    .history-intro {
        align-items: center;
    }

    .history-intro__icon {
        width: 62px;
        height: 62px;
        flex-basis: 62px;
    }

    .history-intro__icon svg {
        width: 34px;
        height: 34px;
    }

    .history-intro h1 {
        font-size: 30px;
    }

    .history-intro p {
        font-size: 16px;
    }

    .history-layout {
        display: block;
        margin-top: 42px;
    }

    .version-timeline {
        transform: none;
    }

    .version-timeline::before {
        left: 44px;
    }

    .version-item > a {
        margin-left: 9px;
        padding-left: 68px;
    }

    .version-item__dot {
        left: 35px;
    }

    .version-item__content {
        left: 68px;
    }

    .release-notes {
        max-width: none;
        margin-top: 74px;
    }

    .release-section::before {
        left: 32%;
    }
}

@media (max-width: 640px) {
    .history-header {
        height: 74px;
    }

    .history-back {
        left: 12px;
        gap: 1px;
        font-size: 13px;
    }

    .history-back svg {
        width: 20px;
        height: 20px;
    }

    .history-brand img {
        width: 132px;
    }

    .history-main {
        margin: 0 16px;
        padding: 34px 0 72px;
    }

    .history-intro {
        display: block;
    }

    .history-intro__copy {
        gap: 10px;
    }

    .history-intro__copy > div {
        min-width: 0;
    }

    .history-intro p {
        overflow-wrap: anywhere;
    }

    .history-intro__icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .history-intro__icon svg {
        width: 28px;
        height: 28px;
    }

    .history-intro h1 {
        font-size: 26px;
    }

    .history-intro p {
        margin-top: 10px;
        font-size: 14px;
        line-height: 1.5;
    }

    .history-filter {
        width: 100%;
        max-width: 100%;
        flex-basis: auto;
        margin-top: 22px;
    }

    .history-filter select {
        min-width: 0;
    }

    .history-layout {
        margin-top: 34px;
    }

    .version-item {
        height: 94px;
    }

    .version-item > a {
        margin-left: 0;
        padding-left: 62px;
    }

    .version-item.is-selected > a {
        height: 104px;
        margin-top: 0;
        margin-bottom: -10px;
    }

    .version-item__dot {
        top: calc(50% - 14px);
        left: 30px;
    }

    .version-timeline::before {
        left: 39px;
    }

    .version-item__content {
        left: 62px;
    }

    .version-item__heading {
        gap: 8px;
    }

    .version-item__heading strong {
        font-size: 18px;
    }

    .version-item time {
        margin-top: 6px;
        font-size: 14px;
    }

    .version-badge {
        height: 24px;
        padding: 0 8px;
        font-size: 11px;
    }

    .release-notes {
        width: 100%;
        max-width: 100%;
        margin-top: 60px;
    }

    .release-meta {
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        flex-direction: column;
        gap: 24px;
    }

    .release-meta__heading h2 {
        font-size: 27px;
    }

    .release-meta__title,
    .release-sections,
    .release-download {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .release-meta__title > time {
        font-size: 16px;
    }

    .release-download {
        width: 100%;
        flex-basis: auto;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .release-download__button {
        width: 146px;
        height: 46px;
        font-size: 16px;
    }

    .release-download__links {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .release-download__links .release-download__button {
        min-width: 132px;
        padding: 0 16px;
    }

    .release-sections {
        margin-top: 48px;
    }

    .release-section {
        height: auto;
        min-height: 0;
        margin-bottom: 42px;
        padding: 0;
    }

    .release-section::before {
        right: -16px;
        left: 24%;
    }

    .release-section__heading {
        gap: 13px;
    }

    .release-section__icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .release-section__icon svg {
        width: 23px;
        height: 23px;
    }

    .release-section__heading h3 {
        font-size: 18px;
    }

    .release-list {
        margin-top: 20px;
    }

    .release-list li {
        padding-left: 25px;
        font-size: 14px;
        line-height: 25px;
    }

    .release-list li::before {
        top: 10px;
    }
}
