/* ============================================================
   口袋西游 OL · 用户管理中心 v2
   主题：深色仙侠 · 鎏金（Dark Xianxia · Gilt）
   ------------------------------------------------------------
   设计要点：
     · 玄夜底色 + 星野云气，营造寰宇仙踪氛围
     · 鎏金主色 + 青蓝辅色，帝金气韵、层次分明
     · 玻璃拟态卡片，描金细边，悬浮微光
     · 字体：宋体系标题 + 无衬线正文，宣纸留白
     · 纯 CSS 绘制，零图片请求（更快加载）
   ============================================================ */

:root {
    /* 底色层 */
    --bg-0: #06090f;
    --bg-1: #0a0f1a;
    --bg-2: #0f1626;

    /* 玻璃面 */
    --surface: rgba(255, 255, 255, .035);
    --surface-2: rgba(255, 255, 255, .062);
    --surface-3: rgba(255, 255, 255, .09);

    /* 描边 */
    --border: rgba(217, 182, 74, .18);
    --border-soft: rgba(255, 255, 255, .075);
    --border-strong: rgba(217, 182, 74, .42);

    /* 鎏金 */
    --gold: #d9b64a;
    --gold-lt: #f2dd94;
    --gold-dk: #9d7715;
    --grad-gold: linear-gradient(135deg, #f2dd94 0%, #d9b64a 42%, #a9811c 100%);

    /* 青蓝 */
    --cyan: #4fa9d8;
    --cyan-lt: #86d4f2;
    --grad-cyan: linear-gradient(135deg, #5fb8e6 0%, #2c6ea8 100%);

    /* 语义色 */
    --success: #38d39f;
    --danger: #f0736e;
    --warn: #e7b84a;

    /* 文字 */
    --text-1: #edeae2;
    --text-2: #a8a396;
    --text-3: #6d6a61;

    /* 结构 */
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, .35);
    --shadow: 0 18px 48px rgba(0, 0, 0, .5);
    --shadow-gold: 0 16px 40px rgba(174, 133, 26, .22);

    --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text-1);
    background: var(--bg-0);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ============================================================
   背景：玄夜 · 星野 · 云气
   ============================================================ */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(1200px 620px at 50% -12%, #17233c 0%, transparent 62%),
        radial-gradient(900px 500px at 88% 18%, rgba(79, 169, 216, .12) 0%, transparent 60%),
        radial-gradient(800px 480px at 6% 72%, rgba(217, 182, 74, .09) 0%, transparent 58%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 46%, var(--bg-2) 100%);
}
/* 星野（纯 CSS 点阵，多倍率混合出远近层次） */
.starfield {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        radial-gradient(1.4px 1.4px at 12% 22%, rgba(255, 255, 255, .8), transparent),
        radial-gradient(1.2px 1.2px at 68% 12%, rgba(242, 221, 148, .7), transparent),
        radial-gradient(1.6px 1.6px at 34% 68%, rgba(255, 255, 255, .55), transparent),
        radial-gradient(1.1px 1.1px at 82% 52%, rgba(134, 212, 242, .7), transparent),
        radial-gradient(1.3px 1.3px at 52% 88%, rgba(255, 255, 255, .45), transparent),
        radial-gradient(1px 1px at 8% 84%, rgba(242, 221, 148, .6), transparent),
        radial-gradient(1.5px 1.5px at 46% 34%, rgba(255, 255, 255, .38), transparent),
        radial-gradient(1px 1px at 92% 78%, rgba(255, 255, 255, .5), transparent);
    opacity: .75;
    animation: twinkle 7s ease-in-out infinite;
    will-change: opacity;
}
@keyframes twinkle {
    0%, 100% { opacity: .55; }
    50%      { opacity: .9; }
}
/* 悬浮光晕
   注意：这里刻意不使用 filter: blur(Npx)。
   大尺寸元素叠加 blur 滤镜，在无 GPU 加速的环境（虚拟机里的 XAMPP）
   下每帧都要做一次全尺寸采样模糊，是首屏卡顿的主要来源之一。
   改用径向渐变，视觉几乎一致但省掉整个滤镜开销。 */
.glow {
    position: fixed; z-index: -2; border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}
.glow-a {
    width: 640px; height: 640px; top: -240px; right: -200px;
    background: radial-gradient(circle, rgba(79, 169, 216, .20) 0%, rgba(79, 169, 216, .07) 46%, transparent 70%);
    animation: float-a 18s ease-in-out infinite;
}
.glow-b {
    width: 580px; height: 580px; bottom: -220px; left: -170px;
    background: radial-gradient(circle, rgba(217, 182, 74, .17) 0%, rgba(217, 182, 74, .06) 46%, transparent 70%);
    animation: float-b 22s ease-in-out infinite;
}
@keyframes float-a { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-28px, 26px); } }
@keyframes float-b { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -22px); } }
/* 云气 */
.clouds {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 30vh;
    z-index: -2;
    pointer-events: none;
    opacity: .5;
    background:
        radial-gradient(46% 100% at 12% 116%, rgba(120, 150, 190, .22) 0%, transparent 62%),
        radial-gradient(54% 100% at 42% 122%, rgba(90, 120, 165, .2) 0%, transparent 60%),
        radial-gradient(48% 100% at 76% 118%, rgba(140, 160, 195, .18) 0%, transparent 62%);
    /* 原为 filter: blur(2px)，改用已经柔和的渐变stop，省掉滤镜 */
}

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ============================================================
   顶部导航
   ============================================================ */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(8, 12, 20, .82);
    border-bottom: 1px solid var(--border-soft);
    transition: background .3s ease, border-color .3s ease;
}
/* 毛玻璃只在滚动后才启用。
   sticky 头部一旦挂上 backdrop-filter，滚动时浏览器每帧都要对头部
   覆盖的整块区域重算背景模糊，是无 GPU 加速环境（虚拟机里的 XAMPP）
   上最明显的卡顿源。而页面顶部背景本就是近乎均匀的深色，
   模糊与否肉眼几乎无差别 —— 放到 .scrolled 上，首屏与静止状态
   完全不承担这笔开销，视觉在滚动时依旧保持玻璃质感。 */
.site-header.scrolled {
    background: rgba(8, 12, 20, .82);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border-bottom-color: var(--border);
    box-shadow: 0 6px 30px rgba(0, 0, 0, .5);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 74px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
    width: 44px; height: 44px; flex: 0 0 44px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-size: 24px; font-weight: 900;
    color: #1a1408;
    background: var(--grad-gold);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(174, 133, 26, .4), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.brand-mark.sm { width: 32px; height: 32px; flex-basis: 32px; font-size: 17px; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b {
    font-family: var(--font-serif); font-size: 20px; font-weight: 900; letter-spacing: 3px;
    background: linear-gradient(100deg, var(--gold-lt), var(--gold) 50%, var(--gold-dk));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text i { font-style: normal; font-size: 11px; color: var(--text-3); letter-spacing: 2px; }

.main-nav { display: flex; gap: 4px; align-items: center; }
.nav-link {
    position: relative; padding: 9px 16px; border-radius: var(--radius-sm);
    text-decoration: none; color: var(--text-2);
    font-size: 14.5px; font-weight: 600; letter-spacing: .5px;
    transition: color .22s ease, background .22s ease;
}
.nav-link:hover { color: var(--gold-lt); background: rgba(217, 182, 74, .08); }
.nav-link.active {
    color: #1a1408;
    background: var(--grad-gold);
    box-shadow: 0 6px 18px rgba(174, 133, 26, .35);
}
.nav-exit { color: var(--danger); }
.nav-exit:hover { color: #fff; background: rgba(240, 115, 110, .16); }

.nav-toggle {
    display: none; width: 42px; height: 42px; border: 1px solid var(--border-soft);
    background: var(--surface); border-radius: var(--radius-sm); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--gold); border-radius: 2px; transition: .3s; }

/* ============================================================
   主体 / 卡片
   ============================================================ */
.main { position: relative; z-index: 1; padding: 44px 0 70px; min-height: 62vh; }

.glass {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.card { padding: 34px; }

/* ============================================================
   首页英雄区
   ============================================================ */
.hero {
    position: relative; overflow: hidden;
    text-align: center; padding: 74px 26px 64px; margin-bottom: 42px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.hero::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-dk), var(--gold-lt), var(--cyan), transparent);
}
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(560px 260px at 50% 0%, rgba(217, 182, 74, .12), transparent 70%);
}
.hero-badge {
    display: inline-block; margin-bottom: 20px; padding: 6px 20px;
    border: 1px solid var(--border-strong); border-radius: 100px;
    color: var(--gold-lt); background: rgba(217, 182, 74, .07);
    font-family: var(--font-serif); font-size: 12.5px; font-weight: 700; letter-spacing: 5px;
}
.hero h1 {
    position: relative;
    font-family: var(--font-serif);
    font-size: clamp(34px, 6vw, 58px); font-weight: 900; line-height: 1.18;
    letter-spacing: 5px; margin-bottom: 16px;
    background: linear-gradient(100deg, #fff 0%, var(--gold-lt) 32%, var(--gold) 58%, var(--cyan-lt) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 24px rgba(217, 182, 74, .25));
}
.hero p { position: relative; color: var(--text-2); font-size: 16.5px; max-width: 680px; margin: 0 auto 34px; }
.hero-actions { position: relative; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 30px; border-radius: var(--radius-sm); border: 1px solid transparent;
    cursor: pointer; font-family: inherit;
    font-size: 15px; font-weight: 700; letter-spacing: 2px; text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn-primary { background: var(--grad-cyan); color: #fff; box-shadow: 0 10px 24px rgba(44, 110, 168, .38); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(44, 110, 168, .5); }
.btn-gold { background: var(--grad-gold); color: #1a1408; box-shadow: 0 10px 24px rgba(174, 133, 26, .38); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(174, 133, 26, .52); }
.btn-ghost { background: var(--surface); color: var(--text-1); border-color: var(--border); }
.btn-ghost:hover { color: var(--gold-lt); border-color: var(--border-strong); transform: translateY(-2px); background: rgba(217, 182, 74, .07); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ============================================================
   功能卡片网格
   ============================================================ */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.func-card {
    position: relative; overflow: hidden;
    display: block; padding: 28px;
    text-decoration: none; color: var(--text-1);
    background: var(--surface);
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: transform .28s cubic-bezier(.2, .8, .3, 1), border-color .28s ease, box-shadow .28s ease;
}
.func-card::after {
    content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0;
    background: linear-gradient(90deg, var(--gold), var(--cyan));
    transition: width .35s ease;
}
.func-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow), var(--shadow-gold);
}
.func-card:hover::after { width: 100%; }
.func-icon {
    width: 58px; height: 58px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin-bottom: 18px;
    border: 1px solid var(--border-soft);
    background: var(--surface-2);
}
.icon-blue   { background: linear-gradient(145deg, rgba(79, 169, 216, .28), rgba(79, 169, 216, .08)); box-shadow: inset 0 0 0 1px rgba(134, 212, 242, .25); }
.icon-purple { background: linear-gradient(145deg, rgba(150, 120, 220, .28), rgba(150, 120, 220, .08)); box-shadow: inset 0 0 0 1px rgba(180, 160, 240, .25); }
.icon-gold   { background: linear-gradient(145deg, rgba(217, 182, 74, .3), rgba(217, 182, 74, .08)); box-shadow: inset 0 0 0 1px rgba(242, 221, 148, .28); }
.icon-green  { background: linear-gradient(145deg, rgba(56, 211, 159, .26), rgba(56, 211, 159, .07)); box-shadow: inset 0 0 0 1px rgba(120, 235, 190, .25); }
.icon-red    { background: linear-gradient(145deg, rgba(240, 115, 110, .26), rgba(240, 115, 110, .07)); box-shadow: inset 0 0 0 1px rgba(255, 160, 155, .25); }
.func-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 7px; letter-spacing: 1.5px; font-family: var(--font-serif); }
.func-card p { color: var(--text-2); font-size: 13.5px; }

/* ============================================================
   页头标题
   ============================================================ */
.page-head { text-align: center; margin-bottom: 36px; }
.page-head h2 {
    font-family: var(--font-serif);
    font-size: clamp(26px, 4vw, 36px); font-weight: 900; letter-spacing: 4px; margin-bottom: 10px;
    background: linear-gradient(100deg, #fff, var(--gold-lt) 45%, var(--gold) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-head p { color: var(--text-2); font-size: 14.5px; }

/* ============================================================
   表单
   ============================================================ */
.form-card {
    max-width: 640px; margin: 0 auto; padding: 38px;
    background: var(--surface);
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 9px; font-size: 13.5px; font-weight: 700; color: var(--text-2); letter-spacing: 1px; }
.form-group label .req { color: var(--danger); margin-left: 3px; }
.form-control {
    width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .04);
    border: 1.5px solid var(--border-soft);
    color: var(--text-1); font-size: 15px; font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-control::placeholder { color: var(--text-3); }
.form-control:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(217, 182, 74, .06);
    box-shadow: 0 0 0 4px rgba(217, 182, 74, .14);
}
select.form-control {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d9b64a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
select.form-control option { background: #0f1626; color: var(--text-1); }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-hint { margin-top: 7px; font-size: 12.5px; color: var(--text-3); }
.field-error { margin-top: 7px; min-height: 18px; font-size: 12.5px; color: var(--danger); }

.captcha-row { display: flex; gap: 12px; align-items: center; }
.captcha-row .form-control { flex: 1; }
.captcha-img {
    height: 54px; width: 176px; flex: 0 0 176px;
    border-radius: var(--radius-sm); cursor: pointer; object-fit: cover;
    border: 1.5px solid var(--border-soft); background: #0b1020;
    transition: border-color .2s ease;
}
.captcha-img:hover { border-color: var(--border-strong); }

/* 密码强度 */
.pw-meter { display: flex; gap: 6px; align-items: center; margin-top: 9px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); transition: background .3s ease; }
.pw-meter strong { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.pw-weak i   { background: var(--danger); }
.pw-mid i    { background: var(--warn); }
.pw-strong i { background: var(--success); }

/* ============================================================
   提示框
   ============================================================ */
.alert {
    display: block;                     /* 不能用 flex：多个内联子节点会被拆成竖条 */
    padding: 14px 18px; margin-bottom: 20px;
    border-radius: var(--radius-sm); border: 1px solid transparent;
    font-size: 14.5px; font-weight: 600; line-height: 1.75;
}
.alert b, .alert strong { font-weight: 800; color: inherit; }
.alert-success { background: rgba(56, 211, 159, .12); border-color: rgba(56, 211, 159, .4); color: #7cf0c2; }
.alert-error   { background: rgba(240, 115, 110, .12); border-color: rgba(240, 115, 110, .42); color: #ffb0ac; }
.alert-info    { background: rgba(79, 169, 216, .12); border-color: rgba(79, 169, 216, .4); color: #9fdcf7; }

/* ============================================================
   签到状态条（uc_sign 页顶：积分 / 今日状态 / 上次签到）
   —— 标签和数值锁在同一格里，窄屏整格换行，文字永不从中间断开
   ============================================================ */
.sign-strip {
    display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px 0;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}
.sign-cell {
    flex: 1 1 0;
    min-width: 150px;
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    padding: 13px 18px;
    white-space: nowrap;                    /* 格内文字不许断行 */
}
.sign-cell + .sign-cell {
    border-left: 1px solid var(--border);   /* 竖分隔线 */
}
.sign-label {
    font-size: 12.5px; letter-spacing: .14em;
    color: var(--text-3);
}
.sign-val {
    font-size: 16.5px; font-weight: 700;
    color: var(--text-1);
    overflow: hidden; text-overflow: ellipsis;
}
.sign-val-gold  { color: var(--gold-lt); }
.sign-val-ok    { color: #7cf0c2; }
.sign-val-todo  { color: var(--warn); }
.sign-val-warn  { color: var(--danger); }

/* 窄屏：三格竖排，改为横向布局（标签在左、值在右） */
@media (max-width: 560px) {
    .sign-cell {
        flex-direction: row; align-items: baseline; justify-content: space-between;
        padding: 11px 16px; min-width: 100%;
    }
    .sign-cell + .sign-cell {
        border-left: 0;
        border-top: 1px solid var(--border);
    }
}

/* ============================================================
   签到主区（图标 / 标题 / 说明 / 按钮居中成一组）
   ============================================================ */
.sign-hero {
    padding: 36px 16px 30px;
    text-align: center;
}
.sign-hero-icon {
    font-size: 50px;
    line-height: 1.15;
    margin-bottom: 14px;
}
.sign-hero-title {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-1);
    margin: 0 0 10px;
}
.sign-hero-desc {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.8;
    max-width: 430px;
    margin: 0 auto 28px;
}
.sign-hero-gain {
    color: var(--gold-lt);
    font-size: 15px;
}
.sign-hero-btn {
    min-width: 250px;
}
.sign-hero .btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* ============================================================
   用户中心：数据条 / 面板
   ============================================================ */
/* 每日签到横幅（未签到时高亮引导，签完转成低调状态） */
.sign-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin: 0 0 28px; padding: 15px 22px;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(217, 182, 74, .15), rgba(217, 182, 74, .03));
    color: var(--text-1); font-size: 14.5px; letter-spacing: .5px;
    box-shadow: var(--shadow-sm);
}
.sign-banner strong { color: var(--gold-lt); }
.sign-banner.is-done {
    border-color: var(--border-soft);
    background: var(--surface);
    color: var(--text-2);
}
.sign-banner .btn { padding: 9px 20px; font-size: 13.5px; letter-spacing: 1px; }
.sign-banner .uc-sign-link { color: var(--gold-lt); font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.sign-banner .uc-sign-link:hover { color: var(--gold); }
@media (max-width: 640px) {
    .sign-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

.uc-hero {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 34px 38px; margin-bottom: 30px;
    background: linear-gradient(120deg, rgba(217, 182, 74, .1), rgba(79, 169, 216, .08));
    border: 1px solid var(--border); border-radius: 22px;
    box-shadow: var(--shadow);
}
.uc-hero::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--grad-gold);
}
.uc-hero .uc-hi { font-size: 13px; color: var(--text-3); letter-spacing: 3px; margin-bottom: 6px; }
.uc-hero h1 { font-family: var(--font-serif); font-size: clamp(24px, 4vw, 34px); font-weight: 900; letter-spacing: 3px; margin-bottom: 8px; }
.uc-hero .uc-meta { color: var(--text-2); font-size: 14px; }
.uc-hero .uc-meta span { color: var(--gold-lt); font-weight: 700; }
.uc-hero .uc-points {
    text-align: right; flex: 0 0 auto;
}
.uc-hero .uc-points .num {
    font-family: var(--font-serif); font-size: 46px; font-weight: 900; line-height: 1;
    background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.uc-hero .uc-points .lbl { font-size: 12.5px; color: var(--text-3); letter-spacing: 2px; margin-top: 6px; }

.stat-strip {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 18px; margin-bottom: 32px;
    padding: 26px 30px;
    background: var(--surface); border: 1px solid var(--border-soft);
    border-radius: var(--radius); backdrop-filter: blur(10px);
}
.stat-item { text-align: center; }
.stat-item .n { font-family: var(--font-serif); font-size: 30px; font-weight: 900; line-height: 1.2; }
.stat-item .n.gold { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-item .n.cyan { color: var(--cyan-lt); }
.stat-item .n.green { color: var(--success); }
.stat-item .t { margin-top: 4px; font-size: 12.5px; color: var(--text-2); letter-spacing: 1px; }

/* 区块小标题 */
.section-title {
    display: flex; align-items: center; gap: 12px;
    margin: 8px 0 20px; font-family: var(--font-serif);
    font-size: 19px; font-weight: 800; letter-spacing: 3px; color: var(--text-1);
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }

/* 返回链接 */
.back-link { display: block; text-align: center; margin-top: 26px; }
.back-link a { color: var(--text-2); text-decoration: none; font-size: 13.5px; transition: color .2s ease; }
.back-link a:hover { color: var(--gold-lt); }

/* 内联说明块 */
.inline-note {
    max-width: 780px; margin: 0 auto 24px;
}

/* ============================================================
   登录 / 验证（独立页）
   ============================================================ */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-wrap { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 100%; padding: 24px; }
.auth-card {
    width: 100%; max-width: 430px; padding: 46px 40px; text-align: center;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.auth-logo {
    display: inline-block; padding: 10px 24px; margin-bottom: 26px;
    font-family: var(--font-serif); font-size: 17px; font-weight: 900; letter-spacing: 4px;
    color: #1a1408; background: var(--grad-gold); border-radius: 12px;
    box-shadow: 0 10px 26px rgba(174, 133, 26, .38);
}
.auth-card h2 { font-family: var(--font-serif); font-size: 23px; letter-spacing: 3px; margin-bottom: 8px; }
.auth-sub { margin-bottom: 28px; color: var(--text-2); font-size: 14px; }
.auth-back { margin-top: 24px; }
.auth-back a { color: var(--text-2); text-decoration: none; font-size: 14px; transition: color .2s ease; }
.auth-back a:hover { color: var(--gold-lt); }

/* 结果页 */
.result-wrap {
    max-width: 580px; margin: 0 auto; padding: 54px 32px; text-align: center;
    background: var(--surface); border: 1px solid var(--border-soft);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.result-icon { font-size: 62px; margin-bottom: 18px; }
.result-wrap h2 { font-family: var(--font-serif); font-size: 26px; letter-spacing: 3px; margin-bottom: 12px; }
.result-wrap p { color: var(--text-2); margin-bottom: 26px; }

/* ============================================================
   表格 / 列表
   ============================================================ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; }
table.data thead th {
    background: rgba(217, 182, 74, .08); color: var(--gold-lt);
    font-weight: 700; letter-spacing: 1px; font-size: 13px;
    border-bottom: 1px solid var(--border);
}
table.data tbody tr { border-bottom: 1px solid var(--border-soft); transition: background .2s ease; }
table.data tbody tr:last-child { border-bottom: none; }
table.data tbody tr:hover { background: rgba(255, 255, 255, .03); }

/* ============================================================
   商城：物品卡
   ============================================================ */
.shop-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.shop-item {
    padding: 22px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border-soft);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
    cursor: pointer;
}
.shop-item:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-gold); }
.shop-item.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 182, 74, .18); }
.shop-item .nm { font-family: var(--font-serif); font-size: 16px; font-weight: 800; letter-spacing: 1px; margin-bottom: 8px; }
.shop-item .id { font-size: 12px; color: var(--text-3); letter-spacing: 1px; margin-bottom: 12px; }
.shop-item .pr { font-size: 20px; font-weight: 900; color: var(--gold-lt); }
.shop-item .pr small { font-size: 12px; color: var(--text-3); font-weight: 600; margin-left: 3px; }

/* 选中信息条 */
.pick-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 16px 20px; margin-bottom: 18px;
    border-radius: var(--radius-sm);
    background: rgba(217, 182, 74, .09); border: 1px solid var(--border-strong);
    font-size: 14.5px;
}
.pick-bar .cost { font-size: 20px; font-weight: 900; color: var(--gold-lt); }

/* ============================================================
   底部
   ============================================================ */
.site-footer {
    position: relative; z-index: 1;
    padding: 34px 0 44px; margin-top: 20px;
    border-top: 1px solid var(--border-soft);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .3));
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; letter-spacing: 1px; }
.footer-copy { color: var(--text-3); font-size: 12.5px; }

/* ============================================================
   动效：入场
   ============================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.hero, .form-card, .uc-hero, .stat-strip, .auth-card, .result-wrap { animation: rise .5s cubic-bezier(.2, .8, .3, 1) both; }
.grid > *, .shop-grid > * { animation: rise .45s cubic-bezier(.2, .8, .3, 1) both; }
.grid > *:nth-child(1), .shop-grid > *:nth-child(1) { animation-delay: .04s; }
.grid > *:nth-child(2), .shop-grid > *:nth-child(2) { animation-delay: .09s; }
.grid > *:nth-child(3), .shop-grid > *:nth-child(3) { animation-delay: .14s; }
.grid > *:nth-child(4), .shop-grid > *:nth-child(4) { animation-delay: .19s; }
.grid > *:nth-child(5), .shop-grid > *:nth-child(5) { animation-delay: .24s; }
.grid > *:nth-child(6), .shop-grid > *:nth-child(6) { animation-delay: .29s; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 820px) {
    .header-inner { height: 66px; }
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        padding: 12px; margin-top: 1px;
        background: rgba(8, 12, 20, .97);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(18px);
        max-height: 0; overflow: hidden; opacity: 0;
        transition: max-height .3s ease, opacity .3s ease, padding .3s ease;
    }
    .main-nav.open { max-height: 420px; opacity: 1; padding: 12px; }
    .nav-link { padding: 12px 16px; }
    .form-row { grid-template-columns: 1fr; }
    .form-card { padding: 28px 22px; }
    .uc-hero { padding: 26px 24px; }
    .uc-hero .uc-points { text-align: left; }
    .hero { padding: 52px 20px 44px; }
    .header-inner { position: relative; }
}
@media (max-width: 480px) {
    .captcha-row { flex-wrap: wrap; }
    .captcha-img { flex: 1 1 100%; width: 100%; }
    .card { padding: 24px 20px; }
}

/* ============================================================
   渲染性能：轻量模式 与 系统减弱动效偏好
   ------------------------------------------------------------
   毛玻璃 backdrop-filter 需要每帧对背景做采样模糊，
   低配机器 / 无 GPU 加速的虚拟机（如 XAMPP 跑在 VM 里）
   会明显拖慢首屏与滚动。装饰层动画同理。
   ------------------------------------------------------------
   开启轻量模式：config/config.php 里 PERF_LITE_RENDER = true
   （会把 body 加上 perf-lite 类，视觉风格不变，仅去掉玻璃与浮动）
   ============================================================ */

/* 系统级「减少动态效果」偏好：自动尊重，无需配置 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* 轻量渲染模式 */
body.perf-lite *,
body.perf-lite *::before,
body.perf-lite *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.perf-lite .glow,
body.perf-lite .clouds {
    display: none !important;          /* 大幅动画层直接移除 */
}

body.perf-lite .starfield {
    animation: none !important;
    opacity: .5 !important;            /* 保留星野质感，但不闪烁 */
}

/* 去掉毛玻璃后，原先靠 blur 分层的面板改为实色底，保证可读性 */
body.perf-lite .site-header { background: rgba(8, 12, 20, .97) !important; }
body.perf-lite .form-card,
body.perf-lite .func-card,
body.perf-lite .auth-card,
body.perf-lite .stat-strip,
body.perf-lite .uc-hero,
body.perf-lite .shop-item,
body.perf-lite .glass        { background-color: #0f1626 !important; }

/* 悬浮/入场动效在轻量模式下直接呈现终态，省掉合成层动画 */
body.perf-lite .func-card:hover,
body.perf-lite .shop-item:hover,
body.perf-lite .btn:hover    { transform: none !important; }
body.perf-lite .func-card,
body.perf-lite .shop-item,
body.perf-lite .card         { transition: none !important; }

/* ============================================================
   角色选择器（页头右上角，退出之后）
   自绘下拉：原生 <select> 的 <option> 列表配色由系统决定，
   白底 + 蓝色高亮改不了，所以面板用 div 自绘，完全吃主题变量。
   ============================================================ */
.role-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 14px;
    padding: 4px 10px 4px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    transition: border-color .25s ease, background .25s ease;
}
.role-picker:hover,
.role-picker.is-open {
    border-color: var(--border-strong);
    background: var(--surface-3);
}
.role-picker.is-empty {
    opacity: .7;
}

/* 读取失败（ROLES_SHOW_ERROR=true 时原因会直接显示在框里） */
.role-picker.is-error {
    opacity: 1;
    border-color: rgba(240, 115, 110, .45);
}
.role-picker.is-error .role-picker-label {
    color: var(--danger);
}
.role-picker.is-error .role-dd-cur {
    color: var(--warn);
}

.role-picker-label {
    font-family: var(--font-serif);
    font-size: 13px;
    letter-spacing: .12em;
    color: var(--gold-lt);
    white-space: nowrap;
}

/* ---------- 触发按钮（看起来像原来的下拉框） ---------- */
.role-dd {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.role-dd-btn {
    appearance: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-1);
    font-family: var(--font);
    font-size: 13.5px;
    line-height: 1.4;
    padding: 2px 22px 2px 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    position: relative;
}
.role-dd-btn:disabled {
    cursor: not-allowed;
    color: var(--text-3);
}
.role-dd-cur {
    /* 要放下「那么（110级法皇）」这样的完整文案 */
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 自绘箭头：金色小三角（纯 CSS，零图片请求） */
.role-dd-caret {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -5px;
    border-right: 1.5px solid var(--gold);
    border-bottom: 1.5px solid var(--gold);
    transform: rotate(45deg);
    transition: transform .2s ease, margin-top .2s ease;
    pointer-events: none;
}
.role-picker.is-open .role-dd-caret {
    transform: rotate(225deg);
    margin-top: -2px;
}

/* ---------- 下拉面板 ---------- */
.role-dd-list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 120;
    min-width: 220px;
    max-width: 340px;
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #101728;                 /* 实底：与页面底色拉开层次 */
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.role-picker.is-open .role-dd-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.role-dd-list::before {                 /* 面板顶部一道鎏金描线 */
    content: '';
    display: block;
    height: 1px;
    margin: -6px -6px 5px;
    background: linear-gradient(90deg, transparent, var(--border-strong) 30%, var(--gold) 50%, var(--border-strong) 70%, transparent);
}

.role-dd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text-1);
    font-size: 13.5px;
    line-height: 1.45;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.role-dd-item:hover {
    background: rgba(217, 182, 74, .13);
    color: var(--gold-lt);
}
.role-dd-item.is-sel {
    background: rgba(217, 182, 74, .2);
    color: var(--gold-lt);
}
.role-dd-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.role-dd-lv {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-3);
}
.role-dd-item:hover .role-dd-lv,
.role-dd-item.is-sel .role-dd-lv {
    color: var(--gold);
}
.role-dd-check {
    flex: 0 0 auto;
    width: 0;
    height: 0;
    border: 0;
    transition: width .15s ease, height .15s ease;
}
.role-dd-item.is-sel .role-dd-check {
    width: 5px;
    height: 10px;
    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    transform: rotate(45deg);
    margin-right: 1px;
}

/* 切换时的忙碌态 */
.role-picker.is-busy .role-dd-btn {
    opacity: .55;
    cursor: progress;
}
.role-picker.is-busy .role-dd-list {
    pointer-events: none;
}

/* ============================================================
   轻提示（角色切换反馈）
   ============================================================ */
.toast {
    position: fixed;
    left: 50%;
    bottom: 36px;
    z-index: 200;
    transform: translate(-50%, 18px);
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(12, 18, 30, .96);
    color: var(--text-1);
    font-size: 13.5px;
    box-shadow: var(--shadow);
    pointer-events: none;
    opacity: 0;
    transition: opacity .28s ease, transform .28s ease;
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.toast.ok   { border-color: rgba(56, 211, 159, .5);  color: #9df0cd; }
.toast.bad  { border-color: rgba(240, 115, 110, .5); color: #f8b5b2; }

/* 移动端：角色选择器跟随导航一起收起 */
@media (max-width: 860px) {
    .role-picker {
        margin: 10px 0 4px;
        width: 100%;
        justify-content: space-between;
    }
    .role-dd      { width: 100%; }
    .role-dd-btn  { width: 100%; justify-content: flex-end; }
    .role-dd-cur  { max-width: none; }
    .role-dd-list {
        left: 0;
        right: 0;
        max-width: none;
        min-width: 0;
    }
}

/* 轻量渲染模式下不保留过渡 */
body.perf-lite .role-picker,
body.perf-lite .role-dd-list,
body.perf-lite .role-dd-item,
body.perf-lite .role-dd-caret,
body.perf-lite .toast {
    transition: none !important;
}
