:root {
    color-scheme: dark;
    --bg: #000000;
    --bg-elevated: #080808;
    --surface: rgba(255, 255, 255, 0.075);
    --surface-soft: rgba(255, 255, 255, 0.055);
    --surface-strong: rgba(255, 255, 255, 0.12);
    --surface-panel: rgba(0, 0, 0, 0.78);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.74);
    --subtle: rgba(255, 255, 255, 0.52);
    --line: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 255, 255, 0.22);
    --brand: #ffc91a;
    --brand-pressed: #e7b300;
    --on-brand: #000000;
    --success: #38e8b0;
    --purple: #7367f0;
    --pink: #ff5fa2;
    --warning-bg: rgba(255, 201, 26, 0.12);
    --warning-text: #ffd84a;
    --shadow: rgba(0, 0, 0, 0.48);
}

* {
    box-sizing: border-box;
    min-width: 0;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg);
}

body {
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -8%, rgba(255, 201, 26, 0.20), rgba(0, 0, 0, 0) 34%),
        linear-gradient(180deg, #090909 0, var(--bg) 360px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.72;
}

a {
    color: var(--brand);
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}

a:hover {
    color: #ffe37a;
    text-decoration: underline;
}

.page {
    width: min(100%, 960px);
    max-width: 100%;
    margin: 0 auto;
    padding: 28px 18px 44px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0 28px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--text);
    font-weight: 900;
}

.brand small {
    color: var(--subtle);
    font-size: 13px;
    font-weight: 700;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
}

.nav a,
.footer-links a {
    color: var(--muted);
}

.nav a:hover,
.footer-links a:hover {
    color: var(--brand);
}

.lang-switch {
    display: inline-flex;
    max-width: 100%;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-strong);
}

.lang-switch button {
    min-width: 44px;
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.lang-switch button:hover {
    color: var(--text);
}

.lang-switch button[aria-pressed="true"] {
    background: var(--brand);
    color: var(--on-brand);
}

.i18n,
.lang-content {
    display: none;
}

html[data-active-lang="en"] .i18n[data-lang="en"],
html[data-active-lang="zh"] .i18n[data-lang="zh"] {
    display: inline;
}

html[data-active-lang="en"] .lang-content[data-lang="en"],
html[data-active-lang="zh"] .lang-content[data-lang="zh"] {
    display: block;
}

.hero,
.card,
.doc {
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 22px 60px var(--shadow);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 5vw, 48px);
}

.hero::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 201, 26, 0.62), rgba(56, 232, 176, 0.18), rgba(255, 95, 162, 0.16));
    content: "";
    -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;
    pointer-events: none;
}

.hero h1 {
    margin: 0 0 14px;
    max-width: 760px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.14;
    letter-spacing: 0;
}

.hero p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
}

.actions,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    min-height: 44px;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 20px;
    background: var(--brand);
    color: var(--on-brand);
    font-weight: 900;
    overflow-wrap: anywhere;
    text-align: center;
}

.button:hover {
    background: #ffdd55;
    color: var(--on-brand);
    text-decoration: none;
}

.button.secondary {
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
}

.button.secondary:hover {
    border-color: rgba(255, 201, 26, 0.62);
    color: var(--brand);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.two-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    padding: 22px;
}

.card h2,
.card h3 {
    margin-top: 0;
}

.card p {
    color: var(--muted);
}

.doc {
    margin-top: 18px;
    padding: clamp(22px, 4vw, 42px);
}

.doc h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 5vw, 40px);
    line-height: 1.18;
    letter-spacing: 0;
}

.doc h2 {
    margin: 32px 0 10px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 22px;
}

.doc h3 {
    margin-top: 24px;
    font-size: 18px;
}

.doc p,
.doc li {
    color: var(--muted);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.doc ul,
.doc ol {
    max-width: 100%;
    padding-left: 1.35rem;
}

.meta {
    margin: 8px 0 28px;
    color: var(--subtle);
    font-size: 14px;
}

.notice {
    margin: 22px 0;
    padding: 14px 16px;
    border-left: 4px solid var(--brand);
    border-radius: 12px;
    background: var(--warning-bg);
    color: rgba(255, 255, 255, 0.86);
}

.warning {
    border-left-color: var(--brand);
    background: linear-gradient(135deg, rgba(255, 201, 26, 0.14), rgba(255, 95, 162, 0.08));
    color: var(--warning-text);
}

.kicker {
    margin: 0 0 8px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    background: var(--surface-strong);
    color: var(--brand);
}

tr:last-child td {
    border-bottom: 0;
}

.footer {
    max-width: 100%;
    margin-top: 28px;
    color: var(--subtle);
    font-size: 13px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

@media (max-width: 720px) {
    .page {
        padding: 22px 18px 40px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        align-items: flex-start;
        flex-direction: column;
        width: 100%;
    }

    .nav {
        width: 100%;
    }

    .grid,
    .two-grid {
        grid-template-columns: 1fr;
    }

    .hero p {
        font-size: 16px;
    }

    .actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    table {
        min-width: 0;
        table-layout: fixed;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .page {
        padding-right: 14px;
        padding-left: 14px;
    }

    .doc,
    .card,
    .hero {
        border-radius: 16px;
    }

    .doc {
        padding: 22px;
    }

    .doc h2 {
        font-size: 21px;
    }
}
