/* ============ 设计变量（对齐硅基流动视觉语言） ============ */
:root {
    --bg: #f7f8fc;
    --surface: #ffffff;
    --surface-2: #f5f5f8;
    --surface-3: #f0f1f6;
    --text: #1e293b;
    --text-2: #475569;
    --muted: #8492a6;
    --line: #edeff5;
    --line-strong: #e2e6f0;
    --primary: #844bf7;
    --primary-2: #4a7dff;
    --primary-soft: #f3edff;
    --primary-soft-2: #eff4ff;
    --success: #18a058;
    --warning: #f0a020;
    --danger: #e5484d;
    --ink: #1d1f2c;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --shadow: 0 12px 34px rgba(31, 35, 60, .08);
    --shadow-sm: 0 2px 10px rgba(31, 35, 60, .05);
    --shadow-lift: 0 18px 40px rgba(89, 60, 200, .12);
    --container: 1180px;
    --grad: linear-gradient(120deg, #844bf7 0%, #6a5bff 52%, #4a7dff 100%);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: "PingFang SC", "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont,
                 "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.site-main { flex: 1; }

/* ============ 导航 ============ */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 26px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand-mark {
    width: 30px; height: 30px; border-radius: 9px;
    background: var(--grad);
    position: relative; flex: none;
    box-shadow: 0 4px 14px rgba(132, 75, 247, .28);
}
.brand-mark::after {
    content: ""; position: absolute; inset: 8px; border-radius: 4px;
    background: rgba(255, 255, 255, .92);
    clip-path: polygon(0 0, 100% 0, 100% 34%, 34% 34%, 34% 100%, 0 100%);
}
.nav-links { display: flex; gap: 2px; margin-left: 8px; }
.nav-links a {
    padding: 8px 13px; border-radius: 8px; color: var(--text-2); font-size: 14.5px;
    transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.balance-pill {
    font-size: 13.5px; color: var(--text-2); background: var(--surface-2);
    padding: 7px 13px; border-radius: var(--radius-pill);
}
.balance-pill b { color: var(--primary); }
.user-chip {
    font-size: 13.5px; font-weight: 600; background: var(--primary-soft);
    color: var(--primary); padding: 7px 13px; border-radius: var(--radius-pill);
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* ============ 按钮 ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 600;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s;
    white-space: nowrap;
}
.btn-primary {
    background: var(--grad); color: #fff;
    box-shadow: 0 8px 22px rgba(110, 82, 240, .28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(110, 82, 240, .36); }
.btn-outline {
    background: var(--surface); color: var(--text-2);
    border: 1px solid var(--line-strong);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: var(--surface-2); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: #fdecec; color: var(--danger); }
.btn-danger:hover { background: #fbe0e0; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-pill { border-radius: var(--radius-pill); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ============ 表单 ============ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.input, select.input, textarea.input {
    width: 100%; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #a9b4c4; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(132, 75, 247, .13); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ============ 卡片 ============ */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-body { padding: 22px; }
.card-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.card-head h3 { font-size: 16px; letter-spacing: -.01em; }

/* ============ 通用小件 ============ */
.tag {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; padding: 4px 10px; border-radius: var(--radius-pill);
    background: var(--surface-2); color: var(--text-2);
}
.tag-primary { background: var(--primary-soft); color: var(--primary); }
.tag-success { background: #e9f8f0; color: var(--success); }
.tag-warn { background: #fff5e6; color: var(--warning); }
.tag-danger { background: #fdecec; color: var(--danger); }

/* ============ 页脚 ============ */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 64px; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; padding: 34px 24px 18px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; align-items: center; }
.footer-links a { color: var(--muted); font-size: 14px; transition: color .15s; }
.footer-links a:hover { color: var(--primary); }
.copyright { text-align: center; font-size: 12.5px; padding: 14px 0 26px; color: var(--muted); }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
    .nav-links {
        display: none; position: absolute; top: 68px; left: 0; right: 0;
        background: var(--surface); flex-direction: column; padding: 10px 16px 14px;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 20px 40px rgba(31, 35, 60, .14);
        border-radius: 0 0 14px 14px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 14px; font-size: 15px; }
    .nav-toggle { display: flex; }
    .balance-pill, .user-chip { display: none; }
}
@media (max-width: 560px) {
    .nav-row { height: 60px; gap: 12px; }
    .container { padding: 0 16px; }
    .btn { padding: 10px 16px; font-size: 14px; }
}
