/* ============================================================
 * FlirtChat Design System v3.0 - 2026
 * 升级目标: 现代圆润 / 暗色主导 + 玻璃拟态 / 微动效
 * ============================================================ */

/* ---------- 设计 token ---------- */
:root {
  /* 品牌色 - 粉紫渐变 */
  --brand-1: #FF6B9D;
  --brand-1-dark: #E8527D;
  --brand-1-soft: #FFC2D4;
  --brand-2: #C44AFF;
  --brand-2-dark: #9F32D6;
  --brand-3: #FFB347;        /* 金橙点缀 */
  --brand-gradient: linear-gradient(135deg, #FF6B9D 0%, #C44AFF 100%);
  --brand-gradient-soft: linear-gradient(135deg, #FF6B9D22 0%, #C44AFF22 100%);
  --brand-gradient-vertical: linear-gradient(180deg, #FF6B9D 0%, #C44AFF 100%);
  --brand-gradient-rainbow: linear-gradient(135deg, #FF6B9D 0%, #C44AFF 50%, #4F46E5 100%);

  /* 暗色表面 */
  --bg: #0A0A14;
  --bg-1: #0F0F1A;
  --bg-2: #1A1A2E;
  --bg-3: #252540;
  --bg-elev: rgba(26, 26, 46, 0.65);
  --glass-bg: rgba(26, 26, 46, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* 文本色 */
  --text: #FFFFFF;
  --text-1: #F5F5FA;
  --text-2: #B8B8D4;
  --text-3: #8B8BA8;
  --text-4: #5C5C77;

  /* 状态色 */
  --success: #2ECC71;
  --success-soft: rgba(46, 204, 113, 0.15);
  --warning: #FFA94D;
  --warning-soft: rgba(255, 169, 77, 0.15);
  --danger: #FF5252;
  --danger-soft: rgba(255, 82, 82, 0.15);
  --info: #4F8EF7;
  --info-soft: rgba(79, 142, 247, 0.15);

  /* 强调色 */
  --gold: #FFD700;
  --gold-soft: rgba(255, 215, 0, 0.15);
  --platinum: #E5E4E2;

  /* 圆角 */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-full: 999px;

  /* 间距 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* 字号 */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 38px;
  --text-5xl: 48px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow-brand: 0 8px 28px rgba(255, 107, 157, 0.35);
  --shadow-glow-purple: 0 8px 28px rgba(196, 74, 255, 0.35);
  --shadow-glow-gold: 0 6px 24px rgba(255, 215, 0, 0.35);

  /* 动效 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --t-fast: 180ms;
  --t-mid: 320ms;
  --t-slow: 500ms;

  /* 安全区 */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* 字体 */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
               -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

/* ---------- 亮色模式 ---------- */
[data-theme="light"] {
  /* 表面 - 浅色 3 阶 */
  --bg: #FBFAFE;
  --bg-1: #FFFFFF;
  --bg-2: #FFFFFF;
  --bg-3: #F2F2F8;
  --bg-elev: rgba(255, 255, 255, 0.85);
  --glass-bg: rgba(255, 255, 255, 0.70);
  --glass-border: rgba(20, 20, 40, 0.06);

  /* 文本色 - 4 级深浅 */
  --text: #1A1A2E;
  --text-1: #252540;
  --text-2: #4A4A6A;
  --text-3: #8B8BA8;
  --text-4: #B8B8D4;

  /* 状态色 - 亮色下稍加深以保证 WCAG 对比 */
  --success: #1FAF5E;
  --success-soft: rgba(31, 175, 94, 0.10);
  --warning: #E5850B;
  --warning-soft: rgba(229, 133, 11, 0.10);
  --danger: #E03E3E;
  --danger-soft: rgba(224, 62, 62, 0.10);
  --info: #3B82F6;
  --info-soft: rgba(59, 130, 246, 0.10);

  /* 品牌色保留饱和 (不变) */
  --brand-1: #FF4B92;
  --brand-1-dark: #E83875;
  --brand-1-soft: #FFC7D8;
  --brand-2: #A635E5;
  --brand-2-dark: #8C25C7;

  /* 强调色 */
  --gold: #E59E00;
  --gold-soft: rgba(229, 158, 0, 0.10);
  --platinum: #2C2C3D;

  /* 阴影 - 亮色下阴影应更深以拉开层次 */
  --shadow-sm: 0 2px 12px rgba(60, 30, 90, 0.06);
  --shadow-md: 0 6px 24px rgba(60, 30, 90, 0.10);
  --shadow-lg: 0 14px 48px rgba(60, 30, 90, 0.16);
  --shadow-glow-brand: 0 8px 28px rgba(255, 75, 146, 0.30);
  --shadow-glow-purple: 0 8px 28px rgba(166, 53, 229, 0.30);
  --shadow-glow-gold: 0 6px 24px rgba(229, 158, 0, 0.30);
}

/* 亮色模式背景光晕更柔和 */
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(255, 107, 157, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(196, 74, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 179, 71, 0.06), transparent 60%);
}

/* 亮色下滚动条更浅 */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--brand-1);
}

/* 亮色模式玻璃卡优化 */
[data-theme="light"] .card-glass {
  background: rgba(255, 255, 255, 0.70);
  border-color: rgba(20, 20, 40, 0.08);
  box-shadow: 0 4px 20px rgba(60, 30, 90, 0.06);
}

/* 亮色下登录页背景更亮 */
[data-theme="light"] body.login-bg {
  background: linear-gradient(135deg, #FFE8F3 0%, #F3E8FF 50%, #FFF8E7 100%);
  color: var(--text);
}

/* 暗色模式特定样式(保持原默认) */
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(255, 107, 157, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(196, 74, 255, 0.15), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 179, 71, 0.08), transparent 60%);
}

/* ---------- 全局基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: 0.02em;
}

/* 暗色背景渐变 + 装饰光斑 */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(255, 107, 157, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(196, 74, 255, 0.15), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 179, 71, 0.08), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 12px 28px;
  border-radius: var(--r-full);
  border: none;
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.97); }

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-glow-brand);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 107, 157, 0.5);
}

.btn-secondary {
  background: var(--bg-3);
  color: var(--text-1);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-2);
  border-color: var(--brand-1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-3);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--brand-1);
  color: var(--brand-1);
}
.btn-outline:hover:not(:disabled) {
  background: var(--brand-1);
  color: #fff;
  transform: translateY(-2px);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #FF3838; transform: translateY(-2px); }

.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }

.btn-sm { padding: 8px 18px; font-size: var(--text-sm); }
.btn-xs { padding: 5px 12px; font-size: var(--text-xs); }
.btn-lg { padding: 14px 32px; font-size: var(--text-lg); }
.btn-block { width: 100%; }

.btn-icon { padding: 10px; width: 40px; height: 40px; border-radius: var(--r-full); }

/* 闪光效果 */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s var(--ease-out);
}
.btn-primary:hover::after { left: 100%; }

/* ---------- 卡片 / 玻璃 ---------- */
.card {
  background: var(--bg-2);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  border: 1px solid var(--glass-border);
  transition: all var(--t-mid) var(--ease-out);
}

.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--brand-1);
  box-shadow: var(--shadow-md);
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
}

.card-elev {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}

.card-gradient {
  background: var(--brand-gradient);
  color: #fff;
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-glow-brand);
}

.card-image {
  background-size: cover;
  background-position: center;
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}

/* ---------- 输入框 ---------- */
.input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  background: var(--bg-3);
  color: var(--text);
  font-size: var(--text-md);
  outline: none;
  transition: all var(--t-fast) var(--ease-out);
}

.input:focus {
  border-color: var(--brand-1);
  background: var(--bg-2);
  box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.15);
}

.input::placeholder { color: var(--text-4); }

.input-bordered {
  border: 2px solid var(--bg-3);
  background: var(--bg-1);
}

.input-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.input-search {
  padding-left: 44px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238B8BA8' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.35-4.35'/></svg>");
  background-repeat: no-repeat;
  background-position: 14px center;
}

/* ---------- 标签 / Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.badge-gold { background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(255,215,0,0.3); }
.badge-platinum { background: var(--bg-3); color: var(--platinum); }
.badge-online { background: var(--success); color: #fff; }
.badge-offline { background: var(--bg-3); color: var(--text-3); }
.badge-burn { background: var(--danger); color: #fff; }
.badge-free { background: var(--bg-3); color: var(--text-3); }
.badge-price { background: var(--brand-gradient); color: #fff; }
.badge-info { background: var(--info-soft); color: var(--info); border: 1px solid rgba(79,142,247,0.3); }
.badge-success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(255,169,77,0.3); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(255,82,82,0.3); }
.badge-purple { background: var(--brand-gradient-soft); color: var(--brand-2); border: 1px solid rgba(196,74,255,0.3); }

/* ---------- 头像 ---------- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--brand-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.avatar-md { width: 48px; height: 48px; font-size: var(--text-md); }
.avatar-lg { width: 64px; height: 64px; font-size: var(--text-lg); }
.avatar-xl { width: 96px; height: 96px; font-size: var(--text-2xl); }
.avatar-2xl { width: 128px; height: 128px; font-size: var(--text-3xl); }

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-online::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 12px; height: 12px;
  background: var(--success);
  border-radius: var(--r-full);
  border: 2px solid var(--bg);
}

.avatar-bordered { border: 3px solid var(--brand-1); }

/* ---------- Toast / 提示 ---------- */
.toast {
  position: fixed;
  top: var(--sp-5);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-3);
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: toastIn 0.3s var(--ease-bounce);
  font-size: var(--text-sm);
  border: 1px solid var(--glass-border);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 加载骨架 / Loading ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: var(--r-xs); }
.skeleton-circle { border-radius: var(--r-full); }
.skeleton-card { height: 100px; border-radius: var(--r-lg); }

/* Spinner */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--bg-3);
  border-top-color: var(--brand-1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 模态弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--t-fast) var(--ease-out);
}

@keyframes fadeIn { from { opacity: 0; } }

.modal {
  background: var(--bg-2);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  animation: modalIn var(--t-mid) var(--ease-bounce);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- Empty State ---------- */
.empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-5);
  color: var(--text-3);
}

.empty-icon {
  width: 80px; height: 80px;
  margin: 0 auto var(--sp-4);
  border-radius: var(--r-full);
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  font-size: 36px;
}

/* ---------- List ---------- */
.list { display: flex; flex-direction: column; gap: var(--sp-3); }
.list-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-2);
  border-radius: var(--r-md);
  transition: all var(--t-fast) var(--ease-out);
  border: 1px solid transparent;
}
.list-item:hover { background: var(--bg-3); border-color: var(--glass-border); }
.list-item .item-content { flex: 1; min-width: 0; }
.list-item .item-title { font-weight: 600; font-size: var(--text-md); color: var(--text-1); }
.list-item .item-sub { font-size: var(--text-sm); color: var(--text-3); margin-top: 2px; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: var(--sp-1);
  padding: var(--sp-1);
  background: var(--bg-3);
  border-radius: var(--r-full);
  position: relative;
}

.tab {
  flex: 1;
  padding: var(--sp-2) var(--sp-4);
  text-align: center;
  border-radius: var(--r-full);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--t-fast) var(--ease-out);
  position: relative;
  z-index: 1;
}

.tab.active {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-glow-brand);
}

/* ---------- TabBar (底部 tab) ---------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-elev);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--glass-border);
  display: flex;
  padding: var(--sp-2) var(--sp-2) calc(var(--sp-2) + var(--safe-bottom)) var(--sp-2);
  z-index: 100;
}

.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--text-3);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out);
}

.tabbar-item.active { color: var(--brand-1); }
.tabbar-item svg { width: 22px; height: 22px; }

/* ---------- TopBar (顶部导航) ---------- */
.topbar {
  position: sticky;
  top: 0;
  height: calc(56px + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--bg-elev);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
  z-index: 50;
}

.topbar-title { font-size: var(--text-lg); font-weight: 700; flex: 1; }

/* ---------- 进度条 ---------- */
.progress {
  height: 8px;
  background: var(--bg-3);
  border-radius: var(--r-full);
  overflow: hidden;
  position: relative;
}
.progress-bar {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: var(--r-full);
  transition: width var(--t-mid) var(--ease-out);
}

/* ---------- Coin / Money / Number ---------- */
.num-coin {
  color: var(--gold);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.num-coin::before { content: '🪙'; font-size: 1.1em; }

/* ---------- FAB 浮动按钮 ---------- */
.fab {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  right: var(--sp-5);
  width: 56px; height: 56px;
  border-radius: var(--r-full);
  background: var(--brand-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-brand);
  border: none;
  cursor: pointer;
  z-index: 99;
  transition: all var(--t-fast) var(--ease-out);
}
.fab:hover { transform: translateY(-4px) scale(1.05); }
.fab:active { transform: translateY(0) scale(0.95); }

/* ---------- 微动效 ---------- */
.pulse {
  animation: pulse 2s var(--ease-in-out) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.glow {
  position: relative;
}
.glow::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: var(--brand-gradient);
  border-radius: inherit;
  opacity: 0.5;
  filter: blur(20px);
  z-index: -1;
}

.shake { animation: shake 0.5s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.bounce { animation: bounce 1s var(--ease-bounce); }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-1); }

/* ---------- 工具类 ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-md { font-size: var(--text-md); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-muted { color: var(--text-3); }
.text-soft { color: var(--text-2); }
.text-brand { color: var(--brand-1); }
.text-purple { color: var(--brand-2); }
.text-gold { color: var(--gold); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.italic { font-style: italic; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.p-2 { padding: var(--sp-2); }
.p-3 { padding: var(--sp-3); }
.p-4 { padding: var(--sp-4); }
.p-5 { padding: var(--sp-5); }
.p-6 { padding: var(--sp-6); }
.px-3 { padding-left: var(--sp-3); padding-right: var(--sp-3); }
.px-4 { padding-left: var(--sp-4); padding-right: var(--sp-4); }
.py-3 { padding-top: var(--sp-3); padding-bottom: var(--sp-3); }
.py-4 { padding-top: var(--sp-4); padding-bottom: var(--sp-4); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.center { transform: translate(-50%, -50%); }
.mx-auto { margin-left: auto; margin-right: auto; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.rounded-sm { border-radius: var(--r-sm); }
.rounded-md { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-xl { border-radius: var(--r-xl); }
.rounded-full { border-radius: var(--r-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.hidden { display: none; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.cursor-pointer { cursor: pointer; }

@media (max-width: 480px) {
  html { font-size: 14px; }
  .btn { padding: 11px 22px; }
  .btn-lg { padding: 13px 26px; }
  .card { padding: var(--sp-4); }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
