/* games.css — 小游戏四页（/games/*）共用样式
   依赖 styles.css 的主题变量（--primary-color / --bg-color / --text-color / --shadow-color），
   深色模式自动跟随 body.dark。games.css 独立于 gallery.css：瀑布流样式与游戏无关，不引。 */

/* ===== 页头（覆盖 styles.css 的 position:fixed，游戏页改粘性；
     2026-09-22 全站统一白底毛玻璃 + 细底边框，与首页/档案馆等顶栏同款） ===== */
.game-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  color: var(--text-color);
  border-bottom: 1px solid rgba(77, 107, 254, 0.14);
  box-shadow: 0 1px 12px rgba(23, 35, 80, 0.06);
  box-sizing: border-box;
}

body.dark .game-header {
  background: rgba(28, 30, 38, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

.gh-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.gh-back {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(77, 107, 254, 0.1);
  transition: background 0.18s ease;
}

.gh-back:hover {
  background: rgba(77, 107, 254, 0.2);
}

body.dark .gh-back {
  background: rgba(93, 121, 255, 0.2);
}

body.dark .gh-back:hover {
  background: rgba(93, 121, 255, 0.32);
}

.gh-brand {
  color: var(--text-color);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

/* 面包屑分隔（梗鲸 / 页名，2026-09-22） */
.gh-sep {
  opacity: 0.3;
  font-size: 13px;
}

.gh-title {
  font-size: 14px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gh-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-header button {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  padding: 4px;
  border-radius: 6px;
}

.game-header button:hover {
  background: rgba(77, 107, 254, 0.12);
}

body.dark .game-header button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.game-header button img {
  width: 24px;
  height: 24px;
  display: block;
  filter: invert(1); /* 白色 SVG 在白底顶栏反成深色；深色顶栏还原 */
  opacity: 0.75;
}

body.dark .game-header button img {
  filter: none;
  opacity: 0.9;
}

/* 页头静音开关（SVG 图标，同主题切换的反色待遇；默认静音见 game-common soundEnabled） */

/* 语言切换：游戏页单 URL，切换即重载，select 比菜单轻量 */
.gh-lang {
  background: rgba(77, 107, 254, 0.1);
  color: var(--text-color);
  border: none;
  border-radius: 6px;
  padding: 5px 6px;
  font-size: 13px;
  cursor: pointer;
}

body.dark .gh-lang {
  background: rgba(255, 255, 255, 0.1);
}

.gh-lang option {
  color: #1e232c;
  background: #fff;
}

/* ===== 主体布局 ===== */
.game-main {
  width: 100%;
  max-width: 700px; /* 容纳放大后的棋盘（.g-board 620px + 左右内边距） */
  margin: 0 auto;
  padding: 18px 14px 40px;
  box-sizing: border-box;
}

.game-main h1,
.game-main h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.game-desc {
  margin: 0 0 14px;
  font-size: 14px;
  opacity: 0.75;
  line-height: 1.5;
}

/* ===== HUD 与工具条 ===== */
.game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.hud-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 16px;
  background: rgba(77, 107, 254, 0.08);
  font-size: 13px;
}

.hud-chip b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.hud-chip.warn b {
  color: #e5484d;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.g-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  /* Q 弹（2026-09-22）：overshoot 回弹曲线，游戏按钮本就该弹 */
  transition: background 0.2s, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.g-btn:hover:not(:disabled) {
  background: var(--primary-color-dark);
}

.g-btn:active:not(:disabled) {
  transform: scale(0.92);
  transition-duration: 0.08s;
}

.g-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.g-btn.ghost {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.g-btn.ghost:hover:not(:disabled) {
  background: rgba(77, 107, 254, 0.1);
}

.g-select {
  padding: 7px 10px;
  border-radius: 14px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  cursor: pointer;
}

/* ===== 棋盘通用 ===== */
.g-board-wrap {
  position: relative;
  margin: 0 auto;
}

/* styles.css 的 main{display:flex;align-items:center} 是全局规则，游戏页 main 里的 flex 子项
   会 shrink-to-fit：内部 width:100% 与容器宽度互相循环依赖，无内容固有宽度的棋盘直接塌成 0。
   给这些直接子元素钉满容器宽，百分比有了确定基准，循环即断（2026-11-14 大瘦身删掉一批
   旧游戏选择器后仅剩 mergefish 的 g-board-wrap 与 beads 工具条两组） */
.game-main > .g-board-wrap,
.game-main > .beads-tools,
.game-main > .beads-colors {
  width: 100%;
}

.g-board {
  display: grid;
  gap: 4px;
  width: 100%;
  /* 牌面可读性：520 → 620（8 列格 61px → 74px），用户反馈过小图伤眼 */
  max-width: min(94vw, 620px);
  margin: 0 auto;
  position: relative; /* 得分气泡 / 连击横幅 / 连线层的定位基准 */
}

.g-tile {
  position: relative;
  border: none;
  padding: 0;
  background: rgba(128, 128, 128, 0.12);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: transform 0.12s, box-shadow 0.12s;
}

.g-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* 点击始终落在 tile 上，不与图片交互 */
}

.g-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px var(--shadow-color);
}

.g-tile.selected {
  outline: 3px solid var(--primary-color);
  outline-offset: -3px;
  transform: scale(0.94);
}

.g-tile.hint-pulse {
  animation: gHintPulse 0.6s ease-in-out 3;
}

@keyframes gHintPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(77, 107, 254, 0); }
  50% { box-shadow: 0 0 0 4px rgba(77, 107, 254, 0.85); }
}

.g-tile.empty {
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.g-tile.removing {
  animation: gTileOut 0.32s ease-in forwards;
  pointer-events: none;
}

@keyframes gTileOut {
  40% { transform: scale(1.12); }
  100% { transform: scale(0); opacity: 0; }
}

/* ===== 结算浮层（game-common 动态生成 #gj-overlay） ===== */
.g-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 20px;
}

.g-overlay.visible {
  display: flex;
}

.g-box {
  background: var(--bg-color);
  color: var(--text-color);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  padding: 26px 28px;
  max-width: 340px;
  max-height: min(86dvh, 640px);
  overflow-y: auto;
  width: 100%;
  text-align: center;
  animation: gBoxIn 0.25s ease-out;
}

@keyframes gBoxIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.g-box h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.g-box h3.win {
  color: #2ea043;
}

.g-box h3.lose {
  color: #e5484d;
}

.g-box .g-lines {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.9;
}

.g-box .g-lines .record {
  color: #e5484d;
  font-weight: 700;
}

.g-box .g-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 加载态 / 出错态 ===== */
.g-state {
  text-align: center;
  padding: 48px 0;
  color: var(--text-color);
  font-size: 15px;
}

.g-state::before {
  content: "";
  display: block;
  margin: 0 auto 14px;
  border: 4px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite; /* spin 关键帧来自 styles.css */
}

.g-state.error::before {
  display: none;
}

.g-state .g-retry-link {
  color: var(--primary-color);
  cursor: pointer;
  text-decoration: underline;
}

/* ===== Toast ===== */
.g-toast {
  position: fixed;
  left: 50%;
  bottom: 10vh;
  transform: translateX(-50%);
  z-index: 2000;
  max-width: 86vw;
  padding: 10px 20px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 14px;
  text-align: center;
  animation: gToastIn 0.25s ease-out;
}

@keyframes gToastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== 合集页（/games） ===== */
/* 2026-09-22 拉宽：1280 容器 + auto-fill ≥248px，宽屏 4 列 / 平板 3 列 / 手机 1 列 */
.games-hub .game-main {
  max-width: 1280px;
}

/* ---- 精选主打卡（2026-11-03）：DaFeiYu 两款大卡置顶，视觉权重高于下方常规网格 ---- */
.hub-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin: 0 0 4px;
  width: 100%; /* 同 .hub-cards：钉满宽防 shrink-to-fit */
  box-sizing: border-box;
}

.hub-all-title {
  margin: 20px 0 12px;
  font-size: 15px;
  opacity: 0.62;
  width: 100%;
}

/* 合作游戏厅网格（2026-11-14）：区块标题与说明行已撤，只靠上间距与自家游戏分开 */
.hub-ext-grid {
  margin-top: 16px;
}

.feat-card {
  display: flex; /* 左形象区 + 右文案区 */
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-color);
  border: 1px solid rgba(30, 42, 80, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 3px 16px rgba(23, 35, 80, 0.1);
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.15s, box-shadow 0.15s;
}

.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 28px rgba(23, 35, 80, 0.18);
}

body.dark .feat-card {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 3px 16px rgba(0, 0, 0, 0.45);
}

/* 左侧进化链形象：三张牌面尺寸递增（豆包小 → 中阶 → DeepSeek 大），透明底用品牌色衬底 */
.feat-art {
  flex: 0 0 178px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 16px 10px;
  background: linear-gradient(160deg, rgba(77, 107, 254, 0.13), rgba(77, 107, 254, 0.26));
}

.feat-art img {
  object-fit: contain;
  display: block;
}

.feat-art img:nth-child(1) { width: 44px; }
.feat-art img:nth-child(2) { width: 58px; }
.feat-art img:nth-child(3) { width: 78px; }

.feat-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px 16px;
}

.feat-body h2 {
  margin: 0;
  font-size: 19px;
}

.feat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.feat-tag {
  font-weight: 600;
}

.feat-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.62;
  opacity: 0.82;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feat-body .g-btn {
  margin-top: auto;
}

@media (max-width: 640px) {
  .feat-card { flex-direction: column; }
  .feat-art { flex: none; height: 100px; padding: 10px; }
  .feat-art img:nth-child(1) { width: 52px; }
  .feat-art img:nth-child(2) { width: 68px; }
  .feat-art img:nth-child(3) { width: 88px; }
}

.hub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;
  width: 100%; /* styles.css 的 main{align-items:center} 会让子块 shrink-to-fit，auto-fill 必须铺满容器才按容器宽算列数 */
  box-sizing: border-box;
}

/* 副标题下的工具条：静音提示 + 换一批 */
.hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 18px;
  width: 100%;
  box-sizing: border-box;
}

.hub-hint {
  font-size: 12.5px;
  opacity: 0.6;
}

#hub-shuffle {
  padding: 7px 14px;
  font-size: 13px;
}

/* 老板键按钮（公文包图标，样式沿用主题/音量图标的反色待遇） */
#gj-boss img {
  width: 20px;
  height: 20px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-color);
  /* 2026-09-22 实体感：顶部内高光 + 极淡描边 */
  border: 1px solid rgba(30, 42, 80, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 12px rgba(23, 35, 80, 0.08);
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.15s, box-shadow 0.15s;
}

body.dark .hub-card {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 24px rgba(23, 35, 80, 0.16);
}

.hub-card .hc-thumbs {
  display: flex;
  height: 88px;
  background: rgba(77, 107, 254, 0.1);
}

.hub-card .hc-thumbs span {
  flex: 1;
  overflow: hidden;
}

.hub-card .hc-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

/* 悬停轻微放大 = 整卡「游乐园橱窗」感（整卡本就是 <a>，全卡可点） */
.hub-card:hover .hc-thumbs img {
  transform: scale(1.06);
}

.hub-card .hc-body {
  padding: 11px 13px 13px;
}

.hub-card h2,
.hub-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

/* 徽章 + 历史最佳一行：帮选择、给重玩动力 */
.hub-card .hc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
  margin: 0 0 6px;
}

.hc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.hc-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(77, 107, 254, 0.08);
  color: var(--primary-color);
  white-space: nowrap;
}

body.dark .hc-tag {
  background: rgba(93, 121, 255, 0.16);
}

.hc-best {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hub-card p {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.75;
}

.hub-card .g-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 14px;
  padding: 5px 14px;
  font-size: 12.5px;
}

.hub-card .g-btn b {
  font-weight: 700;
}

.hub-footer-link {
  text-align: center;
  margin-top: 26px;
}

.hub-footer-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
}

/* ===== 老板键伪装屏（乐园页彩蛋：Esc / 点按钮进入，Esc / 点屏幕退出） ===== */
#boss-screen {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: #0f6cbd; /* Windows 更新蓝 */
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

#boss-screen[hidden] {
  display: none;
}

#boss-screen h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

#boss-screen p {
  margin: 0;
  font-size: 15px;
  opacity: 0.9;
}

.bs-dots {
  position: relative;
  width: 60px;
  height: 60px;
}

.bs-dots i {
  position: absolute;
  inset: 0;
  animation: bsSpin 1.8s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

.bs-dots i::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #fff;
}

.bs-dots i:nth-child(2) { animation-delay: 0.15s; }
.bs-dots i:nth-child(3) { animation-delay: 0.3s; }
.bs-dots i:nth-child(4) { animation-delay: 0.45s; }
.bs-dots i:nth-child(5) { animation-delay: 0.6s; }
.bs-dots i:nth-child(6) { animation-delay: 0.75s; }

@keyframes bsSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bs-dots i { animation: none; }
}

/* ===== 游戏页页脚（轻量文字版，不用首页的色带页脚） ===== */

.game-footer {
  width: 100%; /* body 是 align-items:center 的 flex 列，不铺满会缩成内容宽 */
  margin-top: auto; /* 内容不足一屏时贴底，避免页脚下方留大白 */
  padding: 14px 10px 20px;
  text-align: center;
  font-size: 12px;
  opacity: 0.65;
  box-sizing: border-box;
}

.game-footer a {
  color: var(--text-color);
}

body.dark .game-footer a {
  color: #8fa6ff;
}

/* ===== 深色模式补丁（大部分由变量自动覆盖，这里处理写死的浅色） ===== */
body.dark .hud-chip {
  background: rgba(255, 255, 255, 0.08);
}

body.dark .g-select {
  background: #2d2d2d;
}

@media (max-width: 480px) {
  .game-main {
    padding: 14px 10px 32px;
  }

  .g-board {
    gap: 3px;
  }

  .hud-chip {
    padding: 4px 10px;
    font-size: 12px;
  }
}

/* ===== 拼豆图纸（/games/beads） ===== */
/* 高级参数折叠面板（预设/采样/配色/抖动/用色数）——配色对齐 .g-select */
.beads-adv {
  margin: -4px 0 14px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 14px;
  background: var(--bg-color);
  overflow: hidden;
}
.beads-adv summary {
  cursor: pointer;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
  opacity: 0.75;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.beads-adv summary::-webkit-details-marker { display: none; }
.beads-adv summary::before {
  content: "▸";
  font-size: 11px;
  transition: transform 0.15s ease;
}
.beads-adv[open] summary::before { transform: rotate(90deg); }
.beads-adv-row {
  padding: 4px 14px 12px;
  margin-bottom: 0;
}

.beads-canvas {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow-color);
  /* 竖向手势留给页面滚动（移动端画布很高），点按/横向拖动改色 */
  touch-action: pan-y;
  cursor: crosshair;
}

.beads-tools {
  display: flex;
  gap: 8px;
  margin: 14px 0 4px;
  align-items: flex-start;
}

.bt-eraser {
  flex: none;
  padding: 0 12px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(128, 128, 128, 0.4);
  background: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  font-size: 13px;
}

.bt-eraser.sel,
.bt-swatch.sel {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
}

.bt-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  padding: 2px;
  flex: 1;
  min-width: 0;
}

.bt-swatch {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  cursor: pointer;
  padding: 0;
}

.bt-swatch:hover {
  transform: scale(1.12);
}

.beads-tip {
  font-size: 12px;
  opacity: 0.7;
  margin: 2px 0 10px;
}

.beads-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  max-height: 118px;
  overflow-y: auto;
}

.bc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 2px 8px 2px 3px;
  border-radius: 20px;
  background: rgba(128, 128, 128, 0.1);
}

.bc-chip i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.bc-chip b {
  font-weight: 600;
  opacity: 0.8;
}

body.dark .bc-chip {
  background: rgba(255, 255, 255, 0.08);
}

body.dark .bt-eraser {
  background: #2d2d2d;
}

/* ===== 桌宠（/games/pet）===== */
/* 宠物本体渲染样式（#pet-root/.pet-video/.pet-hit/.pet-bubble/Q 弹）由 public/deskpet.js 注入，双页共用；
   这里只放页面级样式：主区留白、点播面板、降级说明、署名、合集页卡片缩略 */

/* 页面侧：提示 / 点播面板 / 降级说明 / 署名 */
.pet-main {
  max-width: 640px;
  padding-bottom: 40vh; /* 给贴地行走的宠物留出视觉空间 */
}

.pet-hint {
  font-size: 13px;
  opacity: 0.65;
  margin: 4px 0 22px;
}

.pet-picker-label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
  margin: 0 0 8px;
}

.pet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pet-chip {
  border: 1px solid var(--shadow-color);
  border-radius: 999px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.pet-chip:hover {
  transform: translateY(-2px);
  background: rgba(77, 107, 254, 0.12);
}

/* 分类随机按钮与招牌动作区分开一层视觉 */
.pet-chip.cat {
  background: rgba(77, 107, 254, 0.1);
  border-color: rgba(77, 107, 254, 0.35);
}

.pet-unsupported {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid rgba(255, 165, 0, 0.35);
  font-size: 14px;
  line-height: 1.6;
}

.pet-credit {
  font-size: 12px;
  opacity: 0.55;
  line-height: 1.7;
  margin-top: 26px;
}

.pet-credit a {
  color: var(--primary-color);
  margin-left: 6px;
}

/* 合集页桌宠卡缩略：不用表情包图池，鲸鱼渐变 + emoji 自成一格 */
.hub-card .hc-thumbs.pet-card-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: linear-gradient(135deg, rgba(77, 107, 254, 0.16), rgba(126, 217, 255, 0.22));
}

.hub-card .hc-thumbs.pet-card-thumb span {
  animation: petBob 2.6s ease-in-out infinite;
}

@keyframes petBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* 合集页斗兽场卡缩略：不入表情包图池，暗色擂台渐变 + 剑盾 emoji 自成一格（arena 本体是纯暗色大屏页） */
.hub-card .hc-thumbs.arena-card-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: linear-gradient(135deg, rgba(24, 27, 48, 0.92), rgba(90, 78, 220, 0.5));
}

.hub-card .hc-thumbs.arena-card-thumb span {
  animation: arenaFloat 3.2s ease-in-out infinite;
}

@keyframes arenaFloat {
  0%, 100% { transform: translateY(0); text-shadow: 0 0 0 rgba(126, 217, 255, 0); }
  50% { transform: translateY(-6px); text-shadow: 0 8px 20px rgba(126, 217, 255, 0.6); }
}

/* 合集页「机制复刻四连」卡缩略（对轰/扔饭碗/吃白饭/合成小肥鱼）：emoji + 深海渐变自成一格，
   不入 GAME_IDS 表情包取图序（2026-11-11） */
.hub-card .hc-thumbs.mini-card-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: linear-gradient(135deg, rgba(23, 58, 128, 0.2), rgba(126, 217, 255, 0.28));
}

.hub-card .hc-thumbs.mini-card-thumb span {
  animation: arenaFloat 3.2s ease-in-out infinite;
}

/* 新四连游戏卡：用真实画布截图替代 emoji（2026-11-12） */
.hub-card .hc-thumbs.game-cover {
  height: 112px;
  background: #dce8f6;
  overflow: hidden;
}
.hub-card .hc-thumbs.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
#hub-mergefish .hc-thumbs.game-cover img { object-position: center 86%; }
body.dark .hub-card .hc-thumbs.game-cover { background: #152433; }
