/* ============================================================
   现代深色科技感后台 + iOS 26 毛玻璃
   配色：蓝白渐变 (#3b82f6 → #60a5fa) + 深色侧边栏
   纯类名选择器，不受 Vue scope 影响
   ============================================================ */

/* ============================================================
   1. 全局 — 冷灰背景 + 蓝色微光纹理
   ============================================================ */
.page-wrapper {
  background: #f0f2f7 !important;
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 25%, rgba(59, 130, 246, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 50% 45% at 80% 75%, rgba(96, 165, 250, 0.03) 0%, transparent 70%) !important;
}

.main-content {
  background: transparent !important;
}

.main-content.chat-content {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  padding-bottom: 96px !important;
}

.content {
  padding: 20px 18px !important;
}

/* ============================================================
   2. 桌面侧边栏 — 深色毛玻璃 + 图标发光
   ============================================================ */
.desktop-sidebar-nav {
  width: 72px !important;
  min-width: 72px !important;
  background: rgba(22, 25, 36, 0.88) !important;
  backdrop-filter: blur(32px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(180%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow:
    2px 0 24px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset !important;
  border-radius: 0 18px 18px 0 !important;
  padding: 16px 0 !important;
  gap: 6px !important;
  z-index: 20 !important;
}

/* 导航图标项 */
.nav-icon-item {
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px !important;
  color: rgba(255, 255, 255, 0.45) !important;
  transition: all 0.32s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.nav-icon-item:hover {
  color: rgba(255, 255, 255, 0.72) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  transform: scale(1.06) !important;
}

/* 选中态 — 蓝白发光胶囊 */
.nav-icon-item.active {
  color: #60a5fa !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.12)) !important;
  box-shadow:
    0 0 12px rgba(59, 130, 246, 0.25),
    0 0 0 1px rgba(96, 165, 250, 0.2) inset !important;
}

/* 退出 — 红色悬停 */
.nav-icon-item.logout-nav {
  color: rgba(255, 255, 255, 0.3) !important;
}

.nav-icon-item.logout-nav:hover {
  color: #ff6b6b !important;
  background: rgba(255, 59, 48, 0.12) !important;
}

/* 标签 */
.nav-label {
  font-size: 9px !important;
  font-weight: 500 !important;
  color: inherit !important;
  letter-spacing: 0.01em !important;
  opacity: 0.65 !important;
}

.nav-icon-item.active .nav-label {
  opacity: 1 !important;
}

/* 分隔线 */
.nav-spacer {
  flex: 1 !important;
}

/* ============================================================
   3. 桌面主页面板 — 毛玻璃
   ============================================================ */
.desktop-home-panel {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-right: 0.5px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.04) !important;
}

.desktop-home-header {
  background: transparent !important;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.05) !important;
  color: #1d1d1f !important;
  font-weight: 720 !important;
  font-size: 22px !important;
  letter-spacing: -0.02em !important;
  padding: 18px 20px !important;
}

.desktop-home-scroll {
  padding: 16px !important;
}

/* 第二面板 & 聊天区 */
.desktop-panel-second {
  background: rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(14px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%) !important;
}

.desktop-chat-full {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
}

.desktop-panel-chat-placeholder {
  background: rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(14px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%) !important;
}

/* ============================================================
   4. 卡片系统 — 毛玻璃拟态
   ============================================================ */
.info-card {
  background: rgba(255, 255, 255, 0.68) !important;
  backdrop-filter: blur(22px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
  border-radius: 22px !important;
  border: 0.5px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.03),
    0 2px 8px rgba(0, 0, 0, 0.03),
    0 8px 28px rgba(0, 0, 0, 0.05) !important;
  overflow: hidden !important;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease !important;
}

.info-card:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.04),
    0 6px 16px rgba(0, 0, 0, 0.04),
    0 14px 40px rgba(0, 0, 0, 0.07) !important;
}

.info-row {
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.04) !important;
  padding: 15px 18px !important;
}

.info-row:last-child {
  border-bottom: none !important;
}

.info-label {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #8e8e93 !important;
  width: 48px !important;
  letter-spacing: -0.01em !important;
}

.info-value {
  font-size: 15px !important;
  font-weight: 590 !important;
  color: #1d1d1f !important;
  letter-spacing: -0.01em !important;
}

/* 公告卡片 */
.tg-notice {
  background: rgba(255, 255, 255, 0.62) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-radius: 22px !important;
  border: 0.5px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.03),
    0 2px 8px rgba(0, 0, 0, 0.03),
    0 8px 28px rgba(0, 0, 0, 0.05) !important;
  padding: 18px !important;
}

.tg-title {
  font-size: 16px !important;
  font-weight: 650 !important;
  color: #e5a010 !important;
  letter-spacing: -0.01em !important;
}

.tg-desc {
  font-size: 13px !important;
  color: #8e8e93 !important;
  line-height: 1.6 !important;
}

/* ============================================================
   5. 功能入口网格 — 毛玻璃 + 悬浮动效
   ============================================================ */
.feature-grid {
  gap: 14px !important;
}

.feature-item {
  width: calc(50% - 7px) !important;
  height: 82px !important;
  background: rgba(255, 255, 255, 0.68) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-radius: 22px !important;
  border: 0.5px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.03),
    0 2px 8px rgba(0, 0, 0, 0.03),
    0 6px 20px rgba(0, 0, 0, 0.05) !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              background 0.3s ease !important;
  cursor: pointer !important;
}

.feature-item:hover {
  transform: translateY(-4px) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow:
    0 0 0 0.5px rgba(59, 130, 246, 0.08),
    0 8px 24px rgba(59, 130, 246, 0.08),
    0 20px 52px rgba(0, 0, 0, 0.08) !important;
}

.feature-item:active {
  transform: scale(0.95) !important;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1) !important;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.02),
    0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

/* 图标容器 — 蓝白柔光底色 */
.feature-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(96, 165, 250, 0.05)) !important;
  margin-right: 14px !important;
  transition: background 0.35s ease,
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease !important;
}

.feature-item:hover .feature-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.1)) !important;
  transform: scale(1.08) !important;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.12) !important;
}

.feature-text {
  font-size: 15px !important;
  font-weight: 590 !important;
  letter-spacing: -0.01em !important;
  color: #1d1d1f !important;
}

/* 退出入口 — 红色调 */
.feature-item.logout-item .feature-icon {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.07), rgba(255, 107, 107, 0.04)) !important;
}

.feature-item.logout-item:hover .feature-icon {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.14), rgba(255, 107, 107, 0.1)) !important;
  box-shadow: 0 0 16px rgba(255, 59, 48, 0.1) !important;
}

.disabled-feature {
  opacity: 0.4 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* ============================================================
   6. 移动端底部导航 — iOS 26 悬浮毛玻璃胶囊
   ============================================================ */
.custom-tabbar {
  bottom: 16px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  min-width: 200px !important;

  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;

  border-radius: 30px !important;
  padding: 6px 10px !important;
  height: auto !important;

  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.7) inset,
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 12px 40px rgba(0, 0, 0, 0.08),
    0 24px 72px rgba(0, 0, 0, 0.04) !important;

  display: flex !important;
  justify-content: center !important;
  gap: 4px !important;
  z-index: 10 !important;
}

.custom-tabbar .tab-item {
  flex: 0 0 auto !important;
  padding: 10px 20px !important;
  margin: 0 !important;
  border-radius: 24px !important;
  flex-direction: row !important;
  gap: 8px !important;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.custom-tabbar .tab-item.active {
  background: rgba(59, 130, 246, 0.12) !important;
  box-shadow: 0 0 0 0.5px rgba(59, 130, 246, 0.18) !important;
}

.custom-tabbar .tab-item:active {
  transform: scale(0.93) !important;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.custom-tabbar .tab-text {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #8e8e93 !important;
  margin-top: 0 !important;
  letter-spacing: -0.01em !important;
  transition: color 0.3s ease, font-weight 0.3s ease !important;
}

.custom-tabbar .tab-item.active .tab-text {
  color: #3b82f6 !important;
  font-weight: 600 !important;
}

.custom-tabbar .tab-item svg {
  width: 22px !important;
  height: 22px !important;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.custom-tabbar .tab-item.active svg {
  transform: scale(1.1) !important;
}

.custom-tabbar .tab-item.disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* 对话窗口出现时隐藏 TabBar */
.page-wrapper:has(.messages-container) .custom-tabbar {
  display: none !important;
}

/* 所有弹窗/覆盖层撑满全屏，覆盖 TabBar */
.anti-red-popup-overlay,
.anti-red-popup.custom-popup,
.anti-red-popup.purchase-popup,
.modal-overlay,
.chat-settings-overlay,
.popup-overlay,
.order-popup-overlay,
.order-selector-overlay,
.dialog-overlay,
.hb-overlay,
.announcement-overlay,
.mobile-overlay,
.claims-overlay,
.x--popup,
.pop-pay,
.pop-pay .x--popup {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  min-height: 100vh !important;
  max-height: 100vh !important;
  z-index: 500 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* ============================================================
   7. 登录页 — 保持之前的 iOS 26 毛玻璃风格
   ============================================================ */
.login-container {
  background: #f0f2f5 !important;
  background-image:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(96, 165, 250, 0.03) 0%, transparent 70%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding-top: 22vh !important;
}

.login-title {
  font-size: 32px !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: #1d1d1f !important;
}

/* 输入框毛玻璃 */
.input-group input {
  width: 100% !important;
  height: 54px !important;
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 0.5px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 16px !important;
  padding: 0 18px !important;
  font-size: 16px !important;
  color: #1d1d1f !important;
  outline: none !important;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.02),
    0 2px 10px rgba(0, 0, 0, 0.04) !important;
  box-sizing: border-box !important;
  transition: all 0.3s ease !important;
}

.input-group input:focus {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.08),
    0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

.input-label {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #8e8e93 !important;
  margin-bottom: 8px !important;
  letter-spacing: -0.01em !important;
  display: block !important;
}

/* 登录按钮 — 蓝白渐变 */
.login-btn {
  width: 100% !important;
  height: 54px !important;
  background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
  border: none !important;
  border-radius: 16px !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  cursor: pointer !important;
  box-shadow:
    0 4px 16px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset !important;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.login-btn:hover {
  box-shadow:
    0 8px 24px rgba(59, 130, 246, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
  transform: translateY(-2px) !important;
}

.login-btn:active {
  transform: scale(0.96) !important;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1) !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25) !important;
}

/* ============================================================
   8. 页面标题
   ============================================================ */
.page-title {
  font-size: 30px !important;
  font-weight: 750 !important;
  letter-spacing: -0.03em !important;
  color: #1d1d1f !important;
}

/* ============================================================
   9. 徽章 + 标签
   ============================================================ */
.admin-badge {
  color: #8b5e00 !important;
  background: linear-gradient(135deg, #fef3d6, #fde8b0) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-radius: 14px !important;
  padding: 3px 12px !important;
  font-weight: 600 !important;
}

.guest-badge {
  color: #5c5c63 !important;
  background: linear-gradient(135deg, #f2f2f4, #e8e8eb) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-radius: 14px !important;
  padding: 3px 12px !important;
  font-weight: 590 !important;
}

.expire-normal,
.expire-warning,
.expire-critical,
.expire-expired {
  border-radius: 8px !important;
  font-weight: 500 !important;
  padding: 3px 10px !important;
}

.refresh-hint {
  color: #3b82f6 !important;
  font-weight: 500 !important;
}

.arrow {
  font-size: 18px !important;
  color: #c7c7cc !important;
  font-weight: 300 !important;
}

/* ============================================================
   10. Toast — 毛玻璃
   ============================================================ */
.new-user-toast {
  background: rgba(76, 175, 80, 0.85) !important;
  backdrop-filter: blur(22px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
  border-radius: 18px !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.14),
    0 0 0 0.5px rgba(255, 255, 255, 0.2) inset !important;
}

.toast-icon {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.toast-close {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
}

/* ============================================================
   11. 覆盖页 — 毛玻璃
   ============================================================ */
.share-page-overlay {
  background: rgba(240, 242, 247, 0.94) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
}

/* ============================================================
   12. 滚动条
   ============================================================ */
.desktop-home-scroll::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
  width: 4px !important;
}

.desktop-home-scroll::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12) !important;
  border-radius: 2px !important;
}

.desktop-home-scroll::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
  background: transparent !important;
}

/* ============================================================
   13. 动画
   ============================================================ */
.fade-down-enter-active,
.fade-down-leave-active {
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* ============================================================
   14. 字体平滑
   ============================================================ */
* {
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* ============================================================
   15. 键盘弹出隐藏 TabBar
   ============================================================ */
@media (max-height: 500px) {
  .custom-tabbar {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(30px) !important;
    transition: all 0.3s ease !important;
  }
}

/* ============================================================
   16. 内容区底部留白 — 为悬浮 TabBar 腾空间
   ============================================================ */
.main-content:not(.chat-content) {
  padding-bottom: 96px !important;
}
