/* ============================================================
   xw-dark.css — 全站深色模式（增量覆盖，可一键关闭）
   原理：仅在 html.xw-dark body 下生效，用 !important 覆盖 xw-theme.css
   的同级 !important 色值。删掉本文件引用 / 去掉 body class 即整站回退。
   切换状态存 localStorage('xw_dark')，head 内联脚本提前应用防闪烁。
   2026-11-30
   ============================================================ */
html.xw-dark body {
  background: #12131a !important;
  color: #e8e8ef !important;
}
html.xw-dark body::before {
  background:
    radial-gradient(380px 220px at 6% 10%, rgba(232,56,109,.08), transparent 70%),
    radial-gradient(420px 260px at 94% 16%, rgba(255,197,61,.05), transparent 70%) !important;
}
/* 通用文字与背景 */
html.xw-dark body .page-margin,
html.xw-dark body main,
html.xw-dark body .content-container,
html.xw-dark body .container,
html.xw-dark body .container-fluid { color: #e8e8ef; }
html.xw-dark body a { color: #8ab4ff; }
html.xw-dark body a:hover { color: #a9c6ff; }
html.xw-dark body h1, html.xw-dark body h2, html.xw-dark body h3,
html.xw-dark body h4, html.xw-dark body h5, html.xw-dark body h6,
html.xw-dark body .h1, html.xw-dark body .h2, html.xw-dark body .h3 { color: #f0f0f5; }
html.xw-dark body small, html.xw-dark body .text-muted, html.xw-dark body .muted { color: #9a9aa8; }

/* 顶栏 */
html.xw-dark body .navbar,
html.xw-dark body .navbar-default,
html.xw-dark body .header-container,
html.xw-dark body .topbar { background: #1c1d26 !important; border-color: #2a2b36 !important; }
html.xw-dark body .navbar-default .navbar-brand,
html.xw-dark body .navbar-nav > li > a { color: #d8d8e2 !important; }
html.xw-dark body .navbar-default .navbar-nav > li > a:hover,
html.xw-dark body .navbar-default .navbar-nav > .open > a { background: #252633 !important; color: #fff !important; }
html.xw-dark body .navbar .navbar-nav > li a.quicklinks-toggle__btn,
html.xw-dark body .navbar .navbar-nav > li.navbar-home > a,
html.xw-dark body .navbar .navbar-nav > li.messages-notification-container > a.dropdown-toggle,
html.xw-dark body .navbar .navbar-nav > li.notification-container > a.dropdown-toggle,
html.xw-dark body .navbar .navbar-nav > li.msearch-container > a.dropdown-toggle,
html.xw-dark body .navbar .navbar-nav > li.smalldevicemenu > a.dropdown-toggle { background: #2a2b38 !important; color: #e8e8ef !important; }
html.xw-dark body .navbar-default .navbar-toggle .icon-bar { background-color: #d8d8e2 !important; }
html.xw-dark body .navbar-collapse,
html.xw-dark body .navbar-form { border-color: #2a2b36 !important; }

/* 下拉菜单 */
html.xw-dark body .dropdown-menu,
html.xw-dark body .dropdown-menu > li > a { background: #20212c !important; color: #d8d8e2 !important; border-color: #2f3040 !important; }
html.xw-dark body .dropdown-menu > li > a:hover { background: #2a2b38 !important; color: #fff !important; }
html.xw-dark body .dropdown-menu hr { border-color: #2f3040 !important; }
html.xw-dark body .dropdown-header { color: #8a8a99 !important; }

/* 卡片 / 面板 / 帖子 */
html.xw-dark body .panel,
html.xw-dark body .panel-default,
html.xw-dark body .panel-heading,
html.xw-dark body .panel-body,
html.xw-dark body .panel-footer,
html.xw-dark body .card,
html.xw-dark body .post-container,
html.xw-dark body .list-group-item,
html.xw-dark body .well,
html.xw-dark body .thumbnail,
html.xw-dark body .box { background: #1c1d26 !important; color: #e0e0e8 !important; border-color: #2a2b36 !important; }
html.xw-dark body .panel-default > .panel-heading { border-color: #2a2b36 !important; }
html.xw-dark body .list-group-item + .list-group-item { border-top-color: #262733 !important; }
html.xw-dark body .post-container { border-bottom-color: #262733 !important; }

/* 输入框 / 表单 */
html.xw-dark body input[type=text], html.xw-dark body input[type=email],
html.xw-dark body input[type=password], html.xw-dark body input[type=number],
html.xw-dark body input[type=search], html.xw-dark body textarea,
html.xw-dark body .form-control, html.xw-dark body select {
  background: #232430 !important; color: #ececf2 !important; border-color: #33344a !important;
}
html.xw-dark body input::placeholder, html.xw-dark body textarea::placeholder { color: #7a7a8a !important; }
html.xw-dark body .form-control:focus, html.xw-dark body input:focus, html.xw-dark body textarea:focus { border-color: #5b7fff !important; }

/* 按钮（保留品牌色的按钮不强行改，只处理默认/白底按钮） */
html.xw-dark body .btn-default,
html.xw-dark body .btn-white { background: #2a2b38 !important; color: #e0e0e8 !important; border-color: #383a4d !important; }
html.xw-dark body .btn-default:hover { background: #34364a !important; color: #fff !important; }

/* 侧栏 */
html.xw-dark body .sidebar,
html.xw-dark body .side-bar,
html.xw-dark body .left-sidebar,
html.xw-dark body .wonderful-sidebar { background: #181922 !important; }
html.xw-dark body .sidebar a, html.xw-dark body .side-bar a { color: #c8c8d4 !important; }

/* 页脚 */
html.xw-dark body footer,
html.xw-dark body .second-footer { background: #181922 !important; color: #8a8a99 !important; border-color: #2a2b36 !important; }

/* 模态框 */
html.xw-dark body .modal-content { background: #1c1d26 !important; color: #e0e0e8 !important; border-color: #2f3040 !important; }
html.xw-dark body .modal-header, html.xw-dark body .modal-footer { border-color: #2a2b36 !important; }
html.xw-dark body .close { color: #d8d8e2 !important; }

/* Tab / 分隔线 */
html.xw-dark body .nav-tabs, html.xw-dark body .nav-pills { border-color: #2a2b36 !important; }
html.xw-dark body .nav-tabs > li > a { color: #a8a8b6 !important; }
html.xw-dark body .nav-tabs > li.active > a { background: #232430 !important; color: #fff !important; border-color: #2a2b36 !important; }
html.xw-dark body hr { border-color: #2a2b36 !important; }

/* Skeleton / 分割 */
html.xw-dark body .divider { border-color: #2a2b36 !important; }

/* 全局页（服务中心/管理页）本身已适配深色，这里只兜底它们的浅色内联区 */
html.xw-dark body.xw-page-xw_ops .xw-ops-balance { background: #1c1d26 !important; }

/* 减少动态 */
@media (prefers-reduced-motion: reduce) { html.xw-dark body * { transition: none !important; } }

/* ---- 2026-11-30 补充：会员推荐 / 用户卡 / 内联白底兜底 ---- */
html.xw-dark body .pro-user-container,
html.xw-dark body .member_list,
html.xw-dark body .xw-member-cell,
html.xw-dark body .xw-member-grid,
html.xw-dark body .xw-member-hero,
html.xw-dark body .xw-member-note,
html.xw-dark body .xw-member-subtitle,
html.xw-dark body .suggested-users,
html.xw-dark body .people-you-may-know,
html.xw-dark body .user-card,
html.xw-dark body .top-card,
html.xw-dark body .promoted-user,
html.xw-dark body .affiliate,
html.xw-dark body .xw-hero-card,
html.xw-dark body .nearby-card { background: #1c1d26 !important; color: #e0e0e8 !important; border-color: #2a2b36 !important; }
html.xw-dark body .xw-member-subtitle,
html.xw-dark body .member_list a,
html.xw-dark body .pro-user-container a { color: #b8b8c6 !important; }
/* 内联 style="background:#fff" 的兜底（谨慎：只针对带 class 的通用容器） */
html.xw-dark body .panel, html.xw-dark body .card,
html.xw-dark body [class*="-container"], html.xw-dark body [class*="-box"] { background-color: #1c1d26 !important; }
/* 会员推荐标题白底条 */
html.xw-dark body .xw-member-hero,
html.xw-dark body [class*="member"] h4,
html.xw-dark body [class*="member"] h5 { color: #f0f0f5 !important; }
/* 首页信息流 Tab 栏（推荐/热门/最新/关注） */
html.xw-dark body .xw-feed-tabs { background: #1c1d26 !important; border-color: #2a2b36 !important; }
html.xw-dark body .xw-feed-tab { color: #9a9aa8 !important; }
html.xw-dark body .xw-feed-tab.active { color: #ff5b6e !important; background: transparent !important; }
