/**
 * HGMS：深色模式可读性修正（FiMobile .dark-mode 下 --fimobile-page-text 仍为 #000、
 * Bootstrap .text-muted / .text-dark 等与深色页面对比不足时的覆盖）。
 * 需在 style.css 之后加载。
 */

html.dark-mode {
  --fimobile-page-text: rgba(255, 255, 255, 0.92);
}

html.dark-mode .text-muted {
  color: rgba(255, 255, 255, 0.62) !important;
  opacity: 1;
}

html.dark-mode .text-dark,
html.dark-mode .text-body {
  color: rgba(255, 255, 255, 0.92) !important;
}

html.dark-mode .text-black-50 {
  color: rgba(255, 255, 255, 0.45) !important;
}

html.dark-mode a.card,
html.dark-mode a.card:hover,
html.dark-mode a.card:focus {
  color: var(--fimobile-card-text, #fff) !important;
}

html.dark-mode .badge.bg-light.text-dark {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #f8fafc !important;
}

html.dark-mode .table {
  --bs-table-color: rgba(255, 255, 255, 0.92);
  --bs-table-striped-color: rgba(255, 255, 255, 0.92);
  color: var(--bs-table-color);
}

html.dark-mode .table > :not(caption) > * > * {
  border-color: rgba(255, 255, 255, 0.12);
}

html.dark-mode .table thead th {
  color: rgba(255, 255, 255, 0.88);
}

html.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: rgba(255, 255, 255, 0.05);
  color: var(--bs-table-striped-color);
}

html.dark-mode .alert,
html.dark-mode .alert .alert-link {
  color: rgba(255, 255, 255, 0.96) !important;
}

html.dark-mode .alert a:not(.btn) {
  color: #dbeafe !important;
}

html.dark-mode .list-group-item small,
html.dark-mode .list-group-item .small {
  color: rgba(255, 255, 255, 0.72) !important;
}

html.dark-mode .dark-bg label {
  color: rgba(255, 255, 255, 0.85) !important;
}

html.dark-mode .form-control-label {
  color: rgba(255, 255, 255, 0.78) !important;
}

/* 登录页底部语言折叠（lang_switch.php 内联浅色底） */
html.dark-mode .myhgm-lang-accordion > summary {
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

html.dark-mode .myhgm-lang-panel {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

html.dark-mode .myhgm-lang-panel a {
  color: #e2e8f0;
}

html.dark-mode .myhgm-lang-panel a:hover {
  background: rgba(59, 130, 246, 0.2);
}

html.dark-mode .myhgm-lang-panel a.active {
  background: rgba(59, 130, 246, 0.35);
}

/* 底部中间快捷：充值 / 提现 / 兑换（FiMobile centerbutton） */
.footer .nav .nav-item.centerbutton .nav-link .nav-menu-popover.myhgm-footer-quick {
  justify-content: space-around;
  gap: 0.35rem;
}

.footer .nav .nav-item.centerbutton .nav-menu-popover.myhgm-footer-quick .btn-icon-text {
  flex: 1 1 0;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.footer .nav .nav-item.centerbutton .nav-menu-popover.myhgm-footer-quick .btn-icon-text:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

html.dark-mode .footer .nav .nav-item.centerbutton .nav-link.active {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
