/* ═══════════════════════════════════════════════════════════════════════
   Liquid Glass UI — iOS 26 风格设计层（覆盖式，不改原有 class 语义）
   设计原则：
     1) 真 blur 只给 4 个 chrome 面（header / tab-bar / bottom-nav / modal）
     2) 内容卡片用「分层透明 + 内高光 + 细描边」的假玻璃，避免几十层 backdrop-filter
     3) 所有动效只跑 transform / opacity；不跑 filter、不跑 width/height
     4) 尊重 prefers-reduced-motion 与 saveData
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* ── 画布 ── */
  --bg: #05070c;
  --bg-2: #080b12;
  --surface: rgba(255, 255, 255, 0.05);
  --surface2: rgba(255, 255, 255, 0.09);
  --glass-bg: linear-gradient(152deg, rgba(168, 192, 240, 0.15) 0%, rgba(132, 152, 205, 0.065) 44%, rgba(150, 170, 220, 0.105) 100%);
  --glass-bg-strong: linear-gradient(152deg, rgba(178, 200, 245, 0.21) 0%, rgba(146, 166, 216, 0.10) 46%, rgba(160, 180, 230, 0.14) 100%);
  --glass-stroke: rgba(190, 210, 255, 0.18);
  --glass-stroke-strong: rgba(196, 214, 255, 0.28);
  --glass-sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.07) 30%, rgba(255, 255, 255, 0) 56%);

  /* ── 线条 / 文本 ── */
  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.18);
  --text: #f2f4f8;
  --text2: rgba(235, 240, 250, 0.62);
  --text3: rgba(235, 240, 250, 0.38);

  /* ── 品牌色（iOS system palette 改良）── */
  --gold: #e8b657;
  --gold-bright: #f6cf7d;
  --gold-dim: rgba(232, 182, 87, 0.32);
  --gold-glow: rgba(232, 182, 87, 0.16);
  --red: #ff6b7f;
  --red-dim: rgba(255, 107, 127, 0.16);
  --blue: #6fb2ff;
  --blue-dim: rgba(111, 178, 255, 0.16);
  --green: #5fd0ad;
  --green-dim: rgba(95, 208, 173, 0.16);

  /* ── 几何 ── */
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 11px;
  --gap: 14px;
  --header-h: 60px;
  --nav-h: 46px;
  --bottom-nav-h: 70px;
  --gs-blur: 22px;
  --gs-spring: cubic-bezier(0.32, 1.28, 0.36, 1);
  --gs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gs-pad: 18px;

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "PingFang HK", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
}

/* ═══════════════ 画布：极光背景（预渲染渐变，零 filter 成本）═══════════════ */
html { background: var(--bg); }

body {
  background:
    radial-gradient(70% 46% at 6% -6%, rgba(245, 194, 96, 0.30) 0%, rgba(245, 194, 96, 0) 62%),
    radial-gradient(62% 44% at 96% -2%, rgba(92, 152, 255, 0.28) 0%, rgba(92, 152, 255, 0) 60%),
    radial-gradient(72% 52% at 88% 92%, rgba(142, 112, 255, 0.24) 0%, rgba(142, 112, 255, 0) 64%),
    radial-gradient(62% 44% at 10% 88%, rgba(64, 205, 174, 0.18) 0%, rgba(64, 205, 174, 0) 62%),
    radial-gradient(90% 60% at 50% 50%, rgba(120, 150, 220, 0.07) 0%, rgba(120, 150, 220, 0) 72%),
    linear-gradient(178deg, #080b14 0%, #06080f 46%, #04060c 100%) !important;
  background-attachment: fixed;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* 细颗粒，压住渐变色带（1px 纯 CSS，无外链）*/
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.34;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px);
}

/* ═══════════════ 玻璃基元 ═══════════════ */
.gs-glass,
.card,
.section,
.login-card,
.pick-panel,
.modal-box,
.membership-gate,
.plan-card {
  position: relative;
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-stroke) !important;
  border-radius: var(--radius) !important;
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.2) inset,
    0 -1px 0 0 rgba(0, 0, 0, 0.34) inset,
    0 24px 48px -28px rgba(0, 0, 0, 0.85),
    0 2px 10px -4px rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
  isolation: isolate;
}

/* 顶部斜切高光（假玻璃的“液态”质感来源）*/
.gs-glass::after,
.card::after,
.section::after,
.login-card::after,
.modal-box::after,
.plan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--glass-sheen);
  opacity: 0.55;
  z-index: -1;
  border-radius: inherit;
}

/* 顶缘镜面反射：一条柔和的弧形反光，模拟玻璃折射 */
.card::before,
.section::before,
.login-card::before,
.plan-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 46%;
  pointer-events: none;
  background: radial-gradient(120% 100% at 16% 0%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.06) 38%, rgba(255, 255, 255, 0) 68%);
  opacity: 0.75;
  z-index: -1;
  border-radius: inherit;
}

/* ═══════════════ 悬浮容器：header / tab-bar / dock ═══════════════ */
.header {
  height: var(--header-h) !important;
  margin: 10px 12px 0 !important;
  padding: 0 14px !important;
  border: 1px solid var(--glass-stroke-strong) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(150deg, rgba(245, 200, 110, 0.13) 0%, rgba(150, 175, 235, 0.09) 46%, rgba(255, 255, 255, 0.08) 100%),
    var(--glass-bg-strong) !important;
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.26) inset,
    0 18px 40px -22px rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: saturate(180%) blur(var(--gs-blur)) !important;
  -webkit-backdrop-filter: saturate(180%) blur(var(--gs-blur)) !important;
  position: sticky;
  top: 10px !important;
  z-index: 120 !important;
  transition: box-shadow 0.3s var(--gs-ease), background 0.3s var(--gs-ease),
    transform 0.3s var(--gs-ease);
}

/* 滚动后收紧：只改阴影与透明度，不动布局（避免重排）*/
html.gs-scrolled .header {
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.16) inset,
    0 26px 48px -26px rgba(0, 0, 0, 1) !important;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)) !important;
}

.tab-bar {
  margin: 10px 12px 0 !important;
  padding: 6px !important;
  gap: 3px !important;
  border: 1px solid var(--glass-stroke) !important;
  border-radius: 20px !important;
  background:
    linear-gradient(150deg, rgba(245, 200, 110, 0.10) 0%, rgba(150, 175, 235, 0.08) 55%, rgba(255, 255, 255, 0.055) 100%) !important;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.16) inset, 0 16px 34px -24px rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: saturate(160%) blur(18px) !important;
  -webkit-backdrop-filter: saturate(160%) blur(18px) !important;
  position: sticky !important;
  top: calc(var(--header-h) + 17px) !important;
  z-index: 110 !important;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }

/* 滑动指示器：由 glass.js 注入，纯 transform 位移 */
.gs-tab-ink {
  position: absolute;
  top: 6px;
  left: 0;
  height: calc(100% - 12px);
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(232, 182, 87, 0.9), rgba(232, 182, 87, 0.55));
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.5) inset, 0 6px 16px -6px rgba(232, 182, 87, 0.7);
  transform: translate3d(0, 0, 0);
  width: 0;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.34s var(--gs-spring), width 0.34s var(--gs-spring), opacity 0.2s linear;
  z-index: 0;
}

.tab-item,
.lt-btn,
.subtab-btn,
.tab-btn {
  position: relative;
  z-index: 1;
  border-radius: 15px !important;
  border: none !important;
  background: transparent !important;
  color: var(--text2) !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.22s var(--gs-ease), transform 0.18s var(--gs-spring) !important;
}
.tab-item:hover,
.lt-btn:hover,
.subtab-btn:hover { color: var(--text) !important; }
.tab-item.active,
.lt-btn.active,
.subtab-btn.active,
.tab-btn.active { color: #0a0d14 !important; font-weight: 650 !important; }

/* 桌面端标签用 ink 指针，自己不要再上底色（否则双层）*/
html.gs-ink .tab-item.active,
html.gs-ink .lt-btn.active { background: transparent !important; }
html.gs-ink .tab-item.active::after { content: none; }

/* 手机底部 dock */
.bottom-nav {
  margin: 0 12px 12px !important;
  border: 1px solid var(--glass-stroke-strong) !important;
  border-radius: 26px !important;
  background: var(--glass-bg-strong) !important;
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.22) inset,
    0 -18px 40px -26px rgba(0, 0, 0, 1) !important;
  backdrop-filter: saturate(180%) blur(var(--gs-blur)) !important;
  -webkit-backdrop-filter: saturate(180%) blur(var(--gs-blur)) !important;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .bottom-nav {
    left: 50% !important;
    right: auto !important;
    width: min(620px, calc(100% - 24px));
    transform: translateX(-50%);
    margin-bottom: 16px !important;
  }
}
.bottom-nav-inner { padding: 6px 4px !important; }
.bottom-nav-item {
  border-radius: 18px !important;
  transition: background 0.24s var(--gs-ease), color 0.24s var(--gs-ease),
    transform 0.2s var(--gs-spring) !important;
}
.bottom-nav-item.active {
  background: radial-gradient(120% 100% at 50% 0%, rgba(232, 182, 87, 0.26), rgba(232, 182, 87, 0.06)) !important;
  color: var(--gold-bright) !important;
}
.bottom-nav-item .bn-icon { transition: transform 0.28s var(--gs-spring); }
.bottom-nav-item.active .bn-icon { transform: translate3d(0, -1px, 0) scale(1.08); }

/* ═══════════════ 内容区 ═══════════════ */
main, .container, .tab-panel { position: relative; z-index: 1; }
.tab-panel { padding: 12px var(--gs-pad) 22px; }

.card {
  padding: 16px 16px 14px !important;
  contain: layout style paint;
  transition: transform 0.3s var(--gs-ease), box-shadow 0.3s var(--gs-ease),
    border-color 0.3s var(--gs-ease);
}

.card-title {
  font-size: 13px !important;
  font-weight: 650 !important;
  letter-spacing: 0.04em !important;
  color: rgba(255, 255, 255, 0.86) !important;
  text-transform: none;
}
.card-title::before {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold)) !important;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(232, 182, 87, 0.5);
}

/* 数据行/表格去重线，做成分隔发丝线 */
.data-table th,
.data-table td { border-color: rgba(255, 255, 255, 0.06) !important; }
.data-table th { color: var(--text2) !important; font-weight: 600 !important; letter-spacing: 0.03em; }
.num-cell { font-variant-numeric: tabular-nums; }

/* 号码球：玻璃质感 + 弹入 */
.ball {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.4) inset,
    0 6px 14px -8px rgba(0, 0, 0, 0.9) !important;
  color: #fff !important;
  font-variant-numeric: tabular-nums;
  transition: transform 0.24s var(--gs-spring), box-shadow 0.24s var(--gs-ease);
}
.ball.special {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold)) !important;
  color: #10131b !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.6) inset, 0 8px 20px -8px rgba(232, 182, 87, 0.9) !important;
}

/* ═══════════════ 按钮 ═══════════════ */
.btn,
.btn-gold,
.btn-upgrade,
.header-btn,
.code-btn,
.tab-btn,
button {
  -webkit-tap-highlight-color: transparent;
}
.btn,
.btn-gold,
.btn-upgrade {
  border-radius: 16px !important;
  border: 1px solid var(--glass-stroke-strong) !important;
  font-weight: 620 !important;
  letter-spacing: 0.02em;
  transition: transform 0.16s var(--gs-spring), box-shadow 0.24s var(--gs-ease),
    background 0.24s var(--gs-ease), opacity 0.2s linear !important;
}
.btn-gold {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold)) !important;
  color: #0a0d14 !important;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.6) inset, 0 12px 26px -14px rgba(232, 182, 87, 0.9) !important;
}
.btn-gold:hover { box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.7) inset, 0 16px 32px -14px rgba(232, 182, 87, 1) !important; }

.header-btn {
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid var(--glass-stroke) !important;
  transition: transform 0.16s var(--gs-spring), background 0.22s var(--gs-ease),
    border-color 0.22s var(--gs-ease) !important;
}
.header-btn:hover { background: rgba(255, 255, 255, 0.12) !important; }
.header-btn.accent {
  color: var(--gold-bright) !important;
  border-color: rgba(232, 182, 87, 0.42) !important;
  background: rgba(232, 182, 87, 0.12) !important;
}

/* 按压反馈（触屏/鼠标统一，纯 transform）*/
.gs-press { transform: scale(0.965) !important; }

/* ═══════════════ 表单 ═══════════════ */
input,
textarea,
select,
.modal-input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--glass-stroke) !important;
  border-radius: 14px !important;
  color: var(--text) !important;
  font-family: inherit !important;
  transition: border-color 0.2s var(--gs-ease), box-shadow 0.24s var(--gs-ease),
    background 0.2s var(--gs-ease) !important;
}
input:focus,
textarea:focus,
select:focus,
.modal-input:focus {
  outline: none !important;
  border-color: rgba(232, 182, 87, 0.62) !important;
  box-shadow: 0 0 0 4px rgba(232, 182, 87, 0.16) !important;
  background: rgba(255, 255, 255, 0.09) !important;
}
::placeholder { color: rgba(235, 240, 250, 0.32) !important; }
:focus-visible { outline: 2px solid rgba(232, 182, 87, 0.8); outline-offset: 2px; }

/* ═══════════════ 弹窗：真 blur + 弹簧进入 ═══════════════ */
.modal-overlay {
  background: rgba(6, 8, 14, 0.55) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
}
.modal-box {
  animation: gsModalIn 0.34s var(--gs-spring) both;
  transform-origin: 50% 60%;
}
@keyframes gsModalIn {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.965); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* 会员门禁/提示条 */
.membership-gate,
.trial-banner {
  border-radius: var(--radius-sm) !important;
  border: 1px solid rgba(232, 182, 87, 0.28) !important;
  background: linear-gradient(150deg, rgba(232, 182, 87, 0.16), rgba(232, 182, 87, 0.05)) !important;
}

/* ═══════════════ 载入骨架（原「载入中…」占位）═══════════════ */
.gs-loading {
  color: transparent !important;
  border-radius: 12px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.06) 22%, rgba(255, 255, 255, 0.13) 38%, rgba(255, 255, 255, 0.06) 54%);
  background-size: 220% 100%;
  animation: gsShimmer 1.25s linear infinite;
  min-height: 18px;
}
@keyframes gsShimmer {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}

/* ═══════════════ 进场动画（IntersectionObserver 加 .gs-in）═══════════════ */
.gs-anim {
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.985);
  transition: opacity 0.42s var(--gs-ease), transform 0.42s var(--gs-ease);
  transition-delay: var(--gs-delay, 0ms);
}
.gs-anim.gs-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* 面板切换微动效 */
.tab-panel.active {
  animation: gsPanelIn 0.28s var(--gs-ease) both;
}
@keyframes gsPanelIn {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* 号码球批量弹入 */
.balls .ball,
.prediction-grid .ball {
  animation: gsBallIn 0.36s var(--gs-spring) both;
}
.balls .ball:nth-child(2n) { animation-delay: 24ms; }
.balls .ball:nth-child(3n) { animation-delay: 48ms; }
.balls .ball:nth-child(5n) { animation-delay: 72ms; }
@keyframes gsBallIn {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

/* ═══════════════ 滚动进度条（顶部 2px 液态金线）═══════════════ */
.gs-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: translate3d(0, 0, 0) scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(232, 182, 87, 0), var(--gold), rgba(232, 182, 87, 0));
  z-index: 999;
  pointer-events: none;
  opacity: 0.85;
  will-change: transform;
}

/* ═══════════════ 滚动条 / 选中 ═══════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }
::selection { background: rgba(232, 182, 87, 0.32); color: #fff; }

/* ═══════════════ 桌面端增强（hover 能力才启用位移，避免触屏误触）═══════════════ */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translate3d(0, -2px, 0);
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow:
      0 1px 0 0 rgba(255, 255, 255, 0.16) inset,
      0 -1px 0 0 rgba(0, 0, 0, 0.3) inset,
      0 30px 56px -30px rgba(0, 0, 0, 0.95),
      0 0 0 1px rgba(232, 182, 87, 0.06) !important;
  }
  .ball:hover { transform: translate3d(0, -2px, 0) scale(1.05); }
}

/* ═══════════════ 大屏布局：悬浮仪表盘栅格 ═══════════════ */
@media (min-width: 1024px) {
  :root { --gs-pad: 24px; }
  .tab-panel { max-width: 1480px; margin: 0 auto; }
  .header, .tab-bar { max-width: 1480px; margin-left: auto !important; margin-right: auto !important; }
  .grid-2 { gap: 16px !important; }
}

/* ═══════════════ 无障碍 / 降级 ═══════════════ */
@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;
  }
  .gs-anim { opacity: 1 !important; transform: none !important; }
  .gs-progress, .gs-tab-ink { display: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header, .tab-bar, .bottom-nav, .modal-overlay {
    background: rgba(12, 15, 22, 0.94) !important;
  }
}

/* 高对比模式 */
@media (prefers-contrast: more) {
  :root { --glass-stroke: rgba(255, 255, 255, 0.34); --text2: rgba(235, 240, 250, 0.8); }
}

/* ═══════════════ 移动端：给悬浮 dock 留出安全距离 ═══════════════ */
@media (max-width: 1023px) {
  .tab-panel { padding-bottom: calc(var(--bottom-nav-h) + 34px) !important; }
  .header { margin: 8px 8px 0 !important; padding: 0 12px !important; border-radius: 20px !important; }
  .tab-bar { margin: 8px 8px 0 !important; }
  .bottom-nav { margin: 0 8px 8px !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   V4 精修：配色降刺眼 / 字体清晰 / 移动端适配 / 回测页疏朗
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1) 配色：去掉高饱和金与高对比白，整盘统一到冷灰蓝 + 低饱和暖金 ── */
:root {
  --bg: #080a10;
  --text: #e7ecf4;
  --text2: rgba(228, 235, 246, 0.68);
  --text3: rgba(228, 235, 246, 0.44);
  --gold: #d3a96b;
  --gold-bright: #ecd3a3;
  --gold-dim: rgba(211, 169, 107, 0.3);
  --gold-glow: rgba(211, 169, 107, 0.12);
  --red: #ef7d8c;
  --red-dim: rgba(239, 125, 140, 0.14);
  --blue: #7fb3f0;
  --blue-dim: rgba(127, 179, 240, 0.14);
  --green: #6cc4a8;
  --green-dim: rgba(108, 196, 168, 0.14);
  --glass-bg: linear-gradient(152deg, rgba(150, 172, 214, 0.105) 0%, rgba(118, 138, 186, 0.048) 46%, rgba(132, 152, 200, 0.078) 100%);
  --glass-bg-strong: linear-gradient(152deg, rgba(158, 180, 222, 0.155) 0%, rgba(128, 148, 198, 0.07) 48%, rgba(140, 160, 208, 0.105) 100%);
  --glass-stroke: rgba(194, 210, 238, 0.125);
  --glass-stroke-strong: rgba(198, 214, 242, 0.195);
}

body {
  background:
    radial-gradient(82% 46% at 50% -12%, rgba(140, 168, 220, 0.16) 0%, rgba(140, 168, 220, 0) 66%),
    radial-gradient(58% 38% at 100% 2%, rgba(150, 140, 235, 0.12) 0%, rgba(150, 140, 235, 0) 62%),
    radial-gradient(64% 40% at 92% 96%, rgba(120, 150, 205, 0.1) 0%, rgba(120, 150, 205, 0) 64%),
    radial-gradient(46% 30% at 4% 88%, rgba(211, 169, 107, 0.07) 0%, rgba(211, 169, 107, 0) 66%),
    linear-gradient(178deg, #0a0d14 0%, #080a10 48%, #06080d 100%) !important;
}
/* 噪点压到几乎不可见，避免手机小屏出现摩尔纹/发刺 */
body::before { opacity: 0.13; }

/* 卡片反光与投影收敛，观感更“柔” */
.card::before, .section::before, .login-card::before, .plan-card::before { opacity: 0.5; }
.card::after, .section::after, .login-card::after, .modal-box::after, .plan-card::after { opacity: 0.4; }
.card, .section, .login-card, .pick-panel, .modal-box, .membership-gate, .plan-card {
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.14) inset,
    0 -1px 0 0 rgba(0, 0, 0, 0.3) inset,
    0 20px 40px -26px rgba(0, 0, 0, 0.8),
    0 2px 8px -4px rgba(0, 0, 0, 0.4) !important;
}
.btn-gold, .btn-upgrade {
  background: linear-gradient(160deg, #e6d0a6, #cfa261) !important;
  color: #10131b !important;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.45) inset, 0 10px 22px -14px rgba(207, 162, 97, 0.7) !important;
}
.tab-item.active, .lt-btn.active, .subtab-btn.active, .tab-btn.active { color: #14161d !important; }
.gs-tab-ink {
  background: linear-gradient(160deg, rgba(232, 208, 166, 0.92), rgba(203, 160, 100, 0.66));
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.42) inset, 0 6px 14px -8px rgba(203, 160, 100, 0.55);
}

/* ── 2) 字体：统一字重与行高，内联小字号抬到可读下限 ── */
body {
  font-size: 15px;
  line-height: 1.56;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
.card-title {
  font-size: 14px !important;
  font-weight: 660 !important;
  color: rgba(236, 242, 250, 0.93) !important;
  letter-spacing: 0.03em !important;
  line-height: 1.45 !important;
}
/* 模板里大量 8/9/10/11px 的内联字号 → 抬到 11.5–12.5px，保证清晰 */
[style*="font-size:8px"] { font-size: 11px !important; line-height: 1.45 !important; }
[style*="font-size:9px"] { font-size: 11.5px !important; line-height: 1.45 !important; }
[style*="font-size:10px"] { font-size: 12px !important; line-height: 1.5 !important; }
[style*="font-size:11px"] { font-size: 12.5px !important; line-height: 1.5 !important; }
.data-table { font-size: 12px !important; }
.data-table th { color: rgba(226, 234, 246, 0.78) !important; font-size: 11.5px !important; }
.data-table td { color: rgba(232, 238, 248, 0.9); font-variant-numeric: tabular-nums; }

/* ── 3) 回测页疏朗：策略卡留白、字号分级、表格可横向滚动 ── */
#stratGrid.strat-grid { gap: 14px !important; align-content: flex-start; }
.strat-card {
  flex: 1 1 168px !important;
  min-width: 168px !important;
  max-width: 240px !important;
  padding: 18px 16px 14px !important;
  border-radius: 20px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.strat-card .strat-label { font-size: 13px !important; font-weight: 620 !important; line-height: 1.45 !important; }
.strat-card .strat-rate { font-size: 25px !important; font-weight: 680 !important; margin: 2px 0 0 !important; letter-spacing: -0.01em !important; }
.strat-card .strat-meta { font-size: 12px !important; line-height: 1.5 !important; color: var(--text2) !important; }
.strat-card > div:last-child { margin-top: 6px !important; opacity: 0.75; }
#stratDetail { margin-top: 16px !important; }
#stratDetail .table-wrap {
  border: 1px solid var(--glass-stroke);
  border-radius: 16px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.035);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#stratDetail .data-table th, #stratDetail .data-table td { padding: 10px 10px !important; white-space: nowrap; }
.tab-panel .card + .card { margin-top: 16px; }
/* 回测页顶部说明行与标题之间留白 */
#tab3Panel .card > div:first-child { margin-bottom: 16px !important; }

/* ── 4) 移动端适配（≤768px）────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --gs-pad: 13px; --bottom-nav-h: 74px; }

  /* 顶栏：允许换行，倒计时独占一行，不再挤压 */
  .header {
    height: auto !important;
    min-height: 52px !important;
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 9px 12px !important;
    margin: 8px 8px 0 !important;
    border-radius: 20px !important;
  }
  .header h1 { font-size: 15px !important; letter-spacing: 0 !important; }
  .header-logo { font-size: 19px !important; }
  .lottery-toggle { margin: 0 !important; }
  .lt-btn { padding: 5px 11px !important; font-size: 12.5px !important; }
  .header-actions { gap: 6px !important; }
  .header-btn { padding: 6px 10px !important; font-size: 12px !important; border-radius: 12px !important; }
  #countdownBox {
    order: 99;
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 8px;
    margin-top: 2px;
  }
  #nextDrawInfo { font-size: 12px !important; white-space: normal !important; line-height: 1.45; }
  #countdown { font-size: 17px !important; min-width: 66px !important; }

  /* 标签条：可横向滑动，隐藏滚动条 */
  .tab-bar { margin: 8px 8px 0 !important; padding: 5px !important; }
  .tab-item { padding: 9px 13px !important; font-size: 13px !important; }

  /* 内容区 */
  .tab-panel { padding: 11px 12px calc(var(--bottom-nav-h) + 26px) !important; }
  .card { padding: 15px 14px !important; border-radius: 20px !important; }
  .section { border-radius: 20px !important; }
  .grid-2 { grid-template-columns: 1fr !important; gap: 12px !important; }
  .card-title { font-size: 13.5px !important; }

  /* 号码球与图表 */
  .balls { gap: 7px !important; }
  .ball { width: 35px !important; height: 35px !important; font-size: 13.5px !important; }
  .ball.sm { width: 24px !important; height: 24px !important; font-size: 11.5px !important; }
  .chart-box { min-height: 210px !important; }
  .chart-box.tall { min-height: 250px !important; }

  /* 表格：外层横向滚动，表内不挤 */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; padding: 0 2px 2px; }
  .table-wrap .data-table { min-width: 540px; }
  .data-table { font-size: 12px !important; }
  .data-table th, .data-table td { padding: 9px 9px !important; }

  /* 策略卡：两列 */
  .strat-card {
    flex: 1 1 calc(50% - 14px) !important;
    min-width: calc(50% - 14px) !important;
    max-width: none !important;
    padding: 15px 12px 12px !important;
  }
  .strat-card .strat-rate { font-size: 22px !important; }
  .strat-card .strat-label { font-size: 12.5px !important; }

  /* 底部 dock */
  .bottom-nav { margin: 0 8px 8px !important; border-radius: 24px !important; }
  .bottom-nav-inner { height: 62px !important; }
  .bn-label { font-size: 10.5px !important; }
  .bn-icon { font-size: 18px !important; }

  /* 小屏不显示噪点，避免摩尔纹 */
  body::before { display: none; }
}

@media (max-width: 380px) {
  .strat-card { flex: 1 1 100% !important; min-width: 100% !important; }
  .header h1 { font-size: 14px !important; }
}

/* ── 5) 大屏：回测页栅格更松，单行卡片更宽 ── */
@media (min-width: 1024px) {
  #stratGrid.strat-grid { gap: 16px !important; }
  .strat-card { flex: 1 1 190px !important; min-width: 190px !important; max-width: 260px !important; }
}

/* ── 6) 移动端二次收紧：顶栏两行、卡片头竖排、说明行不挤压 ── */
@media (max-width: 768px) {
  .header { flex-wrap: wrap; row-gap: 7px; }
  .header-spacer { display: none !important; }
  .header h1 { flex: 1 1 auto; min-width: 0; font-size: 14.5px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-actions { order: 2; gap: 5px !important; flex: 0 0 auto; }
  .header-btn { padding: 5px 9px !important; font-size: 11.5px !important; }
  /* 倒计时与操作按钮同排，去掉第三行 */
  #countdownBox {
    order: 3 !important;
    width: auto !important;
    flex: 1 1 100%;
    justify-content: space-between;
    border-top: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    gap: 6px;
  }
  #nextDrawInfo { font-size: 11.5px !important; }
  #countdown { font-size: 16px !important; min-width: 62px !important; }

  /* 卡片头：标题与右侧说明改竖排，避免长标题被说明挤断 */
  #tab3Panel .card > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px;
    margin-bottom: 14px !important;
  }
  #tab3Panel .card-title { white-space: normal !important; line-height: 1.4 !important; }
  #tab3Panel .card > div:first-child > span { text-align: left !important; font-size: 11.5px !important; }
}

/* ── 7) 移动端顶栏第三行合并：操作按钮与倒计时同排 ── */
@media (max-width: 768px) {
  .header-actions { order: 2; }
  #countdownBox {
    order: 3 !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0;
    justify-content: flex-end !important;
    gap: 8px !important;
  }
  #nextDrawInfo {
    white-space: nowrap !important;
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px !important;
    color: var(--text3) !important;
  }
  #countdown { font-size: 15.5px !important; min-width: 58px !important; }
}

/* ── 8) 小屏号码球收一档，保证 7 个一行不折行 ── */
@media (max-width: 480px) {
  .ball { width: 29px !important; height: 29px !important; font-size: 12px !important; }
  .balls { gap: 4px !important; }
  .ball.sm { width: 22px !important; height: 22px !important; font-size: 11px !important; }
}

/* ═══════════════ 骨架占位（替代「载入中…」文案）═══════════════ */
.gs-ph:empty,
.gs-ph:has(> .gs-ph-inner:empty) {
  min-height: 16px;
}
.gs-ph:empty::after {
  content: "";
  display: block;
  height: 14px;
  width: 100%;
  max-width: 220px;
  border-radius: 8px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.06) 22%, rgba(255, 255, 255, 0.14) 38%, rgba(255, 255, 255, 0.06) 54%);
  background-size: 220% 100%;
  animation: gsShimmer 1.3s linear infinite;
}
.gs-ph-block:empty::after { max-width: 100%; height: 42px; border-radius: 14px; }
/* 8s 还没数据 → 收敛成破折号，不再无限闪 */
.gs-ph-stale:empty::after {
  content: "—";
  background: none;
  animation: none;
  height: auto;
  color: var(--text3);
  font-size: 13px;
  line-height: 1.6;
}
