/* ============================================================
   custom-override.css —— 全局前端优化
   加载顺序在 index-*.css 之后；以下规则用于兜底与统一视觉。
   ============================================================ */

/* 1) 缩放 / 窄窗口兜底（浏览器缩放、分屏、TG 小窗、桌面浏览器） */
html, body { max-width: 100%; overflow-x: hidden; }
#app { min-width: 0 !important; max-width: 100% !important; }

/* 任何宽度都不再锁死 430px，避免窄窗口被裁切；宽屏时平滑放宽到 1024px */
#app {
  width: 100% !important;
  margin: 0 auto;
  transition: max-width .4s cubic-bezier(.22,.61,.36,1), box-shadow .4s ease;
}

/* 高度跟随“实际可见视口”，兼容桌面浏览器地址栏、TG 桌面端与内嵌窗口 */
#app, .app-container {
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
}

main { max-width: 100% !important; }
img, video, canvas { max-width: 100%; }

@media (min-width: 600px) {
  #app { max-width: min(1024px, 100vw) !important; }
}

/* 去掉“黑边”：页面级滚动条 + 手机壳黑色光晕 */
body { overflow: hidden !important; }
html::-webkit-scrollbar,
body::-webkit-scrollbar,
#app::-webkit-scrollbar,
#app::-webkit-scrollbar-track,
#app::-webkit-scrollbar-thumb { width: 0 !important; height: 0 !important; display: none !important; background: transparent !important; }
#app { box-shadow: none !important; }

/* 底部导航始终贴在可见视口底部，避免内嵌窗口里跑到内容中间 */
#bottom-menu.menu {
  position: fixed !important;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 1000 !important;
}

/* 2) 移除底部导航栏的“搜索”按钮与搜索条 */
#bottom-menu .menu__search,
#bottom-menu .menu__searching {
  display: none !important;
}

/* 底部菜单安全区：避开 iPhone 底部横条，避免贴边 */
#bottom-menu.menu {
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
}

/* 3) 全局交互手感 */
* { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid rgba(255, 215, 0, .75);
  outline-offset: 2px;
  border-radius: 6px;
}

button, a {
  transition: transform .15s ease, opacity .15s ease, box-shadow .2s ease, filter .2s ease;
}

/* 可点击卡片 / 列表项按压反馈 */
.game-card:active, .recent-game-card:active, .message-item:active,
.deposit-item:active, .withdraw-item:active, .subordinate-item:active,
.task-card:active, .wallet-card:active, .stat-card:active {
  transform: scale(.985);
}

/* 4) 分区标题统一金色点缀，视觉更整齐 */
.section-title {
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--Base-Accent, #f5f6f8);
}

/* 空状态 / 加载状态文字更柔和，留白更舒适 */
.empty-state, .empty-text, .loading-state, .deposit-empty, .withdraw-empty {
  color: var(--Neutral-Neutral_56, rgba(232, 231, 243, .56)) !important;
}
