/* ==========================================================================
   components.css — 可复用组件（按钮 / 卡片 / tab / 徽标 / 输入 / 表格 / 分页 /
   评分环 / 星级 / 迷你折线 / 骨架 / tooltip / modal / toast / 下拉 / 折叠 / 横滑）
   ========================================================================== */

/* ---------- 渐变描边（原站 .nd-gradient-border：::before + mask） ---------- */
.gradient-border { position: relative; }
.gradient-border::before,
.card::before,
.btn--ghost::before,
.tabs::before,
.input-wrap::before,
.select::before,
.seg::before,
.pill-info::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: var(--border-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
/* 亮色：ghost 按钮 / tab / 输入框走实体边框，不走渐变描边 */
html[data-theme="light"] .btn--ghost::before,
html[data-theme="light"] .tabs::before,
html[data-theme="light"] .input-wrap::before,
html[data-theme="light"] .select::before,
html[data-theme="light"] .seg::before { display: none; }

/* ---------- 卡片 ---------- */
.card {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--r-card);
  background: var(--bg-card);
  border: var(--card-border-w) solid var(--card-border);
  padding: var(--card-pad);
  color: var(--text-1);
}
html[data-theme="light"] .card::before { display: none; }
.card--flush { padding: 0; }
.card--glass { background: var(--glass-1); border-radius: var(--r-glass); }
.card--glass2 { background: var(--glass-2); border-radius: var(--r-tile); }
.card--glass3 { background: var(--glass-3); border-radius: var(--r-glass); }
.card--row { border-radius: var(--r-row); background: var(--glass-1); min-height: 73px; }
.card--2 { background: var(--bg-card2); }
.card--2::before { display: none; }
html[data-theme="dark"] .card--2 { border: 1px solid rgba(255, 255, 255, 0.05); }
.card--cta { background: var(--cta-card-gradient); color: #fff; border: 0; }
.card--cta::before { display: none; }
.card-glow::after {
  content: ""; position: absolute; left: 50%; bottom: -100px; width: 130%; height: 200px; transform: translateX(-50%);
  background: #4f2dec; filter: blur(70px); opacity: 0.15; pointer-events: none; z-index: -1;
}
html[data-theme="light"] .card-glow::after { opacity: 0.12; }
.card__title { font-size: 18px; font-weight: 500; line-height: 27px; }
.card__sub { font-size: 12px; color: var(--text-3); }

/* ---------- 区块头 ---------- */
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-header__title { font-size: 18px; font-weight: 500; line-height: 27px; display: flex; align-items: center; gap: 8px; }
.section-header__title .brand-wm { font-size: 18px; }
.section-header__actions { display: flex; align-items: center; gap: 12px; }
.section-header__link { font-size: 13px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.section-header__link:hover { color: var(--primary); }

/* ---------- 按钮 .btn（原站 .nd-button） ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; font-size: 14px; font-weight: 500; line-height: 21px; border-radius: var(--r-full);
  color: var(--primary); background: var(--tint-04);
  padding: 12px 16px; min-height: 42px;
  transition: color 0.3s, box-shadow 0.35s, transform 0.12s, filter 0.3s, background-color 0.3s;
  --btn-icon: 18px; cursor: pointer; user-select: none; text-decoration: none;
  isolation: isolate;
}
.btn > * { position: relative; z-index: 1; }
.btn svg { width: var(--btn-icon); height: var(--btn-icon); }
.btn:active { transform: scale(0.97); }
.btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; pointer-events: none;
  background: radial-gradient(75% 165%, rgba(136, 116, 255, 0.34) 0%, rgba(136, 116, 255, 0.12) 50%, rgba(0, 0, 0, 0) 90%);
  transition: opacity 0.5s var(--ease-out);
}
.btn:hover::after { opacity: 1; }
.btn:active::after { opacity: 0; }
.btn__pulse {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transform: scale(1.2);
  background: radial-gradient(circle, rgba(136, 116, 255, 0.5) 0%, rgba(136, 116, 255, 0) 65%);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out; z-index: 0;
}
.btn:active .btn__pulse { opacity: 1; transform: scale(0.92); transition: opacity 0s, transform 0s; }

.btn--primary { color: #fff; background: var(--primary-gradient); box-shadow: var(--primary-glow); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--primary::after { display: none; }
.btn--primary .btn__pulse { background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 65%); }

.btn--ghost { color: var(--primary); background: var(--ghost-bg); border: var(--ghost-border); }
.btn--ghost:hover { background: var(--ghost-hover-bg); }

.btn--outline { color: var(--outline-text); background: var(--tint-04); border: 0.5px solid var(--outline-border); }
.btn--outline:hover { background: var(--tint-08); color: var(--outline-text-hover); }
.btn--outline::after { display: none; }

.btn--cta { color: #fff; background: var(--primary-gradient); box-shadow: var(--primary-glow); transition: transform 0.2s; --btn-icon: 16px; gap: 6px; padding: 12px 32px; min-height: 44px; }
.btn--cta:hover { transform: scale(1.01); }
.btn--cta::after { display: none; }

.btn--telegram { color: #fff; background: #2aabee; border: 0; }
.btn--telegram:hover { background: #1d94d2; color: #fff; }
.btn--telegram::after { display: none; }

.btn--danger { color: #fff; background: linear-gradient(180deg, #fb3748, #b3182a); box-shadow: 0 0 20px rgba(251, 55, 72, 0.3); }
.btn--danger::after { display: none; }
.btn--link { background: transparent; color: var(--text-2); padding: 0; min-height: 0; }
.btn--link::after { display: none; }
.btn--link:hover { color: var(--primary); }

/* 尺寸 */
.btn--md { width: 120px; padding: 12px 16px; min-height: 42px; }
.btn--auto { padding: 12px 16px; min-height: 45px; }
.btn--sm { padding: 9px 14px; min-height: 39px; }
.btn--xs { padding: 9px 20px; min-height: 37.5px; font-size: 13px; }
.btn--icon { width: 42px; height: 42px; min-height: 42px; padding: 11px; --btn-icon: 20px; }
.btn--icon-sm { width: 36px; height: 36px; min-height: 36px; padding: 9px; --btn-icon: 18px; }
.btn--block { width: 100%; }
.btn--pill-lg { border-radius: var(--r-pill-lg); }
.btn:disabled, .btn.is-disabled { cursor: not-allowed; color: var(--btn-disabled-text); box-shadow: none; filter: none; transform: none; pointer-events: none; }
.btn--primary:disabled, .btn--primary.is-disabled { background: var(--btn-disabled-bg); }
.btn.is-loading { pointer-events: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }

/* 信息药丸（How it works） */
.pill-info { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--r-pill-lg); background: var(--tint-04); color: var(--info); font-size: 13px; font-weight: 500; }
.pill-info:hover { background: var(--tint-08); }
.pill-info svg { width: 20px; height: 20px; }

/* 图标方按钮（折叠、社交、关闭） */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-icon-btn); color: var(--text-1); transition: background-color var(--t-fast), color var(--t-fast); }
.icon-btn:hover { background: var(--social-btn-hover); }
.icon-btn--sub { color: var(--collapse-btn); }
.icon-btn--sub:hover { color: var(--collapse-btn-hover); background: transparent; }
.icon-btn--round { border-radius: 50%; background: rgba(0, 0, 0, 0.3); color: rgba(255, 255, 255, 0.7); }

/* ---------- Tab 组（分段控件，原站 .nd-tab-*） ---------- */
.tabs { position: relative; display: inline-flex; align-items: center; padding: 4px; border-radius: var(--r-full); background: var(--tab-bg); isolation: isolate; max-width: 100%; }
html[data-theme="light"] .tabs { border: 0.5px solid rgba(42, 39, 78, 0.10); }
.tabs__indicator { position: absolute; left: 0; top: 0; pointer-events: none; transition: transform 0.35s var(--ease-out), width 0.35s var(--ease-out), height 0.35s var(--ease-out); z-index: 0; }
.tabs__liquid { display: block; width: 100%; height: 100%; border-radius: var(--r-tab); background: var(--tab-selected-bg); border: var(--tab-selected-border); }
.tabs.is-animating .tabs__liquid { animation: nd-tab-liquid 0.44s var(--ease-out); }
.tabs__item { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--r-tab); font-weight: 400; color: var(--tab-text); transition: color 0.3s; white-space: nowrap; flex-shrink: 0; }
.tabs__item:hover { color: var(--tab-text-hover); background: var(--tab-item-hover-bg); }
.tabs__item.is-active { color: var(--tab-selected-text); }
.tabs__item:disabled, .tabs__item.is-disabled { color: var(--text-disabled); cursor: not-allowed; }
.tabs__item svg { width: 16px; height: 16px; }
.tabs--sm .tabs__item { height: 28px; padding: 6px 12px; font-size: 13px; }
.tabs--md .tabs__item { height: 32px; padding: 6px 12px; font-size: 13px; }
.tabs--md2 .tabs__item { height: 38px; padding: 10px 12px; font-size: 12px; }
.tabs--lg .tabs__item { height: 45px; padding: 12px; font-size: 16px; }
.tabs--auth .tabs__item { height: 38px; font-size: 12px; flex: 1; }
.tabs--auth { display: flex; width: 100%; background: rgba(255, 255, 255, 0.01); backdrop-filter: blur(35.5px); border-radius: 50px; }
.tabs--auth .tabs__liquid { border-radius: 22px; }
.tabs--block { display: flex; width: 100%; }
.tabs--block .tabs__item { flex: 1; }
.tabs--scroll { overflow-x: auto; }

/* 图标分段切换（图表类型） */
.seg { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 4px; border-radius: var(--r-full); background: var(--tab-bg); }
html[data-theme="light"] .seg { border: 0.5px solid rgba(42, 39, 78, 0.10); }
.seg__item { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 100%; border-radius: var(--r-full); color: var(--tab-text); transition: color 0.2s; }
.seg__item svg { width: 16px; height: 16px; }
.seg__item:hover { color: var(--tab-text-hover); }
.seg__item.is-active { color: #fff; background: var(--tab-selected-bg); border: 0.5px solid rgba(255, 255, 255, 0.2); }

/* ---------- 徽标 / chip / tag ---------- */
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 8px; border-radius: var(--r-badge); font-size: 12px; font-weight: 600; line-height: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge--up, .badge--success { background: var(--success-bg); color: var(--success); }
.badge--down, .badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--purple, .badge--primary { background: var(--tint-14); color: var(--primary); }
.badge--neutral { background: var(--chip-bg); color: var(--chip-text); }
.badge--pct { width: 52px; }
.badge--pill { border-radius: var(--r-full); }
.badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trend__arrow { font-size: 10px; line-height: 10px; }
.trend--up { color: var(--success); } .trend--down { color: var(--danger); } .trend--flat { color: var(--text-3); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-full); background: var(--chip-bg); color: var(--chip-text); font-size: 10px; font-weight: 500; line-height: 15px; white-space: nowrap; }
.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--green .chip__dot { background: #1fc16b; } .chip--yellow .chip__dot { background: var(--star); } .chip--red .chip__dot { background: var(--danger); }
.tag { font-size: 11px; font-weight: 500; letter-spacing: 0.275px; text-transform: uppercase; color: var(--text-3); }
.ribbon { position: absolute; top: 14px; left: -28px; transform: rotate(-45deg); width: 110px; text-align: center; padding: 3px 0; background: var(--primary-gradient); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.55px; text-transform: uppercase; box-shadow: var(--primary-glow); z-index: 2; }
.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: liveBreathe 1.8s ease-in-out infinite; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--success); animation: livePulseOuter 1.8s ease-out infinite; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-full); background: var(--success-bg); color: var(--success); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- 输入框 ---------- */
.input-wrap { position: relative; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: var(--r-input); background: var(--field-bg); border: 1px solid var(--field-border); color: var(--field-text); }
.input-wrap svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.input-wrap input { width: 100%; background: transparent; font-size: 14px; font-weight: 300; color: var(--field-text); min-width: 0; }
.input-wrap--sm { height: 36px; padding: 0 12px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 14px; font-weight: 500; color: var(--text-1); }
.field__hint { font-size: 12px; color: var(--text-3); }
.field__error { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--danger); }
.field.is-error .field__label { color: var(--danger); }
.field.is-error .input, .field.is-error .input-wrap { border-color: var(--danger); animation: errorPulse 0.6s ease-out; }
.input { width: 100%; padding: 12px 16px; border-radius: var(--r-input); background: var(--field-bg); border: 1px solid var(--field-border); color: var(--field-text); font-size: 14px; font-weight: 300; transition: border-color var(--t-fast); }
html[data-theme="dark"] .input { border-color: rgba(255, 255, 255, 0.10); }
.input:focus { border-color: rgba(136, 116, 255, 0.6); }
.input--auth { background: var(--auth-field-bg); border: 1px solid var(--auth-field-border); color: #fff; }
.input--auth:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 1000px var(--bg-auth-input) inset; }
textarea.input { min-height: 120px; resize: vertical; border-radius: 16px; line-height: 1.5; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox input { appearance: none; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--divider); background: var(--glass-2); position: relative; cursor: pointer; }
.checkbox input:checked { background: var(--primary); border-color: var(--primary); }
.checkbox input:checked::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.switch { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--chip-bg); transition: background var(--t-fast); flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--t-fast); }
.switch.is-on { background: var(--primary); }
.switch.is-on::after { transform: translateX(18px); }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 4px; background: var(--kbd-bg); border: 1px solid var(--kbd-border); color: var(--kbd-text); font-family: var(--font-sans); font-size: 10px; font-weight: 500; line-height: 1; }
.kbd--lg { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 6px; }

/* ---------- 下拉触发器 / 菜单 ---------- */
.select { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 9px 12px; border-radius: var(--r-full); font-size: 12px; font-weight: 500; background: var(--select-bg); border: 1px solid var(--select-border); color: var(--select-text); transition: color var(--t-fast); cursor: pointer; white-space: nowrap; }
.select:hover { color: var(--select-text-hover); }
.select svg.chev { width: 14px; height: 14px; }
.select__stack { display: inline-flex; }
.select__stack img, .select__stack .avatar { width: 16px; height: 16px; border-radius: 50%; box-shadow: var(--avatar-ring); margin-left: -4px; }
.select__stack > :first-child { margin-left: 0; }
.dropdown { position: relative; display: inline-block; }
.dropdown__menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; max-height: 320px; overflow-y: auto; padding: 8px; border-radius: 12px; background: var(--popover-bg); border: 1px solid var(--popover-border); box-shadow: var(--shadow-xl); z-index: var(--z-dropdown); animation: fadeSlideIn 0.15s ease-out; }
.dropdown__menu--right { left: auto; right: 0; }
.dropdown__menu--up { top: auto; bottom: calc(100% + 6px); }
.dropdown__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--popover-text); text-align: left; cursor: pointer; transition: background var(--t-fast); }
.dropdown__item:hover { background: var(--nav-hover-bg); }
.dropdown__item.is-active { color: var(--primary); background: var(--nav-active-bg); }
.dropdown__item svg { width: 18px; height: 18px; }
.dropdown__item img { width: 18px; height: 18px; border-radius: 50%; }
.dropdown__divider { height: 1px; background: var(--divider); margin: 6px 0; }
.dropdown__label { padding: 6px 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.55px; text-transform: uppercase; color: var(--text-dim); }
.dropdown__check { margin-left: auto; width: 14px; height: 14px; color: var(--primary); }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { height: var(--table-th-h); padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 500; line-height: 16.5px; text-transform: uppercase; color: var(--table-th-text); border-bottom: 1px solid var(--table-th-border); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th.is-right, .table td.is-right { text-align: right; }
.table th.is-center, .table td.is-center { text-align: center; }
.table td { height: var(--table-row-h); padding: 0 12px; border-bottom: 1px solid var(--table-row-border); vertical-align: middle; }
.table--compact td { height: var(--table-row-h-compact); }
.table--dense td { height: 44px; font-size: 13px; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--table-row-hover); }
.table--sticky thead th { position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.table__sort { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.table__sort svg { width: 12px; height: 12px; opacity: 0.3; }
.table__sort.is-sorted svg { opacity: 1; color: var(--primary); }
.table__rank { font-size: 13px; font-weight: 600; color: var(--text-3); }
.table__name { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.table__amount { font-size: 14px; font-weight: 700; }
.table__value { font-size: 15px; letter-spacing: 0.15px; }
.table--feed th { height: 44px; padding: 0 16px; color: var(--text-3); }
.table--feed td { height: 45px; padding: 0 16px; font-size: 13px; }
.feed-row-new { animation: feedSlideIn 0.4s ease-out, wcFeedFlash 1.4s ease-out; }
/* 行网格（analytics 用） */
.grid-table { display: flex; flex-direction: column; }
.grid-table__head { display: grid; align-items: center; gap: 10px; height: 22px; padding: 0 12px; font-size: 10px; font-weight: 500; text-transform: uppercase; color: var(--text-3); }
.grid-table__row { display: grid; align-items: center; gap: 10px; height: 46px; padding: 0 12px; border-radius: var(--r-md); transition: background var(--t-fast); }
.grid-table__row:hover { background: var(--table-row-hover); }
.share-bar { height: 6px; width: 100%; border-radius: 999px; background: var(--share-track); overflow: hidden; }
.share-bar__fill { height: 100%; border-radius: inherit; background: var(--share-fill); transition: width 0.6s var(--ease-out); }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--r-full); font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--tint-04); transition: background var(--t-fast), color var(--t-fast); }
.pagination__btn svg { width: 16px; height: 16px; }
.pagination__btn:hover { background: var(--tint-14); color: var(--text-1); }
.pagination__btn.is-active { color: #fff; background: var(--primary-gradient); box-shadow: var(--primary-glow); }
.pagination__btn:disabled { opacity: 0.35; pointer-events: none; }
.pagination__ellipsis { color: var(--text-3); padding: 0 4px; }
.pagination__info { font-size: 12px; color: var(--text-3); margin: 0 8px; }

/* ---------- 评分环 / 星级 ---------- */
.rating-ring { position: relative; display: inline-block; width: 52px; height: 27.5px; }
.rating-ring svg { position: absolute; inset: 0; overflow: visible; }
.rating-ring__num { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 14.56px; font-weight: 600; line-height: 14.56px; }
.rating-ring--lg { width: 104px; height: 55px; }
.rating-ring--lg .rating-ring__num { font-size: 28px; line-height: 28px; }
.stars { display: inline-flex; align-items: center; gap: 2px; }
.stars svg { width: 14px; height: 14px; color: var(--star); }
.stars--lg svg { width: 18px; height: 18px; }
.stars__star { position: relative; display: inline-block; }
.stars__star .stars__empty { color: var(--divider); position: absolute; inset: 0; }
html[data-theme="light"] .stars__star .stars__empty { color: rgba(42, 39, 78, 0.2); }
.stars__star .stars__fill { position: relative; overflow: hidden; }
.stars__count { margin-left: 6px; font-size: 12px; color: var(--text-3); }

/* ---------- 迷你折线 / 图表 ---------- */
.sparkline { display: block; width: 100%; max-width: 84px; height: 36px; overflow: visible; }
.sparkline--kpi { max-width: 110px; height: 40px; }
.sparkline__line { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawFlash 1s ease-out forwards; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__tick { font-size: 11px; fill: var(--chart-tick); }
.chart__grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart__axis { stroke: var(--chart-axis); }
.chart__tooltip { position: absolute; pointer-events: none; z-index: 5; min-width: 140px; padding: 10px 12px; border-radius: 12px; background: var(--chart-tooltip-bg); border: 1px solid var(--chart-tooltip-border); box-shadow: var(--shadow-tooltip); font-size: 12px; opacity: 0; transition: opacity 0.12s; }
.chart__tooltip.is-visible { opacity: 1; }
.chart__tooltip-title { font-size: 11px; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.chart__tooltip-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; line-height: 20px; }
.chart__tooltip-row .dot { width: 8px; height: 8px; border-radius: 50%; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 12px 16px; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.chart__legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart__legend-item .dot { width: 8px; height: 8px; border-radius: 50%; }
.chart__crosshair { stroke: var(--chart-ref); stroke-dasharray: 3 3; }
.donut__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut__value { font-size: 20px; font-weight: 600; }
.donut__label { font-size: 11px; color: var(--text-3); text-transform: uppercase; }

/* ---------- 骨架屏 ---------- */
.skeleton { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%); background-size: 200% 100%; animation: skeletonShimmer 1.4s ease-in-out infinite; }
.skeleton--text { height: 14px; }
.skeleton--title { height: 20px; width: 40%; }
.skeleton--circle { border-radius: 50%; }
.skeleton--card { height: 120px; border-radius: var(--r-glass); }
.skeleton-rows { display: flex; flex-direction: column; gap: 12px; }

/* ---------- 空状态 ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px 16px; text-align: center; color: var(--text-3); }
.empty__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--glass-6); display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.empty__icon svg { width: 24px; height: 24px; }
.empty__title { font-size: 16px; font-weight: 500; color: var(--text-1); }
.empty__desc { font-size: 14px; max-width: 360px; }

/* ---------- Tooltip ---------- */
[data-tip] { position: relative; }
.tooltip { position: fixed; z-index: var(--z-toast); padding: 8px 12px; border-radius: 10px; background: var(--bg-tooltip); border: 1px solid var(--divider); color: var(--text-1); font-size: 12px; line-height: 16px; max-width: 260px; box-shadow: var(--shadow-tooltip); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s; white-space: normal; }
.tooltip.is-visible { opacity: 1; transform: none; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn 0.18s ease-out; }
.modal-overlay__bg { position: absolute; inset: 0; background: var(--overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 0; }
.modal-overlay > :not(.modal-overlay__bg) { position: relative; z-index: 1; }
.modal-overlay--auth .modal-overlay__bg { background: var(--overlay-auth); }
.modal { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: var(--r-card); background: var(--modal-bg); border: 1px solid var(--modal-border); box-shadow: var(--shadow-modal); animation: slideUp 0.22s var(--ease-out); color: var(--text-1); }
.modal--sm { max-width: 420px; } .modal--md { max-width: 560px; } .modal--lg { max-width: 760px; } .modal--xl { max-width: 960px; }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.3); color: rgba(255, 255, 255, 0.7); }
.modal__close svg { width: 16px; height: 16px; }
.modal__close:hover { color: #fff; background: rgba(0, 0, 0, 0.45); }
.modal__head { padding: 24px 24px 0; }
.modal__title { font-size: 20px; font-weight: 600; line-height: 28px; }
.modal__body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 12px; padding: 0 24px 24px; }
.modal--top { align-items: flex-start; padding-top: 12vh; }
.modal--top .modal { margin-top: 0; }
@media (max-width: 767px) { .modal { max-width: calc(100vw - 32px); } .modal__body { padding: 20px; gap: 16px; } .modal__head { padding: 20px 20px 0; } }

/* ---------- Toast ---------- */
.toast-root { position: fixed; right: 24px; bottom: 24px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 360px; padding: 12px 16px; border-radius: 14px; background: var(--toast-bg); border: 1px solid var(--toast-border); box-shadow: var(--shadow-xl); font-size: 14px; color: var(--text-1); animation: toastIn 0.25s var(--ease-out); pointer-events: auto; }
.toast svg { width: 18px; height: 18px; }
.toast--success svg { color: var(--success); } .toast--error svg { color: var(--danger); } .toast--info svg { color: var(--primary); } .toast--warning svg { color: var(--warning); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; }
@media (max-width: 767px) { .toast-root { left: 16px; right: 16px; bottom: calc(var(--bottombar-h) + 16px + env(safe-area-inset-bottom, 0px)); } .toast { max-width: none; } }

/* ---------- 折叠面板 ---------- */
.accordion { display: flex; flex-direction: column; }
.accordion__item { border-bottom: 1px solid var(--divider-row); }
.accordion__item:last-child { border-bottom: 0; }
.accordion__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 0; font-size: 14px; font-weight: 500; text-align: left; color: var(--text-1); }
.accordion__head svg { width: 16px; height: 16px; color: var(--text-3); transition: transform 0.25s; }
.accordion__item.is-open .accordion__head svg { transform: rotate(180deg); }
.accordion__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s var(--ease-out); }
.accordion__item.is-open .accordion__body { grid-template-rows: 1fr; }
.accordion__inner { overflow: hidden; }
.accordion__content { padding: 0 0 14px; font-size: 14px; line-height: 21px; color: var(--text-2); }

/* ---------- 横滑容器 / 轮播 ---------- */
.carousel { position: relative; }
.carousel__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2px; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; flex-shrink: 0; }
.carousel__nav { display: flex; align-items: center; gap: 8px; }
.carousel__dots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.carousel__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--text-40); opacity: 0.5; transition: all 0.25s; }
.carousel__dot:hover { opacity: 0.8; }
.carousel__dot.is-active { width: 20px; background: var(--primary); opacity: 1; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex-shrink: 0; }
.marquee { overflow: hidden; }
.marquee__track { display: flex; gap: 18px; width: max-content; animation: scrollX 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- 头像 / 赌场 logo ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--glass-6); color: var(--text-2); font-size: 13px; font-weight: 600; flex-shrink: 0; box-shadow: var(--avatar-ring); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { width: 20px; height: 20px; font-size: 9px; } .avatar--sm { width: 28px; height: 28px; font-size: 11px; } .avatar--md { width: 32px; height: 32px; font-size: 12px; } .avatar--lg { width: 48px; height: 48px; font-size: 16px; } .avatar--xl { width: 64px; height: 64px; font-size: 20px; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--bg-card); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.casino-logo { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--glass-6); flex-shrink: 0; }
.casino-logo img { width: 100%; height: 100%; object-fit: contain; }
.casino-logo--fallback { font-size: 12px; font-weight: 700; color: var(--text-1); background: var(--cta-card-gradient); }
.casino-logo--square { border-radius: 8px; }
.logo-tile { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: var(--r-tile); background: var(--logo-tile-bg); box-shadow: var(--logo-tile-inset); }
.logo-tile img { width: 52px; height: 52px; object-fit: contain; }

/* ---------- 复制按钮 / 倒计时 ---------- */
.copy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--glass-6); color: var(--text-2); font-size: 12px; font-weight: 500; font-family: var(--font-mono); transition: background var(--t-fast), color var(--t-fast); }
.copy-btn:hover { background: var(--tint-14); color: var(--primary); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.is-copied { color: var(--success); }
.countdown { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.countdown__seg { display: inline-flex; flex-direction: column; align-items: center; min-width: 40px; padding: 6px 4px; border-radius: 8px; background: var(--glass-6); }
.countdown__num { font-size: 16px; font-weight: 600; line-height: 20px; }
.countdown__lbl { font-size: 10px; text-transform: uppercase; color: var(--text-3); }
.countdown--inline { font-size: 13px; font-weight: 500; }

/* ---------- KPI 卡 ---------- */
.kpi { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 126px; padding: 16px; border-radius: var(--r-glass); background: var(--glass-1); position: relative; }
.kpi::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: var(--border-gradient); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.kpi__label { font-size: 12px; color: var(--text-3); }
.kpi__value { font-size: 30px; font-weight: 600; line-height: 36px; }
.kpi__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- 进度 / 分隔线 ---------- */
.progress { height: 6px; border-radius: 999px; background: var(--share-track); overflow: hidden; }
.progress__fill { height: 100%; background: var(--primary); border-radius: inherit; }
.divider { height: 1px; background: var(--divider); }
.divider--soft { background: var(--divider-soft); }
.or-divider { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 300; color: var(--text-3); }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--divider); }

/* ---------- 品牌字标（FAIR 粗 + PLAY 细） ---------- */
.brand-wm { display: inline-flex; align-items: baseline; font-family: var(--font-sans); font-size: 18px; line-height: 1; letter-spacing: 0.01em; color: var(--text-1); white-space: nowrap; text-transform: uppercase; }
.brand-wm__b { font-weight: 700; }
.brand-wm__l { font-weight: 400; }
.brand-wm--sm { font-size: 14px; }
.brand-wm--lg { font-size: 22px; }
.brand-wm--white { color: #fff; }
.brand-wm--svg { display: inline-flex; align-items: center; }
.brand-wm__img { display: block; width: auto; }
html[data-theme="dark"] .brand-wm--svg:not(.brand-wm--forced) .brand-wm__img--light { display: none; }
html[data-theme="light"] .brand-wm--svg:not(.brand-wm--forced) .brand-wm__img--dark { display: none; }
.brand-mark { display: block; object-fit: contain; }
