/* ============ 公共基础样式（Reset / 排版 / 按钮 / 导航 / 页脚 / 弹窗 / 客服） ============ */
/* ============================================
   优米彩对单助手 - 智能数据趋势分析平台
   视觉风格：科技数据风 (TradingView / CoinMarketCap)
   主色：深蓝 + 紫色 + 白色
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #080d1e;
  --bg-secondary: #0d1333;
  --bg-card: #111940;
  --bg-card-hover: #162050;
  --bg-input: #0f1738;
  --purple-500: #7c3aed;
  --purple-600: #6d28d9;
  --purple-400: #a78bfa;
  --purple-300: #c4b5fd;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-600: #2563eb;
  --cyan-400: #22d3ee;
  --green-400: #4ade80;
  --red-400: #f87171;
  --yellow-400: #fbbf24;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(124, 58, 237, 0.15);
  --border-light: rgba(255,255,255,0.06);
  --gradient-purple: linear-gradient(135deg, #7c3aed, #3b82f6);
  --gradient-bg: linear-gradient(135deg, #0d1333 0%, #1a0a2e 50%, #0d1333 100%);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 30px rgba(124,58,237,0.2);
  --radius: 12px;
  --radius-lg: 20px;
  --font-main: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; overscroll-behavior-x: none; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden; /* 旧浏览器兜底 */
  overflow-x: clip;   /* 不产生滚动容器，保证子元素 position: sticky 生效 */
  overscroll-behavior-x: none;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple-400); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--purple-300); }

img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* === Typography === */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
p { color: var(--text-secondary); }

.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--purple-400);
  margin-bottom: 12px;
}
.section-label::before {
  content: ''; width: 20px; height: 2px;
  background: var(--gradient-purple); border-radius: 2px;
}
.section-title { margin-bottom: 16px; }
.section-desc {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 600px; margin-bottom: 48px;
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all 0.25s ease;
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-purple); color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.5);
  color: #fff;
}
.btn-secondary {
  background: transparent; color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
}
.btn-sm { padding: 10px 20px; font-size: 0.875rem; border-radius: 8px; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; border-radius: 12px; }
/* 顶部导航登录态切换：登录后显示「个人中心」，隐藏「免费试用」（需覆盖 .btn / .mobile-menu a.btn 的 display） */
.nav-actions .js-user-center[hidden],
.mobile-menu .js-user-center[hidden],
.nav-actions .js-guest-only[hidden],
.mobile-menu .js-guest-only[hidden] { display: none; }
/* 登录后「个人中心」按钮：高对比橙红配色，突出于紫色主按钮（桌面 + 移动克隆） */
.nav-actions .js-user-center,
.mobile-menu .js-user-center {
  background: linear-gradient(135deg, #fb923c, #ef4444);
  box-shadow: 0 4px 20px rgba(239,68,68,0.45);
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.nav-actions .js-user-center:hover,
.mobile-menu .js-user-center:hover {
  box-shadow: 0 8px 30px rgba(239,68,68,0.6);
}

/* === Navigation === */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height); z-index: 1000;
  background: rgba(8,13,30,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(8,13,30,0.95);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.4rem; font-weight: 800; color: #fff;
  text-decoration: none; letter-spacing: -0.02em;
}
.nav-logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gradient-purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 900; color: #fff;
}
.nav-logo span.trend { color: var(--purple-400); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  text-decoration: none; transition: color 0.2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gradient-purple); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
/* 首页顶部“登录/注册”按钮：渐变描边玻璃（次级入口，弱于免费试用主 CTA） */
.nav-login-btn {
  background:
    linear-gradient(rgba(124,58,237,0.12), rgba(124,58,237,0.12)) padding-box,
    linear-gradient(135deg, #7c3aed, #3b82f6) border-box;
  border: 1px solid transparent;
  color: #ddd6fe;
}
.nav-login-btn:hover {
  background:
    linear-gradient(rgba(124,58,237,0.24), rgba(124,58,237,0.24)) padding-box,
    linear-gradient(135deg, #7c3aed, #3b82f6) border-box;
  color: #fff;
  box-shadow: 0 0 18px rgba(124,58,237,0.35);
  transform: translateY(-1px);
}
.nav-toggle {
  display: none; background: none; border: none; color: #fff;
  font-size: 1.5rem; cursor: pointer; padding: 4px;
}
/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; top: var(--nav-height); left: 0; right: 0;
  background: rgba(8,13,30,0.98); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 20px 24px; z-index: 999;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 14px 0; color: var(--text-secondary);
  font-size: 1rem; font-weight: 500; border-bottom: 1px solid var(--border-light);
  text-decoration: none;
}
.mobile-menu a:hover { color: #fff; }
/* 移动菜单 CTA 按钮（克隆自桌面右上角，保持按钮外观，避免被 .mobile-menu a 的块级样式覆盖） */
.mobile-menu a.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; margin-top: 10px; padding: 12px 20px;
  border-bottom: none; text-align: center;
}

/* === Footer === */
.footer {
  padding: 60px 0 32px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-brand p { font-size: 0.88rem; color: var(--text-muted); margin-top: 16px; line-height: 1.7; }
.footer-col { text-align: right; }
.footer-col h4 {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  color: var(--text-secondary); font-size: 0.88rem;
  text-decoration: none; transition: color 0.2s;
}
.footer-col a:hover { color: var(--purple-400); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 0.8rem; color: var(--text-muted); }

.page-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 10%, transparent 80%);
}
/* === Animations === */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* === Auth Modal (登录/注册弹窗) === */
.auth-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-modal[hidden] { display: none; }
.auth-overlay {
  position: absolute; inset: 0;
  background: rgba(8,13,30,0.75); backdrop-filter: blur(6px);
}
.auth-dialog {
  position: relative; width: 100%; max-width: 420px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-glow);
  animation: authPop 0.3s ease;
}
@keyframes authPop {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.6rem; line-height: 1; cursor: pointer; transition: color 0.2s;
}
.auth-close:hover { color: #fff; }
.auth-title { font-size: 1.3rem; text-align: center; margin-bottom: 24px; }
.auth-tabs {
  display: flex; gap: 6px; padding: 4px;
  background: var(--bg-input); border-radius: 10px; margin-bottom: 24px;
}
.auth-tab {
  flex: 1; padding: 10px 0; border: none; border-radius: 8px;
  background: transparent; color: var(--text-secondary);
  font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.25s;
}
.auth-tab.active { background: var(--gradient-purple); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form[hidden] { display: none; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.auth-field input {
  background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 12px 14px; color: var(--text-primary);
  font-size: 0.95rem; outline: none; transition: border-color 0.2s;
}
.auth-field input:focus { border-color: var(--purple-500); }
.auth-field input::placeholder { color: var(--text-muted); }
.auth-submit { justify-content: center; width: 100%; margin-top: 4px; }
.auth-captcha-row { display: flex; align-items: center; gap: 10px; }
.auth-captcha-input { flex: 1; min-width: 0; }
.auth-captcha-canvas {
  display: block; width: 110px; height: 42px; flex-shrink: 0;
  border-radius: 10px; border: 1px solid var(--border-light);
  background: var(--bg-input); cursor: pointer;
  object-fit: contain;
  transition: border-color 0.2s;
}
.auth-captcha-canvas:hover { border-color: var(--purple-500); }
.auth-switch { text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.auth-switch a { color: var(--purple-400); }
.auth-switch a:hover { color: var(--purple-300); }

/* === 成功提示弹窗（登录/注册成功，动态注入） === */
.success-modal {
  position: fixed; inset: 0; z-index: 2200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: successFadeIn 0.22s ease;
}
.success-modal-out { animation: successFadeOut 0.22s ease forwards; }
.success-overlay {
  position: absolute; inset: 0;
  background: rgba(8,13,30,0.75);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.success-dialog {
  position: relative; width: 100%; max-width: 320px;
  padding: 34px 28px 30px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  animation: authPop 0.3s ease;
}
.success-icon {
  width: 76px; height: 76px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(124,58,237,0.28), rgba(59,130,246,0.14));
  box-shadow: 0 0 0 1px rgba(139,92,246,0.4), 0 0 30px rgba(124,58,237,0.45);
}
.success-icon svg { width: 52px; height: 52px; overflow: visible; }
.success-icon-circle {
  stroke-dasharray: 145; stroke-dashoffset: 145;
  animation: successCircleDraw 0.5s ease forwards;
}
.success-icon-check {
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: successCheckDraw 0.45s ease 0.15s forwards;
}
.success-title { font-size: 1.25rem; color: #fff; margin-bottom: 6px; }
.success-subtitle { font-size: 0.88rem; color: var(--text-muted); }
@keyframes successFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes successFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes successCircleDraw { to { stroke-dashoffset: 0; } }
@keyframes successCheckDraw { to { stroke-dashoffset: 0; } }

/* === 通用提示弹窗（替代原生 alert，动态注入；见 js/utils/dialog.js） === */
.tip-modal {
  position: fixed; inset: 0; z-index: 2300;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: successFadeIn 0.22s ease;
}
.tip-modal-out { animation: successFadeOut 0.2s ease forwards; }
.tip-overlay {
  position: absolute; inset: 0;
  background: rgba(8,13,30,0.75);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tip-dialog {
  position: relative; width: 100%; max-width: 340px;
  padding: 30px 26px 24px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  animation: authPop 0.3s ease;
}
.tip-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--blue-400);
  background: radial-gradient(circle at 50% 40%, rgba(96,165,250,0.28), rgba(96,165,250,0.08));
  box-shadow: 0 0 0 1px rgba(96,165,250,0.4), 0 0 24px rgba(96,165,250,0.35);
}
.tip-icon svg { width: 32px; height: 32px; }
.tip-modal-error .tip-icon {
  color: var(--red-400);
  background: radial-gradient(circle at 50% 40%, rgba(248,113,113,0.28), rgba(248,113,113,0.08));
  box-shadow: 0 0 0 1px rgba(248,113,113,0.4), 0 0 24px rgba(248,113,113,0.35);
}
.tip-modal-warning .tip-icon {
  color: var(--yellow-400);
  background: radial-gradient(circle at 50% 40%, rgba(251,191,36,0.28), rgba(251,191,36,0.08));
  box-shadow: 0 0 0 1px rgba(251,191,36,0.4), 0 0 24px rgba(251,191,36,0.35);
}
.tip-title { font-size: 1.15rem; color: #fff; margin-bottom: 8px; }
.tip-message { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; word-break: break-word; }
.tip-btn {
  width: 100%; margin-top: 22px; padding: 12px 0;
  border: none; border-radius: 10px;
  background: var(--gradient-purple); color: #fff;
  font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tip-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,0.5); }

/* === 浮动客服窗口（主站与个人中心注入，页面右侧垂直居中卡片；个人中心仅“在线聊天”） === */
.kefu-widget {
  position: fixed; top: 50%; right: 64px;
  transform: translateY(-50%);
  z-index: 1200;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px 10px;
  background: linear-gradient(180deg, rgba(24,32,80,0.96), rgba(10,15,38,0.97));
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.45), 0 0 26px rgba(124,58,237,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  touch-action: none;
}
.kefu-widget[hidden] { display: none; }
.kefu-title {
  width: 100%; padding-bottom: 9px;
  text-align: center; white-space: nowrap;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--purple-300);
  border-bottom: 1px solid var(--border-light);
}
.kefu-close {
  position: absolute; top: -12px; right: -12px;
  width: 20px; height: 20px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; line-height: 1; cursor: pointer;
  color: #fff;
  background: #7c3aed; border: 2px solid #a78bfa; border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0,0,0,0.45);
  transition: background 0.2s, transform 0.2s;
}
.kefu-close:hover { background: #a78bfa; transform: scale(1.08); }
.kefu-items { display: flex; flex-direction: column; gap: 9px; }
.kefu-item {
  width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); color: var(--text-primary);
  border: 1px solid var(--border-light); border-radius: 13px;
  font-family: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.kefu-item:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(255,255,255,0.1);
}
.kefu-item-wechat:hover { border-color: rgba(74,222,128,0.6); box-shadow: 0 0 16px rgba(74,222,128,0.35); }
.kefu-item-telegram:hover { border-color: rgba(96,165,250,0.6); box-shadow: 0 0 16px rgba(96,165,250,0.35); }
.kefu-item-service:hover { border-color: rgba(124,58,237,0.7); box-shadow: 0 0 16px rgba(124,58,237,0.4); }
.kefu-item-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.kefu-item-caption {
  font-size: 0.62rem; line-height: 1; white-space: nowrap;
  color: var(--text-secondary);
}

/* 微信图标点击弹出的二维码卡片 */
.kefu-qr-pop {
  position: absolute; top: 50%; right: calc(100% + 12px);
  transform: translateY(-50%);
  width: 128px; padding: 8px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), var(--shadow-glow);
}
.kefu-qr-pop[hidden] { display: none; }
.kefu-qr-pop img { width: 100%; height: auto; display: block; border-radius: 6px; }
.kefu-qr-pop span {
  display: block; margin-top: 5px; text-align: center;
  font-size: 0.66rem; font-weight: 600; color: #334155;
}

/* 移动端：缩小卡片与图标 */
@media (max-width: 768px) {
  .kefu-widget { right: 8px; gap: 8px; padding: 10px 8px; border-radius: 16px; }
  .kefu-title { font-size: 0.6rem; padding-bottom: 7px; }
  .kefu-items { gap: 7px; }
  .kefu-item { width: 38px; height: 38px; border-radius: 11px; font-size: 1rem; }
  .kefu-item-caption { font-size: 0.58rem; }
  .kefu-qr-pop { width: 110px; }
}

/* 个人中心电脑端：保持基础样式的右侧垂直居中（仅“在线聊天”一项，与主站一致） */
/* 个人中心移动端 / 平板：避让底部 Tab 导航栏（约 60px + 安全区） */
@media (max-width: 1024px) {
  .page-user .kefu-widget {
    top: auto; right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    transform: none;
  }
}

/* === 在线客服聊天弹窗（关于页在线客服卡触发；外壳网站风格，内容为第三方 iframe） === */
.kefu-chat-modal {
  position: fixed; right: 20px; bottom: 20px; z-index: 2000;
}
.kefu-chat-modal[hidden] { display: none; }
.kefu-chat-modal-box {
  position: relative;
  width: 360px; max-width: calc(100vw - 40px);
  height: min(448px, 64vh);
  background: linear-gradient(180deg, rgba(24,32,80,0.98), rgba(10,15,38,0.99));
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 30px rgba(124,58,237,0.22);
}
.kefu-chat-modal-box iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.kefu-chat-modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; line-height: 1; color: #fff; cursor: pointer;
  background: rgba(255,255,255,0.12);
  border: 1px solid var(--border-light); border-radius: 10px;
  transition: background 0.2s, border-color 0.2s;
}
.kefu-chat-modal-close:hover { background: rgba(124,58,237,0.4); border-color: var(--purple-500); }

/* 移动端：底部居中，左右等距 */
@media (max-width: 768px) {
  .kefu-chat-modal { left: 50%; right: auto; transform: translateX(-50%); bottom: 12px; }
  .kefu-chat-modal-box { max-width: calc(100vw - 32px); height: 70vh; border-radius: 14px; }
}

/* === Responsive (base) === */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  /* 登录后：移动端顶部导航直接显示「个人中心」按钮（[hidden] 特异性更高，未登录仍隐藏） */
  .nav-actions .js-user-center { display: inline-flex; }
  /* 未登录：移动端顶部导航显示「登录」按钮 */
  .nav-actions .js-guest-only { display: inline-flex; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col { text-align: left; }
  .auth-dialog { padding: 24px 20px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
}

/* === 自定义下拉（替换原生 select 展开列表） === */
.uc-select { position: relative; display: inline-flex; align-items: center; }
/* 原生 select 仅作取值载体：视觉隐藏且不接收点击 */
.uc-select > select {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.uc-select-display {
  flex: 1; min-width: 0; width: 100%;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0; margin: 0; border: 0; background: transparent;
  font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.uc-select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-select-arrow { flex-shrink: 0; color: var(--text-muted); transition: transform 0.2s; }
.uc-select.is-open .uc-select-arrow { transform: rotate(180deg); }
.uc-select:focus-within { border-color: rgba(124,58,237,0.5); }
/* history 页原生下拉自带背景箭头，包裹后需去除 */
.filter-select.uc-select { background-image: none; padding-right: 16px; }

.uc-select-panel {
  position: fixed; z-index: 2300;
  min-width: 120px; max-width: calc(100vw - 16px);
  max-height: 260px; overflow-y: auto;
  padding: 6px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 12px; box-shadow: 0 18px 48px rgba(0,0,0,0.5);
}
.uc-select-panel[hidden] { display: none; }
.uc-select-option {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--text-secondary);
  font-family: inherit; font-size: 0.85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}
.uc-select-option:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.uc-select-option.is-selected { background: var(--gradient-purple); color: #fff; font-weight: 600; }
