@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/manrope-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/manrope-latin.woff2") format("woff2");
}

:root {
    --bg-color: #ffffff;
    --text-color: #1d1d1f;
    --sub-text: #86868b;
    --accent-color: #0071e3;
    --card-bg: #f5f5f7;
    --card-border: rgba(0, 0, 0, 0.06);
    --footer-icon-filter: brightness(0) saturate(100%);
    --header-bg: rgba(255, 255, 255, 0.86);
    --header-line: rgba(0, 0, 0, 0.08);
    --header-line-strong: rgba(0, 0, 0, 0.12);
    --header-text: #1d1d1f;
    --header-text-soft: rgba(29, 29, 31, 0.62);
    --release-line: rgba(0, 0, 0, 0.08);
    --version-border: #9fadc0;
    --version-text: #29305d;
    --body-text: #50506a;
    --features-bg: #eaedff;
    --features-text: #657dff;
    --improvements-bg: #ffe8e8;
    --improvements-text: #f65050;
    --fixes-bg: #f4efe4;
    --fixes-text: #ac9562;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 40px), 1160px);
    z-index: 30;
}

.site-header .container {
    border: 1px solid var(--header-line);
    background: var(--header-bg);
    border-radius: 18px;
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    min-height: 56px;
    padding: 0 10px;
    position: relative;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 8px;
}

.brand-wordmark {
    width: 53px;
    opacity: 0.96;
}

.top-nav {
    display: inline-flex;
    align-items: center;
    gap: 45px;
    justify-self: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.top-nav a {
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: var(--header-text-soft);
}

.top-nav a:hover {
    color: var(--header-text);
}

.top-nav a.is-active {
    color: var(--header-text);
    font-weight: 500;
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 26px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding-right: 10px;
}

.mobile-menu {
    display: none;
    position: relative;
    justify-self: end;
}

.mobile-menu summary {
    list-style: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--header-line);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.mobile-menu summary::-webkit-details-marker {
    display: none;
}

.mobile-menu summary span,
.mobile-menu summary::before,
.mobile-menu summary::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 1.5px;
    border-radius: 999px;
    background: var(--header-text);
}

.mobile-menu summary::before {
    transform: translateY(-5px);
}

.mobile-menu summary::after {
    transform: translateY(5px);
}

.mobile-menu[open] summary span {
    opacity: 0;
}

.mobile-menu[open] summary::before {
    transform: rotate(45deg);
}

.mobile-menu[open] summary::after {
    transform: rotate(-45deg);
}

.mobile-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--header-line);
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    display: grid;
    gap: 4px;
}

.mobile-menu-panel a {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--header-text);
}

.mobile-menu-panel a:hover {
    background: rgba(0, 113, 227, 0.08);
}

.mobile-menu-panel a.is-active {
    color: var(--header-text);
    background: rgba(0, 113, 227, 0.1);
}

.language-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.static-lang {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--header-text-soft);
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.static-lang:hover {
    color: var(--header-text);
}

.static-lang svg {
    width: 14.4px;
    height: 14.4px;
    opacity: 0.85;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
    padding: 6px;
    border: 1px solid var(--header-line);
    border-radius: 14px;
    background-color: var(--card-bg);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.lang-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 12px;
}

.language-picker:hover .lang-menu,
.language-picker:focus-within .lang-menu,
.language-picker.is-open .lang-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.lang-option:hover {
    background-color: rgba(0, 113, 227, 0.08);
}

.lang-option.is-active {
    color: var(--accent-color);
    background-color: rgba(0, 113, 227, 0.1);
}

.lang-option.is-active::after {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 999px;
    background-color: currentColor;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.button img {
    width: 14.04px;
    height: 18.11px;
}

.site-header .button {
    min-width: 120px;
    padding: 0 16px;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC",
        "PingFang TC", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Apple SD Gothic Neo",
        "Noto Sans SC", "Noto Sans TC", "Noto Sans KR", sans-serif;
}

.button-primary {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(78, 135, 255, 0.32);
}

.button-primary::before {
    content: none;
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));
    pointer-events: none;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.button-primary::after {
    content: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: url("image/btn-hightlight.png") center / 100% 100% no-repeat;
    pointer-events: none;
}

.button-primary > img,
.button-primary > span {
    position: relative;
    z-index: 2;
}

.site-header .button-primary {
    box-shadow: none;
}

.page {
    padding: 132px 0 60px;
}

.page-shell {
    width: min(calc(100% - 40px), 800px);
    margin: 0 auto;
}

.changelog-list {
    display: grid;
}

.release {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    column-gap: 70px;
    padding: 26px 0 40px;
}

.release-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0;
}

.version-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 30px;
    padding: 0 16px;
    border: 1px solid var(--version-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--version-text);
    font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Monaco, monospace;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0.04em;
}

.release-date {
    display: inline-block;
    margin-top: 12px;
    color: var(--sub-text);
    font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Monaco, monospace;
    font-size: 12px;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

body[data-lang="zh"] .release-date,
body[data-lang="zh-hant"] .release-date,
body[data-lang="ja"] .release-date,
body[data-lang="ko"] .release-date {
    letter-spacing: 0.02em;
}

.release-body {
    display: grid;
    gap: 26px;
    width: 100%;
    max-width: 600px;
}

.release + .release {
    margin-top: 94px;
}

.release + .release .release-body {
    position: relative;
}

.release + .release .release-body::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -80px;
    border-top: 1px solid var(--release-line);
}

.change-section {
    display: grid;
    gap: 14px;
}

.category-badge {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    line-height: 24px;
}

body[data-lang="en"] .category-badge,
body[data-lang="en"] .change-list li {
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.category-badge.features {
    background: var(--features-bg);
    color: var(--features-text);
}

.category-badge.improvements {
    background: var(--improvements-bg);
    color: var(--improvements-text);
}

.category-badge.fixes {
    background: var(--fixes-bg);
    color: var(--fixes-text);
}

.change-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.change-list li {
    position: relative;
    padding-left: 18px;
    color: var(--body-text);
    font-size: 15px;
    line-height: 1.56;
}

.change-list li::before {
    content: "";
    position: absolute;
    top: calc(0.72em - 2px);
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.change-section[data-type="features"] .change-list li::before {
    color: var(--features-text);
}

.change-section[data-type="improvements"] .change-list li::before {
    color: #a4acb7;
}

.change-section[data-type="fixes"] .change-list li::before {
    color: #b9aa83;
}

.empty,
.error {
    padding: 24px;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    color: var(--sub-text);
    background: #fafafa;
    font-size: 15px;
    line-height: 1.6;
}

footer {
    width: 100%;
    padding: 0;
}

footer .container {
    width: min(calc(100% - 40px), 1160px);
    margin: 0 auto;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--card-border);
    padding: 36px 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--sub-text);
}

.footer-links {
    display: inline-flex;
    align-items: center;
    gap: 30px;
}

.footer-links .icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: -12px;
    opacity: 0.5;
}

.footer-links .icon-link img {
    width: 16px;
    height: 16px;
    filter: var(--footer-icon-filter);
}

.footer-links a:hover {
    color: var(--text-color);
}

.footer-links .icon-link:hover {
    opacity: 0.7;
}

@media (max-width: 1024px) {
    .site-header {
        width: min(calc(100% - 28px), 1160px);
    }

    footer .container,
    .page-shell {
        width: min(calc(100% - 28px), 800px);
    }

    .site-header .container {
        gap: 16px;
        padding: 10px 12px;
    }

    .top-nav {
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .site-header {
        width: min(calc(100% - 20px), 1160px);
    }

    footer .container,
    .page-shell {
        width: min(calc(100% - 20px), 800px);
    }

    .site-header .container {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 10px 10px 12px;
    }

    .top-nav {
        display: none;
    }

    .mobile-menu {
        display: block;
        order: 3;
        margin-left: 12px;
    }

    .header-actions {
        position: static;
        transform: none;
        margin-left: auto;
        padding-right: 0;
        gap: 0;
        order: 2;
    }

    .header-actions .button {
        display: none;
    }

    .page {
        padding-top: 126px;
    }

    .release {
        grid-template-columns: 1fr;
        row-gap: 18px;
        padding: 24px 0 32px;
    }

    .release + .release {
        margin-top: 24px;
    }

    .release-body {
        gap: 22px;
    }

    .release + .release .release-body::before {
        top: -24px;
    }
}

@media (max-width: 520px) {
    .site-header .container {
        gap: 10px;
    }

    .brand-wordmark {
        width: 50px;
    }

    .brand-mark {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .static-lang {
        font-size: 11px;
    }

    .page {
        padding-bottom: 46px;
    }

    .release {
        row-gap: 14px;
    }

    .change-list li {
        font-size: 14px;
    }

    .footer-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer-links .icon-link {
        margin-left: 0;
    }
}
