:root {
    color-scheme: dark;
    --bg: #05070a;
    --card: rgba(13, 18, 24, 0.86);
    --card-strong: #0d1319;
    --text: #f7fbff;
    --muted: #8f9ea9;
    --line: rgba(229, 239, 248, 0.13);
    --primary: #66ff9d;
    --cyan: #42d8ff;
    --silver: #dce5ee;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
    --metal: linear-gradient(135deg, #ffffff 0%, #7f8d9d 18%, #edf4fb 38%, #586775 59%, #f8fbff 78%, #91a0af 100%);
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f7f9;
    --card: rgba(255, 255, 255, 0.9);
    --card-strong: #ffffff;
    --text: #0d171d;
    --muted: #60717d;
    --line: rgba(18, 35, 46, 0.13);
    --primary: #0aae63;
    --cyan: #007fb4;
    --silver: #21313d;
    --shadow: 0 24px 70px rgba(22, 38, 48, 0.16);
    --metal: linear-gradient(135deg, #0b1520 0%, #708293 20%, #172633 38%, #c4ced8 58%, #253543 78%, #8798a8 100%);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 72% 4%, color-mix(in srgb, var(--cyan) 22%, transparent), transparent 30%),
        radial-gradient(circle at 16% 16%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
    text-rendering: geometricPrecision;
}

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

.h5-shell {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
    overflow-x: hidden;
}

.h5-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(20px) saturate(135%);
}

.h5-brand img {
    display: block;
    width: 52px;
    height: auto;
}

.h5-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.h5-brand span {
    display: grid;
    gap: 1px;
}

.h5-brand b {
    background: var(--metal);
    color: transparent;
    font-size: 17px;
    font-weight: 920;
    line-height: 1;
    -webkit-background-clip: text;
    background-clip: text;
}

.h5-brand small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 860;
    letter-spacing: 0;
}

.h5-actions-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 36px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
}

.lang-switch button {
    min-width: 34px;
    min-height: 28px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
}

.lang-switch button.is-active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 24%, transparent), color-mix(in srgb, var(--cyan) 20%, transparent));
    color: var(--text);
}

.h5-theme {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
}

.h5-theme span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--metal);
    box-shadow: 0 0 18px color-mix(in srgb, var(--primary) 45%, transparent);
}

.h5-main {
    width: min(100% - 28px, 480px);
    margin: 0 auto;
}

.h5-hero {
    position: relative;
    min-height: 620px;
    padding: 34px 0 26px;
}

.h5-orbit {
    position: relative;
    display: grid;
    min-height: 300px;
    place-items: center;
    margin-bottom: 18px;
}

.h5-orbit::before {
    animation: h5Spin 16s linear infinite;
}

.h5-orbit::after {
    animation: h5SpinReverse 12s linear infinite;
}

.h5-orbit::before,
.h5-orbit::after {
    position: absolute;
    border: 1px solid color-mix(in srgb, var(--silver) 18%, transparent);
    border-radius: 50%;
    content: "";
}

.h5-orbit::before {
    width: 284px;
    height: 284px;
}

.h5-orbit::after {
    width: 205px;
    height: 205px;
    border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}

.h5-core {
    display: grid;
    position: relative;
    z-index: 2;
    width: 224px;
    height: 224px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--card-strong) 88%, transparent);
    overflow: hidden;
    box-shadow: inset 0 0 72px color-mix(in srgb, var(--primary) 16%, transparent), var(--shadow);
    animation: h5Float 4.6s ease-in-out infinite;
}

.h5-core img {
    width: 214px;
}

.h5-core::after {
    position: absolute;
    inset: -30%;
    background: linear-gradient(115deg, transparent 0 42%, rgba(255,255,255,0.22) 48%, transparent 55% 100%);
    content: "";
    animation: h5Sweep 3.5s ease-in-out infinite;
}

.h5-node {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--silver);
    font-size: 12px;
    font-weight: 900;
    box-shadow: var(--shadow);
}

.h5-node-a {
    top: 36px;
    left: 22px;
}

@keyframes h5Spin {
    to { transform: rotate(360deg); }
}

@keyframes h5SpinReverse {
    to { transform: rotate(-360deg); }
}

@keyframes h5Float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.025); }
}

@keyframes h5Sweep {
    0% { transform: translateX(-48%) rotate(-18deg); opacity: 0; }
    36% { opacity: 0.82; }
    72%, 100% { transform: translateX(48%) rotate(-18deg); opacity: 0; }
}

.h5-node-b {
    right: 14px;
    top: 88px;
}

.h5-node-c {
    right: 54px;
    bottom: 38px;
}

.h5-eyebrow,
.h5-kicker {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 14px;
    background: var(--metal);
    color: transparent;
    font-size: clamp(48px, 15vw, 68px);
    font-weight: 930;
    line-height: 0.92;
    letter-spacing: 0;
    -webkit-background-clip: text;
    background-clip: text;
}

.h5-lead,
.h5-card p {
    color: var(--muted);
    line-height: 1.72;
}

.h5-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
}

.h5-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 860;
}

.h5-btn-primary {
    border-color: color-mix(in srgb, var(--primary) 70%, transparent);
    background: linear-gradient(135deg, var(--primary), #dcffe7 48%, var(--cyan));
    color: #06100c;
}

.h5-btn-ghost {
    background: var(--card);
}

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

.h5-stats div,
.h5-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--silver) 8%, transparent), transparent 42%),
        var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(125%);
}

.h5-stats div {
    min-height: 82px;
    padding: 13px;
}

.h5-stats strong {
    display: block;
    color: var(--silver);
    font-size: 23px;
    line-height: 1;
}

.h5-stats span {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 12px;
}

.h5-card {
    margin: 14px 0;
    padding: 20px;
}

.h5-card h2 {
    margin-bottom: 12px;
    color: var(--silver);
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: 0;
}

.h5-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 18px;
}

.h5-mini-grid b,
.h5-list div {
    min-height: 44px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-strong) 74%, transparent);
}

.h5-mini-grid b {
    color: var(--silver);
    font-size: 13px;
}

.h5-list {
    display: grid;
    gap: 9px;
}

.h5-list b,
.h5-list span {
    display: block;
}

.h5-list b {
    color: var(--silver);
}

.h5-list span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

pre {
    margin: 16px 0;
    padding: 16px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-strong) 82%, transparent);
    color: var(--primary);
    font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.h5-inline-link {
    color: var(--primary);
    font-weight: 860;
}

.h5-security {
    margin-bottom: 22px;
}

.h5-tabbar {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-width: 480px;
    min-height: 58px;
    margin: 0 auto;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card-strong) 88%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(135%);
}

.h5-tabbar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 820;
}

.h5-tabbar a:active,
.h5-tabbar a:hover {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
}

@media (max-width: 360px) {
    .h5-brand img {
        width: 46px;
    }

    .h5-actions,
    .h5-mini-grid {
        grid-template-columns: 1fr;
    }

    .h5-stats {
        grid-template-columns: 1fr;
    }
}
