/* ============================================================
   智绘精灵 · V3 前端改版 — 深色 AI 科技风（设计系统）
   布局：侧边栏大厂框架 + 顶栏 + 内容区；保留全部业务 DOM 契约
   ============================================================ */
:root {
  --bg: #0a0d14;
  --bg-soft: #0d1120;
  --panel: #111627;
  --card: #141b30;
  --card-hover: #182139;
  --border: #232c44;
  --border-soft: #1c2438;
  --text: #e9edf6;
  --text-dim: #9aa6bd;
  --text-faint: #5e6a84;
  --brand: #7c5cff;
  --brand-2: #4e8bff;
  --brand-soft: rgba(124, 92, 255, 0.14);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --grad: linear-gradient(135deg, #7c5cff 0%, #4e8bff 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(78, 139, 255, 0.16));
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --sidebar-w: 232px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
  color-scheme: dark;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font); }
html { -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
}
button { outline: none; }
button:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

/* 原生下拉框：弹层（option 列表）统一暗色底 + 浅色字，避免白底白字看不清 */
select { color-scheme: dark; }
select option {
  background-color: var(--panel);
  color: var(--text);
}

/* ---------- 背景装饰 ---------- */
.bg-deco { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-deco::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124, 92, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-deco .orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.bg-deco .orb-a { width: 480px; height: 480px; top: -180px; right: -80px; background: #5b3df5; }
.bg-deco .orb-b { width: 420px; height: 420px; bottom: -160px; left: -120px; background: #1e5eff; opacity: 0.35; }
/* AI 神经网络粒子动效层（Canvas）：放在 orbs 之上，网格之下不需要，整体盖住装饰即可 */
.bg-deco #bg-particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; z-index: 2;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2b3552; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a4570; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   登录 / 注册 / 找回密码
   ============================================================ */
.auth {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-split {
  position: relative;
  /* 已去掉视觉容器（无背景/边框/毛玻璃/圆角/阴影），背景粒子特效完全透出；仅保留内容布局 */
  display: flex; flex-direction: column; justify-content: center;
  width: 100%;
  /* 上下随视口高缩放，左右随视口宽缩放（无固定上限），避免大屏被挤成竖屏 */
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 80px);
}
/* 横幅下方的左右两栏容器：品牌区+表单区 flex 整体居中 */
.auth-split-body {
  display: flex; justify-content: center;
  width: 100%;
  flex: 1 1 auto; min-height: 0;
}
.auth-brand-panel {
  position: relative; z-index: 1;
  flex: 1 1 880px; max-width: 880px; min-width: 0;
  display: flex; flex-direction: column;
  align-items: center; /* 内容块水平居中，避免宽屏下贴左留大空白 */
  padding: 30px 40px 24px;
  overflow-y: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.auth-brand-panel::-webkit-scrollbar { display: none; }
/* 左侧顶部 logo（智绘精灵 ZHI-HUI JING-LING + 图标）已按需求移除，.auth-brand-logo 相关样式一并删除 */
.ab-hero {
  flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 14px 0;
  /* 锚定右侧表单区：内容区靠右贴住分界，缩放时中间不留白 */
  width: 100%; max-width: 880px; margin-left: auto;
}
.ab-tag {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  font-size: 14px; font-weight: 600; color: #b3a1ff;
  background: var(--brand-soft); border: 1px solid rgba(124, 92, 255, 0.35);
  padding: 7px 18px; border-radius: 999px;
}
.ab-tag i { font-size: 13px; }
.ab-hero h2 { font-size: 48px; font-weight: 800; line-height: 1.25; margin: 16px 0 14px; letter-spacing: -0.5px; }
.ab-hero h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ab-desc { color: var(--text-dim); font-size: 17px; line-height: 1.8; max-width: 720px; }

/* ---------- 降本增效痛点横幅（登录区顶部，横跨品牌区+表单区全宽） ---------- */
.ab-highlight {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; margin: 0 0 20px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(78, 139, 255, 0.16));
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 14px; padding: 18px 24px;
  font-size: 19px; color: var(--text); line-height: 1.6;
}
.ab-highlight i { color: #b3a1ff; font-size: 17px; flex-shrink: 0; }
.ab-highlight b { color: #b3a1ff; font-weight: 700; }
.ab-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; max-width: 880px; }
.ab-feat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 18px 22px; display: flex; align-items: center; gap: 15px;
}
.ab-feat .f-ico {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--grad-soft); display: grid; place-items: center;
  color: var(--brand-2); font-size: 17px; flex-shrink: 0;
}
.ab-feat .f-t { font-size: 16px; font-weight: 700; }
.ab-feat .f-d { font-size: 14px; color: var(--text-faint); line-height: 1.5; }

/* ---------- 平台数据统计条 ---------- */
.ab-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 24px; max-width: 880px; width: 100%;
}
.ab-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 18px 20px;
}
.ab-stat .s-num {
  font-size: 26px; font-weight: 800; letter-spacing: 0.2px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ab-stat .s-lb { font-size: 14px; color: var(--text-faint); margin-top: 5px; }

/* ---------- 三步上手 ---------- */
.ab-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 16px; max-width: 880px; width: 100%;
}
.ab-step {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 18px 20px;
}
.ab-step .st-idx {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: var(--grad-soft); color: #b3a1ff;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.ab-step .st-t { font-size: 16px; font-weight: 700; }
.ab-step .st-d { font-size: 14px; color: var(--text-faint); line-height: 1.5; margin-top: 3px; }
.ab-dl { position: relative; z-index: 1; margin-top: 18px; width: 100%; max-width: 880px; }
.dl-btn-big {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  width: 100%;
  background: var(--grad); color: #fff; text-decoration: none;
  font-family: var(--font); font-size: 16px; font-weight: 700;
  padding: 15px 30px; border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.4);
  transition: all 0.15s;
}
.dl-btn-big i { font-size: 15px; }
.dl-btn-big:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 12px 30px rgba(124, 92, 255, 0.5); }
.dl-btn-big .dl-ver {
  font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, 0.18); padding: 2px 10px; border-radius: 999px;
}
.dl-btn-big.off { opacity: 0.75; pointer-events: none; }
.dl-meta { font-size: 13px; color: var(--text-faint); margin-top: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dl-meta .dl-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.ab-foot { position: relative; z-index: 1; font-size: 13px; color: var(--text-faint); margin-top: 16px; }

/* ---------- 右侧表单区 ---------- */
.auth-side {
  position: relative; z-index: 1;
  flex: 0 1 460px; max-width: 460px; min-width: 0;
  /* 外侧 padding 与左品牌区对称（右 40），内容整体不偏左 */
  padding: 32px 40px 32px 24px;
  /* 表单卡垂直+水平居中：flex + .auth-card{margin:auto} 实现「安全居中」——
     内容超出时 auto margin 自动归零贴顶，滚动区从顶部可达；
     原 grid place-items:center 居中溢出会在起始侧（顶部）裁切且滚不到（矮屏桌面实测复现） */
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.auth-card {
  width: min(400px, 100%); max-width: 100%; min-width: 0;
  margin: auto; /* 双轴安全居中：不超高时居中，超高时贴起 top 可滚动 */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 34px 30px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 24px; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  background: var(--grad); display: grid; place-items: center;
  font-size: 22px; color: #fff; box-shadow: 0 6px 18px rgba(124, 92, 255, 0.45);
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.auth-brand .b-name { font-size: 20px; font-weight: 800; letter-spacing: 0.3px; }
.auth-brand .b-name em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand .b-sub { font-size: 11px; color: var(--text-faint); text-align: center; margin-top: 2px; }
.auth-card h1 { font-size: 20px; font-weight: 800; text-align: center; }
.auth-card .a-sub { font-size: 13px; color: var(--text-dim); text-align: center; margin: 8px 0 22px; line-height: 1.6; }
.field { margin-bottom: 16px; }
.field .label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }
.input-field {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-field:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(78, 139, 255, 0.18); }
.input-field.error { border-color: var(--danger); }
.input-field i { color: var(--text-faint); font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.input-field input {
  background: transparent; border: none; outline: none; flex: 1;
  color: var(--text); font-size: 14px; min-width: 0;
}
.input-field input::placeholder { color: var(--text-faint); }
.password-toggle { cursor: pointer; color: var(--text-faint) !important; }
.password-toggle:hover { color: var(--text) !important; }
.field-error { display: none; font-size: 12px; color: var(--danger); margin: 6px 2px 0; }
.field-error.show { display: block; }
.auth-btn {
  width: 100%; border: none; cursor: pointer;
  background: var(--grad); color: #fff;
  font-family: var(--font); font-size: 15px; font-weight: 700; letter-spacing: 1px;
  padding: 13px 0; border-radius: var(--radius-sm);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.35);
  transition: all 0.15s; margin-top: 6px;
}
.auth-btn:hover { filter: brightness(1.1); box-shadow: 0 8px 24px rgba(124, 92, 255, 0.45); }
.auth-btn:active { transform: translateY(1px); }
.btn-text { display: inline-flex; align-items: center; gap: 7px; }
.btn-loading { opacity: 0.75; pointer-events: none; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.auth-switch { font-size: 13px; color: var(--text-dim); }
.auth-switch span { color: var(--brand-2); cursor: pointer; font-weight: 600; }
.auth-switch span:hover { text-decoration: underline; }
.forgot-link { color: var(--text-faint); font-size: 13px; cursor: pointer; transition: color 0.15s; }
.forgot-link:hover { color: var(--brand-2); }
.save-btn {
  background: var(--brand-soft); color: #b3a1ff; border: 1px solid rgba(124, 92, 255, 0.35);
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
}
.save-btn:hover { background: rgba(124, 92, 255, 0.22); }
/* .btn 基类：供 .btn-primary/.btn-ghost 等修饰类单独组合（如充值成功页「完成」btn btn-primary），
   缺基类时按钮只带渐变背景、无内边距/圆角/字体（浏览器默认 2px outset 边框 + 直角），
   且会被浏览器默认 Arial 字体覆盖。修饰/尺寸类（btn-sm/btn-lg/btn-ghost…）在文件后部，同优先级按出现顺序覆盖，无回归。 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font); font-size: 13px; font-weight: 600; line-height: 1.4;
  padding: 9px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: all 0.15s; user-select: none;
}
.btn-sm {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, 0.05); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--font); font-size: 12px; font-weight: 600;
  padding: 5px 11px; cursor: pointer; white-space: nowrap; transition: all 0.14s;
}
.btn-sm svg { width: 13px; height: 13px; }
.btn-sm:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); border-color: #334060; }
.btn-lg {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff; border: none; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 700;
  padding: 11px 22px; border-radius: var(--radius-sm);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.3); transition: all 0.15s;
}
.btn-lg:hover { filter: brightness(1.1); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(124, 92, 255, 0.35); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 8px 24px rgba(124, 92, 255, 0.45); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #334060; }
.btn-success { background: var(--success-soft); color: var(--success); border: 1px solid transparent; }
.btn-success:hover { background: rgba(52, 211, 153, 0.2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid transparent; }
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }

/* ============================================================
   主应用骨架：侧边栏 + 顶栏 + 内容
   ============================================================ */
#app-container { display: none; }
.shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, rgba(17, 22, 39, 0.92), rgba(10, 13, 20, 0.72));
  border-right: 1px solid var(--border-soft);
  backdrop-filter: blur(12px);
}
.logo { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; }
.logo .logo-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.logo-name { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.logo-name em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-sub { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.nav { flex: 1; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; margin-top: 4px; }
.nav-group { font-size: 11px; color: var(--text-faint); letter-spacing: 1.2px; padding: 16px 12px 7px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: all 0.16s;
  position: relative; background: none; border: none; width: 100%; text-align: left;
  font-family: var(--font);
}
.nav-item i { width: 17px; text-align: center; flex-shrink: 0; opacity: 0.85; font-size: 15px; }
.nav-item:hover { background: rgba(124, 92, 255, 0.08); color: var(--text); }
.nav-item.active { color: #fff; font-weight: 600; background: var(--grad-soft); }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 20%; bottom: 20%;
  width: 3px; border-radius: 4px; background: var(--grad);
}
.nav-item.active i { opacity: 1; }
.nav-badge { margin-left: auto; font-size: 10.5px; font-weight: 600; background: var(--brand-soft); color: #b3a1ff; padding: 2px 8px; border-radius: 999px; }
.user-box {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; margin-top: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 700;
  display: grid; place-items: center;
}
.user-box .uname { font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-box .uplan { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; flex-shrink: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10, 13, 20, 0.55);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 12.5px; color: var(--text-faint); display: flex; align-items: center; gap: 8px; }
.crumb b { color: var(--text-dim); font-weight: 600; }
.crumb b.cur { color: var(--text); }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid transparent;
  color: var(--text-dim); cursor: pointer; transition: all 0.15s; position: relative;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); border-color: var(--border); }
.icon-btn i { font-size: 16px; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); border: 2px solid var(--bg); }
.content { padding: 20px 28px 28px; width: 100%; flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* 联系客服弹层 */
.contact-popup {
  position: fixed; top: 76px; right: 28px; z-index: 1000;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; width: 240px; max-width: calc(100vw - 40px);
  box-shadow: var(--shadow); display: none;
}
.contact-popup.show { display: block; }
.contact-popup .close-btn { position: absolute; top: 6px; right: 12px; color: var(--text-faint); cursor: pointer; font-size: 1.2rem; }
.contact-popup .close-btn:hover { color: var(--text); }
.contact-popup h3 { font-size: 14px; margin-bottom: 12px; text-align: center; }
.contact-popup img { width: 190px; height: 190px; display: block; margin: 0 auto; border-radius: 10px; }
.contact-popup p { font-size: 12px; color: var(--text-faint); text-align: center; margin-top: 10px; }

/* ============================================================
   首页（home-view）
   ============================================================ */
.welcome-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.welcome-row h1 { font-size: 23px; font-weight: 800; }
.welcome-row h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome-row .w-desc { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.welcome-row .w-desc b { color: #b3a1ff; font-weight: 700; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1024px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}

.dashboard-card {
  text-decoration: none; display: flex; flex-direction: column; gap: 4px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 20px;
  transition: all 0.16s; position: relative; overflow: hidden;
}
.dashboard-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  border-radius: 50%; background: var(--grad-soft); filter: blur(26px); opacity: 0.55; transition: opacity 0.2s;
}
.dashboard-card:hover { transform: translateY(-3px); border-color: rgba(124, 92, 255, 0.45); box-shadow: var(--shadow); }
.dashboard-card:hover::after { opacity: 1; }
.dashboard-card .card-icon {
  width: 42px; height: 42px; border-radius: 13px; margin-bottom: 14px;
  background: var(--grad-soft); border: 1px solid rgba(124, 92, 255, 0.25);
  display: grid; place-items: center; color: var(--brand-2); font-size: 19px;
}
.dashboard-card .card-title { font-size: 15.5px; font-weight: 700; }
.dashboard-card .card-desc { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.6; flex: 1; }
.dashboard-card .card-badge { font-size: 12.5px; font-weight: 600; color: var(--brand-2); display: flex; align-items: center; gap: 5px; margin-top: 12px; }

/* ============================================================
   首页卡片丰富化 · 大号半透明图标背景 + 每卡专属主题色（V3）
   - container-type: inline-size 让卡片成为查询容器，子元素用 cqw
     （= 卡片宽度的 1%）做装饰/字体缩放：卡片随屏幕拉伸，装饰同步缩放
   - contain:layout 同时让卡片成为层叠上下文，背景装饰 z-index:-1
     自然垫在文字/图标之下，无需逐元素调层级
   ============================================================ */
.dashboard-card {
  --accent: var(--brand-2); container-type: inline-size;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0) 45%),
    color-mix(in srgb, var(--card) 62%, transparent);
  border-color: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.dashboard-card::after {
  right: -30px; top: -30px; width: 120px; height: 120px;
  background: var(--accent); filter: blur(30px); opacity: 0.45; z-index: -1;
}
.dashboard-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.12));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 45%),
    color-mix(in srgb, var(--card) 72%, transparent);
}
.dashboard-card:hover::after { opacity: 0.85; }
.dashboard-card .card-icon {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}
.dashboard-card .card-badge { color: var(--accent); }

/* 大号背景图标：贴在右上角、随卡片宽度(cqw)缩放，hover 亮起并轻微放大 */
.card-bg-icon {
  position: absolute; right: -3cqw; top: -3cqw; z-index: -1;
  font-size: clamp(56px, 24cqw, 140px); line-height: 1;
  color: var(--accent, var(--brand-2)); opacity: 0.16;
  pointer-events: none; user-select: none;
  transition: opacity 0.2s, transform 0.2s;
}
.dashboard-card:hover .card-bg-icon, .card:hover .card-bg-icon { opacity: 0.3; transform: scale(1.05); }

/* 每卡专属主题色（--accent 用于小卡图标/光晕，--card-glow 用于大卡角落光晕） */
.accent-violet { --accent: #b3a1ff; --card-glow: #b3a1ff; }
.accent-blue   { --accent: #7ea8ff; --card-glow: #7ea8ff; }
.accent-pink   { --accent: #f79cc4; --card-glow: #f79cc4; }
.accent-amber  { --accent: #ffc97a; --card-glow: #ffc97a; }
.accent-green  { --accent: #7fe0ae; --card-glow: #7fe0ae; }
.accent-cyan   { --accent: #62cfe0; --card-glow: #62cfe0; }

.card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 20px;
}
.card.glow { border-color: rgba(124, 92, 255, 0.35); box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.15), var(--shadow); }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-title .ico {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--brand-2); flex-shrink: 0; font-size: 13px;
}
.card-header .spacer { flex: 1; }
.s-label { font-size: 12px; color: var(--text-faint); }
.s-value { font-size: 14.5px; font-weight: 700; margin-top: 6px; }
.s-value.mono { font-family: var(--mono); }
.balance-hero {
  font-size: 30px; font-weight: 800; margin-top: 5px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.divider-hr { border: none; border-top: 1px solid var(--border-soft); margin: 18px 0; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.muted { color: var(--text-faint); }
.dim { color: var(--text-dim); }
.link { color: var(--brand-2); text-decoration: none; font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
}
.chip.gray { background: rgba(255, 255, 255, 0.06); color: var(--text-dim); }
.chip.violet { background: var(--brand-soft); color: #b3a1ff; }
.chip.green { background: var(--success-soft); color: var(--success); }
.chip.amber { background: var(--warning-soft); color: var(--warning); }
.chip.red { background: var(--danger-soft); color: var(--danger); }
.chip.blue { background: rgba(78, 139, 255, 0.14); color: #8fb6ff; }

/* 最近出图（装饰占位） */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.shot {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border-soft); cursor: pointer;
  background: var(--panel);
}
.shot .img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.35s; }
.shot:hover .img { transform: scale(1.05); }
.shot .veil {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 13px; opacity: 0; transition: opacity 0.2s;
  background: linear-gradient(180deg, transparent 30%, rgba(5, 7, 12, 0.85) 100%);
}
.shot:hover .veil { opacity: 1; }
.shot .v-title { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.shot .chip { position: absolute; top: auto; right: 10px; bottom: 10px; left: auto; }

/* V3 优化：首页一屏放下 — 字体/图标随卡片宽度(cqw)自适应缩放，大屏卡片拉伸时同步放大 */
#home-view .welcome-row { margin-bottom: 14px; }
#home-view .welcome-row h1 { font-size: clamp(20px, 1.5vw, 26px); }
#home-view .welcome-row .w-desc { margin-top: 4px; }
#home-view .grid { gap: 12px; }
#home-view .grid.cols-2.mt-16 { margin-top: 12px; }
#home-view .dashboard-card { padding: clamp(14px, 1.2vw, 22px); gap: 4px; }
#home-view .dashboard-card .card-icon { width: clamp(34px, 8.2cqw, 46px); height: clamp(34px, 8.2cqw, 46px); border-radius: clamp(11px, 2.6cqw, 15px); margin-bottom: clamp(10px, 1.9cqw, 16px); font-size: clamp(16px, 3.9cqw, 22px); }
#home-view .dashboard-card .card-title { font-size: clamp(15px, 3.3cqw, 18px); }
#home-view .dashboard-card .card-desc { font-size: clamp(12.5px, 2.6cqw, 14.5px); margin-top: clamp(3px, 0.7cqw, 7px); line-height: 1.55; }
#home-view .dashboard-card .card-badge { margin-top: clamp(8px, 1.6cqw, 14px); font-size: clamp(12.5px, 2.6cqw, 14.5px); }
#home-view .card { padding: clamp(16px, 1.4vw, 24px); position: relative; overflow: hidden; container-type: inline-size; background: radial-gradient(130% 95% at 100% 0%, color-mix(in srgb, var(--card-glow, #b3a1ff) 15%, transparent), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 40%), color-mix(in srgb, var(--card) 62%, transparent); border-color: rgba(255, 255, 255, 0.09); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
#home-view .card-header { margin-bottom: 12px; }
#home-view .balance-hero { font-size: clamp(26px, 4.6cqw, 40px); }
#home-view .divider-hr { margin: 12px 0; }
#home-view .gallery { gap: 10px; }
#home-view .shot { aspect-ratio: auto; height: 112px; }
/* V3 优化：大屏纵向铺满 — 首页内容区撑满视口高度，卡片/画廊随高度自适应拉伸。
   仅桌面（≥1025px 三列布局）启用：flex:1 + min-height:0 + grid-auto-rows:minmax(0,1fr)
   依赖父级有确定高度才会拉伸/压缩；外壳 .shell 是 min-height:100vh（随内容生长），
   小屏/矮屏内容超出时自然滚动、卡片保持内容高度。把压缩链锁进桌面媒体查询，
   避免任何祖先出现定高时小屏卡片被压扁裁切（minmax(0,1fr) 行高压到 0）。 */
#home-view .grid.cols-2 .card { display: flex; flex-direction: column; }
#home-view .grid.cols-2 .card .divider-hr { margin-top: auto; }
@media (min-width: 1025px) {
  #home-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  #home-view .grid.cols-3 { flex: 1; grid-auto-rows: minmax(0, 1fr); min-height: 0; }
  #home-view .grid.cols-2 { flex: 1; min-height: 0; }
  #home-view .gallery { flex: 1; grid-auto-rows: minmax(112px, 1fr); min-height: 0; }
  #home-view .shot { height: auto; }
}

/* 小屏（窄屏单列堆叠 8 张卡）降低模糊强度，避免低端机毛玻璃采样开销 */
@media (max-width: 620px) {
  .dashboard-card, #home-view .card {
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
  }
}

/* ============================================================
   个人中心（user-profile-view）
   ============================================================ */
#user-profile-view { display: none; }
.page-header { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-header .grow { flex: 1; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: 0.2px; }
.page-desc { font-size: 13px; color: var(--text-dim); margin-top: 5px; line-height: 1.55; }
.close-profile { font-size: 24px; color: var(--text-faint); cursor: pointer; line-height: 1; }
.close-profile:hover { color: var(--text); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-soft); margin-bottom: 18px; }
.tab {
  padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: flex; align-items: center; gap: 7px; transition: all 0.15s;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--font);
}
.tab:hover { color: var(--text); }
.tab.active { color: #fff; border-bottom-color: var(--brand-2); }
.tab-panel { display: none; animation: panel-in 0.18s ease; }
.tab-panel.active { display: block; }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.profile-section, .referral-section, .bind-referrer-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 22px; margin-bottom: 16px;
}
.profile-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.profile-item:last-child { border-bottom: none; }
.profile-label { font-size: 13px; color: var(--text-dim); font-weight: 600; flex-shrink: 0; width: 110px; }
.profile-value { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.profile-value input {
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 13.5px;
  padding: 8px 12px; outline: none; width: 200px; max-width: 100%;
}
.profile-value input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(78, 139, 255, 0.18); }
.eye-icon { color: var(--text-faint); cursor: pointer; }
.eye-icon:hover { color: var(--text); }
.masked-phone { font-family: var(--mono); }
.balance-section {
  background: linear-gradient(150deg, #1b1440 0%, #141b30 55%, #111627 100%);
  border: 1px solid rgba(124, 92, 255, 0.35); border-radius: var(--radius);
  padding: 24px; margin-bottom: 16px; text-align: center;
}
.balance-icon { font-size: 22px; color: #b3a1ff; }
.balance-amount {
  font-size: 34px; font-weight: 800; margin-top: 8px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.balance-label { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }
.referral-section h3, .bind-referrer-section h3 { font-size: 14.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.referral-section h3 i, .bind-referrer-section h3 i { color: var(--brand-2); }
.ref-code {
  font-family: var(--mono); font-size: 17px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  padding: 6px 16px; border-radius: 999px; color: #8fb6ff;
}
.referral-hint { font-size: 12.5px; color: var(--text-faint); margin-top: 10px; line-height: 1.6; }

/* ============================================================
   Toast
   ============================================================ */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 99999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  min-width: 200px; max-width: 360px;
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--brand-2);
  border-radius: var(--radius-sm); padding: 12px 18px;
  color: var(--text); font-size: 13.5px;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateX(120%);
  transition: all 0.3s ease; pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }

/* ============================================================
   自定义弹窗（showPrompt / showConfirm / 改密码）
   ============================================================ */
.custom-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 60;
  background: rgba(4, 6, 12, 0.68); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 24px;
}
.custom-modal-overlay.show { display: flex; }
.custom-modal-box {
  width: 440px; max-width: 100%;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: pop 0.22s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.custom-modal-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.custom-modal-box p { color: var(--text-dim); font-size: 13px; margin-bottom: 18px; line-height: 1.6; word-break: break-word; }
.custom-modal-box input {
  width: 100%; background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 13.5px; padding: 10px 13px; outline: none;
  transition: all 0.15s;
}
.custom-modal-box input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(78, 139, 255, 0.18); }
.custom-modal-input { width: 100% !important; margin-bottom: 0 !important; }
.custom-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.btn-cancel {
  background: rgba(255, 255, 255, 0.05); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 9px 18px; cursor: pointer; transition: all 0.15s;
}
.btn-cancel:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.btn-confirm {
  background: var(--grad); color: #fff; border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 700;
  padding: 9px 20px; cursor: pointer; transition: all 0.15s;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.3);
}
.btn-confirm:hover { filter: brightness(1.1); }

/* ============================================================
   内容视图（view）— 侧边栏统一在中间内容区渲染
   ============================================================ */
.view { display: none; position: static; background: transparent; flex-direction: column; align-items: stretch; justify-content: flex-start; z-index: auto; padding: 26px 28px 60px; width: 100%; }
.view .modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap; gap: 12px;
}
.view .modal-header h2 { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.view .modal-header h2 i { color: var(--brand-2); }
.view .modal-header > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.view-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.05); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  padding: 7px 14px; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.view-back i { font-size: 12px; }
.view-back:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); border-color: #334060; }
.view .filter-bar { padding: 0; }
.view .image-grid { padding: 0; }
#recharge-modal { max-width: clamp(460px, 30vw, 640px); margin: 0 auto; }
#recharge-records-modal { max-width: 640px; }
#download-modal { max-width: clamp(520px, 34vw, 780px); margin: 0 auto; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; flex-wrap: wrap; gap: 10px;
}
.modal-header h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.modal-header h2 i { color: var(--brand-2); }
.close-modal, .close-fullscreen {
  color: var(--text-faint); font-size: 26px; cursor: pointer;
  transition: all 0.12s; padding: 4px; line-height: 1;
}
.close-modal:hover, .close-fullscreen:hover { color: var(--text); transform: scale(1.15); }

/* 筛选条 */
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input {
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  color: var(--text); font-size: 13px; outline: none; cursor: pointer;
  font-family: var(--font); transition: all 0.15s;
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(78, 139, 255, 0.18); }
.filter-bar input::placeholder { color: var(--text-faint); }
.search-wrap { position: relative; display: inline-block; }
.search-wrap input { padding-right: 28px; width: 180px; }
.search-wrap .search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: var(--text-faint); font-size: 15px; display: none; line-height: 1;
}
.search-wrap .search-clear:hover { color: var(--text); }

/* 表格 */
.table-wrap { border: 1px solid var(--border-soft); border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; }
.keys-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.keys-table th {
  text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: 0.6px;
  color: var(--text-faint); text-transform: uppercase;
  padding: 12px 16px; background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border-soft); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.keys-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.keys-table tr:last-child td { border-bottom: none; }
.keys-table tbody tr { transition: background 0.12s; }
.keys-table tbody tr:hover { background: rgba(124, 92, 255, 0.045); }
.keys-table .num { font-family: var(--mono); font-size: 12.5px; }
.default-key-row { background: rgba(251, 191, 36, 0.07); }
.default-key-row:hover { background: rgba(251, 191, 36, 0.1) !important; }
.key-row-disabled { opacity: 0.55; }
.status-enabled { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--success); background: var(--success-soft); padding: 3px 10px; border-radius: 999px; }
.status-disabled { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-faint); background: rgba(255, 255, 255, 0.06); padding: 3px 10px; border-radius: 999px; }
.status-enabled::before, .status-disabled::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.default-badge { color: var(--warning); font-weight: 700; margin-left: 8px; font-size: 11px; background: var(--warning-soft); padding: 2px 8px; border-radius: 999px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; font-size: 13px; color: var(--text-dim); flex-wrap: wrap; }
.pagination button { min-height: 32px; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px;
  background: transparent; border: 1px solid var(--border-soft); color: var(--text-dim);
  font-family: var(--font); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.14s;
}
.page-btn:hover { border-color: var(--border); color: var(--text); }
.page-btn.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ============================================================
   图片画廊（fullscreen-gallery → 内容视图）
   ============================================================ */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
@media (max-width: 768px) { .image-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; } }
.image-card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 10px; text-align: center; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.image-card:hover { border-color: rgba(124, 92, 255, 0.45); transform: translateY(-2px); }
.image-card img { width: 100%; height: auto; border-radius: 8px; aspect-ratio: 1; object-fit: cover; }
.image-card .img-broken-placeholder {
  width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04); border-radius: 8px; color: var(--text-faint); font-size: 13px;
}
.image-card.img-broken .image-info { opacity: 0.5; }
.image-info { font-size: 12px; margin-top: 8px; color: var(--text-dim); line-height: 1.6; }

/* 图片预览 */
.preview-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.9); z-index: 10001;
  align-items: center; justify-content: center;
}
.preview-overlay img { max-width: 95vw; max-height: 95vh; object-fit: contain; border-radius: 8px; }
.preview-close {
  position: absolute; top: 20px; right: 30px;
  color: #fff; font-size: 40px; cursor: pointer; padding: 10px; transition: all 0.12s; z-index: 1; line-height: 1;
}
.preview-close:hover { color: var(--brand-2); transform: scale(1.15); }

/* ============================================================
   消费记录（transaction-modal）
   ============================================================ */
.tx-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 0 14px; }
.tx-filter-btn {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 5px 16px; color: var(--text-dim);
  cursor: pointer; font-size: 12.5px; font-weight: 600; font-family: var(--font);
  transition: all 0.15s;
}
.tx-filter-btn:hover { border-color: var(--border); color: var(--text); }
.tx-filter-btn.active { background: var(--grad); color: #fff; border-color: transparent; }
.tx-amount-in { color: var(--success); font-weight: 700; }
.tx-amount-out { color: var(--danger); font-weight: 700; }

/* ============================================================
   充值（recharge-modal）
   ============================================================ */
.recharge-balance-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(30, 94, 255, 0.08));
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.recharge-balance-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.28), transparent 70%);
  pointer-events: none;
}
.recharge-balance-card .rb-left { position: relative; z-index: 1; }
.recharge-balance-card .rb-label { font-size: clamp(12.5px, 0.8vw, 14px); color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.recharge-balance-card .rb-label i { color: var(--brand-2); }
.recharge-balance-card .rb-amount {
  font-size: clamp(30px, 2vw, 44px); font-weight: 800; margin-top: 6px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.recharge-balance-card .rb-right { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.recharge-step { padding: 8px 4px 4px; }
.recharge-hint {
  text-align: center; color: var(--text-dim); font-size: clamp(13px, 0.85vw, 15px); margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.recharge-hint i { color: var(--brand-2); }
.recharge-amount-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-bottom: 16px; }
.recharge-amount-btn {
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: clamp(13px, 0.9vw, 18px) 8px; color: var(--text);
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--font);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: all 0.15s;
}
.recharge-amount-btn b { font-size: clamp(16px, 1vw, 20px); font-weight: 800; line-height: 1.2; }
.recharge-amount-btn span { font-size: clamp(11px, 0.7vw, 13px); font-weight: 600; color: var(--text-faint); }
.recharge-amount-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.recharge-amount-btn.selected { border-color: var(--brand); background: var(--brand-soft); color: #b3a1ff; box-shadow: 0 0 15px rgba(124, 92, 255, 0.2); }
.recharge-amount-btn.selected span { color: #b3a1ff; }
.recharge-fee-note { font-size: clamp(12px, 0.75vw, 13.5px); color: var(--text-faint); line-height: 1.7; margin-bottom: 16px; text-align: left; }
.recharge-fee-note b { color: var(--text-dim); }
.alipay-tip {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; background: rgba(78, 139, 255, 0.1); border: 1px solid rgba(78, 139, 255, 0.3);
  border-radius: var(--radius-sm); color: #8fb6ff; font-size: 13px; margin-bottom: 18px;
}
.alipay-tip i { font-size: 16px; }
.recharge-submit { width: 100%; border: none; cursor: pointer; background: var(--grad); color: #fff; font-family: var(--font); font-size: 15px; font-weight: 700; padding: 13px 0; border-radius: var(--radius-sm); box-shadow: 0 6px 18px rgba(124, 92, 255, 0.3); transition: all 0.15s; }
.recharge-submit:hover { filter: brightness(1.1); }
.recharge-submit:disabled { opacity: 0.5; pointer-events: none; }
.qr-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; background: rgba(78, 139, 255, 0.12); border: 1px solid rgba(78, 139, 255, 0.3);
  border-radius: 999px; color: #8fb6ff; font-size: 12.5px;
}
.qr-amount-label { color: var(--text-faint); font-size: 12.5px; margin-bottom: 4px; }
.qr-amount { font-size: 32px; font-weight: 800; color: var(--warning); margin-bottom: 18px; }
.qr-box { background: #fff; border-radius: var(--radius-sm); padding: 12px; display: inline-block; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.qr-box img { width: 220px; height: 220px; object-fit: contain; display: block; }
.qr-status { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; color: var(--text-dim); font-size: 12.5px; }
.qr-status .pulse-dot { display: inline-block; width: 6px; height: 6px; background: var(--success); border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.qr-remind {
  margin-top: 14px; padding: 10px 16px;
  background: var(--warning-soft); border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-sm); color: var(--warning); font-size: 12.5px; text-align: center;
}
.qr-footer {
  margin-top: 20px; display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border-soft); padding-top: 16px;
}
.qr-order-id { color: var(--text-faint); font-size: 11.5px; font-family: var(--mono); }
.recharge-success { padding: 40px 30px; text-align: center; }
.recharge-success .ok-icon { font-size: 56px; margin-bottom: 14px; }
.recharge-success .ok-title { color: var(--success); font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.recharge-success .ok-amount { color: var(--warning); font-size: 30px; font-weight: 800; margin-bottom: 4px; }
.recharge-success .ok-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }

/* 充值记录 */
.recharge-records-list { display: grid; gap: 8px; }
.recharge-record {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}

/* ============================================================
   下载客户端（download-modal）
   ============================================================ */
/* 下载客户端（download-modal）重设计：Hero + 更新说明（仅 Windows 桌面端） */
.dl-btn {
  border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-family: var(--font);
  font-weight: 700; padding: 11px 20px; font-size: 15px;
  border-radius: var(--radius-sm); box-shadow: 0 6px 18px rgba(124, 92, 255, 0.3);
  transition: all 0.15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.dl-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.dl-hero {
  display: flex; align-items: center; gap: clamp(18px, 1.3vw, 26px);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(30, 94, 255, 0.08));
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: var(--radius); padding: clamp(22px, 1.6vw, 32px) clamp(20px, 1.6vw, 30px); margin-bottom: 14px;
  text-align: left;
}
.dl-hero-icon {
  width: clamp(62px, 4vw, 84px); height: clamp(62px, 4vw, 84px);
  border-radius: clamp(17px, 1.1vw, 22px); flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: clamp(25px, 1.7vw, 34px);
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.45);
}
.dl-hero-info { flex: 1; min-width: 0; }
.dl-hero-name { font-size: clamp(18px, 1.25vw, 24px); font-weight: 800; }
.dl-hero-meta { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; flex-wrap: wrap; }
.dl-version-badge {
  font-family: var(--mono); font-size: clamp(11.5px, 0.7vw, 13px); font-weight: 700;
  background: rgba(124, 92, 255, 0.18); color: #b3a1ff;
  padding: 2px 10px; border-radius: 999px;
}
.dl-hero-date { font-size: clamp(12px, 0.75vw, 14px); color: var(--text-faint); }
.dl-btn-hero { width: 100%; padding: clamp(12px, 0.9vw, 16px) 20px; font-size: clamp(15px, 0.95vw, 17px); }
.dl-hero-sub {
  margin-top: 10px; font-size: clamp(12px, 0.75vw, 14px); color: var(--text-faint);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.dl-hero-sub i { color: var(--success); }
.dl-changelog {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: clamp(14px, 1vw, 20px) clamp(16px, 1.1vw, 22px); margin-bottom: 4px;
  text-align: left;
}
.dl-changelog-title { font-size: clamp(12px, 0.75vw, 13.5px); font-weight: 700; color: var(--text-dim); display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.dl-changelog-title i { color: var(--brand-2); }
.dl-changelog-body { font-size: clamp(12.5px, 0.8vw, 14.5px); color: var(--text-dim); line-height: 1.7; white-space: pre-wrap; }
.dl-state { padding: 40px 0; color: var(--text-dim); text-align: center; font-size: 13px; }
.dl-state i { font-size: 30px; display: block; margin-bottom: 12px; }
.dl-state.dl-error { color: var(--danger); }

/* ============================================================
   空状态
   ============================================================ */
.empty { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty i { font-size: 30px; margin-bottom: 10px; opacity: 0.5; display: block; }

/* 矮屏（笔记本常见高度）压缩左侧品牌区内容，避免一屏放不下 */
@media (max-height: 960px) {  .auth-brand-panel { padding: 18px 52px 12px; }
  .ab-hero { padding: 4px 0; }
  .ab-tag { font-size: 12px; padding: 5px 13px; }
  .ab-hero h2 { font-size: 34px; margin: 8px 0 6px; }
  .ab-desc { font-size: 14px; line-height: 1.65; }
  .ab-highlight { margin: 0 0 14px; padding: 14px 20px; font-size: 17px; }
  .ab-feats { margin-top: 10px; gap: 10px; }
  .ab-feat { padding: 12px 14px; }
  .ab-feat .f-ico { width: 32px; height: 32px; font-size: 14px; }
  .ab-feat .f-t { font-size: 14px; }
  .ab-feat .f-d { font-size: 12px; }
  .ab-stats { margin-top: 10px; gap: 10px; }
  .ab-stat { padding: 12px 14px; }
  .ab-stats .s-num { font-size: 19px; }
  .ab-stats .s-lb { font-size: 12px; }
  .ab-steps { margin-top: 8px; gap: 10px; }
  .ab-step { padding: 12px 14px; }
  .ab-step .st-idx { width: 26px; height: 26px; font-size: 12px; }
  .ab-step .st-t { font-size: 14px; }
  .ab-step .st-d { font-size: 12px; }
  .ab-dl { margin-top: 6px; }
  .dl-btn-big { padding: 12px 24px; font-size: 15px; }
  .ab-foot { margin-top: 8px; }
}

/* 超矮屏（≤800px 高）再压一档，窄屏换行多时也能一屏放下 */
@media (max-height: 800px) {
  .ab-hero h2 { font-size: 30px; margin: 6px 0 4px; }
  .ab-desc { font-size: 13px; line-height: 1.6; }
  .ab-highlight { margin: 0 0 10px; padding: 10px 16px; font-size: 15px; }
  .ab-feats { margin-top: 8px; gap: 8px; }
  .ab-feat { padding: 9px 12px; }
  .ab-feat .f-ico { width: 30px; height: 30px; font-size: 13px; }
  .ab-feat .f-t { font-size: 13.5px; }
  .ab-feat .f-d { font-size: 12px; }
  .ab-stats { margin-top: 8px; gap: 8px; }
  .ab-stat { padding: 9px 12px; }
  .ab-stats .s-num { font-size: 18px; }
  .ab-stats .s-lb { font-size: 12px; }
  .ab-steps { margin-top: 6px; gap: 8px; }
  .ab-step { padding: 9px 12px; }
  .ab-step .st-idx { width: 24px; height: 24px; font-size: 12px; }
  .ab-step .st-t { font-size: 13.5px; }
  .ab-step .st-d { font-size: 12px; }
  .ab-dl { margin-top: 4px; }
  .dl-btn-big { padding: 10px 22px; font-size: 14px; }
  .dl-meta { font-size: 12px; }
  .ab-foot { margin-top: 6px; }
}

/* ============================================================
   预设代码（内容区直接渲染，替代原 iframe 嵌入 —— 无双重滚动条）
   ============================================================ */
#presets-view .count-label { font-size: 13px; color: var(--text-dim); padding: 0 4px; }
#presets-view .filter-bar { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 0; }
#presets-view .filter-bar input { flex: 1; min-width: 200px; padding: 10px 16px; cursor: text; }
.presets-panel {
  background: rgba(20, 27, 48, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
#presets-view .group-tabs-label { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.8px; }
.group-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.group-tab {
  padding: 7px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; font-family: var(--font); user-select: none;
}
.group-tab:hover { border-color: var(--brand); color: var(--text); }
.group-tab.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(124, 92, 255, 0.3); }
.usage-hint {
  font-size: 12.5px; color: var(--text-dim);
  background: var(--brand-soft); border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; line-height: 1.7;
}
.usage-hint strong { color: #b3a1ff; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.preset-card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 22px;
  transition: all 0.15s; position: relative;
}
.preset-card:hover { border-color: rgba(124, 92, 255, 0.45); transform: translateY(-2px); box-shadow: var(--shadow); }
.preset-card.fav { border-color: rgba(251, 191, 36, 0.35); }
.preset-card .code {
  font-size: 12.5px; font-weight: 700; color: #8fb6ff;
  font-family: var(--mono); margin-bottom: 8px; word-break: break-all;
}
.preset-card .code i { margin-right: 6px; color: var(--text-faint); }
.preset-card .name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.preset-card .group-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  background: var(--brand-soft); color: #b3a1ff;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.preset-card .desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; margin-bottom: 16px; }
.fav-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  border-radius: 8px; font-size: 11px; cursor: pointer;
  color: var(--text-faint); transition: all 0.2s;
  padding: 3px 9px; line-height: 1.5; font-weight: 600; font-family: var(--font);
}
.fav-btn:hover { border-color: var(--text-dim); color: var(--text); }
.fav-btn.faved { border-color: var(--warning); color: var(--warning); background: rgba(251, 191, 36, 0.12); font-weight: 700; }
.preset-card .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.preset-card .actions .price {
  margin-left: auto; font-size: 12px; color: var(--warning);
  background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-weight: 700;
}
.btn-copy {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad); border: none; color: #fff;
  font-family: var(--font); font-weight: 700; font-size: 12.5px;
  padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.15s;
}
.btn-copy:hover { filter: brightness(1.1); }
.btn-copy.copied { background: linear-gradient(135deg, #10b981, #34d399); }
.btn-view {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(78, 139, 255, 0.1); border: 1px solid rgba(78, 139, 255, 0.25);
  color: #8fb6ff; padding: 9px 14px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 12.5px; font-weight: 600; font-family: var(--font);
  transition: all 0.15s;
}
.btn-view:hover { background: rgba(78, 139, 255, 0.2); border-color: var(--brand-2); color: #fff; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.empty-state i { font-size: 42px; margin-bottom: 14px; opacity: 0.5; display: block; }
.empty-state p { font-size: 14px; }
.loading-state { text-align: center; padding: 60px 20px; color: var(--text-faint); }
.loading-state i { font-size: 28px; animation: spin 0.8s linear infinite; display: block; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 案例查看弹窗（原 presets.html 样式，直接复用） ===== */
.case-view-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(4, 6, 12, 0.72); backdrop-filter: blur(6px);
  z-index: 9000; justify-content: center; align-items: center; padding: 20px;
}
.case-view-modal.show { display: flex; }
.case-view-panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 1100px; height: 85vh;
  display: flex; flex-direction: column;
  overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: pop 0.2s ease;
}
.case-view-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 26px 14px; flex-shrink: 0;
  border-bottom: 1px solid var(--border-soft);
}
.case-view-header .title { font-size: 15px; font-weight: 700; letter-spacing: 0.5px; }
.case-view-header .title i { color: var(--brand-2); margin-right: 8px; }
.case-view-close { color: var(--text-faint); font-size: 28px; cursor: pointer; transition: color 0.15s; line-height: 1; }
.case-view-close:hover { color: var(--text); }
.case-view-body { flex: 1; display: flex; gap: 20px; padding: 26px 26px 22px; overflow: hidden; min-height: 0; }
.case-view-left { display: flex; flex-direction: column; flex-shrink: 0; }
.case-ref-slot {
  width: 100%; max-width: 180px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; position: relative;
}
.case-ref-slot .img-wrap {
  width: 100%; aspect-ratio: 1; max-width: 180px; max-height: 180px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.25); cursor: pointer; overflow: hidden;
}
.case-ref-slot .img-wrap img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.2s; }
.case-ref-slot .img-wrap:hover img { transform: scale(1.05); }
.case-ref-badge {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; line-height: 22px;
  background: var(--brand-2); color: #fff; font-size: 11px; font-weight: 700;
  text-align: center; border-radius: 50%; z-index: 2; pointer-events: none;
}
.case-ref-slot.empty { border: 1px dashed var(--border); }
.case-ref-slot.empty .img-wrap { cursor: default; }
.case-ref-slot.empty .img-wrap:hover img { transform: none; }
.case-ref-slot.empty .empty-icon { font-size: 28px; color: var(--text-faint); opacity: 0.4; }
.case-view-refs-wrapper {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: rgba(124, 92, 255, 0.04);
}
.case-view-refs-header {
  text-align: center; font-size: 12px; font-weight: 700;
  color: #b3a1ff; letter-spacing: 1px;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border-soft); width: 100%;
}
.case-view-right { flex: 1; display: flex; align-items: stretch; justify-content: center; min-height: 0; }
.case-view-right-wrapper { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.case-view-gen-header {
  text-align: center; font-size: 12px; font-weight: 700;
  color: var(--warning); letter-spacing: 1px;
  padding-bottom: 8px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}
.case-gen-card {
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-soft);
  border-radius: var(--radius); overflow: hidden;
  max-width: 100%; max-height: 100%; display: flex; flex-direction: column;
  box-shadow: 0 0 30px rgba(124, 92, 255, 0.08);
}
.case-gen-card .img-wrap {
  flex: 1; min-height: 0; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.25); cursor: pointer; overflow: hidden;
}
.case-gen-card .img-wrap img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform 0.2s; }
.case-gen-card .img-wrap:hover img { transform: scale(1.05); }
.case-gen-card .img-label {
  text-align: center; padding: 8px 12px;
  color: var(--text-dim); font-size: 12px; font-weight: 600;
  border-top: 1px solid var(--border-soft);
}
.case-view-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; gap: 2px; }
.case-view-arrow .arrow-line { flex: 1; width: 2px; min-height: 20px; background: linear-gradient(to bottom, transparent, rgba(124, 92, 255, 0.35)); border-radius: 1px; }
.case-view-arrow .arrow-line:last-child { background: linear-gradient(to bottom, rgba(124, 92, 255, 0.35), transparent); }
.case-view-arrow .arrow-icon { font-size: 16px; color: var(--brand-2); line-height: 1; opacity: 0.7; margin: 2px 0; }
.case-view-arrow .arrow-text { font-size: 11px; color: var(--text-faint); font-weight: 600; letter-spacing: 1px; writing-mode: vertical-rl; white-space: nowrap; }
.case-view-desc { padding: 16px 26px 20px; flex-shrink: 0; text-align: center; border-bottom: 1px solid var(--border-soft); }
.case-view-desc .desc-box {
  display: inline-block; text-align: center;
  background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 12px 24px;
  color: var(--text-dim); font-size: 13px; line-height: 1.65;
  white-space: pre-wrap; max-width: 700px;
}
.case-view-desc .desc-box:empty { display: none; }
.case-view-empty { display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 13px; padding: 40px; }

/* 工具提示（[data-tooltip]，body 级固定定位） */
[data-tooltip] { cursor: help; }
.custom-tooltip {
  position: fixed;
  background: rgba(17, 22, 39, 0.96); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 500;
  white-space: nowrap; pointer-events: none; z-index: 99999;
  backdrop-filter: blur(8px); box-shadow: var(--shadow);
  opacity: 0; transition: opacity 0.15s ease;
}
.custom-tooltip.show { opacity: 1; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1000px) {
  .auth { padding: 20px 16px; }
  .auth-split { flex-direction: column; max-height: none; }
  .ab-highlight { display: none; }
  .auth-brand-panel { display: none; }
  .auth-side { flex: 1 1 auto; max-width: none; padding: 28px 18px; min-height: 100vh; }
  .auth-card { width: 100%; max-width: 420px; }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar {
    position: static; width: 100%; height: auto;
    flex-direction: column; padding: 14px 16px;
  }
  .logo { padding-bottom: 12px; }
  .nav { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; gap: 6px; margin-top: 0; }
  .nav-group { display: none; }
  .nav-item { padding: 8px 12px; white-space: nowrap; width: auto; }
  .nav-item.active::before { display: none; }
  .user-box { display: none; }
  .content { padding: 20px 16px 50px; }
  .view { padding: 20px 16px 50px; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 480px) {
  .auth-card { padding: 26px 20px 22px; }
  .keys-table, .keys-table thead, .keys-table tbody, .keys-table th, .keys-table td, .keys-table tr { display: block; }
  .keys-table thead { display: none; }
  .keys-table tr { margin-bottom: 14px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 6px 4px; }
  .keys-table td { display: flex; justify-content: space-between; border: none; padding: 7px 10px; font-size: 12.5px; }
  .keys-table td::before { content: attr(data-label); font-weight: 700; width: 42%; color: var(--text-faint); }
  .view .modal-header { flex-direction: column; align-items: flex-start; }
  .profile-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .profile-label { width: 100%; }
  .profile-value input { width: 100%; }
}
/* 预设代码 / 案例弹窗 移动端适配 */
@media (max-width: 768px) {
  .case-view-body { flex-direction: column; align-items: center; padding: 12px 16px 20px; overflow-y: auto; }
  .case-ref-slot { max-width: 140px; }
  .case-ref-slot .img-wrap { max-width: 140px; max-height: 140px; }
  .case-gen-card { width: 100%; }
  .case-gen-card .img-wrap { width: 100%; height: 260px; }
  .case-view-panel { max-height: 98vh; border-radius: 16px; }
  .case-view-header { padding: 14px 18px 12px; }
  .case-view-desc { padding: 10px 16px 4px; }
  .case-view-desc .desc-box { padding: 10px 16px; font-size: 12.5px; }
  .case-view-arrow { flex-direction: row; width: auto; gap: 4px; }
  .case-view-arrow .arrow-line { width: 40px; height: 2px; min-height: 0; background: linear-gradient(to right, transparent, rgba(124, 92, 255, 0.35)); }
  .case-view-arrow .arrow-line:last-child { background: linear-gradient(to right, rgba(124, 92, 255, 0.35), transparent); }
  .case-view-arrow .arrow-icon { transform: rotate(0deg); margin: 0; }
  .case-view-arrow .arrow-text { writing-mode: horizontal-tb; }
}
@media (max-width: 640px) {
  .preset-grid { grid-template-columns: 1fr; }
  .presets-panel { padding: 18px 16px; }
}
/* 下载客户端 / 充值 移动端适配 */
@media (max-width: 768px) {
  .dl-hero { flex-direction: column; text-align: center; }
  .dl-hero-sub { justify-content: center; }
}
