/* ================================================================
   人生模拟器 - 全局样式表 (style.css)
   覆盖: 登录页 / 绑定页 / 游戏主页面
   主题: 深色游戏风 + 霓虹紫蓝强调色
   ================================================================ */

/* -------------------- 设计变量 -------------------- */
:root {
    /* 背景色阶 */
    --bg-deep: #0b0918;
    --bg-base: #110d24;
    --bg-grad-1: #0f0c29;
    --bg-grad-2: #1a1448;
    --bg-grad-3: #24243e;

    /* 卡片 / 面板 */
    --panel-bg: rgba(28, 24, 56, 0.72);
    --panel-bg-solid: #1c1838;
    --panel-border: rgba(124, 108, 240, 0.22);
    --panel-border-strong: rgba(124, 108, 240, 0.45);
    --panel-hover: rgba(40, 34, 78, 0.85);

    /* 强调色 */
    --accent: #7c6cf0;
    --accent-2: #8b5cf6;
    --accent-soft: rgba(124, 108, 240, 0.16);
    --cyan: #22d3ee;
    --gold: #fbbf24;
    --pink: #f472b6;

    /* 语义色 */
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.16);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.16);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.16);
    --info: #38bdf8;
    --info-soft: rgba(56, 189, 248, 0.16);

    /* 文字 */
    --text: #e8e8f5;
    --text-muted: #a3a0c4;
    --text-dim: #6f6c8f;

    /* 圆角 / 阴影 */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 24px rgba(124, 108, 240, 0.35);
    --glow-accent: 0 0 18px rgba(124, 108, 240, 0.55);

    /* 尺寸 */
    --nav-h: 62px;
    --side-w: 230px;
    --maxw: 1180px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

/* -------------------- 重置 -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
}

body {
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background: linear-gradient(135deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 42%, var(--bg-grad-3) 100%);
    background-attachment: fixed;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* 星光背景动效（全页通用） */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(120, 200, 255, 0.4), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 80% 20%, rgba(180, 140, 255, 0.4), transparent),
        radial-gradient(1px 1px at 35% 85%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(120, 200, 255, 0.3), transparent);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    animation: starShift 60s linear infinite;
}

@keyframes starShift {
    0% { opacity: .6; }
    50% { opacity: 1; }
    100% { opacity: .6; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--cyan); }

img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.25); }
::-webkit-scrollbar-thumb { background: var(--accent-soft); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* -------------------- 通用工具类 -------------------- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

/* ================================================================
   登录页  (login)
   ================================================================ */
.auth-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow), var(--shadow-glow);
    padding: 38px 30px 30px;
    animation: cardIn 0.5s ease;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo .logo-icon {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 0 14px rgba(124, 108, 240, 0.7));
}

.auth-logo h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
}

.auth-form .field {
    margin-bottom: 18px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 7px;
}

.auth-tip {
    background: var(--info-soft);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    color: #bfe9ff;
    margin-bottom: 18px;
    line-height: 1.5;
}

.auth-error {
    background: var(--danger-soft);
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    color: #ffcaca;
    margin-bottom: 18px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--text-dim);
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--panel-border);
}

.auth-foot {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-dim);
}

/* ================================================================
   表单控件（全站通用）
   ================================================================ */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="search"],
select,
textarea {
    width: 100%;
    background: rgba(15, 12, 30, 0.7);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 11px 14px;
    font-size: 15px;
    font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a3a0c4' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

option { background: var(--bg-base); color: var(--text); }

/* 复选框 */
.check-line {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-muted);
}
.check-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    flex: none;
}

/* 输入组 */
.input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.input-group input { flex: 1; }

/* ================================================================
   按钮（全站通用）
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 11px 20px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
    white-space: nowrap;
    line-height: 1.2;
}

.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 108, 240, 0.4);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 22px rgba(124, 108, 240, 0.6); }

.btn-cyan {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    color: #062a33;
    box-shadow: 0 4px 16px rgba(34, 211, 238, 0.35);
}
.btn-cyan:hover:not(:disabled) { box-shadow: 0 6px 22px rgba(34, 211, 238, 0.5); }

.btn-success {
    background: linear-gradient(135deg, #059669, #34d399);
    color: #06311f;
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.35);
}
.btn-success:hover:not(:disabled) { box-shadow: 0 6px 22px rgba(52, 211, 153, 0.5); }

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #f87171);
    color: #fff;
    box-shadow: 0 4px 16px rgba(248, 113, 113, 0.35);
}
.btn-danger:hover:not(:disabled) { box-shadow: 0 6px 22px rgba(248, 113, 113, 0.5); }

.btn-gold {
    background: linear-gradient(135deg, #d97706, #fbbf24);
    color: #3a2606;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.35);
}
.btn-gold:hover:not(:disabled) { box-shadow: 0 6px 22px rgba(251, 191, 36, 0.5); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--panel-border-strong);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { padding: 9px 11px; }

/* ================================================================
   绑定页 (bind)
   ================================================================ */
.bind-card {
    width: 100%;
    max-width: 440px;
    background: var(--panel-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow), var(--shadow-glow);
    padding: 34px 30px;
    animation: cardIn 0.5s ease;
}

.bind-qq-head {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--accent-soft);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 22px;
}
.bind-qq-head .qq-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    flex: none;
    background: var(--bg-base);
}
.bind-qq-head .qq-avatar.placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.bind-qq-head .qq-meta { flex: 1; min-width: 0; }
.bind-qq-head .qq-meta strong { font-size: 15px; display: block; }
.bind-qq-head .qq-meta span { font-size: 12px; color: var(--text-muted); }

/* ================================================================
   游戏主页面 (game)
   ================================================================ */
.game-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- 顶部导航 ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    background: rgba(15, 12, 30, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--panel-border);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.topbar .brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    flex: none;
}
.topbar .brand .brand-icon { -webkit-text-fill-color: initial; font-size: 22px; }

.topbar .spacer { flex: 1; }

.topbar .player-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-soft);
    border: 1px solid var(--panel-border);
    border-radius: 30px;
    padding: 6px 14px 6px 8px;
    font-size: 14px;
    max-width: 200px;
}
.player-chip .chip-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex: none;
}
.player-chip .chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-chip .chip-name small { display: block; font-size: 10px; color: var(--text-dim); line-height: 1; }

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    width: 40px; height: 40px;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex: none;
}

/* ---------- 主体布局 ---------- */
.game-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    width: var(--side-w);
    flex: none;
    padding: 18px 12px 30px;
    position: sticky;
    top: var(--nav-h);
    align-self: flex-start;
    height: calc(100vh - var(--nav-h));
    overflow-y: auto;
}

.nav-group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    padding: 14px 12px 7px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    padding: 11px 13px;
    font-size: 14.5px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    margin-bottom: 3px;
}
.nav-item .nav-ico { font-size: 18px; flex: none; width: 22px; text-align: center; }
.nav-item:hover {
    background: var(--accent-soft);
    color: var(--text);
}
.nav-item.active {
    background: linear-gradient(135deg, var(--accent-soft), rgba(34, 211, 238, 0.1));
    color: #fff;
    border-color: var(--panel-border-strong);
    box-shadow: inset 3px 0 0 var(--accent);
}

/* ---------- 主内容区 ---------- */
.main {
    flex: 1;
    min-width: 0;
    padding: 22px 18px 60px;
}

/* 面板/卡片 */
.panel {
    display: none;
    animation: panelIn 0.35s ease;
}
.panel.active { display: block; }

@keyframes panelIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--panel-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--panel-border);
}
.card-title .ct-ico { font-size: 20px; }
.card-title .ct-actions { margin-left: auto; display: flex; gap: 8px; }

.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.section-head h2 {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 1px;
}
.section-head .sh-actions { margin-left: auto; }

/* ---------- 角色信息 ---------- */
.char-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.char-avatar {
    width: 78px; height: 78px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: 38px;
    flex: none;
    box-shadow: var(--glow-accent);
}
.char-hero .char-name {
    font-size: 24px;
    font-weight: 800;
}
.char-hero .char-sub { color: var(--text-muted); font-size: 14px; margin-top: 3px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 6px;
}
.stat-box {
    background: rgba(15, 12, 30, 0.5);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
}
.stat-box .sb-label { font-size: 12px; color: var(--text-muted); }
.stat-box .sb-value { font-size: 22px; font-weight: 800; margin-top: 2px; }

/* 属性进度条 */
.attr-list { display: grid; gap: 14px; }
.attr-row { display: flex; flex-direction: column; gap: 6px; }
.attr-row .attr-top {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
}
.attr-row .attr-top .attr-name { color: var(--text-muted); }
.attr-row .attr-top .attr-val { font-weight: 700; }
.bar-track {
    height: 9px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    transition: width 0.6s ease;
    width: 0;
}
.bar-fill.gold { background: linear-gradient(90deg, #d97706, var(--gold)); }
.bar-fill.green { background: linear-gradient(90deg, #059669, var(--success)); }
.bar-fill.pink { background: linear-gradient(90deg, #db2777, var(--pink)); }
.bar-fill.cyan { background: linear-gradient(90deg, #0891b2, var(--cyan)); }
.bar-fill.violet { background: linear-gradient(90deg, #7c3aed, var(--accent-2)); }

/* ---------- 徽章 / 标签 ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid transparent;
    line-height: 1.5;
}
.badge-accent { background: var(--accent-soft); color: #cbbfff; border-color: var(--panel-border-strong); }
.badge-success { background: var(--success-soft); color: var(--success); border-color: rgba(52,211,153,.3); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(248,113,113,.3); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(251,191,36,.3); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: rgba(56,189,248,.3); }
.badge-muted { background: rgba(255,255,255,0.06); color: var(--text-muted); border-color: var(--panel-border); }
.badge-gold { background: var(--warning-soft); color: var(--gold); border-color: rgba(251,191,36,.3); }

/* ---------- 网格卡片（酒店/食物/工作/商品） ---------- */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}
.item-card {
    display: flex;
    flex-direction: column;
    background: rgba(15, 12, 30, 0.55);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 16px;
    transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}
.item-card:hover {
    transform: translateY(-3px);
    border-color: var(--panel-border-strong);
    box-shadow: var(--shadow), 0 0 18px rgba(124, 108, 240, 0.2);
}
.item-card .ic-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.item-card .ic-name { font-size: 16px; font-weight: 700; }
.item-card .ic-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; flex: 1; }
.item-card .ic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 12.5px;
}
.item-card .ic-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}
.item-card .ic-price { font-size: 18px; font-weight: 800; color: var(--gold); }

/* ---------- 银行卡 ---------- */
.bank-card-visual {
    position: relative;
    border-radius: var(--radius);
    padding: 18px;
    min-height: 130px;
    background: linear-gradient(135deg, #3b2a6b, #1a1448);
    border: 1px solid var(--panel-border-strong);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.bank-card-visual::after {
    content: "";
    position: absolute;
    top: -40%; right: -20%;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(34,211,238,.35), transparent 70%);
    border-radius: 50%;
}
.bank-card-visual .bc-name { font-size: 14px; color: var(--text-muted); }
.bank-card-visual .bc-num { font-size: 17px; letter-spacing: 2px; margin: 12px 0 8px; font-family: monospace; }
.bank-card-visual .bc-bal { font-size: 22px; font-weight: 800; color: var(--gold); }
.bank-card-visual .bc-status { position: absolute; top: 16px; right: 16px; }

/* ---------- 表格 ---------- */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
}
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 560px;
}
.data-table thead th {
    background: rgba(124, 108, 240, 0.14);
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 12px 14px;
    white-space: nowrap;
    border-bottom: 1px solid var(--panel-border);
}
.data-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(124, 108, 240, 0.1);
    white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--accent-soft); }
.data-table .amt-in { color: var(--success); font-weight: 600; }
.data-table .amt-out { color: var(--danger); font-weight: 600; }

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.pagination .pg-info { color: var(--text-muted); font-size: 13px; margin: 0 10px; }
.pagination button {
    min-width: 38px;
    height: 38px;
    border: 1px solid var(--panel-border);
    background: rgba(15, 12, 30, 0.6);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    padding: 0 10px;
    transition: background 0.15s, border-color 0.15s;
}
.pagination button:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.pagination button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- 状态行 / 信息行 ---------- */
.info-list { display: grid; gap: 10px; }
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(15, 12, 30, 0.5);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
}
.info-row .ir-key { color: var(--text-muted); font-size: 14px; }
.info-row .ir-val { font-weight: 700; font-size: 15px; text-align: right; }

/* ---------- 表单卡片 ---------- */
.form-card {
    display: grid;
    gap: 14px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form-field label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 空状态 / 加载 ---------- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state .es-icon { font-size: 46px; opacity: 0.6; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.spinner {
    width: 38px; height: 38px;
    border: 3px solid var(--accent-soft);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, rgba(124,108,240,0.08) 25%, rgba(124,108,240,0.18) 50%, rgba(124,108,240,0.08) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Toast 通知 ---------- */
.toast-wrap {
    position: fixed;
    top: calc(var(--nav-h) + 14px);
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    width: calc(100% - 36px);
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: var(--panel-bg-solid);
    border: 1px solid var(--panel-border-strong);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    box-shadow: var(--shadow);
    font-size: 14px;
    animation: toastIn 0.3s ease;
    backdrop-filter: blur(10px);
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast .t-ico { font-size: 18px; flex: none; line-height: 1.4; }
.toast .t-body { flex: 1; min-width: 0; word-break: break-word; }
.toast .t-close {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; font-size: 16px; line-height: 1; flex: none; padding: 0;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(40px); }
}

/* ---------- 当前状态横幅 ---------- */
.status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--info-soft);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 18px;
}
.status-banner .sb-ico { font-size: 24px; flex: none; }
.status-banner .sb-txt { flex: 1; font-size: 14px; }
.status-banner .sb-txt strong { display: block; font-size: 15px; }
.status-banner.warning { background: var(--warning-soft); border-color: rgba(251,191,36,.3); }
.status-banner.success { background: var(--success-soft); border-color: rgba(52,211,153,.3); }
.status-banner.danger { background: var(--danger-soft); border-color: rgba(248,113,113,.3); }

/* ---------- QQ 绑定卡片 ---------- */
.bind-status-box {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.bind-status-box .bq-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
    background: var(--bg-base);
    flex: none;
}
.bind-status-box .bq-avatar.placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
}

/* ================================================================
   响应式
   ================================================================ */
@media (max-width: 860px) {
    .menu-toggle { display: inline-flex; }

    .game-layout { flex-direction: column; }

    .sidebar {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        z-index: 90;
        width: 78%;
        max-width: 300px;
        height: calc(100vh - var(--nav-h));
        background: rgba(17, 13, 36, 0.97);
        backdrop-filter: blur(18px);
        border-right: 1px solid var(--panel-border);
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        padding-top: 16px;
    }
    .sidebar.open { transform: translateX(0); }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: var(--nav-h) 0 0 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 80;
    }
    .sidebar-backdrop.show { display: block; }

    .main { padding: 16px 12px 50px; }

    .topbar .player-chip { max-width: 140px; }
    .topbar .brand { font-size: 16px; }

    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .item-grid { grid-template-columns: 1fr; }
    .char-hero { gap: 12px; }
    .char-avatar { width: 64px; height: 64px; font-size: 32px; }
    .char-hero .char-name { font-size: 20px; }
    .card { padding: 16px; }
    .topbar { padding: 0 12px; gap: 10px; }
    .player-chip .chip-name small { display: none; }
    .btn { padding: 10px 16px; font-size: 14px; }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
