/* ============================================================
   三月天传媒预测 —— 全站样式（移动端优先，浅色 indigo 风）
   ============================================================ */
:root {
  --c-bg: #f5f6f8;
  --c-bg-soft: #eef1f6;
  --c-card: #ffffff;
  --c-primary: #4f46e5;
  --c-primary-hover: #4338ca;
  --c-primary-soft: #eef2ff;
  --c-text: #1e293b;
  --c-text-2: #475569;
  --c-muted: #64748b;
  --c-border: #e2e8f0;
  --c-border-light: #eef1f5;
  --c-big: #ef4444;
  --c-small: #3b82f6;
  --c-success: #22c55e;
  --c-warning: #f59e0b;
  --c-ds-dadan: #ef4444;
  --c-ds-dashuang: #f59e0b;
  --c-ds-xiaodan: #3b82f6;
  --c-ds-xiaoshuang: #22c55e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-primary: 0 4px 14px rgba(79, 70, 229, .22);
  --header-gradient: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-num: ui-monospace, "DM Sans", "SF Mono", Consolas, monospace;
  --tabbar-h: 58px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
a { color: var(--c-primary); text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
.muted { color: var(--c-muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.mt6 { margin-top: 6px; } .mt10 { margin-top: 10px; } .mt16 { margin-top: 16px; }
.mb6 { margin-bottom: 6px; } .mb10 { margin-bottom: 10px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap6 { gap: 6px; } .row.gap10 { gap: 10px; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wrap { max-width: 620px; margin: 0 auto; padding: 0 12px; }
.page { padding-top: 10px; min-height: 60vh; }

/* ------------------------------------------------------------ 顶部栏 */
.app-header {
  background: var(--header-gradient);
  color: #fff;
  padding: 12px 14px 14px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(79, 70, 229, .18);
}
.app-header .hd-inner { max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.22);
  display: grid; place-items: center; font-size: 16px; backdrop-filter: blur(4px);
}
.hd-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hd-user {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.32); color: #fff;
  padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.hd-user.vip { background: linear-gradient(135deg,#fbbf24,#f59e0b); border-color: #fcd34d; color: #442c00; }
.sub-header {
  background: var(--c-card); border-bottom: 1px solid var(--c-border);
  padding: 8px 14px; position: sticky; top: 0; z-index: 49;
}
.sub-header .hd-inner { max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.back-btn { font-size: 20px; line-height: 1; color: var(--c-text); padding: 4px 6px; margin-left: -6px; }
.sub-title { font-size: 16px; font-weight: 700; }

/* ------------------------------------------------------------- 通知条 */
.notice-bar {
  max-width: 620px; margin: 10px auto 0; padding: 0 12px;
}
.notice-inner {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: var(--radius-md); padding: 8px 12px; font-size: 12.5px;
  display: flex; align-items: center; gap: 8px;
}
.notice-inner .ico { flex: none; }

/* --------------------------------------------------------------- 卡片 */
.card {
  background: var(--c-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--c-border-light);
  padding: 14px; margin-bottom: 12px;
}
.card.tight { padding: 0; overflow: hidden; }
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 10px; gap: 8px;
}
.card.tight .card-hd { padding: 13px 14px 10px; border-bottom: 1px solid var(--c-border-light); }
.card-title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.card-title .emoji { font-size: 16px; }
.card-more { font-size: 12.5px; color: var(--c-muted); }
.card-bd { }
.card.tight .card-bd { padding: 12px 14px; }

/* ------------------------------------------------------------- 最新开奖 */
.draw-hero { text-align: center; padding: 6px 0 2px; }
.draw-label { font-size: 12.5px; color: var(--c-muted); }
.draw-nbr { font-size: 12.5px; color: var(--c-text-2); font-weight: 600; }
.balls { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 6px; }
.ball {
  width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 21px; font-weight: 700;
  display: grid; place-items: center; font-family: var(--font-num);
  box-shadow: 0 3px 8px rgba(15,23,42,.16); flex: none;
}
.ball.small-ball { width: 38px; height: 38px; font-size: 18px; }
.ball.plus { background: none; box-shadow: none; color: var(--c-muted); font-size: 20px; width: 14px; }
.ball.c-big { background: linear-gradient(145deg, #f87171, #ef4444); }
.ball.c-small { background: linear-gradient(145deg, #60a5fa, #3b82f6); }
.ball.c-dan { background: linear-gradient(145deg, #fbbf24, #f59e0b); }
.ball.c-shuang { background: linear-gradient(145deg, #4ade80, #22c55e); }
.sum-line { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; margin-top: 4px; }
.sum-line b { font-size: 19px; color: var(--c-primary); font-family: var(--font-num); }
.countdown-box {
  margin-top: 12px; background: var(--c-primary-soft); border-radius: var(--radius-md);
  padding: 8px 12px; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--c-primary); font-size: 13px; font-weight: 600;
}
.countdown-box b { font-family: var(--font-num); font-size: 17px; letter-spacing: .5px; }

/* --------------------------------------------------------------- 标签 */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
  white-space: nowrap;
}
.pill.dadan { background: var(--c-ds-dadan); }
.pill.dashuang { background: var(--c-ds-dashuang); }
.pill.xiaodan { background: var(--c-ds-xiaodan); }
.pill.xiaoshuang { background: var(--c-ds-xiaoshuang); }
.pill.big { background: var(--c-big); }
.pill.small { background: var(--c-small); }
.pill.dan { background: var(--c-warning); }
.pill.shuang { background: var(--c-success); }
.pill.gray { background: #94a3b8; }
.pill.hit { background: var(--c-success); }
.pill.miss { background: #cbd5e1; color: #475569; }
.pill.locked { background: #e2e8f0; color: #64748b; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 700; border: 1px solid transparent;
}
.badge.vip0 { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.badge.vip1 { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.badge.vip2 { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.badge.vip3 { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }
.badge.free { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.badge.lock { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

/* --------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--radius-md); border: 1px solid var(--c-border);
  background: var(--c-card); color: var(--c-text); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn.gold { background: linear-gradient(135deg,#fbbf24,#f59e0b); border-color: #f59e0b; color: #442c00; }
.btn.ghost { background: transparent; }
.btn.danger { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn.xs { padding: 4px 9px; font-size: 11.5px; border-radius: 6px; }
.btn:disabled { opacity: .55; }

/* --------------------------------------------------------------- 表单 */
.field { margin-bottom: 12px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--c-text-2); margin-bottom: 5px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--c-border); border-radius: var(--radius-md);
  font-size: 14px; font-family: inherit; background: var(--c-card); color: var(--c-text);
}
.input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
textarea.input { min-height: 90px; resize: vertical; line-height: 1.5; }
.form-tip { font-size: 12px; color: var(--c-muted); margin-top: 4px; }

/* --------------------------------------------------------------- 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  background: var(--c-bg-soft); color: var(--c-text-2); font-weight: 600; font-size: 12px;
  padding: 8px 6px; text-align: center; white-space: nowrap;
}
.tbl td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--c-border-light); }
.tbl tr:last-child td { border-bottom: none; }
.tbl td.nbr { font-family: var(--font-num); color: var(--c-muted); font-size: 12px; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-scroll .tbl { min-width: 460px; }
.tbl-scroll .tbl.fit { min-width: 0; }

/* 走势图 */
.trend-head { font-size: 12px; }
.trend-cell { padding: 5px 3px !important; }
.trend-dot {
  width: 22px; height: 22px; border-radius: 50%; margin: 0 auto; color: #fff;
  font-size: 11.5px; font-weight: 700; display: grid; place-items: center; font-family: var(--font-num);
}
.trend-dot.b { background: var(--c-big); } .trend-dot.s { background: var(--c-small); }
.trend-dot.d { background: var(--c-warning); } .trend-dot.e { background: var(--c-success); }
.trend-dot.da { background: var(--c-ds-dadan); } .trend-dot.db { background: var(--c-ds-dashuang); }
.trend-dot.xa { background: var(--c-ds-xiaodan); } .trend-dot.xb { background: var(--c-ds-xiaoshuang); }
.trend-legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: var(--c-muted); padding: 4px 0 10px; }
.trend-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; vertical-align: -1px; }

/* --------------------------------------------------------- 算法卡片 */
.algo-card {
  background: var(--c-card); border-radius: var(--radius-lg); border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm); padding: 13px 14px; margin-bottom: 10px;
}
.algo-top { display: flex; align-items: flex-start; gap: 10px; }
.algo-name { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.algo-desc { font-size: 12.5px; color: var(--c-muted); margin-top: 3px; line-height: 1.45; }
.algo-rank {
  width: 26px; height: 26px; border-radius: 8px; background: var(--c-bg-soft); color: var(--c-text-2);
  display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none;
}
.algo-rank.top1 { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #442c00; }
.algo-rank.top2 { background: linear-gradient(135deg,#cbd5e1,#94a3b8); color: #fff; }
.algo-rank.top3 { background: linear-gradient(135deg,#fdba74,#fb923c); color: #fff; }
.algo-metrics { display: flex; gap: 0; margin-top: 11px; border-top: 1px dashed var(--c-border); padding-top: 10px; }
.algo-metric { flex: 1; text-align: center; }
.algo-metric .v { font-size: 15px; font-weight: 700; font-family: var(--font-num); }
.algo-metric .k { font-size: 11.5px; color: var(--c-muted); }
.algo-latest {
  margin-top: 11px; background: var(--c-bg-soft); border-radius: var(--radius-md); padding: 9px 11px;
  display: flex; align-items: center; gap: 8px; font-size: 13px;
}
.algo-latest .lock-tip { color: var(--c-muted); font-size: 12.5px; }
.rate-high { color: var(--c-big); } .rate-mid { color: var(--c-warning); } .rate-low { color: var(--c-muted); }

/* ------------------------------------------------------------ 筛选条 */
.filter-bar { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; -webkit-overflow-scrolling: touch; }
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  padding: 5px 13px; border-radius: 999px; background: var(--c-card); border: 1px solid var(--c-border);
  color: var(--c-text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.chip.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.select-row { display: flex; gap: 8px; margin-bottom: 10px; }
.select-row select { flex: 1; padding: 8px 10px; font-size: 13px; border-radius: var(--radius-sm); border: 1px solid var(--c-border); background: var(--c-card); }

/* --------------------------------------------------------------- 标签页 */
.tabs { display: flex; background: var(--c-card); border-radius: var(--radius-md); padding: 4px; gap: 4px; margin-bottom: 12px; border: 1px solid var(--c-border-light); }
.tabs .tab {
  flex: 1; text-align: center; padding: 8px 4px; font-size: 13.5px; font-weight: 600; color: var(--c-text-2);
  border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
}
.tabs .tab.on { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-primary); }

/* --------------------------------------------------------- 统计网格 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.stat-box { background: var(--c-bg-soft); border-radius: var(--radius-md); padding: 11px 8px; text-align: center; }
.stat-box .v { font-size: 19px; font-weight: 700; font-family: var(--font-num); color: var(--c-text); }
.stat-box .k { font-size: 11.5px; color: var(--c-muted); margin-top: 1px; }
.stat-box.big .v { color: var(--c-big); } .stat-box.small .v { color: var(--c-small); }
.stat-box.dan .v { color: var(--c-warning); } .stat-box.shuang .v { color: var(--c-success); }

/* --------------------------------------------------------- 快捷入口 */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-item {
  background: var(--c-card); border: 1px solid var(--c-border-light); border-radius: var(--radius-md);
  padding: 12px 4px; text-align: center; box-shadow: var(--shadow-sm);
}
.quick-item .ico { font-size: 21px; display: block; margin-bottom: 4px; }
.quick-item .txt { font-size: 12px; color: var(--c-text-2); font-weight: 600; }

/* --------------------------------------------------------------- 列表行 */
.list-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--c-border-light);
}
.list-row:last-child { border-bottom: none; }
.list-row .lr-ico { font-size: 18px; width: 26px; text-align: center; flex: none; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: 14px; font-weight: 600; }
.list-row .lr-sub { font-size: 12px; color: var(--c-muted); margin-top: 1px; }
.list-row .lr-arrow { color: #cbd5e1; font-size: 16px; flex: none; }

/* --------------------------------------------------------- 底部导航 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--c-border);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; color: var(--c-muted); font-size: 11px; font-weight: 600;
}
.tabbar a .ico { font-size: 19px; line-height: 1.15; }
.tabbar a.on { color: var(--c-primary); }

/* --------------------------------------------------------- 悬浮客服 */
.cs-float {
  position: fixed; right: 14px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px));
  z-index: 55; background: var(--c-primary); color: #fff; border-radius: 999px;
  padding: 10px 15px; font-size: 13px; font-weight: 700; box-shadow: 0 6px 18px rgba(79,70,229,.4);
  display: flex; align-items: center; gap: 5px; border: none; cursor: pointer;
}

/* ------------------------------------------------------------- 弹层 */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--c-card); width: 100%; max-width: 620px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 86vh; overflow-y: auto; animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-title { font-size: 16.5px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.sheet-close { color: var(--c-muted); font-size: 20px; cursor: pointer; line-height: 1; }
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 95; display: grid; place-items: center; padding: 20px; }
.modal {
  background: var(--c-card); border-radius: var(--radius-lg); padding: 18px; width: 100%; max-width: 400px;
  max-height: 82vh; overflow-y: auto; animation: sheetUp .2s ease;
}

/* --------------------------------------------------------------- 提示 */
#toast-box { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(30,41,59,.94); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 6px 20px rgba(15,23,42,.28); animation: toastIn .18s ease;
  max-width: 84vw; text-align: center;
}
.toast.ok { background: rgba(22,163,74,.96); }
.toast.err { background: rgba(220,38,38,.96); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------- 空/加载 */
.empty { text-align: center; padding: 34px 12px; color: var(--c-muted); font-size: 13px; }
.empty .ico { font-size: 38px; display: block; margin-bottom: 8px; opacity: .75; }
.skeleton { background: linear-gradient(90deg,#eef1f5 25%,#e2e8f0 50%,#eef1f5 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.loading-line { padding: 20px; text-align: center; color: var(--c-muted); font-size: 13px; }
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(148,163,184,.4); border-top-color: var(--c-primary);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------- 算法详情 iframe */
.algo-frame-box {
  background: var(--c-card); border-radius: var(--radius-lg); border: 1px solid var(--c-border-light);
  overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 12px;
}
.algo-frame-box iframe { width: 100%; border: 0; display: block; background: #fff; min-height: 320px; }
.locked-box {
  text-align: center; padding: 30px 18px; color: var(--c-muted);
}
.locked-box .lock-ico { font-size: 42px; }

/* --------------------------------------------------------- VIP 卡种 */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.price-card {
  background: var(--c-card); border: 1.5px solid var(--c-border); border-radius: var(--radius-md);
  padding: 13px; text-align: center; position: relative;
}
.price-card.hot { border-color: var(--c-primary); background: var(--c-primary-soft); }
.price-card .pc-name { font-size: 14.5px; font-weight: 700; }
.price-card .pc-price { font-size: 21px; font-weight: 800; color: var(--c-primary); font-family: var(--font-num); margin: 5px 0 2px; }
.price-card .pc-price small { font-size: 12px; font-weight: 600; }
.price-card .pc-sub { font-size: 11.5px; color: var(--c-muted); }
.hot-tag { position: absolute; top: -9px; right: 8px; background: var(--c-primary); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }

/* --------------------------------------------------------- 计划/权益 */
.benefit-list { list-style: none; padding: 0; margin: 0; }
.benefit-list li { padding: 5px 0 5px 22px; position: relative; font-size: 13.5px; color: var(--c-text-2); }
.benefit-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--c-success); font-weight: 700; }

.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--c-border-light); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--c-muted); }
.kv .v { font-weight: 600; }

/* --------------------------------------------------------- 我的中心头卡 */
.me-hero {
  background: var(--header-gradient); color: #fff; border-radius: var(--radius-lg); padding: 16px;
  margin-bottom: 12px; box-shadow: var(--shadow-primary);
}
.me-hero .name { font-size: 18px; font-weight: 700; }
.me-hero .vip-tag { background: rgba(255,255,255,.2); padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.me-stat { display: flex; margin-top: 14px; text-align: center; }
.me-stat > div { flex: 1; }
.me-stat .v { font-size: 17px; font-weight: 700; font-family: var(--font-num); }
.me-stat .k { font-size: 11.5px; opacity: .85; }

/* --------------------------------------------------------- 后台管理 */
.admin-body { padding-bottom: 24px; }
.admin-nav { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; }
.admin-nav .chip { font-size: 12.5px; }
.admin-panel { display: none; }
.admin-panel.on { display: block; }
table.admin-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; background: #fff; }
table.admin-tbl th { background: #f1f5f9; padding: 8px 6px; font-size: 12px; text-align: left; white-space: nowrap; }
table.admin-tbl td { padding: 8px 6px; border-bottom: 1px solid var(--c-border-light); vertical-align: middle; }
table.admin-tbl tr:hover td { background: #fafbff; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; }
.mini-input { padding: 5px 8px; font-size: 12.5px; border: 1px solid var(--c-border); border-radius: 6px; width: 100%; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar .input { width: auto; min-width: 140px; flex: 1; }
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; padding: 12px 0; font-size: 13px; }

@media (min-width: 700px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .tabbar { left: 50%; transform: translateX(-50%); max-width: 620px; border-radius: 14px 14px 0 0; }
  .cs-float { bottom: calc(var(--tabbar-h) + 16px); right: calc(50% - 300px); }
}

/* ============================================================
   下一期预测 / 战绩展示（对标参考站）
   ============================================================ */
.predict-hero {
  background: var(--header-gradient);
  border-radius: var(--radius-lg);
  padding: 15px 14px 13px;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: var(--shadow-primary);
  position: relative;
  overflow: hidden;
}
.predict-hero::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px;
  background: rgba(255,255,255,.12); border-radius: 50%;
}
.predict-hero .ph-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.predict-hero .ph-title { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.predict-hero .ph-nbr { font-size: 12.5px; opacity: .92; font-family: var(--font-num); }
.predict-hero .ph-cd {
  background: rgba(255,255,255,.2); border-radius: 999px; padding: 3px 11px;
  font-size: 12.5px; font-weight: 700; font-family: var(--font-num);
}
.predict-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 11px; }
.predict-item {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius-md); padding: 9px 11px; position: relative; z-index: 1;
}
.predict-item .pi-t { font-size: 11.5px; opacity: .92; display: flex; align-items: center; gap: 4px; }
.predict-item .pi-v { font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: .5px; }
.predict-item .pi-v.small { font-size: 16px; }
.predict-item .pi-w { font-size: 11px; opacity: .85; }
.predict-item .pi-lock { font-size: 20px; }
.predict-item.free { background: rgba(255,255,255,.28); }

/* 圆环进度 */
.ring {
  position: relative; width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--ring-c, #4f46e5) calc(var(--p, 0) * 1%), #e9edf5 0);
  display: grid; place-items: center;
}
.ring::after { content: ''; position: absolute; inset: 6px; background: #fff; border-radius: 50%; }
.ring b { position: relative; z-index: 1; font-size: 14px; font-weight: 800; font-family: var(--font-num); color: var(--c-text); }
.ring b small { font-size: 9px; font-weight: 700; }

/* 五格战绩条 */
.stat-strip { display: flex; text-align: center; gap: 2px; }
.stat-strip > div { flex: 1; min-width: 0; }
.stat-strip .v { font-size: 17px; font-weight: 800; font-family: var(--font-num); line-height: 1.3; }
.stat-strip .v.win { color: var(--c-success); }
.stat-strip .v.lose { color: var(--c-big); }
.stat-strip .k { font-size: 11px; color: var(--c-muted); }

/* 迷你面板（首页四宫格） */
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.mini-panel {
  background: var(--c-card); border: 1px solid var(--c-border-light); border-radius: var(--radius-lg);
  padding: 11px 12px; box-shadow: var(--shadow-sm);
}
.mini-panel .mt { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 4px; margin-bottom: 6px; color: var(--c-text); }
.mini-panel .big { font-size: 19px; font-weight: 800; color: var(--c-primary); font-family: var(--font-num); line-height: 1.3; }
.mini-panel .sub { font-size: 11.5px; color: var(--c-muted); line-height: 1.55; margin-top: 2px; }
.mini-panel .sub b { color: var(--c-text-2); }

/* 算法卡片上的「下一期」条 */
.next-strip {
  margin-top: 11px; border-radius: var(--radius-md); padding: 8px 11px;
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  background: linear-gradient(90deg, #eef2ff, #f5f3ff);
  border: 1px solid #ddd6fe;
}
.next-strip.locked { background: #f8fafc; border-color: var(--c-border); }
.next-strip .ns-label { font-size: 11.5px; color: var(--c-primary); font-weight: 800; flex: none; }
.next-strip.locked .ns-label { color: var(--c-muted); }
.next-strip .ns-value { font-size: 17px; font-weight: 800; color: var(--c-primary); font-family: var(--font-num); letter-spacing: .5px; }
.next-strip .ns-nbr { font-size: 11.5px; color: var(--c-muted); font-family: var(--font-num); }

/* 连中徽章 */
.streak-chip {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; background: #fff1f2; color: #be123c; border: 1px solid #fecdd3;
}
.streak-chip.miss { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.streak-chip.cold { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }

/* 待开奖行 */
tr.tr-pending td { background: #fffbeb !important; }
tr.tr-pending td:first-child { font-weight: 800; }
.pill.pending { background: #f59e0b; }
.dash-ring-wrap { display: flex; align-items: center; gap: 12px; }

/* ============================================================
   算法详情页（对齐参考站 nv21.cc/detail.html 的展示）
   ============================================================ */
.stats-card {
  background: #fff; border: 1px solid #dee2e6; border-radius: 8px;
  margin: 15px 0; padding: 15px; animation: cardIn .3s ease-out .1s backwards;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.stats-row { display: flex; justify-content: space-around; text-align: center; }
.stats-item { flex: 1; min-width: 0; }
.stats-label { font-size: 12px; color: #6c757d; margin-bottom: 5px; white-space: nowrap; }
.stats-value { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stats-value.accuracy { color: #28a745; }
.stats-value.text-danger { color: #dc3545; }
.stats-value.text-success { color: #28a745; }
.stats-value.stats-highlight { color: #007bff; }
.stats-value.stats-highlight.negative { color: #dc3545; }

.detail-vip-game-tag { margin: 0 0 10px; }
.detail-vip-game-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 700; color: #1c1917;
  background: linear-gradient(135deg, #fde047, #f59e0b, #d97706);
  border: 1px solid rgba(251,191,36,.8); box-shadow: 0 4px 14px rgba(245,158,11,.35);
}

.detail-vip-live {
  margin: 10px 0 14px; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(102,126,234,.35); box-shadow: 0 6px 20px rgba(15,23,42,.12);
  background: linear-gradient(145deg, #0f172a 0, #1e293b 55%, #0f172a 100%);
}
.detail-vip-live-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: linear-gradient(90deg, rgba(102,126,234,.12), rgba(99,102,241,.06));
  border-bottom: 1px solid rgba(102,126,234,.2);
}
.detail-vip-live-head .game-name { color: #e2e8f0; font-size: 13px; font-weight: 600; }
.detail-vip-live-head .period-line { color: #94a3b8; font-size: 12.5px; }
.detail-vip-live-head .period-line b { color: #fbbf24; font-size: 15px; font-family: var(--font-num); }
.detail-vip-refresh-btn {
  margin-left: auto; border: none; border-radius: 8px; padding: 6px 12px; font-size: 12px;
  font-weight: 700; cursor: pointer; color: #1c1917;
  background: linear-gradient(135deg, #fde047, #f59e0b);
}
.detail-vip-refresh-btn:active { transform: scale(.96); }
.detail-vip-refresh-btn:disabled { opacity: .6; }
.detail-vip-live-voice {
  padding: 14px 14px 16px; font-size: 17px; line-height: 1.5; font-weight: 700;
  color: #f8fafc; text-align: center; font-variant-numeric: tabular-nums; min-height: 52px;
}
.detail-vip-live-voice.is-waiting { color: #fcd34d; }
.detail-vip-live-voice small { display: block; font-size: 12px; font-weight: 500; color: #94a3b8; margin-top: 4px; }

.detail-access-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px;
  margin: 0 0 12px; background: linear-gradient(90deg, #fffbeb 0, #fef3c7 100%);
  border: 1px solid #fcd34d; border-radius: 10px; font-size: 13px; color: #92400e;
}
.detail-access-banner .vip-banner-lock { font-size: 16px; flex-shrink: 0; }
.detail-access-banner .vip-banner-text { flex: 1; min-width: 0; line-height: 1.4; }
.detail-access-banner .vip-banner-link { flex-shrink: 0; color: #2563eb; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* 统一预测历史表（期号 / 预测 / 号码 / 命中） */
.pred-hist-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #e5e7eb; background: #fff; }
table.pred-hist-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.pred-hist-table thead th {
  background: #f9fafb; color: #6b7280; font-weight: 600; font-size: 13px;
  padding: 12px 10px; text-align: center; border-bottom: 1px solid #e5e7eb; white-space: nowrap;
}
table.pred-hist-table tbody td { padding: 11px 10px; text-align: center; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
table.pred-hist-table tbody tr:nth-child(even) { background: #f6ffed; }
table.pred-hist-table tbody tr:hover { background: #ecfdf5; }
table.pred-hist-table .pred-period { font-variant-numeric: tabular-nums; color: #374151; }
table.pred-hist-table .pred-label {
  display: inline-block; padding: 4px 10px; border-radius: 6px; font-weight: 600; font-size: 13px;
  background: #eff6ff; color: #1d4ed8;
}
table.pred-hist-table .pred-label.kill { background: #fff7ed; color: #c2410c; }
table.pred-hist-table .pred-numbers { font-variant-numeric: tabular-nums; color: #111827; letter-spacing: .02em; white-space: nowrap; }
table.pred-hist-table .pred-hit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; margin: 0 auto; font-weight: 800; font-size: 15px;
}
table.pred-hist-table .pred-hit.hit-yes { background: #dcfce7; color: #16a34a; }
table.pred-hist-table .pred-hit.hit-no { background: #fee2e2; color: #dc2626; }
table.pred-hist-table tr.pred-pending td { background: #fffbeb !important; }
table.pred-hist-table .pred-pending-text { color: #d97706; font-size: 13px; cursor: pointer; text-decoration: underline dotted; }
table.pred-hist-table .pred-empty { padding: 32px 16px; color: #9ca3af; text-align: center; }
table.pred-hist-table .pred-vip-lock-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 12px 14px;
  background: linear-gradient(90deg, #fffbeb 0, #fef3c7 100%);
  border-top: 1px solid #fde68a; border-bottom: 1px solid #fcd34d;
  font-size: 13px; color: #92400e; line-height: 1.4; text-align: left;
}
table.pred-hist-table .pred-vip-lock-icon { font-size: 16px; flex-shrink: 0; }
table.pred-hist-table .pred-vip-lock-text { flex: 1; min-width: 0; }
table.pred-hist-table .pred-vip-lock-link { flex-shrink: 0; color: #2563eb; font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (max-width: 768px) {
  table.pred-hist-table { font-size: 12px; }
  table.pred-hist-table thead th { font-size: 12px; padding: 10px 6px; }
  table.pred-hist-table tbody td { padding: 9px 5px; }
  table.pred-hist-table .pred-period { font-size: 11px; }
  table.pred-hist-table .pred-label { font-size: 12px; padding: 3px 6px; }
  table.pred-hist-table .pred-numbers { font-size: 11px; }
  table.pred-hist-table .pred-hit { width: 24px; height: 24px; font-size: 13px; }
}
/* ============================================================
   全站顶部导航（照抄参考站 nv21.cc 的 .site-header / .top-nav-tabs）
   ============================================================ */
.site-header {
  background: linear-gradient(135deg, #667eea 0, #764ba2 100%);
  padding: 12px 15px 10px; position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.header-row1 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.header-left { display: flex; align-items: center; gap: 8px; }
.site-logo { font-size: 24px; }
.site-title { font-size: 17px; font-weight: 600; color: #fff; margin: 0; }
.header-right { display: flex; align-items: center; gap: 12px; }
.site-domains { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11px; }
.site-domains a { text-decoration: none; color: rgba(255,255,255,.75); }
.site-domains .main-domain { color: #90ee90; }
.top-nav-tabs {
  display: flex; gap: 8px; justify-content: space-between;
  background: rgba(255,255,255,.1); border-radius: 12px; padding: 4px;
}
.nav-tab {
  flex: 1; padding: 10px 8px; font-size: 13px; color: rgba(255,255,255,.9);
  text-decoration: none; border-radius: 10px; transition: all .25s ease;
  text-align: center; font-weight: 500; white-space: nowrap; overflow: hidden;
}
.nav-tab:hover { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; transform: translateY(-1px); }
.nav-tab.active { background: #fff; color: #667eea; font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.nav-tab.nav-vip {
  position: relative; background: linear-gradient(135deg, #1a1a2e 0, #16213e 100%);
  border: 2px solid transparent; background-clip: padding-box; overflow: hidden;
}
.nav-tab.nav-vip::before {
  content: ''; position: absolute; inset: -2px; border-radius: 12px; z-index: -1;
  background: linear-gradient(135deg, gold, #ff6b6b, gold, #ff6b6b); animation: vipBorderGlow 3s linear infinite;
}
.nav-tab.nav-vip::after {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,215,0,.3) 50%, transparent 70%);
  animation: vipShine 2s ease-in-out infinite;
}
.nav-tab.nav-vip .vip-crown { font-size: 10px; margin-right: 3px; animation: crownBounce 1.5s ease-in-out infinite; }
.nav-tab.nav-vip > span:last-child {
  position: relative; z-index: 1;
  background: linear-gradient(135deg, gold 0, #fff 50%, gold 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700;
}
.nav-tab.nav-vip:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 20px rgba(255,215,0,.4); }
.nav-tab.nav-vip.active { background: linear-gradient(135deg, gold 0, #ffb347 100%); }
.nav-tab.nav-vip.active > span:last-child {
  background: linear-gradient(135deg, #1a1a2e 0, #16213e 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
@keyframes vipBorderGlow { 0%,100% { filter: hue-rotate(0deg); } 50% { filter: hue-rotate(30deg); } }
@keyframes vipShine { 0% { transform: translateX(-100%) rotate(45deg); } 100% { transform: translateX(100%) rotate(45deg); } }
@keyframes crownBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
body.has-site-header { padding-top: 96px; }
body.has-site-header .wrap { padding-top: 0; }
@media (max-width: 480px) {
  .site-domains { display: none; }
  .top-nav-tabs { gap: 3px; padding: 3px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-tab { padding: 8px 4px; font-size: 11px; flex-shrink: 0; min-width: 0; }
  .site-title { font-size: 15px; }
  .site-header { padding: 10px 10px 8px; }
}