/* ==========================================================================
   Zone · 统一世界平台前端样式
   深色渐变 + 玻璃拟态；无外部字体 / 图片 / CDN；原生 CSS。
   ========================================================================== */

/* ------------------------------ 1. 设计令牌 ------------------------------ */
:root {
  color-scheme: dark;

  --bg: #070b16;
  --bg-deep: #050811;
  --surface: rgba(17, 24, 48, 0.66);
  --surface-solid: #0d1428;
  --surface-2: rgba(255, 255, 255, 0.035);
  --surface-3: rgba(255, 255, 255, 0.06);
  --border: rgba(124, 145, 214, 0.18);
  --border-strong: rgba(124, 145, 214, 0.32);

  --text: #e9edff;
  --text-soft: #c3cbe9;
  --muted: #9aa6d4;
  --dim: #7480ab;

  --primary: #5b7cff;
  --primary-2: #c084fc;
  --gradient: linear-gradient(135deg, #5b7cff 0%, #8b7bff 52%, #c084fc 100%);
  --gradient-soft: linear-gradient(135deg, rgba(91, 124, 255, 0.22), rgba(192, 132, 252, 0.16));

  --ai: #4f9dff;
  --ai-2: #38e0f0;
  --world: #b06bff;
  --world-2: #f472b6;

  --ok: #3ddc97;
  --warn: #ffc46b;
  --danger: #ff6b8a;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 4px 16px rgba(2, 5, 14, 0.35);
  --shadow: 0 18px 50px rgba(3, 7, 20, 0.45);
  --shadow-glow: 0 14px 40px rgba(91, 124, 255, 0.28);

  --header-h: 68px;
  --container: 1200px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------ 2. 基础重置 ------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(60, 88, 190, 0.32) 0%, transparent 60%),
    radial-gradient(900px 640px at 92% 4%, rgba(126, 72, 190, 0.26) 0%, transparent 62%),
    radial-gradient(700px 500px at 50% 100%, rgba(32, 60, 120, 0.22) 0%, transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

main { flex: 1 0 auto; outline: none; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a { color: var(--text-soft); text-decoration: none; transition: color 160ms var(--ease); }
a:hover { color: #fff; }

button { font: inherit; color: inherit; }

img, svg { display: block; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid #9db3ff;
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: rgba(91, 124, 255, 0.45); color: #fff; }

/* ------------------------------ 3. 工具类 ------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #0b1020;
  font-weight: 600;
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: 12px; color: #0b1020; }

.mono { font-family: var(--font-mono); font-size: 0.92em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.nowrap { white-space: nowrap; }

.page { padding-block: 36px 72px; min-height: 50vh; }
.page-narrow { max-width: 880px; margin-inline: auto; }

.hidden { display: none !important; }

/* ------------------------------ 4. 站点头部 ------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.site-header.is-scrolled,
.site-header.mobile-open {
  background: rgba(7, 11, 22, 0.92);
  border-bottom-color: var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex: none;
}
.brand:hover { color: var(--text); }

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  font-style: italic;
  letter-spacing: -0.04em;
  box-shadow: 0 6px 20px rgba(91, 124, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text strong { font-size: 16px; letter-spacing: 0.01em; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: #fff; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 14px;
  max-width: 260px;
}
.nav-user .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.nav-user .nav-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.nav-user .icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.nav-user .icon-btn:hover { background: rgba(255, 107, 138, 0.14); color: var(--danger); }
.nav-user-link.is-active { color: #fff; }
.nav-user-link.is-active .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.26); }

/* 宣传落地页隐藏页脚，顶部导航与其他页面一致 */
body.is-landing .site-footer { display: none; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle .nav-toggle-close { display: none; }
.site-header.mobile-open .nav-toggle .icon-menu { display: none; }
.site-header.mobile-open .nav-toggle .nav-toggle-close { display: block; }

/* ------------------------------ 5. 按钮 ------------------------------ */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-h);
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: transform 160ms var(--ease), box-shadow 200ms var(--ease),
    background 200ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 18px; height: 18px; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { color: #fff; box-shadow: 0 18px 48px rgba(123, 105, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

.btn-ghost {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}
.btn-ghost:hover { border-color: rgba(157, 179, 255, 0.55); background: rgba(91, 124, 255, 0.12); color: #fff; }

.btn-soft {
  background: rgba(91, 124, 255, 0.14);
  border-color: rgba(91, 124, 255, 0.32);
  color: #c9d4ff;
}
.btn-soft:hover { background: rgba(91, 124, 255, 0.22); color: #fff; }

.btn-danger {
  background: rgba(255, 107, 138, 0.12);
  border-color: rgba(255, 107, 138, 0.38);
  color: #ff9db1;
}
.btn-danger:hover { background: rgba(255, 107, 138, 0.2); color: #fff; }

.btn-link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #9db3ff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-link:hover { color: #c9d4ff; text-decoration: underline; text-underline-offset: 4px; }

.btn-sm { --btn-h: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { --btn-h: 52px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn[data-loading="true"] {
  color: transparent !important;
  pointer-events: none;
}
.btn[data-loading="true"] .icon { visibility: hidden; }
.btn[data-loading="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ 6. 卡片 / 标签 ------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card-pad { padding: 24px; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
}
.card-title .icon { width: 19px; height: 19px; color: #9db3ff; }
.card-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }

.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.tag-ok { color: var(--ok); border-color: rgba(61, 220, 151, 0.35); background: rgba(61, 220, 151, 0.1); }
.tag-warn { color: var(--warn); border-color: rgba(255, 196, 107, 0.35); background: rgba(255, 196, 107, 0.1); }
.tag-danger { color: #ff9db1; border-color: rgba(255, 107, 138, 0.35); background: rgba(255, 107, 138, 0.1); }
.tag-info { color: #9db3ff; border-color: rgba(91, 124, 255, 0.35); background: rgba(91, 124, 255, 0.12); }
.tag-neutral { color: var(--muted); }

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dim);
  flex: none;
}
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.16); }
.dot-off { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 196, 107, 0.14); }

.empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--dim);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.012);
}
.empty .icon { width: 28px; height: 28px; margin: 0 auto 10px; color: #4c5a8c; }

/* ------------------------------ 7. 首页 Hero ------------------------------ */
.hero {
  position: relative;
  padding-block: 64px 40px;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -180px 8% auto;
  height: 520px;
  background: radial-gradient(closest-side, rgba(91, 124, 255, 0.28), transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 640px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 8px;
  border: 1px solid rgba(91, 124, 255, 0.35);
  border-radius: 999px;
  background: rgba(91, 124, 255, 0.1);
  color: #b6c4ff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.hero-eyebrow .icon { width: 15px; height: 15px; color: #c9b4ff; }

.hero-title {
  margin-top: 22px;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero-title .grad {
  background: linear-gradient(100deg, #7ea2ff 0%, #a78bfa 45%, #f0a6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  margin-top: 20px;
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--dim);
  font-size: 13px;
}
.hero-note .icon { width: 15px; height: 15px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.hero-stat { display: flex; align-items: baseline; gap: 8px; }
.hero-stat b { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }
.hero-stat span { font-size: 13px; color: var(--muted); }

.hero-art {
  position: relative;
  min-height: 400px;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}
.orb-a { width: 300px; height: 300px; background: #3d5cff; top: 4%; left: -6%; }
.orb-b { width: 260px; height: 260px; background: #b45cf5; bottom: 0; right: -4%; }
.orb-c { width: 180px; height: 180px; background: #1fa8e0; top: 46%; left: 44%; opacity: 0.35; }

.world-panel {
  position: relative;
  width: min(100%, 430px);
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(140, 160, 230, 0.24);
  background: linear-gradient(165deg, rgba(23, 33, 66, 0.9), rgba(11, 17, 34, 0.82));
  box-shadow: 0 30px 80px rgba(2, 5, 16, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.world-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 14px;
  color: var(--dim);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.world-panel-head .tag { letter-spacing: 0.04em; text-transform: none; }

.world-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
}
.world-row + .world-row { margin-top: 10px; }
.world-row:hover { border-color: rgba(140, 160, 230, 0.4); transform: translateY(-1px); }

.world-dot {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  color: #fff;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.world-dot .icon { width: 21px; height: 21px; }
.world-dot.ai { background: linear-gradient(135deg, #2f6bff, #22d3ee); }
.world-dot.world { background: linear-gradient(135deg, #a855f7, #ec4899); }

.world-meta { flex: 1; min-width: 0; }
.world-name { font-size: 15px; font-weight: 650; }
.world-sub { font-size: 12.5px; color: var(--muted); }

.world-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 2px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.world-divider::before,
.world-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.world-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 4px 2px;
}
.world-foot .points { font-size: 13px; color: var(--muted); }
.world-foot .points b { color: #fff; font-size: 15px; }
.world-foot .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex: none;
}

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(150, 170, 240, 0.28);
  background: rgba(15, 23, 46, 0.9);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}
.float-chip .icon { width: 16px; height: 16px; color: #9db3ff; }
.float-chip-a { top: -18px; right: 14px; }
.float-chip-b { bottom: -18px; left: 8px; }

/* ------------------------------ 8. 通用区块 ------------------------------ */
.section { padding-block: 54px; }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  color: #9db3ff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.section-title { margin-top: 10px; font-size: clamp(26px, 2.8vw, 34px); letter-spacing: -0.02em; }
.section-lead { margin-top: 12px; color: var(--muted); font-size: 15.5px; line-height: 1.75; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ------------------------------ 9. 世界卡片 ------------------------------ */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease);
}
.game-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--gradient);
  opacity: 0.7;
}
.game-card::after {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  top: -120px; right: -80px;
  filter: blur(50px);
  opacity: 0.22;
  pointer-events: none;
  transition: opacity 240ms var(--ease);
}
.game-card.ai::after { background: #2f7bff; }
.game-card.world::after { background: #b45cf5; }
.game-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.game-card:hover::after { opacity: 0.36; }

.game-icon {
  width: 52px; height: 52px;
  border-radius: 15px;
  display: grid; place-items: center;
  color: #fff;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.game-icon .icon { width: 26px; height: 26px; }
.game-card.ai .game-icon { background: linear-gradient(135deg, #2f6bff, #22d3ee); }
.game-card.world .game-icon { background: linear-gradient(135deg, #a855f7, #ec4899); }

.game-title { font-size: 20px; }
.game-tagline { margin-top: 4px; color: #9db3ff; font-size: 13px; font-weight: 600; }
.game-desc { margin-top: 12px; color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.game-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.game-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}
.game-foot .hint { color: var(--dim); font-size: 12.5px; }

/* ------------------------------ 10. 价值卡片 ------------------------------ */
.value-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.value-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(91, 124, 255, 0.16);
  border: 1px solid rgba(91, 124, 255, 0.3);
  color: #b6c4ff;
  margin-bottom: 16px;
}
.value-icon .icon { width: 21px; height: 21px; }
.value-card h3 { font-size: 16.5px; }
.value-card p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.72; }

/* ------------------------------ 11. 套餐卡片 ------------------------------ */
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease);
}
.plan-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.plan-card.featured {
  border-color: rgba(151, 137, 255, 0.55);
  background:
    linear-gradient(165deg, rgba(91, 124, 255, 0.15), rgba(192, 132, 252, 0.07)),
    var(--surface);
  box-shadow: 0 18px 60px rgba(91, 124, 255, 0.18);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(91, 124, 255, 0.4);
}
.plan-name { display: flex; align-items: center; gap: 8px; font-size: 19px; }
.plan-name .icon { width: 17px; height: 17px; color: #c9b4ff; }
.plan-tagline { margin-top: 6px; color: var(--muted); font-size: 13px; min-height: 22px; }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 18px;
}
.plan-price .amount { font-size: 38px; font-weight: 780; letter-spacing: -0.03em; line-height: 1; }
.plan-price .unit { color: var(--muted); font-size: 13px; }
.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.plan-points {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}
.plan-points div { flex: 1; }
.plan-points b { display: block; font-size: 18px; line-height: 1.3; }
.plan-points span { font-size: 12px; color: var(--muted); }
.plan-perks { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.plan-perks li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.55;
}
.plan-perks .icon {
  width: 16px; height: 16px;
  color: var(--ok);
  margin-top: 2px;
}
.plan-card .btn { margin-top: 22px; }

/* 套餐对比表 */
.compare-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.compare th,
.compare td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare thead th {
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  color: var(--text-soft);
  white-space: nowrap;
}
.compare thead th:first-child { color: var(--muted); font-weight: 600; }
.compare tbody th {
  font-weight: 550;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
}
.compare tr:last-child th,
.compare tr:last-child td { border-bottom: 0; }
.compare .col-featured { background: rgba(91, 124, 255, 0.07); }
.compare .price-cell { font-size: 20px; font-weight: 750; }
.compare .price-cell small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.compare .btn { margin: 2px 0; }

.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 196, 107, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 196, 107, 0.07);
  color: #ffe0ac;
  font-size: 13.5px;
  line-height: 1.65;
}
.demo-note .icon { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.demo-note b { color: #fff; }

/* 支付成功面板 */
.success-panel {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(61, 220, 151, 0.3);
  background:
    radial-gradient(600px 240px at 10% 0%, rgba(61, 220, 151, 0.12), transparent 70%),
    var(--surface);
  margin-bottom: 34px;
}
.success-head { display: flex; align-items: center; gap: 14px; }
.success-mark {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(61, 220, 151, 0.16);
  border: 1px solid rgba(61, 220, 151, 0.4);
  color: var(--ok);
  flex: none;
}
.success-mark .icon { width: 24px; height: 24px; }
.success-title { font-size: 21px; }
.success-sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.success-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.success-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}
.success-item .label { font-size: 12px; color: var(--muted); letter-spacing: 0.03em; }
.success-item .value { margin-top: 6px; font-size: 19px; font-weight: 720; }
.success-item .value.small { font-size: 15px; font-weight: 650; }
.success-item .sub { margin-top: 4px; font-size: 12px; color: var(--dim); }
.success-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ------------------------------ 12. 表单 ------------------------------ */
.form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
}
.field-label .hint { font-size: 12px; color: var(--dim); font-weight: 400; }

.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(6, 10, 22, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}
.input::placeholder { color: #5c6893; }
.input:hover { border-color: var(--border-strong); }
.input:focus {
  outline: none;
  border-color: rgba(123, 145, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.2);
  background: rgba(8, 13, 28, 0.8);
}
.input[aria-invalid="true"] { border-color: rgba(255, 107, 138, 0.7); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(255, 107, 138, 0.16); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.6; }
select.input { cursor: pointer; }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.input-toggle:hover { color: var(--text); background: var(--surface-3); }
.input-toggle .icon { width: 18px; height: 18px; }

.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  font-size: 12.5px;
  color: #ff9db1;
}
.field-error:empty { display: none; }
.field-error .icon { width: 14px; height: 14px; }

.form-error,
.form-success {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.6;
}
.form-error {
  border: 1px solid rgba(255, 107, 138, 0.35);
  background: rgba(255, 107, 138, 0.1);
  color: #ffb3c2;
}
.form-success {
  border: 1px solid rgba(61, 220, 151, 0.35);
  background: rgba(61, 220, 151, 0.1);
  color: #9ff0c8;
}
.form-error .icon,
.form-success .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.form-error:empty,
.form-success:empty { display: none; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.checkbox input {
  width: 17px; height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* ------------------------------ 13. 认证页 ------------------------------ */
.auth-page {
  display: grid;
  place-items: center;
  padding-block: 48px 60px;
  min-height: calc(100vh - var(--header-h) - 340px);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 34px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, rgba(24, 33, 66, 0.9), rgba(10, 15, 32, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.auth-head { margin-bottom: 26px; text-align: center; }
.auth-head .logo-mark { margin: 0 auto 16px; }
.auth-title { font-size: 25px; }
.auth-sub { margin-top: 8px; color: var(--muted); font-size: 14px; }
.auth-alt { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-alt a { color: #b6c4ff; font-weight: 650; }
.auth-alt a:hover { text-decoration: underline; text-underline-offset: 4px; }
.auth-demo {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.65;
}
.auth-demo code { color: var(--text-soft); font-family: var(--font-mono); font-size: 12px; }

/* ------------------------------ 14. 页面标题 ------------------------------ */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}
.page-head h1 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.02em; }
.page-head .page-sub { margin-top: 8px; color: var(--muted); font-size: 14.5px; max-width: 680px; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------ 15. 控制台 ------------------------------ */
.dash-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}

.member-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(140, 150, 235, 0.3);
  background:
    radial-gradient(500px 220px at 95% 0%, rgba(192, 132, 252, 0.18), transparent 65%),
    radial-gradient(460px 200px at 0% 100%, rgba(91, 124, 255, 0.18), transparent 62%),
    linear-gradient(160deg, rgba(26, 36, 74, 0.85), rgba(11, 16, 34, 0.92));
  box-shadow: var(--shadow);
}
.member-card.is-inactive {
  background:
    radial-gradient(460px 200px at 95% 0%, rgba(120, 130, 170, 0.12), transparent 65%),
    linear-gradient(160deg, rgba(22, 28, 52, 0.85), rgba(11, 16, 34, 0.92));
}
.member-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(160, 170, 255, 0.16);
  pointer-events: none;
}
.member-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.member-plan { margin-top: 14px; font-size: 28px; font-weight: 760; letter-spacing: -0.02em; }
.member-plan small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 18px;
}
.member-meta div { min-width: 90px; }
.member-meta .label { font-size: 12px; color: var(--dim); letter-spacing: 0.04em; }
.member-meta .value { margin-top: 3px; font-size: 16px; font-weight: 650; }
.member-meta .value.small { font-size: 14px; font-weight: 550; color: var(--text-soft); }

.member-progress { margin-top: 22px; }
.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5b7cff, #c084fc);
  transition: width 600ms var(--ease);
}
.member-benefits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.member-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 22px; }

.quick-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.quick-card h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.quick-card h2 .icon { width: 18px; height: 18px; color: #9db3ff; }
.quick-list { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.quick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13.5px;
}
.quick-item .label { color: var(--muted); }
.quick-item .value { font-weight: 650; }

.game-status-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
}
.game-status-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.game-status-head { display: flex; align-items: center; gap: 12px; }
.game-status-head .game-icon { margin-bottom: 0; width: 44px; height: 44px; border-radius: 13px; }
.game-status-head .game-icon .icon { width: 22px; height: 22px; }
.game-status-name { font-size: 16.5px; font-weight: 700; }
.game-status-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.health { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.balance { margin-top: 18px; display: flex; align-items: baseline; gap: 8px; }
.balance-value { font-size: 34px; font-weight: 780; letter-spacing: -0.03em; line-height: 1; }
.balance-unit { font-size: 13px; color: var(--muted); }
.backend-state {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 196, 107, 0.3);
  background: rgba(255, 196, 107, 0.06);
  color: #ffd79a;
  font-size: 12.5px;
  line-height: 1.55;
}
.backend-state .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.game-status-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.section-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.section-card + .section-card { margin-top: 18px; }

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  background: rgba(6, 10, 22, 0.3);
}
.table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 13.5px; }
.table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(124, 145, 214, 0.12);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.table td.nowrap,
.table td .tag { white-space: nowrap; }
.table .order-id { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-soft); }
.table .row-actions { display: flex; gap: 8px; justify-content: flex-end; }

.grant-game { display: inline-flex; align-items: center; gap: 7px; }
.grant-game .dot { width: 7px; height: 7px; }
.grant-game.ai { color: #8fc4ff; }
.grant-game.ai .dot { background: var(--ai); }
.grant-game.world { color: #d7a8ff; }
.grant-game.world .dot { background: var(--world); }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; align-items: start; }

/* ------------------------------ 16. 管理后台 ------------------------------ */
.admin-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 13px 18px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 196, 107, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 196, 107, 0.07);
  color: #ffe0ac;
  font-size: 13.5px;
}
.admin-banner .icon { width: 18px; height: 18px; flex: none; }
.admin-banner b { color: #fff; }
.admin-banner .spacer { flex: 1; }

.admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.stat-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(91, 124, 255, 0.14);
  border: 1px solid rgba(91, 124, 255, 0.28);
  color: #b6c4ff;
  flex: none;
}
.stat-icon .icon { width: 20px; height: 20px; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { margin-top: 4px; font-size: 25px; font-weight: 760; letter-spacing: -0.02em; line-height: 1.15; }
.stat-value small { font-size: 13px; color: var(--muted); font-weight: 500; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.admin-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.search-form { display: flex; gap: 8px; flex: 1; min-width: 240px; max-width: 420px; }
.search-form .input { min-height: 40px; font-size: 14px; }
.search-form .btn { --btn-h: 40px; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}
.user-cell .user-name { font-weight: 600; }
.user-cell .user-id { font-size: 11.5px; color: var(--dim); font-family: var(--font-mono); }

.plan-editor { display: flex; flex-direction: column; gap: 12px; }
.plan-row {
  display: grid;
  grid-template-columns: 90px minmax(96px, 130px) 100px 100px minmax(130px, 1fr) 84px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}
.plan-row .field-label { font-size: 11.5px; color: var(--dim); font-weight: 500; }
.plan-row .input { min-height: 38px; font-size: 13.5px; padding: 7px 10px; }
.plan-row .plan-id { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-soft); }
.plan-row .switch { display: flex; align-items: center; justify-content: center; }
.plan-row .switch input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.plan-row .plan-save { --btn-h: 36px; }

.audit-action { font-size: 12.5px; font-weight: 600; color: #b6c4ff; }
.audit-detail {
  max-width: 380px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission {
  max-width: 560px;
  margin: 60px auto;
  padding: 40px 32px;
  text-align: center;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 107, 138, 0.25);
  background: var(--surface);
}
.permission .lock-mark {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 107, 138, 0.12);
  border: 1px solid rgba(255, 107, 138, 0.3);
  color: #ff9db1;
}
.permission h1 { font-size: 23px; }
.permission p { margin-top: 10px; color: var(--muted); font-size: 14.5px; }
.permission .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }

/* ------------------------------ 17. 弹窗 / 提示 ------------------------------ */
dialog.modal {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  color: var(--text);
}
dialog.modal[open] {
  display: grid;
  place-items: center;
  padding: 20px;
}
dialog.modal::backdrop {
  background: rgba(3, 6, 15, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(170deg, #131c38, #0a1024);
  box-shadow: var(--shadow);
  animation: modal-in 200ms var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 22px 0;
}
.modal-title { font-size: 19px; }
.modal-sub { margin-top: 5px; color: var(--muted); font-size: 13px; }
.modal-close {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}
.modal-close:hover { color: var(--text); background: var(--surface-3); }
.modal-close .icon { width: 17px; height: 17px; }
.modal-body { padding: 18px 22px; overflow-y: auto; font-size: 14.5px; }
.modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.modal-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 196, 107, 0.28);
  background: rgba(255, 196, 107, 0.07);
  color: #ffdca5;
  font-size: 12.5px;
  line-height: 1.6;
}
.modal-note .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.modal-note.info {
  border-color: rgba(91, 124, 255, 0.3);
  background: rgba(91, 124, 255, 0.1);
  color: #c6d2ff;
}

.pay-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}
.pay-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13.5px; }
.pay-summary-row .label { color: var(--muted); }
.pay-summary-row .value { font-weight: 650; }
.pay-total { padding-top: 10px; border-top: 1px dashed var(--border); }
.pay-total .value { font-size: 22px; font-weight: 780; }

.toast-host {
  position: fixed;
  top: calc(var(--header-h) + 14px);
  right: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  border-left-width: 3px;
  background: rgba(15, 23, 46, 0.97);
  box-shadow: var(--shadow);
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.55;
  pointer-events: auto;
  animation: toast-in 200ms var(--ease);
}
.toast .icon { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.toast-ok { border-left-color: var(--ok); }
.toast-ok .icon { color: var(--ok); }
.toast-error { border-left-color: var(--danger); }
.toast-error .icon { color: #ff9db1; }
.toast-info { border-left-color: var(--primary); }
.toast-info .icon { color: #9db3ff; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 196, 107, 0.3);
  background: rgba(255, 196, 107, 0.07);
  color: #ffe0ac;
  font-size: 13.5px;
}
.banner .icon { width: 17px; height: 17px; flex: none; }
.banner .spacer { flex: 1; }

/* ------------------------------ 18. 骨架屏 / 加载 ------------------------------ */
.skeleton {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.035) 30%, rgba(255, 255, 255, 0.085) 50%, rgba(255, 255, 255, 0.035) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.page-loading { padding-block: 40px 60px; }
.sk-hero { height: 240px; margin-bottom: 24px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sk-card { height: 170px; }

.loading-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px;
  color: var(--muted);
  font-size: 14px;
}
.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(157, 179, 255, 0.3);
  border-top-color: #9db3ff;
  animation: spin 0.7s linear infinite;
}

/* ------------------------------ 19. 页脚 ------------------------------ */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 17, 0.6);
  padding-block: 44px 24px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 36px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-note { max-width: 400px; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.footer-brand .tag { margin-top: 16px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-title { font-size: 12.5px; color: var(--text-soft); letter-spacing: 0.08em; font-weight: 700; margin-bottom: 2px; }
.footer-col a { color: var(--muted); font-size: 13.5px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid rgba(124, 145, 214, 0.12);
  color: var(--dim);
  font-size: 12.5px;
}

/* ------------------------------ 20. 404 / 全局消息 ------------------------------ */
.notfound {
  text-align: center;
  padding-block: 80px 40px;
  max-width: 620px;
  margin-inline: auto;
}
.notfound-code {
  font-size: clamp(72px, 14vw, 128px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(120deg, #5b7cff, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.notfound h1 { margin-top: 12px; font-size: 26px; }
.notfound p { margin-top: 12px; color: var(--muted); font-size: 15px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  text-align: center;
}

/* ------------------------------ 21. 响应式 ------------------------------ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-copy { max-width: none; }
  .hero-art { min-height: 0; }
  .world-panel { max-width: 520px; margin-inline: auto; }
  .float-chip-a { top: -16px; right: 8px; }
  .float-chip-b { bottom: -16px; left: 8px; }
  .dash-hero { grid-template-columns: minmax(0, 1fr); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid.two { grid-template-columns: minmax(0, 1fr); }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 62px; }
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 24px 20px;
    background: #080d1b;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .site-header.mobile-open .nav-menu { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 11px 12px; font-size: 15.5px; }
  .nav-link.is-active::after { left: 12px; right: auto; width: 24px; bottom: 6px; }
  .nav-auth {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-left: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .nav-user { max-width: none; justify-content: space-between; }
  .nav-auth .btn { width: 100%; }
  .nav-auth .btn-link { width: auto; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skeleton-grid { grid-template-columns: minmax(0, 1fr); }
  .sk-hero { height: 180px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .compare thead th:first-child { display: none; }
  .compare tbody th { display: none; }
  .compare thead th, .compare td, .compare tbody th { padding: 13px 15px; }
  .compare, .compare thead, .compare tbody, .compare tr, .compare td { display: block; }
  .compare thead { display: none; }
  .compare tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid var(--border);
  }
  .compare tr:last-child { border-bottom: 0; }
  .compare td { border-bottom: 0; }
  .compare .col-featured { box-shadow: inset 0 0 0 1px rgba(91, 124, 255, 0.25); }
  .compare td[data-th]::before {
    content: attr(data-th);
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.04em;
  }
  .success-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-row .plan-id { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { padding-inline: 18px; }
  .page { padding-block: 24px 54px; }
  .hero { padding-block: 40px 24px; }
  .hero-title { font-size: 34px; }
  .hero-lead { font-size: 15.5px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-stats { gap: 12px 20px; }
  .section { padding-block: 40px; }
  .section-head { margin-bottom: 24px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .card-pad, .section-card, .quick-card, .game-status-card, .game-card, .plan-card, .member-card { padding: 20px; }
  .brand-text small { display: none; }
  .float-chip { display: none; }
  .member-plan { font-size: 24px; }
  .member-meta { gap: 10px 20px; }
  .member-meta .value { font-size: 15px; }
  .auth-card { padding: 26px 20px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .dash-hero { gap: 14px; }
  .dash-grid { gap: 14px; }
  .success-panel { padding: 22px; }
  .modal-head { padding: 18px 18px 0; }
  .modal-body { padding: 16px 18px; }
  .modal-foot { padding: 14px 18px 18px; }
  .modal-foot .btn { flex: 1 1 100%; }
  .admin-stats { gap: 12px; }
  .stat-card { padding: 16px; gap: 10px; }
  .stat-value { font-size: 21px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .toast-host { top: auto; bottom: 16px; right: 16px; left: 16px; width: auto; }
  .table { font-size: 13px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 30px; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head-actions .btn { flex: 1; }
  .compare tr { grid-template-columns: minmax(0, 1fr); }
  .compare td { border-bottom: 1px dashed rgba(124, 145, 214, 0.12); }
  .compare td:last-child { border-bottom: 0; }
  .plan-points { flex-direction: column; gap: 8px; }
}

/* ------------------------------ 22. 首页 FAQ / CTA ------------------------------ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.faq-item[open] { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.03); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: #fff; }
.faq-q .icon { width: 18px; height: 18px; color: var(--muted); transition: transform 200ms var(--ease); }
.faq-item[open] .faq-q .icon { transform: rotate(180deg); color: #b6c4ff; }
.faq-a {
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  animation: faq-in 180ms var(--ease);
}
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.cta-band {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 38px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(140, 150, 235, 0.28);
  background:
    radial-gradient(520px 240px at 12% 0%, rgba(91, 124, 255, 0.22), transparent 68%),
    radial-gradient(520px 260px at 92% 100%, rgba(192, 132, 252, 0.18), transparent 68%),
    linear-gradient(150deg, rgba(25, 34, 68, 0.9), rgba(10, 15, 32, 0.92));
  box-shadow: var(--shadow);
}
.cta-copy h2 { font-size: clamp(22px, 2.4vw, 28px); }
.cta-copy p { margin-top: 8px; color: var(--muted); font-size: 14.5px; max-width: 520px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------ 23. 组件补丁 ------------------------------ */
.nav-user { padding: 5px 5px 5px 6px; }
.nav-user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 4px 0 6px;
  color: var(--text);
}
.nav-user-link:hover { color: #fff; }
.nav-user .avatar { width: 27px; height: 27px; }
.nav-demo-tag { margin-right: 2px; }

.success-item .label .icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.plan-row {
  grid-template-columns: 78px minmax(110px, 1.4fr) 108px 108px 62px 78px;
}
.plan-row .switch { justify-content: flex-start; padding-left: 4px; }

@media (max-width: 1024px) {
  .plan-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-row > div:first-child { grid-column: 1 / -1; }
  .plan-row > div:last-child { grid-column: 1 / -1; display: flex; }
  .plan-row .plan-save { width: 100%; }
}

@media (max-width: 860px) {
  .nav-demo-tag { display: none; }
  .cta-band { padding: 28px 24px; }
  .cta-actions .btn { flex: 1 1 100%; }
}

/* ------------------------------ 25. 平台积分卡片 ------------------------------ */
.points-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(140, 150, 235, 0.3);
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(56, 224, 240, 0.14), transparent 65%),
    radial-gradient(420px 200px at 0% 100%, rgba(91, 124, 255, 0.16), transparent 62%),
    linear-gradient(160deg, rgba(24, 36, 68, 0.85), rgba(11, 16, 34, 0.92));
  box-shadow: var(--shadow);
}
.points-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(160, 170, 255, 0.14);
  pointer-events: none;
}
.points-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.points-balance {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 18px;
}
.points-value {
  font-size: 42px;
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.points-unit { color: var(--muted); font-size: 13px; }
.points-rate {
  margin-top: 10px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.65;
}
.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.usage-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}
.usage-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.usage-name .dot { width: 7px; height: 7px; }
.usage-points {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}
.usage-points span { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.usage-sub { margin-top: 3px; font-size: 11.5px; color: var(--dim); }
.points-empty {
  margin-top: 12px;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.65;
}
.points-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}
.delta-plus { color: var(--ok); font-weight: 650; font-variant-numeric: tabular-nums; }
.delta-minus { color: #ff9db1; font-weight: 650; font-variant-numeric: tabular-nums; }
.points-badge { font-weight: 650; font-variant-numeric: tabular-nums; }
.dot-ai { background: var(--ai); }
.dot-world { background: var(--world); }

@media (max-width: 640px) {
  .points-value { font-size: 34px; }
  .points-card { padding: 20px; }
  .usage-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .admin-stats { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------ 24. 动效偏好 ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 充值 */
.recharge-amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.recharge-amount { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.02); color: var(--text); cursor: pointer; text-align: left; }
.recharge-amount:hover { border-color: var(--border-strong); }
.recharge-amount.is-active { border-color: rgba(123,105,255,0.85); background: rgba(123,105,255,0.14); box-shadow: 0 0 0 1px rgba(123,105,255,0.25) inset; }
.recharge-amount small { color: var(--muted); font-size: 11.5px; }
.recharge-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: end; }
.recharge-preview { display: flex; align-items: baseline; gap: 5px; padding: 0 4px 9px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.recharge-preview strong { font-size: 20px; color: var(--text); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table th { color: var(--muted); font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .recharge-form { grid-template-columns: 1fr; } .recharge-preview { padding-bottom: 0; } }

.recharge-denoms { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 6px; }
.recharge-denom { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.02); }
.recharge-denom-amount { font-size: 22px; font-weight: 750; color: var(--text); }
.recharge-denom strong { font-size: 13px; color: var(--accent-2, #8cd6ff); }
.redeem-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 8px; }
.redeem-result { margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(80, 200, 140, 0.45); border-radius: 12px; background: rgba(80, 200, 140, 0.08); display: flex; flex-direction: column; gap: 3px; }
.redeem-result strong { display: flex; align-items: center; gap: 6px; color: var(--ok, #8be3b8); font-size: 14px; }
.redeem-result span { color: var(--muted); font-size: 12.5px; }
@media (max-width: 720px) { .redeem-form { grid-template-columns: 1fr; } }

/* 管理后台：模型定价 */
.model-price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.model-price-grid .field { margin: 0; }
.model-price-cell { max-width: 320px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.model-price-dialog { width: min(860px, 100%); }
.model-price-editor { display: flex; flex-direction: column; gap: 10px; }
.model-price-editor h3 { margin: 8px 0 0; font-size: 15px; }
.price-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.price-section-head h3 { margin: 0; }
.price-rates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.price-rates .field { margin: 0; }
.price-rule { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, 0.02); }
.price-rule-top { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) auto; gap: 8px; align-items: end; }
.price-days { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.price-days label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
/* 定价：元价换算 + 折扣 */
.price-discount-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.price-advanced { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.price-advanced > summary { cursor: pointer; font-size: 13px; font-weight: 650; color: var(--text); }
.price-advanced h3 { margin-top: 10px; }
#price-final-preview { padding: 8px 10px; border-radius: 10px; background: rgba(91, 124, 255, 0.08); border: 1px solid rgba(91, 124, 255, 0.2); font-size: 12.5px; line-height: 1.7; }
@media (max-width: 720px) {
  .model-price-grid, .price-rule-top { grid-template-columns: 1fr; }
  .price-rates { grid-template-columns: 1fr 1fr; }
}

/* 管理后台分页导航 */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.admin-tab { flex: 0 0 auto; padding: 8px 14px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.admin-tab:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.admin-tab.is-active { color: var(--text); background: rgba(123,105,255,0.18); box-shadow: inset 0 0 0 1px rgba(123,105,255,0.35); }
@media (max-width: 720px) { .admin-tabs { gap: 3px; } .admin-tab { padding: 7px 10px; font-size: 12px; } }

/* ================= 模型管理：突出展示 + 多选 + 获取模型弹窗（2026-11-02） ================= */
.model-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
  flex-wrap: wrap;
}
.model-toolbar-count { font-size: 13px; color: var(--text-dim, #9aa6d4); }
.model-toolbar-count b { color: var(--text, #e9edff); font-size: 15px; }
.model-bulk { display: inline-flex; align-items: center; gap: 10px; }
.model-bulk .dim { font-size: 12.5px; }

.model-table .model-check { width: 38px; text-align: center; }
.model-table .model-check input { accent-color: #ffc14d; width: 15px; height: 15px; cursor: pointer; }
.model-cell { min-width: 190px; }
.model-name-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.model-name {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: var(--text, #e9edff);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.model-source-tag {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--text-dim, #9aa6d4);
  border: 1px solid var(--border, #22305c);
}
.model-vendor { font-size: 11.5px; color: var(--text-dim, #9aa6d4); margin-top: 3px; }

.model-price-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(91, 124, 255, 0.2);
  background: linear-gradient(180deg, rgba(91, 124, 255, 0.1), rgba(91, 124, 255, 0.03));
  min-width: 246px;
}
.model-price-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.model-price-item { font-size: 12px; color: var(--text-dim, #9aa6d4); }
.model-price-item b { font-size: 14px; font-weight: 750; color: #eef2ff; font-family: var(--mono, ui-monospace, Menlo, monospace); }
.model-price-unit { font-size: 10.5px; color: var(--text-dim, #9aa6d4); opacity: 0.85; }
.model-discount-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #3a1d00;
  white-space: nowrap;
  background: linear-gradient(135deg, #fff2bf 0%, #ffcf5c 32%, #ff9d3f 62%, #ffd977 100%);
  box-shadow: 0 0 0 1px rgba(255, 206, 92, 0.55), 0 2px 10px rgba(255, 152, 63, 0.32);
}
.model-price-sub { font-size: 10.5px; color: var(--text-dim, #9aa6d4); }
.model-price-raw { opacity: 0.9; text-decoration: line-through; text-decoration-color: rgba(255, 150, 120, 0.55); }
.model-price-unset {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-dim, #9aa6d4);
  border: 1px dashed var(--border, #22305c);
}

.model-rules-cell { min-width: 210px; }
.model-rule-chip {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-dim, #9aa6d4);
  border: 1px solid var(--border, #22305c);
  background: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
}
.model-rule-chip--peak { color: #ffd8a0; border-color: rgba(255, 180, 90, 0.4); }
.model-rule-chip--tier { color: #b9c6ff; border-color: rgba(120, 150, 255, 0.4); }
.model-rule-chip--plain { opacity: 0.7; }
.model-actions { white-space: nowrap; }

/* 获取上游模型弹窗 */
.fetch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.fetch-all { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.fetch-all input { accent-color: #ffc14d; width: 15px; height: 15px; }
.fetch-list { display: flex; flex-direction: column; gap: 6px; max-height: 380px; overflow: auto; padding-right: 4px; }
.fetch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-size: 13px;
}
.fetch-item:hover { border-color: rgba(255, 193, 77, 0.4); }
.fetch-item:has(input:checked) { border-color: rgba(255, 193, 77, 0.75); background: rgba(255, 193, 77, 0.08); }
.fetch-item input { accent-color: #ffc14d; width: 15px; height: 15px; }
.fetch-item.is-existing { opacity: 0.55; cursor: default; }
.fetch-id { font-family: var(--mono, ui-monospace, Menlo, monospace); font-weight: 650; color: var(--text, #e9edff); }
.fetch-vendor { font-size: 11.5px; color: var(--text-dim, #9aa6d4); }
.fetch-tag { margin-left: auto; font-size: 10.5px; color: var(--text-dim, #9aa6d4); border: 1px solid var(--border, #22305c); border-radius: 999px; padding: 1px 7px; }
/* 嵌入模型管理小节 */
.model-subsection { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--border, #22305c); }
.model-subsection-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.model-subsection-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--text, #e9edff); }
.model-price-card--embed { border-color: rgba(140, 120, 255, 0.28); background: linear-gradient(180deg, rgba(140, 120, 255, 0.12), rgba(140, 120, 255, 0.04)); }
.model-embed-add { margin: 0 0 12px; }
.fetch-tag--embed { color: #ffe2a8; border-color: rgba(255, 193, 77, 0.5); background: rgba(255, 193, 77, 0.1); margin-left: 4px; }

/* 兑换码分页工具栏 */
.recharge-code-tools .spacer { flex: 1; }
.recharge-code-tools .dim { white-space: nowrap; }
