/* ============================================================================
   Project: NOVA · PG 风格外壳改版 第 1 阶段（css/pg-shell.css）
   2026-11-14 开发者审核《pg_style_redesign_preview》后批准：
     1. 底部导航：探索厅 | 任务 | 🚀 发射台（中间凸起圆按钮）| 商城 | 仓库（只调顺序与样式，不删页面）
     2. 全局顶栏压成一行：头像 + NOVA + 圣殿图标 + 钱包 + 榜单 + 更多（星象/大字/画质收进「更多」）
     3. 探索厅大厅：2×2 大分类卡 + 分类胶囊 + 3 列方形游戏图标（隐藏长描述与“进入”按钮，点图标直接进）
   纯布局/外观改动：不改任何概率、结算、接口与退出流程。全部规则以 body.pg-shell 作用域隔离，
   移除 <body> 的 pg-shell 类即可整体回退。
   ============================================================================ */

/* ==================== 1. 底部导航：中间凸起发射台 ==================== */
body.pg-shell nav.app-nav {
  overflow: visible !important;
}
body.pg-shell nav.app-nav .app-nav-inner {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: end !important;
  overflow: visible !important;
}
body.pg-shell nav.app-nav .nav-item[data-view="arcade"] { order: 1; }
body.pg-shell nav.app-nav .nav-item[data-view="base"]   { order: 2; }
body.pg-shell nav.app-nav .nav-item[data-view="launch"] { order: 3; }
body.pg-shell nav.app-nav .nav-item[data-view="shop"]   { order: 4; }
body.pg-shell nav.app-nav .nav-item[data-view="hangar"] { order: 5; }
body.pg-shell nav.app-nav .nav-item[data-view="decode"] { order: 9; }

body.pg-shell nav.app-nav .nav-item {
  gap: 2px !important;
  padding: 3px 2px 2px !important;
  min-width: 0 !important;
}
body.pg-shell nav.app-nav .nav-item .nav-lbl {
  font-size: 11px !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 中间凸起圆按钮：🎲 随机开始（优先匹配仍有新手免费试玩次数的游戏） */
body.pg-shell nav.app-nav .nav-item[data-view="launch"] {
  overflow: visible !important;
  z-index: 2;
}
body.pg-shell nav.app-nav .nav-item[data-view="launch"] .nav-ico {
  position: relative !important;
  width: 52px !important;
  height: 52px !important;
  margin-top: -24px !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0) 38%),
    radial-gradient(circle at 50% 56%, #fbbf24 0%, #d97706 58%, #7c2d12 100%) !important;
  border: 3px solid #0b1120 !important;
  box-shadow:
    0 0 0 2px rgba(56, 232, 255, 0.88),
    0 6px 14px rgba(0, 0, 0, 0.62),
    0 0 16px rgba(251, 191, 36, 0.48) !important;
  color: #2b1400 !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
body.pg-shell nav.app-nav .nav-item[data-view="launch"] .nav-ico svg.pg-dice-svg {
  width: 27px !important;
  height: 27px !important;
  color: #2b1400 !important;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.45)) !important;
  transform: none !important;
}
body.pg-shell nav.app-nav .nav-item[data-view="launch"] .nav-ico img {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain;
}
body.pg-shell nav.app-nav .nav-item[data-view="launch"]:active .nav-ico {
  transform: scale(0.94);
}
body.pg-shell nav.app-nav .nav-item[data-view="launch"] .nav-lbl {
  color: #fde68a !important;
  font-weight: 900 !important;
}
.pg-random-gift-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  z-index: 3;
  padding: 1px 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  border: 1.5px solid #fef08a;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.pg-random-gift-badge[hidden] {
  display: none !important;
}

/* ==================== 2. 全局顶栏压成一行 ==================== */
/* 圣殿只留图标（红点保留），星象 / 大字 / 画质已由 js/pg-shell.js 移入「更多」 */
body.pg-shell header.topbar #novaRetTopLbl {
  display: none !important;
}
body.pg-shell header.topbar #novaRetTopBtn {
  padding: 0 !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  justify-content: center !important;
  border-radius: 50% !important;
}
body.pg-shell header.topbar #novaRetTopBtn img {
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
}

/* 「更多」里的界面设置区 */
.pg-more-quick .pg-more-title {
  font-size: 12px;
  font-weight: 800;
  color: #9fb1cc;
  margin-bottom: 8px;
}
.pg-more-quick .pg-more-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pg-more-quick .pg-more-row > button {
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* ==================== 3. 探索厅大厅（PG 风格） ==================== */
/* 大厅时去掉外框与标题区，背景改为平整深海军蓝 */
body.pg-shell #ahMainLobbyHeader {
  display: none !important;
}
body.pg-shell.pg-lobby-on #ahShellBox {
  border-color: transparent !important;
  box-shadow: none !important;
  background: transparent !important;
}
body.pg-shell.pg-lobby-on #ahShellBox > .ah-layer {
  padding-left: 2px !important;
  padding-right: 2px !important;
}
body.pg-shell #ahLobbyView {
  gap: 10px !important;
}

/* 2×2 大分类卡 */
#pgCatBanners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  flex-shrink: 0;
}
.pg-cat-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 74px;
  padding: 10px 46% 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(120, 160, 220, 0.22);
  background:
    radial-gradient(80% 120% at 100% 50%, rgba(56, 189, 248, 0.16), transparent 60%),
    linear-gradient(135deg, #1a2440 0%, #111a2e 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.pg-cat-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #ffd866, #f0a91c);
}
.pg-cat-banner:active {
  transform: scale(0.97);
}
.pg-cat-banner.active {
  border-color: rgba(246, 200, 95, 0.75);
  box-shadow: 0 0 0 1px rgba(246, 200, 95, 0.35), 0 4px 14px rgba(0, 0, 0, 0.4);
}
.pg-cat-banner b {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-cat-banner small {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8ea3c4;
  white-space: nowrap;
}
.pg-cat-banner img {
  position: absolute;
  right: -4px;
  top: 50%;
  width: 46%;
  height: 112%;
  object-fit: contain;
  transform: translateY(-50%);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}
.pg-cat-banner[data-pg-cat="flagship"],
.pg-cat-banner[data-pg-cat="dig"] {
  background:
    radial-gradient(80% 120% at 100% 50%, rgba(246, 200, 95, 0.22), transparent 60%),
    linear-gradient(135deg, #252236 0%, #13182a 100%);
}

/* 分类胶囊 */
body.pg-shell #ssLobbyCats {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto !important;
  scrollbar-width: none;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}
body.pg-shell #ssLobbyCats::-webkit-scrollbar { display: none; }
body.pg-shell #ssLobbyCats .ss-lobby-cat {
  flex: 0 0 auto !important;
  height: 32px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(120, 160, 220, 0.18) !important;
  background: #18223a !important;
  box-shadow: none !important;
  color: #9fb1cc !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}
body.pg-shell #ssLobbyCats .ss-lobby-cat.active {
  border-color: transparent !important;
  background: linear-gradient(180deg, #ffd866 0%, #f0a91c 100%) !important;
  color: #3a2200 !important;
  box-shadow: 0 2px 10px rgba(240, 169, 28, 0.35) !important;
}

/* 分区标题：一行小字，保留产出率公示 */
body.pg-shell #ahLobbyView .ah-lobby-sec-title {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin: 2px 2px 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #e6edf8 !important;
}
body.pg-shell #ahLobbyView .ah-lobby-sec-title > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.pg-shell #ahLobbyView .ah-lobby-sec-title .sub {
  flex-shrink: 0;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #7f93b3 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

/* 3 列方形游戏图标 */
body.pg-shell #ahLobbyView .ah-lobby-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px 8px !important;
  margin: 0 !important;
}
@media (min-width: 700px) {
  body.pg-shell #ahLobbyView .ah-lobby-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
  }
}
body.pg-shell #ahLobbyView .ah-game-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  transform: none;
  overflow: visible !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body.pg-shell #ahLobbyView .ah-game-card::before,
body.pg-shell #ahLobbyView .ah-game-card::after {
  display: none !important;
}
body.pg-shell #ahLobbyView .ah-game-card:active .ah-gc-icon {
  transform: scale(0.95);
}
body.pg-shell #ahLobbyView .ah-game-card .ah-gc-icon {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: 1 / 1;
  object-fit: contain !important;
  box-sizing: border-box !important;
  padding: 10% !important;
  margin: 0 !important;
  border-radius: 16px !important;
  border: 1px solid rgba(246, 200, 95, 0.22) !important;
  background:
    radial-gradient(70% 70% at 50% 40%, rgba(56, 189, 248, 0.18), transparent 70%),
    linear-gradient(160deg, #1d2945 0%, #121a2e 100%) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  filter: none !important;
  animation: none !important;
  transition: transform 0.15s ease;
}
body.pg-shell #ahLobbyView .ah-game-card .ah-gc-title {
  display: block !important;
  margin: 0 !important;
  padding: 0 2px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #e6edf8 !important;
  text-align: center !important;
  text-shadow: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}
/* 长描述与“进入”按钮去掉，点图标直接进入（点击事件仍绑定在整张卡片上） */
body.pg-shell #ahLobbyView .ah-game-card .ah-gc-sub,
body.pg-shell #ahLobbyView .ah-game-card .ah-gc-play {
  display: none !important;
}
/* 角标：图标右上角小签 */
body.pg-shell #ahLobbyView .ah-game-card .ah-gc-badge {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 2 !important;
  max-width: calc(100% - 8px) !important;
  margin: 0 !important;
  padding: 1px 5px !important;
  border-radius: 6px !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transform: none !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45) !important;
}

/* 奇点母岩（多人刮刮乐）卡片结构不同：sr-lobby-art + sr-lobby-copy，同样统一成方形图标 + 一行名字 */
body.pg-shell #ahLobbyView .ah-game-card.sr-lobby-card {
  text-align: center !important;
  color: inherit !important;
  font: inherit !important;
}
body.pg-shell #ahLobbyView .ah-game-card .sr-lobby-art {
  order: 0 !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: contain !important;
  box-sizing: border-box !important;
  padding: 10% !important;
  margin: 0 !important;
  border-radius: 16px !important;
  border: 1px solid rgba(246, 200, 95, 0.22) !important;
  background:
    radial-gradient(70% 70% at 50% 40%, rgba(56, 189, 248, 0.18), transparent 70%),
    linear-gradient(160deg, #1d2945 0%, #121a2e 100%) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.15s ease;
}
body.pg-shell #ahLobbyView .ah-game-card.sr-lobby-card:active .sr-lobby-art {
  transform: scale(0.95);
}
body.pg-shell #ahLobbyView .sr-lobby-copy > span,
body.pg-shell #ahLobbyView .sr-lobby-copy b {
  display: none !important;
}
body.pg-shell #ahLobbyView .sr-lobby-copy strong {
  order: 1 !important;
  display: block !important;
  padding: 0 2px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #e6edf8 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.pg-shell #ahLobbyView .sr-lobby-copy small {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  left: auto !important;
  z-index: 2 !important;
  max-width: calc(100% - 8px) !important;
  margin: 0 !important;
  padding: 1px 5px !important;
  border-radius: 6px !important;
  font-size: 9px !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* 分类筛选用内联 display:none 隐藏卡片 / 网格 / 标题，必须压过上面的 display !important */
body.pg-shell #ahLobbyView .ah-game-card[style*="display: none"],
body.pg-shell #ahLobbyView .ah-game-card[style*="display:none"],
body.pg-shell #ahLobbyView .ah-lobby-grid[style*="display: none"],
body.pg-shell #ahLobbyView .ah-lobby-grid[style*="display:none"],
body.pg-shell #ahLobbyView .ah-lobby-sec-title[style*="display: none"],
body.pg-shell #ahLobbyView .ah-lobby-sec-title[style*="display:none"] {
  display: none !important;
}

/* 探索厅卡片左下角「🎁 免费X局」动态角标 */
body.pg-shell #ahLobbyView .ah-game-card .pg-trial-pill {
  position: absolute !important;
  left: 4px !important;
  bottom: 24px !important;
  z-index: 3 !important;
  max-width: calc(100% - 8px) !important;
  padding: 1px 5px !important;
  border-radius: 6px !important;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.95), rgba(4, 120, 87, 0.96)) !important;
  border: 1px solid rgba(167, 243, 208, 0.72) !important;
  color: #ecfdf5 !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  pointer-events: none !important;
}
body.pg-shell #ahLobbyView .ah-game-card .pg-trial-pill[hidden] {
  display: none !important;
}

/* ==================== 4. 全屏《苍穹发射台》&《古陆挖宝》无框轻透顶栏 (#novaLaunchFsBar) ==================== */
.nova-launch-fs-bar {
  position: relative;
  z-index: 25;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 30px;
  padding: 2px 3px;
  border: none;
  background: linear-gradient(180deg, rgba(6, 10, 22, 0.68) 0%, rgba(6, 10, 22, 0) 100%);
}
.nova-launch-fs-bar[hidden] {
  display: none !important;
}
.nova-launch-fs-bar .nova-fs-left {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.nova-launch-fs-bar .nova-fs-back-btn {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(246, 200, 95, 0.42);
  background: rgba(11, 17, 32, 0.82);
  color: #fde68a;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s ease;
}
.nova-launch-fs-bar .nova-fs-back-btn:active {
  transform: scale(0.96);
}
.nova-launch-fs-bar .nova-fs-back-tip {
  position: absolute;
  left: 34px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(12, 19, 36, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.68);
  color: #fef08a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.58);
  cursor: pointer;
}
.nova-launch-fs-bar .nova-fs-back-tip[hidden] {
  display: none !important;
}
.nova-launch-fs-bar .nova-fs-title {
  font-size: 13px;
  font-weight: 900;
  color: #f8fafc;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nova-launch-fs-bar .nova-fs-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
/* 无框轻透余额显示（遵循铁律22：不可点击纯读数严禁乱套方框/胶囊框，改用柔化暗影衬底） */
.nova-launch-fs-bar .nova-fs-wallet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
  border: none;
  background: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.92);
}
.nova-launch-fs-bar .nova-fs-wallet .nova-coin-icon {
  width: 15px !important;
  height: 15px !important;
  flex: 0 0 15px;
  object-fit: contain;
}
.nova-launch-fs-bar .nova-fs-wallet b {
  font-size: 12.5px;
  font-weight: 900;
  color: #fde68a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nova-launch-fs-bar .nova-fs-plus-btn {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(254, 240, 138, 0.65);
  background: linear-gradient(180deg, #ffd866 0%, #d97706 100%);
  color: #2b1400;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nova-launch-fs-bar .nova-fs-ico-btn {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(11, 17, 32, 0.78);
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.14s ease;
}
.nova-launch-fs-bar .nova-fs-ico-btn[hidden] {
  display: none !important;
}
.nova-launch-fs-bar .nova-fs-ico-btn:active {
  transform: scale(0.96);
}
.nova-launch-fs-bar.is-running .nova-fs-ico-btn {
  opacity: 0.56;
}
.nova-launch-fs-bar.is-running .nova-fs-ico-btn:hover,
.nova-launch-fs-bar.is-running .nova-fs-ico-btn:focus-visible {
  opacity: 1;
}
body[data-nova-skin="qianli"] .nova-launch-fs-bar {
  background: linear-gradient(180deg, rgba(12, 46, 40, 0.76) 0%, rgba(12, 46, 40, 0) 100%);
}

