/* ==========================================================================
 * 惊局工作室 · 通用干净按钮与手游 Icon 样式基线（Chrome 61 / WebView 兼容）
 * 提炼自《跳绳派对》干净圆角卡片与轻立体按压质感 + Layer Lab 手游 Icon 染色
 * ========================================================================== */
:root {
  /* 各游戏仅需覆盖 --jj-accent（建议用 JS 主题派生同步计算深色/文字色/浅槽色） */
  --jj-accent: #f43f5e;
  --jj-accent-dark: #d12345;
  --jj-accent-ink: #ffffff;
  --jj-tint: rgba(244, 63, 94, 0.11);
  --jj-tint-bd: rgba(244, 63, 94, 0.28);
  --jj-card-bg: linear-gradient(180deg, #fffdf9 0%, #fff7f2 100%);
  --jj-ink: #1f2329;
  --jj-muted: #64748b;
  --jj-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 1. 手游级单色功能图标（纯白透明 PNG + mask-image 动态染色） */
.jj-ico {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: var(--ico);
  mask-image: var(--ico);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.jj-ico-sm { width: 15px; height: 15px; }
.jj-ico-lg { width: 22px; height: 22px; }
.jj-ico-xl { width: 28px; height: 28px; }

/* 2. 主操作按钮（干净、饱满、轻底边立体按压，不杂乱） */
.jj-btn-primary {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--jj-accent) 0%, var(--jj-accent-dark) 100%);
  color: var(--jj-accent-ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -3px 0 rgba(0, 0, 0, 0.14);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s var(--jj-ease), box-shadow 0.14s var(--jj-ease);
}
.jj-btn-primary > * + * { margin-left: 8px; }
.jj-btn-primary:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.jj-btn-primary:disabled {
  opacity: 0.55;
  cursor: default;
}

/* 3. 次级轻胶囊按钮（重开 / 辅助功能） */
.jj-pill-soft {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--jj-tint-bd);
  background: var(--jj-tint);
  color: var(--jj-accent-dark);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s var(--jj-ease);
}
.jj-pill-soft > * + * { margin-left: 6px; }
.jj-pill-soft:active { transform: scale(0.95); }

/* 4. 克制暖金排行榜胶囊 */
.jj-pill-gold {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(217, 119, 6, 0.28);
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #b45309;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s var(--jj-ease);
}
.jj-pill-gold > * + * { margin-left: 6px; }
.jj-pill-gold:active { transform: scale(0.95); }

/* 5. 局内深色半透明毛玻璃 HUD 胶囊与图标按钮（不抢 3D 场景风头） */
.jj-hud-pill,
.jj-hud-btn {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(18, 22, 32, 0.62);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}
.jj-hud-pill { padding: 0 12px; }
.jj-hud-pill > * + * { margin-left: 6px; }
.jj-hud-pill img { width: 18px; height: 18px; object-fit: contain; display: block; }
.jj-hud-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s var(--jj-ease);
}
.jj-hud-btn:active { transform: scale(0.92); }

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .jj-hud-pill,
  .jj-hud-btn {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
