:root {
    --bg: #0a0b0e;
    --text: #f1f2f4;
    --muted: #9a9da6;
    --dim: #7f838c;
    --gold: #ecd6a5;
    --orange: #ff7351;
    --green: #4dd67f;
    --panel: rgba(28, 29, 31, 0.88);
    --border: rgba(255, 255, 255, 0.075);
    --radius: 15px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: transparent;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: #0a0b0e;
}

.bg__img {
    position: absolute;
    inset: -9%;
    background: url("/assets/bg.jpg") center / cover no-repeat;
    filter: blur(34px) brightness(1.45) saturate(0.92);
    transform: scale(1.04);
}

.bg__veil {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(92% 78% at 50% 8%, rgba(72, 76, 94, 0.05), rgba(10, 11, 15, 0.35) 58%, rgba(7, 8, 11, 0.65) 100%),
        linear-gradient(180deg, rgba(7, 8, 11, 0.16), rgba(7, 8, 11, 0.42));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(8, 9, 12, 0.84);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.topbar__inner {
    display: flex;
    align-items: center;
    max-width: 1180px;
    height: 54px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.88);
}

.brand img {
    display: block;
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 0 9px rgba(225, 25, 76, 0.28));
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.hero {
    padding: 52px 0 6px;
    text-align: center;
}

.lockup {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.lockup__mark {
    display: block;
    width: 92px;
    height: 92px;
    filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.45));
}

.lockup__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.lockup__name {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: 0.4px;
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.35);
}

.lockup__cn {
    margin-left: 2px;
}

.lockup__sub {
    padding-left: 2px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 5.6px;
    color: rgba(255, 255, 255, 0.4);
}

.hero__title {
    margin: 24px 0 0;
    font-size: clamp(30px, 3.4vw, 42px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 4px;
    text-shadow: 0 4px 26px rgba(0, 0, 0, 0.5);
}

.hero__sub {
    margin: 10px 0 0;
    font-size: 13px;
    letter-spacing: 1px;
    color: rgba(226, 229, 236, 0.62);
}

.downloads {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    max-width: 1040px;
    margin: 32px auto 0;
}

.dl-card {
    display: flex;
    flex: 1 1 420px;
    align-items: center;
    gap: 14px;
    max-width: 513px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(40, 41, 44, 0.9), rgba(27, 28, 31, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.downloads--single .dl-card {
    flex-basis: 560px;
    max-width: 560px;
}

.dl-card__icon {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    color: #cbd3df;
}

.dl-card__icon svg {
    width: 22px;
    height: 22px;
}

.dl-card__icon--windows {
    color: #8db6ff;
    background: rgba(105, 150, 235, 0.11);
    border-color: rgba(120, 165, 245, 0.16);
}

.dl-card__icon--android {
    color: #7fe0a4;
    background: rgba(80, 200, 130, 0.1);
    border-color: rgba(90, 215, 140, 0.16);
}

.dl-card__icon--ios,
.dl-card__icon--macos {
    color: #e8eaee;
}

.dl-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.dl-card__desc {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #e9ebef;
}

.dl-card__ver {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 2px 8px;
    border: 1px solid rgba(63, 206, 126, 0.24);
    border-radius: 999px;
    background: rgba(46, 190, 113, 0.1);
    font-size: 10.5px;
    letter-spacing: 0.3px;
    color: #67e69a;
    white-space: nowrap;
}

.dl-card__ver::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn:focus-visible,
a:focus-visible {
    outline: 2px solid rgba(120, 205, 155, 0.75);
    outline-offset: 2px;
}

.btn-download {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 15px;
    border: 1px solid rgba(126, 240, 170, 0.45);
    background: linear-gradient(180deg, #38c977, #24a45e);
    box-shadow: 0 8px 20px rgba(35, 175, 100, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 12.5px;
}

.btn-download svg {
    width: 15px;
    height: 15px;
}

.btn-download:hover {
    background: linear-gradient(180deg, #43d484, #2ab268);
}

.btn-download:active {
    transform: translateY(1px);
}

.lines {
    margin-top: 24px;
}

.lines__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.lines__empty {
    margin: 40px 0;
    text-align: center;
    color: var(--muted);
}

.line-card {
    display: flex;
    flex-direction: column;
    padding: 15px 16px 14px;
    background: linear-gradient(180deg, rgba(36, 37, 39, 0.9), rgba(24, 25, 27, 0.93));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.line-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.line-card--off:hover {
    transform: none;
}

.line-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.line-card__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.5px;
}

.badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
}

.badge__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge--ok {
    border: 1px solid rgba(70, 210, 130, 0.28);
    background: rgba(41, 180, 102, 0.12);
    color: #63e293;
}

.badge--ok .badge__dot {
    box-shadow: 0 0 6px rgba(99, 226, 147, 0.8);
}

.badge--off {
    border: 1px solid rgba(240, 90, 90, 0.3);
    background: rgba(220, 70, 70, 0.12);
    color: #ff8282;
}

.line-card__note {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #8f939c;
}

.line-card__meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    min-width: 0;
    font-size: 12.5px;
}

.line-card__host {
    overflow: hidden;
    max-width: 58%;
    color: var(--gold);
    letter-spacing: 0.2px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-card__state {
    flex: 0 0 auto;
    font-size: 11.5px;
    color: #4dd67f;
}

.line-card--off .line-card__state {
    color: #ff8282;
}

.line-card__latency {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--orange);
    white-space: nowrap;
}

.line-card__latency[data-state="pending"] {
    font-weight: 500;
    color: #858a93;
}

.line-card__latency[data-state="slow"] {
    color: #ff5f3d;
}

.line-card__latency[data-state="fail"] {
    font-weight: 500;
    color: #cf7474;
}

.line-card__actions {
    display: flex;
    gap: 9px;
    margin-top: 14px;
}

.btn-test {
    flex: 0 0 72px;
    height: 33px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.015);
    color: #d9dbe1;
    font-size: 12.5px;
    font-weight: 500;
}

.btn-test:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
}

.btn-test:disabled {
    color: #7d818a;
    cursor: default;
}

.btn-enter {
    flex: 1 1 auto;
    height: 33px;
    border: 1px solid rgba(160, 190, 220, 0.22);
    background: linear-gradient(180deg, #60758a, #4d6074);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
    color: #fdfdfd;
    font-size: 12.5px;
}

.btn-enter:hover {
    background: linear-gradient(180deg, #6b8299, #566b81);
}

.btn-enter--off,
.btn-enter--off:hover {
    border-color: rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
    color: #6f737c;
    cursor: not-allowed;
}

.notice {
    max-width: 560px;
    margin: 34px auto 0;
    padding: 36px 28px 32px;
    text-align: center;
    background: rgba(28, 29, 32, 0.82);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3);
}

.notice__icon {
    display: inline-grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.045);
    color: #c9a0a0;
}

.notice__icon svg {
    width: 24px;
    height: 24px;
}

.notice__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.notice__text {
    margin: 7px 0 0;
    font-size: 12.5px;
    color: var(--dim);
}

/* 失败原因：给运维/站主看的一句话（DNS 失败 / SSL 证书 / HTTP 5xx 之类）。
   访客看到就是"服务不可用"，不影响观感；排查的时候不用去翻服务器日志。 */
.notice__reason {
    margin: 8px 0 0;
    padding: 7px 11px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--dim);
    word-break: break-all;
}

.btn-retry {
    height: 36px;
    margin-top: 20px;
    padding: 0 20px;
    border: 1px solid rgba(160, 190, 220, 0.22);
    background: linear-gradient(180deg, #60758a, #4d6074);
    color: #fff;
    font-size: 12.5px;
}

.btn-retry:hover {
    background: linear-gradient(180deg, #6b8299, #566b81);
}

.foot {
    margin-top: 44px;
    text-align: center;
    font-size: 11.5px;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.26);
}

@media (max-width: 1199px) {
    .lines__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 759px) {
    .topbar__inner {
        height: 50px;
        padding: 0 16px;
    }

    .page {
        padding: 0 16px 44px;
    }

    .hero {
        padding: 36px 0 4px;
    }

    .lockup {
        gap: 12px;
    }

    .lockup__mark {
        width: 68px;
        height: 68px;
    }

    .lockup__name {
        font-size: 27px;
    }

    .lockup__sub {
        font-size: 8px;
        letter-spacing: 4px;
    }

    .hero__title {
        margin-top: 18px;
        font-size: 30px;
        letter-spacing: 3px;
    }

    .hero__sub {
        margin-top: 8px;
        font-size: 12px;
    }

    .downloads {
        margin-top: 24px;
        gap: 12px;
    }

    .dl-card {
        flex-basis: 100%;
        max-width: none;
        flex-wrap: wrap;
        padding: 13px 14px;
    }

    .downloads--single .dl-card {
        flex-basis: 100%;
        max-width: none;
    }

    .dl-card__body {
        flex: 1 1 160px;
    }

    .dl-card__desc {
        font-size: 12.5px;
    }

    .btn-download {
        flex: 1 0 100%;
        height: 36px;
        margin-top: 2px;
        font-size: 12.5px;
    }

    .lines {
        margin-top: 18px;
    }

    .lines__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .line-card {
        padding: 14px;
    }

    .line-card__title {
        font-size: 16px;
    }

    .foot {
        margin-top: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .line-card,
    .btn {
        transition: none;
    }

    .line-card:hover {
        transform: none;
    }
}
