/* ============================================================
   星链接口 · 全局样式
   ============================================================ */

:root {
    --bg: #060a16;
    --bg-soft: #0a1022;
    --panel: rgba(17, 24, 46, .78);
    --panel-solid: #111830;
    --panel-2: rgba(23, 32, 60, .6);
    --border: rgba(125, 145, 205, .17);
    --border-strong: rgba(140, 160, 220, .3);
    --text: #e9edfa;
    --muted: #94a1c4;
    --muted-2: #6d7a9d;
    --primary: #7c6cff;
    --primary-2: #38d6ff;
    --primary-soft: rgba(124, 108, 255, .15);
    --green: #3ddc97;
    --green-soft: rgba(61, 220, 151, .12);
    --orange: #ffb454;
    --danger: #ff6b81;
    --danger-soft: rgba(255, 107, 129, .12);
    --gold: #ffd166;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .35);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::selection { background: rgba(124, 108, 255, .4); }

a { color: var(--primary-2); text-decoration: none; }
a:hover { color: #7fe2ff; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin-top: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

:focus-visible {
    outline: 2px solid rgba(56, 214, 255, .75);
    outline-offset: 2px;
}

/* 背景光效 */
.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(720px 520px at 8% -6%, rgba(124, 108, 255, .22), transparent 65%),
        radial-gradient(760px 540px at 96% 8%, rgba(56, 214, 255, .11), transparent 60%),
        radial-gradient(900px 620px at 50% 110%, rgba(83, 62, 190, .13), transparent 65%);
}

.bg-stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .55;
    background-image:
        radial-gradient(1px 1px at 22px 34px, rgba(255, 255, 255, .65), transparent),
        radial-gradient(1px 1px at 140px 110px, rgba(160, 200, 255, .5), transparent),
        radial-gradient(1.4px 1.4px at 260px 56px, rgba(255, 255, 255, .35), transparent),
        radial-gradient(1px 1px at 340px 210px, rgba(180, 160, 255, .45), transparent),
        radial-gradient(1px 1px at 80px 250px, rgba(255, 255, 255, .3), transparent),
        radial-gradient(1.2px 1.2px at 420px 140px, rgba(120, 220, 255, .4), transparent);
    background-size: 480px 320px;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .65) 60%, transparent);
}

/* 顶栏、主体、底部共用同一宽度，保证三者的左右边缘严格对齐 */
.container,
.site-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-main { min-height: 62vh; padding-bottom: 40px; }

/* ============================================================
   按钮
   ============================================================ */

.btn {
    --btn-bg: transparent;
    --btn-fg: var(--text);
    --btn-border: var(--border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 11px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; transform: none; }

.btn-primary {
    --btn-border: transparent;
    background: linear-gradient(120deg, #7c6cff, #5f8bff 55%, #38d6ff);
    box-shadow: 0 10px 30px rgba(103, 108, 255, .28);
    color: #fff;
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(103, 108, 255, .42); color: #fff; }

.btn-ghost {
    --btn-bg: rgba(255, 255, 255, .03);
    --btn-border: var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, .06); }

.btn-soft {
    background: var(--primary-soft);
    border-color: rgba(124, 108, 255, .25);
    color: #c8c0ff;
}
.btn-soft:hover { background: rgba(124, 108, 255, .24); color: #e1ddff; }

.btn-success {
    background: var(--green-soft);
    border-color: rgba(61, 220, 151, .28);
    color: var(--green);
}
.btn-success:hover { background: rgba(61, 220, 151, .2); color: #86f3c4; }

.btn-danger {
    background: var(--danger-soft);
    border-color: rgba(255, 107, 129, .25);
    color: var(--danger);
}
.btn-danger:hover { background: rgba(255, 107, 129, .2); color: #ff9caa; }

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 12px; }
.btn.loading { pointer-events: none; opacity: .7; }

.btn .spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    cursor: pointer;
    transition: all .15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, .07); }

/* ============================================================
   徽章 / 标签
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .02em;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
    vertical-align: middle;
    white-space: nowrap;
}
.badge-official {
    color: #ffd98b;
    border-color: rgba(255, 209, 102, .28);
    background: rgba(255, 209, 102, .08);
}
.badge-official svg { width: 12px; height: 12px; }
.badge-green { color: var(--green); border-color: rgba(61, 220, 151, .25); background: var(--green-soft); }
.badge-orange { color: var(--orange); border-color: rgba(255, 180, 84, .25); background: rgba(255, 180, 84, .08); }
.badge-danger { color: var(--danger); border-color: rgba(255, 107, 129, .25); background: var(--danger-soft); }
.badge-primary { color: #c9c2ff; border-color: rgba(124, 108, 255, .28); background: var(--primary-soft); }
.badge-muted { color: var(--muted-2); }

/* ============================================================
   顶部导航
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: rgba(6, 10, 22, .82);
    backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 26px;
    height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
    color: var(--text);
}
.brand:hover { color: var(--text); }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 0 12px rgba(124, 108, 255, .35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 17px; letter-spacing: .04em; }
.brand-text small { color: var(--muted-2); font-size: 10.5px; letter-spacing: .08em; margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    position: relative;
    padding: 8px 13px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: color .15s, background .15s;
}
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.main-nav a.active { color: #dcd8ff; background: var(--primary-soft); }
.main-nav a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.bean-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 209, 102, .22);
    background: rgba(255, 209, 102, .07);
    color: #ffd98b;
    font-weight: 700;
    font-size: 13px;
}
.bean-pill:hover { color: #ffe9b8; background: rgba(255, 209, 102, .13); }
.bean-pill em { font-style: normal; font-weight: 500; font-size: 11px; opacity: .75; }

.user-menu { position: relative; }
.user-menu summary {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 9px 0 5px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
    list-style: none;
    color: var(--text);
    transition: border-color .15s, background .15s;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, .06); }
.user-menu .uname { font-size: 13px; font-weight: 600; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu .avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--av) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--av) 45%, transparent);
    color: var(--av);
    font-size: 13px;
    font-weight: 800;
}
.user-menu .dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 210px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: #0d1428;
    box-shadow: var(--shadow);
    animation: dropIn .16s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.dropdown-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-head strong { display: block; font-size: 14px; }
.dropdown-head span { display: block; font-size: 11.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; }
.user-menu .dropdown a,
.user-menu .dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 13.5px;
    cursor: pointer;
}
.user-menu .dropdown a:hover,
.user-menu .dropdown button:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.user-menu .dropdown form { margin: 4px 0 0; border-top: 1px solid var(--border); padding-top: 4px; }
.user-menu .dropdown .dropdown-logout { color: #ff8e9e; }
.user-menu .dropdown .dropdown-logout:hover { background: var(--danger-soft); color: #ffb3be; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0 9px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--muted); transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   Flash / Toast
   ============================================================ */

.flash-stack {
    position: fixed;
    z-index: 80;
    top: 84px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(380px, calc(100% - 40px));
}
.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: #101731;
    box-shadow: var(--shadow);
    font-size: 13.5px;
    animation: flashIn .22s ease;
}
@keyframes flashIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.flash button { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.flash-success { border-color: rgba(61, 220, 151, .35); color: #a9f4d3; }
.flash-error { border-color: rgba(255, 107, 129, .35); color: #ffb6c0; }
.flash-info { border-color: rgba(56, 214, 255, .3); color: #b4ecff; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    z-index: 90;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: #121b36;
    box-shadow: var(--shadow);
    font-size: 13.5px;
    max-width: calc(100% - 40px);
    transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { border-color: rgba(61, 220, 151, .4); }
.toast.error { border-color: rgba(255, 107, 129, .4); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.55fr .95fr;
    gap: 34px;
    padding: 56px 0 38px;
    align-items: start;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(124, 108, 255, .3);
    background: rgba(124, 108, 255, .1);
    color: #c7c0ff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    margin-bottom: 20px;
}
.eyebrow .pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(61, 220, 151, .16);
    animation: pulse 2s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(61, 220, 151, 0); } }

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4.4vw, 50px);
    line-height: 1.16;
    letter-spacing: -.02em;
    font-weight: 800;
}
.gradient-text {
    background: linear-gradient(110deg, #a79cff 0%, #6e8dff 48%, #47e0ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub {
    color: var(--muted);
    font-size: 15.5px;
    max-width: 560px;
    margin-bottom: 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 34px; }
.hero-stat strong { display: block; font-size: 23px; line-height: 1.2; letter-spacing: -.01em; }
.hero-stat span { color: var(--muted-2); font-size: 12px; letter-spacing: .06em; }

.hero-side { display: flex; flex-direction: column; gap: 14px; }

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(24, 33, 62, .82), rgba(11, 16, 33, .88));
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}
.panel-pad { padding: 20px; }

.signin-card { position: relative; overflow: hidden; padding: 22px; }
.signin-card::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 209, 102, .18), transparent 65%);
    pointer-events: none;
}
.signin-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.signin-head .coin {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 209, 102, .12);
    border: 1px solid rgba(255, 209, 102, .3);
    color: var(--gold);
    font-size: 18px;
}
.signin-head h3 { margin: 0; font-size: 15px; }
.signin-head p { margin: 1px 0 0; font-size: 12px; color: var(--muted-2); }
.signin-balance { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 16px; }
.signin-balance strong { font-size: 32px; font-weight: 800; color: var(--gold); letter-spacing: -.02em; }
.signin-balance span { color: var(--muted-2); font-size: 12px; }
.signin-card .btn { width: 100%; }

.announcement { padding: 18px 20px; }
.announcement h4 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    font-size: 13px;
    color: #cbc4ff;
    letter-spacing: .03em;
}
.announcement p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ============================================================
   区块标题 / 搜索 / 标签页
   ============================================================ */

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0 16px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
}
.section-head h2 { margin: 18px 0 0; font-size: 20px; letter-spacing: -.01em; }
.section-head h2 small { font-size: 12px; font-weight: 400; color: var(--muted-2); margin-left: 8px; letter-spacing: .02em; }
.section-head p { margin: 4px 0 0; color: var(--muted-2); font-size: 12.5px; }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .025);
}
.tabs a {
    padding: 7px 15px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--primary-soft); color: #d8d3ff; }

.search-form { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.search-box { position: relative; flex: 1; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search-box input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 38px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .035);
    color: var(--text);
    font-size: 13.5px;
    transition: border-color .15s, background .15s;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box input:focus { outline: none; border-color: rgba(124, 108, 255, .55); background: rgba(255, 255, 255, .05); }
.search-form .btn { height: 42px; }

/* ============================================================
   接口列表卡片
   ============================================================ */

.iface-list { display: flex; flex-direction: column; gap: 14px; }

.iface-card {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 148px;
    gap: 18px;
    padding: 20px 20px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(155deg, rgba(22, 30, 57, .74), rgba(11, 16, 33, .9));
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.iface-card:hover {
    border-color: rgba(124, 108, 255, .35);
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, .3);
}
.iface-card.is-unlocked { border-color: rgba(61, 220, 151, .22); }
.iface-card.related-card { grid-template-columns: minmax(0, 1fr) auto; }
.iface-card.related-card .iface-actions { border-left: 0; padding-left: 0; }

.rank {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
    font-size: 21px;
    font-weight: 800;
    font-style: italic;
    color: rgba(148, 161, 196, .55);
    font-variant-numeric: tabular-nums;
}
.rank.top-1 { color: var(--gold); text-shadow: 0 0 18px rgba(255, 209, 102, .4); }
.rank.top-2 { color: #c8d3ea; }
.rank.top-3 { color: #d99a6c; }

.iface-body { min-width: 0; }
.iface-title-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.iface-title {
    margin: 0;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
    word-break: break-word;
}
a.iface-title:hover { color: #cfc9ff; }
.iface-desc {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.url-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 13px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px dashed rgba(140, 160, 220, .26);
    background: rgba(5, 9, 20, .55);
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--muted);
    overflow: hidden;
}
.url-box .lock { display: inline-flex; color: var(--muted-2); flex-shrink: 0; }
.url-box .url-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #a8e9ff;
    user-select: all;
}
.url-box .url-placeholder {
    letter-spacing: .18em;
    color: var(--muted-2);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.url-box .url-hint { margin-left: auto; font-family: var(--font); font-size: 11px; color: var(--gold); flex-shrink: 0; }
.url-box.unlocked { border-style: solid; border-color: rgba(61, 220, 151, .25); background: rgba(61, 220, 151, .05); }
.url-box.unlocked .lock { color: var(--green); }

.iface-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted-2); }
.iface-meta span { display: inline-flex; align-items: center; gap: 5px; }
.iface-meta svg { opacity: .75; }
.iface-meta .hot { color: #cdc5ff; }
.iface-meta .sharer { color: var(--muted); }

.iface-submeta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--muted-2);
}
.iface-submeta b { color: var(--muted); font-weight: 500; }

.iface-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}
.iface-actions .btn { width: 100%; padding-left: 10px; padding-right: 10px; }
.iface-actions .btn svg { flex-shrink: 0; }
.action-cost { font-size: 10.5px; opacity: .75; font-weight: 500; }

.empty-state {
    padding: 64px 24px;
    text-align: center;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .015);
}
.empty-state .empty-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: #b9b1ff;
}
.empty-state h3 { margin: 0 0 6px; font-size: 17px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }

/* ============================================================
   分页
   ============================================================ */

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 28px 0 8px; }
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .025);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: .15s;
}
.page-link:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, .06); }
.page-link.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(125deg, var(--primary), #5a8bff);
    box-shadow: 0 6px 18px rgba(124, 108, 255, .3);
}
.page-link.disabled { opacity: .35; pointer-events: none; }
.page-gap { color: var(--muted-2); padding: 0 4px; }

/* ============================================================
   表单
   ============================================================ */

.form-group { margin-bottom: 18px; }
.form-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: #c3cbe2; }
.form-label .req { color: var(--danger); }
.form-label a { font-size: 12px; font-weight: 400; }
.form-control {
    width: 100%;
    padding: 11px 14px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .035);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-control::placeholder { color: var(--muted-2); }
.form-control:focus {
    outline: none;
    border-color: rgba(124, 108, 255, .6);
    background-color: rgba(255, 255, 255, .05);
    box-shadow: 0 0 0 4px rgba(124, 108, 255, .1);
}
textarea.form-control { min-height: 110px; resize: vertical; }
select.form-control { color-scheme: light; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
/* 原生下拉弹层由系统绘制：.form-control 的浅色字会被 option 继承，在 Windows 的浅色弹层上变成灰白一片看不清。
   这里固定展开后的选项为白底黑字；收起状态仍沿用深色主题的浅色字。 */
select.form-control option,
select.form-control optgroup { color: #000; background: #fff; }
select.form-control option:checked { color: #000; background: #dfe6ff; }
select.form-control option:disabled { color: #555; background: #fff; }
.form-hint { margin-top: 6px; font-size: 11.5px; color: var(--muted-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }

.form-card {
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(23, 31, 58, .88), rgba(10, 15, 30, .92));
    box-shadow: var(--shadow);
}
.form-card h1, .form-card h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.01em; }
.form-card .form-lead { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.alert {
    padding: 12px 15px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    font-size: 13px;
    margin-bottom: 18px;
}
.alert-error { color: #ffb3bd; border-color: rgba(255, 107, 129, .3); background: var(--danger-soft); }
.alert-success { color: #a6f0ce; border-color: rgba(61, 220, 151, .3); background: var(--green-soft); }
.alert-info { color: #b5e9ff; border-color: rgba(56, 214, 255, .25); background: rgba(56, 214, 255, .07); }
.alert-warn { color: #ffd9a1; border-color: rgba(255, 180, 84, .3); background: rgba(255, 180, 84, .08); }
.alert ul { margin: 0; padding-left: 18px; }

/* ============================================================
   登录 / 注册
   ============================================================ */

.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 42px;
    align-items: center;
    padding: 54px 0 64px;
    min-height: calc(100vh - 220px);
}
.auth-aside { position: relative; padding: 10px 0; }
.auth-aside h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.2; margin: 14px 0 16px; letter-spacing: -.02em; }
.auth-aside > p { color: var(--muted); font-size: 15px; max-width: 460px; margin-bottom: 30px; }
.feature-list { display: flex; flex-direction: column; gap: 16px; }
.feature { display: flex; gap: 13px; align-items: flex-start; }
.feature .fi {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(124, 108, 255, .12);
    border: 1px solid rgba(124, 108, 255, .22);
    color: #c0b8ff;
}
.feature strong { display: block; font-size: 14px; margin-bottom: 2px; }
.feature p { margin: 0; color: var(--muted-2); font-size: 12.5px; }

.auth-card { width: 100%; max-width: 470px; margin-left: auto; }
.auth-card .brand { display: none; }
.auth-switch { margin-top: 20px; text-align: center; color: var(--muted-2); font-size: 13px; }
.auth-switch a { font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 11px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }

/* ============================================================
   通用页面 / 仪表盘
   ============================================================ */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 40px 0 22px;
}
.page-head h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 15px;
    border: 1px solid var(--border);
    background: linear-gradient(155deg, rgba(23, 31, 58, .8), rgba(10, 15, 30, .88));
}
.stat-card .stat-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: #bcb4ff;
    margin-bottom: 12px;
}
.stat-card.green .stat-icon { background: var(--green-soft); color: var(--green); }
.stat-card.gold .stat-icon { background: rgba(255, 209, 102, .1); color: var(--gold); }
.stat-card.cyan .stat-icon { background: rgba(56, 214, 255, .1); color: var(--primary-2); }
.stat-card strong { display: block; font-size: 25px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.stat-card span { color: var(--muted-2); font-size: 12px; }
.stat-card small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted-2); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(160deg, rgba(22, 30, 57, .72), rgba(10, 15, 30, .9)); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 15px; }
.card-head a { font-size: 12.5px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .li-icon { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; background: rgba(255, 255, 255, .04); color: var(--muted); }
.list-item .li-main { min-width: 0; flex: 1; }
.list-item .li-main strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-main span { display: block; color: var(--muted-2); font-size: 11.5px; }
.list-item .li-amount { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.li-amount.plus { color: var(--green); }
.li-amount.minus { color: var(--danger); }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-link { padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .025); color: var(--muted); font-size: 13px; font-weight: 600; transition: .15s; }
.quick-link:hover { border-color: rgba(124, 108, 255, .4); background: var(--primary-soft); color: #d9d4ff; }
.quick-link span { display: block; font-size: 11px; color: var(--muted-2); font-weight: 400; margin-top: 2px; }

/* ============================================================
   数据表格
   ============================================================ */

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(10, 15, 30, .6); }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--muted-2);
    text-transform: uppercase;
    background: rgba(255, 255, 255, .025);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .022); }
.data-table .cell-main { max-width: 340px; }
.data-table .cell-main strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.data-table .cell-main span { display: block; font-size: 11px; color: var(--muted-2); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 后台接口管理：地址完整显示，不掩码也不省略，长 URL 自动换行 */
.data-table .cell-main span.admin-url {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-all;
    color: var(--primary-2);
    line-height: 1.5;
}
.table-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.table-actions .btn { padding: 5px 9px; font-size: 11.5px; border-radius: 7px; }
.nowrap { white-space: nowrap; }
.text-muted { color: var(--muted); }
.text-muted-2 { color: var(--muted-2); }
.text-green { color: var(--green); }
.text-danger { color: var(--danger); }
.text-gold { color: var(--gold); }
.text-sm { font-size: 12px; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-8 { gap: 8px; }

/* ============================================================
   管理后台
   ============================================================ */

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px;
    margin: 22px 0 24px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .025);
}
.admin-nav a { padding: 8px 14px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 600; }
.admin-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.admin-nav a.active { color: #dcd7ff; background: var(--primary-soft); }

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    margin-bottom: 16px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
}
.filter-bar form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-bar .form-control { height: 38px; padding: 6px 12px; font-size: 13px; width: auto; min-width: 130px; }
.filter-bar .search-box input { height: 38px; min-width: 200px; }

.detail-list { display: grid; grid-template-columns: 150px 1fr; gap: 0; }
.detail-list dt { padding: 10px 0; color: var(--muted-2); font-size: 12.5px; border-bottom: 1px solid var(--border); }
.detail-list dd { margin: 0; padding: 10px 0; font-size: 13px; border-bottom: 1px solid var(--border); word-break: break-all; }
.detail-list dt:last-of-type, .detail-list dd:last-of-type { border-bottom: 0; }

/* 后台「接口数据」三项计数：直接编辑，失焦自动保存（逻辑见 app.js）。
   全部用主题变量，白天 / 黑夜两套配色自动适配，无需额外覆盖。 */
.stat-note { font-size: 11.5px; color: var(--muted-2); text-align: right; }
.detail-list dd.stat-dd { padding: 5px 0; }
.stat-input {
    width: 100%;
    max-width: 180px;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.5;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.stat-input:hover { border-color: var(--border); background: rgba(127, 140, 190, .08); }
.stat-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--panel-solid);
    box-shadow: 0 0 0 3px rgba(124, 108, 255, .15);
}
.stat-input.is-saving { border-color: var(--primary); }
.stat-input.is-saved { border-color: var(--green); }
.stat-input.is-error { border-color: var(--danger); }

/* ============================================================
   下载页
   ============================================================ */

.download-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.download-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(155deg, rgba(22, 30, 57, .74), rgba(10, 15, 30, .9));
    transition: border-color .2s, transform .2s;
}
.download-card:hover { border-color: rgba(124, 108, 255, .32); transform: translateY(-2px); }
.download-card .dc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.download-card h3 { margin: 0; font-size: 16px; line-height: 1.45; }
.download-card .dc-desc { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.download-card .url-box { margin-bottom: 10px; }
.download-card .dc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--muted-2); margin-bottom: 14px; }
.download-card .dc-actions { display: flex; gap: 8px; margin-top: auto; }
.download-card .dc-actions .btn { flex: 1; }
.download-card.is-unlocked { border-color: rgba(61, 220, 151, .22); }

/* ============================================================
   扩容码 / 订单
   ============================================================ */

.toolbar-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-search .form-control { height: 38px; padding: 6px 12px; font-size: 13px; min-width: 220px; }
.code-value { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; color: #c9d4f2; }
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.code-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
}
.code-card > div { min-width: 0; }
.code-label { display: block; font-size: 10.5px; color: var(--muted-2); margin-bottom: 2px; }
.code-card .code-value { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.pay-summary {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    padding: 16px 18px;
    margin: 4px 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 209, 102, .2);
    background: rgba(255, 209, 102, .05);
}
.pay-summary > div span { display: block; font-size: 11.5px; color: var(--muted-2); margin-bottom: 4px; }
.pay-summary > div strong { font-size: 22px; }
.pay-result {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
}
.pay-result-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; }
.pay-result strong { display: block; font-size: 15px; margin-bottom: 4px; }
.pay-result p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.pay-result.success { border-color: rgba(61, 220, 151, .28); background: var(--green-soft); }
.pay-result.success .pay-result-icon { color: var(--green); background: rgba(61, 220, 151, .14); }
.pay-result.pending { border-color: rgba(255, 180, 84, .25); background: rgba(255, 180, 84, .07); }
.pay-result.pending .pay-result-icon { color: var(--orange); background: rgba(255, 180, 84, .12); }
.pay-result.closed .pay-result-icon { color: var(--muted-2); background: rgba(255, 255, 255, .05); }
.rule-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 2; }
.rule-list li::marker { color: var(--primary); }

/* ============================================================
   Footer
   ============================================================ */

.site-footer { margin-top: 30px; border-top: 1px solid var(--border); background: rgba(4, 7, 16, .6); }
.footer-grid {
    display: grid;
    /* 品牌 / 快速导航 / 帮助与支持 / 本站赞助 / 安全提示 共 5 列 */
    grid-template-columns: 1.4fr 1fr 1fr .8fr 1.3fr;
    gap: 30px;
    padding: 42px 0 34px;
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--muted-2); font-size: 12.5px; max-width: 280px; margin-bottom: 12px; }
.footer-beans { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted-2); }
.footer-beans .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(61, 220, 151, .6); }
.footer-col h4 { margin: 3px 0 12px; font-size: 12px; letter-spacing: .08em; color: #c2cae0; }
.footer-col a { display: block; color: var(--muted-2); font-size: 12.5px; padding: 3px 0; }
.footer-col a:hover { color: var(--text); }
.footer-note p { color: var(--muted-2); font-size: 11.5px; line-height: 1.75; margin-bottom: 8px; }
.footer-note .muted { color: #5c6787; }
.footer-bottom { border-top: 1px solid var(--border); padding: 15px 0; }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted-2); font-size: 11.5px; }
.footer-bottom a { color: var(--muted-2); }

/* ============================================================
   顶栏配色切换控件
   ============================================================ */

.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel-2);
}
.theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}
.theme-btn:hover { color: var(--text); }
/* 高亮由 html 的 data-theme 直接驱动，不依赖 JS 同步 class，切换无闪烁 */
[data-theme="light"] .theme-btn[data-theme-value="light"],
[data-theme="dark"] .theme-btn[data-theme-value="dark"] {
    background: var(--primary-soft);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(124, 108, 255, .28);
}
@media (max-width: 760px) {
    .theme-btn span { display: none; }
    .theme-btn { padding: 0 9px; }
}

/* ============================================================
   白天配色（灰白）
   :root 原值一条不动，黑夜模式完全走原规则；以下只在 data-theme="light" 下生效。
   除了变量，还需翻转 CSS 里写死的大量浅色文字 / 半透明白底 / 深色渐变卡片。
   ============================================================ */

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #eef1f7;
    --bg-soft: #e5eaf3;
    --panel: rgba(255, 255, 255, .94);
    --panel-solid: #ffffff;
    --panel-2: rgba(255, 255, 255, .72);
    --border: rgba(35, 51, 86, .14);
    --border-strong: rgba(35, 51, 86, .26);
    --text: #1c2740;
    --muted: #4f5b74;
    --muted-2: #6b768d;
    --primary: #5b4bdd;
    --primary-2: #0d7fa8;
    --primary-soft: rgba(91, 75, 221, .1);
    --green: #12855a;
    --green-soft: rgba(18, 133, 90, .1);
    --orange: #b26a06;
    --danger: #cf3c55;
    --danger-soft: rgba(207, 60, 85, .09);
    --gold: #a4760a;
    --shadow: 0 16px 40px rgba(32, 48, 84, .12);
}

/* 背景：去掉星空，弱化极光 */
[data-theme="light"] .bg-aurora {
    background:
        radial-gradient(720px 520px at 8% -6%, rgba(124, 108, 255, .1), transparent 65%),
        radial-gradient(760px 540px at 96% 8%, rgba(56, 214, 255, .08), transparent 60%),
        radial-gradient(900px 620px at 50% 110%, rgba(83, 62, 190, .06), transparent 65%);
}
[data-theme="light"] .bg-stars { display: none; }
[data-theme="light"] a:hover { color: #4b3fd0; }
[data-theme="light"] .brand img { filter: drop-shadow(0 0 8px rgba(124, 108, 255, .18)); }

/* 按钮 / 徽章 / 表单控件 */
[data-theme="light"] .btn-ghost,
[data-theme="light"] .icon-btn,
[data-theme="light"] .page-link,
[data-theme="light"] .search-box input,
[data-theme="light"] .nav-toggle,
[data-theme="light"] .user-menu summary { background: #fff; }
/* select 的箭头是 background-image，只能用 background-color 覆盖，不能用 background 简写 */
[data-theme="light"] .form-control { background-color: #fff; }
[data-theme="light"] .btn-ghost:hover,
[data-theme="light"] .icon-btn:hover,
[data-theme="light"] .page-link:hover,
[data-theme="light"] .user-menu summary:hover,
[data-theme="light"] .user-menu .dropdown a:hover,
[data-theme="light"] .user-menu .dropdown button:hover,
[data-theme="light"] .main-nav a:hover,
[data-theme="light"] .admin-nav a:hover { background: #f1f4fa; }
[data-theme="light"] .form-control:focus { background-color: #fff; box-shadow: 0 0 0 4px rgba(91, 75, 221, .1); }
[data-theme="light"] .search-box input:focus { background: #fff; box-shadow: 0 0 0 4px rgba(91, 75, 221, .1); }
[data-theme="light"] .btn-soft,
[data-theme="light"] .badge-primary,
[data-theme="light"] .main-nav a.active,
[data-theme="light"] .admin-nav a.active,
[data-theme="light"] .tabs a.active,
[data-theme="light"] .announcement h4,
[data-theme="light"] .eyebrow,
[data-theme="light"] .feature .fi,
[data-theme="light"] .stat-card .stat-icon,
[data-theme="light"] .empty-state .empty-icon,
[data-theme="light"] .iface-meta .hot,
[data-theme="light"] a.iface-title:hover,
[data-theme="light"] .quick-link:hover { color: #4b3fd0; }
[data-theme="light"] .btn-soft:hover { color: #3a2fb0; background: rgba(91, 75, 221, .16); }
[data-theme="light"] .btn-success:hover { color: #0d6b48; }
[data-theme="light"] .btn-danger:hover { color: #a72e43; }
[data-theme="light"] .badge { background: #f4f6fb; }
[data-theme="light"] .badge-green { background: #f1fbf6; }
[data-theme="light"] .badge-orange,
[data-theme="light"] .badge-official { background: #fff9ef; }
[data-theme="light"] .badge-danger { background: #fff4f5; }
[data-theme="light"] .badge-primary { background: var(--primary-soft); }
[data-theme="light"] .badge-official { color: #8a6207; }
[data-theme="light"] .eyebrow { background: rgba(91, 75, 221, .08); border-color: rgba(91, 75, 221, .22); }
[data-theme="light"] .bean-pill { color: #8a6207; border-color: rgba(164, 118, 10, .24); background: rgba(164, 118, 10, .08); }
[data-theme="light"] .bean-pill:hover { color: #6f4e05; background: rgba(164, 118, 10, .14); }

/* 顶栏 / 弹层 / 提示条 */
[data-theme="light"] .site-header { background: rgba(248, 250, 253, .9); }
[data-theme="light"] .user-menu .dropdown,
[data-theme="light"] .flash,
[data-theme="light"] .toast { background: #fff; }
[data-theme="light"] .dropdown-logout { color: #c23a51; }
[data-theme="light"] .dropdown-logout:hover { color: #a72e43; }
[data-theme="light"] .flash-success { color: #0f7a52; }
[data-theme="light"] .flash-error { color: #b02f47; }
[data-theme="light"] .flash-info { color: #0b6f96; }
[data-theme="light"] .tabs,
[data-theme="light"] .admin-nav { background: rgba(35, 51, 86, .045); }

/* Hero / 卡片：深色渐变换成白卡片 */
[data-theme="light"] .panel,
[data-theme="light"] .iface-card,
[data-theme="light"] .form-card,
[data-theme="light"] .card,
[data-theme="light"] .stat-card,
[data-theme="light"] .download-card { background: linear-gradient(160deg, #ffffff, #f7f9fd); }
[data-theme="light"] .iface-card:hover { box-shadow: 0 18px 38px rgba(32, 48, 84, .12); }
[data-theme="light"] .signin-card::before { background: radial-gradient(circle, rgba(164, 118, 10, .1), transparent 65%); }
[data-theme="light"] .gradient-text {
    background: linear-gradient(110deg, #5b4bdd 0%, #2f63d8 48%, #0b7fa8 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
[data-theme="light"] .empty-state,
[data-theme="light"] .filter-bar,
[data-theme="light"] .table-wrap,
[data-theme="light"] .code-card,
[data-theme="light"] .pay-result,
[data-theme="light"] .alert,
[data-theme="light"] .quick-link { background: #fff; }
[data-theme="light"] .alert-error { color: #b02f47; background: #fff4f5; }
[data-theme="light"] .alert-success { color: #0f7a52; background: #f1fbf6; }
[data-theme="light"] .alert-info { color: #0b6f96; background: #f0f9fd; }
[data-theme="light"] .alert-warn { color: #9a5c04; background: #fff9ef; }
[data-theme="light"] .pay-result.success { background: #f1fbf6; }
[data-theme="light"] .pay-result.pending { background: #fff9ef; }
[data-theme="light"] .list-item .li-icon,
[data-theme="light"] .pay-result.closed .pay-result-icon { background: rgba(35, 51, 86, .05); }
[data-theme="light"] .data-table th { background: #f4f6fb; }
[data-theme="light"] .data-table tbody tr:hover { background: rgba(35, 51, 86, .035); }

/* 原写死的浅色字：改成深灰蓝 */
[data-theme="light"] .form-label,
[data-theme="light"] .footer-col h4,
[data-theme="light"] .code-value { color: #33405c; }
[data-theme="light"] .rank { color: rgba(35, 51, 86, .35); }
[data-theme="light"] .rank.top-1 { text-shadow: none; }
[data-theme="light"] .rank.top-2 { color: #6b7891; }
[data-theme="light"] .rank.top-3 { color: #a86a3c; }
[data-theme="light"] .url-box { background: #f4f6fb; border-color: rgba(35, 51, 86, .22); }
[data-theme="light"] .url-box .url-value { color: #0b6f96; }
[data-theme="light"] .url-box.unlocked { background: rgba(18, 133, 90, .06); }
[data-theme="light"] .pay-summary { border-color: rgba(164, 118, 10, .24); background: rgba(164, 118, 10, .06); }

/* 底部 */
[data-theme="light"] .site-footer { background: rgba(255, 255, 255, .62); }

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1080px) {
    .hero { grid-template-columns: 1.35fr 1fr; gap: 24px; }
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
    /* 1080px 以下隐藏「帮助与支持」腾出空间，赞助栏与安全提示仍保留 */
    .footer-grid { grid-template-columns: 1.4fr 1fr .8fr 1.4fr; }
    .footer-col:nth-child(3) { display: none; }
}

@media (max-width: 960px) {
    .main-nav {
        display: none;
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        z-index: 45;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 20px 18px;
        background: rgba(7, 11, 24, .98);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 24px 40px rgba(0, 0, 0, .4);
    }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: 11px 14px; font-size: 14px; }
    .main-nav a.active::after { display: none; }
    .nav-toggle { display: flex; }

    .hero { grid-template-columns: 1fr; padding-top: 38px; }
    .hero-side { display: grid; grid-template-columns: 1fr 1fr; }
    .auth-wrap { grid-template-columns: 1fr; gap: 26px; min-height: auto; padding: 34px 0 50px; }
    .auth-aside { padding: 0; }
    .auth-aside > p { margin-bottom: 22px; }
    .auth-card { margin: 0 auto; max-width: 560px; }
    .content-grid { grid-template-columns: 1fr; }
    .download-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .container, .site-main { width: calc(100% - 28px); }
    .header-inner { height: 64px; gap: 12px; }
    .brand-text small { display: none; }
    .brand img { width: 34px; height: 34px; }
    .main-nav { top: 65px; }
    .user-menu .uname { display: none; }

    .hero { padding-top: 30px; gap: 24px; }
    .hero h1 { font-size: 30px; }
    .hero-sub { font-size: 14px; }
    .hero-stats { gap: 24px; }
    .hero-stat strong { font-size: 20px; }
    .hero-side { grid-template-columns: 1fr; }

    .iface-card { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 16px; }
    .iface-card.related-card { grid-template-columns: minmax(0, 1fr); }
    .iface-card.related-card .iface-actions { grid-column: auto; }
    .rank { font-size: 17px; }
    .iface-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; padding-left: 0; padding-top: 12px; border-left: 0; border-top: 1px solid var(--border); }
    .iface-actions .btn { flex: 1; min-width: 110px; }
    .iface-title { font-size: 15px; }

    .section-head { flex-direction: column; align-items: stretch; gap: 10px; }
    .section-head h2 { margin-top: 14px; }
    .toolbar { align-items: stretch; }
    .search-form { max-width: none; }
    .tabs { align-self: flex-start; }

    .form-card { padding: 22px 18px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .page-head { padding-top: 28px; }
    .dash-grid { gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card strong { font-size: 22px; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 32px 0 26px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-col:nth-child(3) { display: block; }
    .footer-note { grid-column: 1 / -1; }

    .flash-stack { top: 74px; right: 14px; left: 14px; width: auto; }
}

@media (max-width: 480px) {
    .bean-pill { padding: 0 9px; }
    .bean-pill em { display: none; }
    .header-actions { gap: 6px; }
    .theme-btn { padding: 0 7px; }
    .theme-btn svg { width: 14px; height: 14px; }
    .header-actions .btn-ghost { display: none; }
    .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-note { grid-column: auto; }
    .auth-card { padding: 22px 18px; }
    .quick-grid { grid-template-columns: 1fr; }
    .detail-list { grid-template-columns: 110px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
