/* 掘金局 · 游戏统一皮肤
   所有 games/*.html 共用。放在各游戏 <style> **之后**引入，
   以便统一覆盖粗糙样式；颜色值用 var(--x, fallback) 兼容各游戏自定义变量。
   升级此文件必须同步改 ?v= 版本串（CDN 按 URL 强缓存）。 */

/* ============ 基础与背景纵深 ============ */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}

html,body{
  margin:0; min-height:100%;
  color:var(--ink,#e7ecf3);
  overflow-x:hidden;
  font:14px/1.6 system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(56,189,248,.16), transparent 62%),
    radial-gradient(680px 420px at 12% 8%, rgba(124,92,240,.13), transparent 60%),
    radial-gradient(680px 420px at 88% 4%, rgba(16,185,129,.10), transparent 60%),
    linear-gradient(180deg,#0b0f18 0%,#080b12 46%,#06080e 100%)
    !important;
  background-attachment:fixed !important;
}
/* 细网格纹理，制造"高级深色控制台"的质感 */
body::before{
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:radial-gradient(circle at 50% 22%, #000 0%, transparent 78%);
  -webkit-mask-image:radial-gradient(circle at 50% 22%, #000 0%, transparent 78%);
}

.wrap{position:relative; z-index:1}

/* ============ 顶部信息条 / Pill ============ */
.hud{
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  padding:8px; margin-bottom:10px !important;
  border-radius:14px;
  background:linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018)) !important;
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.07) inset, 0 8px 24px -12px rgba(0,0,0,.8) !important;
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
}
.pill,.hud>div:not(.row){
  position:relative;
  padding:6px 11px !important;
  font-size:12px; font-weight:700; letter-spacing:.2px;
  border-radius:11px !important;
  background:linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.03)) !important;
  border:1px solid rgba(255,255,255,.11) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.10) inset, 0 2px 8px -4px rgba(0,0,0,.7) !important;
  color:var(--sub,#9aa5b5) !important;
}
.pill b,.hud>div:not(.row) b{
  font-size:15px !important; font-weight:800; letter-spacing:.3px;
  color:var(--ink,#fff) !important;
  text-shadow:0 0 12px rgba(255,255,255,.18);
}

/* ============ 画布外框：发光 + 内凹 ============ */
canvas{
  display:block; width:100%; height:auto;
  border-radius:16px !important;
  border:1px solid rgba(255,255,255,.13) !important;
  background:#070a11 !important;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.6),
    0 18px 50px -20px rgba(0,0,0,.95),
    0 0 60px -30px rgba(56,189,248,.55) !important;
  touch-action:none;
}

/* ⚠️ 特效层必须豁免（2026-10-05 修）
   上面那条 canvas{background:#070a11 !important} 本意是给「游戏画布」加个黑底和发光外框，
   但 fx.js 会在全屏铺一块 id="fxLayer" 的画布（position:fixed; z-index:9998），
   用来放震屏/粒子/闪屏 —— 它必须是**完全透明**的。
   那条规则把它也涂成了不透明黑（#070a11），于是它把整个游戏界面严严实实盖住，
   表现就是「页面一片黑、但游戏其实一直在正常运行、也没有任何 JS 报错」。
   踩坑记录：加载 skin.css 的 6 款（survivor / td / dungeon / deck / auto / tactics）全黑，
   不加载的 15 款正常，1:1 对应 —— 就是这条规则干的。
   ⚠️ 别删这段，也不要"优化"掉：删了特效层又会变回不透明黑。 */
#fxLayer{
  background:none !important;
  background-color:transparent !important;
  background-image:none !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

/* ============ 按钮 ============ */
button{
  position:relative;
  font-family:inherit; font-size:13px; font-weight:700; letter-spacing:.2px;
  padding:9px 14px !important;
  border-radius:12px !important;
  color:var(--ink,#e7ecf3) !important;
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.035)) !important;
  border:1px solid rgba(255,255,255,.14) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.13) inset, 0 4px 14px -6px rgba(0,0,0,.85) !important;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
button:hover:not(:disabled){
  transform:translateY(-1px);
  filter:brightness(1.12);
  box-shadow:0 1px 0 rgba(255,255,255,.18) inset, 0 8px 22px -8px rgba(0,0,0,.9), 0 0 22px -10px rgba(56,189,248,.6) !important;
}
button:active:not(:disabled){ transform:translateY(1px) scale(.985) }
button:disabled{ opacity:.36; cursor:not-allowed; filter:grayscale(.5) }

/* 主按钮：渐变 + 光晕 */
button.pri,.btn.pri{
  color:#04121a !important; font-weight:800;
  background:linear-gradient(135deg,#67e8f9,#38bdf8 45%,#0ea5e9) !important;
  border:1px solid rgba(255,255,255,.45) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.55) inset, 0 6px 20px -6px rgba(56,189,248,.65) !important;
  text-shadow:0 1px 0 rgba(255,255,255,.25);
}
button.pri:hover:not(:disabled){
  box-shadow:0 1px 0 rgba(255,255,255,.6) inset, 0 10px 28px -8px rgba(56,189,248,.9) !important;
}

.row{display:flex; gap:8px; margin-top:10px; align-items:center; flex-wrap:wrap}

/* ============ 分区小标题 ============ */
.sec,.sec-title{
  margin:16px 0 8px !important;
  font-size:11.5px; font-weight:800; letter-spacing:1.4px;
  text-transform:uppercase;
  color:var(--sub,#8b95a5) !important;
  display:flex; align-items:center; gap:9px;
}
.sec::after{
  content:''; flex:1; height:1px;
  background:linear-gradient(90deg, rgba(255,255,255,.14), transparent);
}

/* ============ 遮罩与弹窗：玻璃 + 弹入动画 ============ */
.mask{
  position:fixed; inset:0; z-index:40; padding:16px;
  display:none; align-items:center; justify-content:center;
  background:rgba(4,7,13,.80) !important;
  backdrop-filter:blur(9px) saturate(115%); -webkit-backdrop-filter:blur(9px) saturate(115%);
}
.mask.on{ display:flex; animation:skFade .22s ease both }
.box{
  position:relative; max-width:440px; width:100%; text-align:center;
  padding:24px 22px !important;
  border-radius:20px !important;
  background:
    radial-gradient(520px 200px at 50% -10%, rgba(56,189,248,.15), transparent 70%),
    linear-gradient(180deg, rgba(28,34,48,.97), rgba(15,19,28,.98)) !important;
  border:1px solid rgba(255,255,255,.14) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.14) inset, 0 30px 70px -28px rgba(0,0,0,.95) !important;
  animation:skPop .3s cubic-bezier(.16,1,.3,1) both;
}
.box h2{
  margin:0 0 10px !important; font-size:22px !important; font-weight:800; letter-spacing:.4px;
  background:linear-gradient(135deg,#fff,#a5d8ff);
  -webkit-background-clip:text; background-clip:text; color:transparent !important;
}
.box p{margin:0 0 16px !important; color:var(--sub,#9aa5b5) !important; font-size:13px; line-height:1.85}
.box .tip{font-size:11.5px; color:var(--sub,#7d879a) !important; line-height:1.8}

@keyframes skFade{ from{opacity:0} to{opacity:1} }
@keyframes skPop{
  from{opacity:0; transform:translateY(14px) scale(.94)}
  to{opacity:1; transform:none}
}

/* ============ 选项卡 / 卡片（三选一、商店、塔面板等） ============ */
.op,.card,.ab,.perk,.tw,.opt{
  position:relative; overflow:hidden;
  border-radius:14px !important;
  background:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.022)) !important;
  border:1px solid rgba(255,255,255,.11) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.09) inset, 0 4px 14px -8px rgba(0,0,0,.8) !important;
  transition:transform .14s ease, box-shadow .18s ease, border-color .18s ease;
}
.op:hover,.card:hover,.ab:hover,.tw:hover,.opt:hover{
  transform:translateY(-2px);
  border-color:rgba(56,189,248,.55) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.16) inset, 0 10px 26px -10px rgba(0,0,0,.9), 0 0 26px -12px rgba(56,189,248,.75) !important;
}
.op:active,.card:active,.ab:active,.tw:active{ transform:translateY(0) scale(.985) }

/* 稀有度描边光（若带 data-r / class 稀有度则用颜色呼吸） */
.card[data-r="epic"],.op[data-r="epic"]{ border-color:rgba(168,85,247,.6) !important;
  box-shadow:0 0 22px -8px rgba(168,85,247,.7), 0 1px 0 rgba(255,255,255,.1) inset !important }
.card[data-r="rare"],.op[data-r="rare"]{ border-color:rgba(56,189,248,.55) !important }

/* ============ 说明文字 ============ */
.tip{ font-size:11.5px; color:var(--sub,#7d879a) !important; line-height:1.85;
  margin-top:10px !important; padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.032) !important;
  border:1px solid rgba(255,255,255,.07) !important;
}
.legend{ display:flex; gap:10px; flex-wrap:wrap; font-size:11px;
  color:var(--sub,#8b95a5) !important; margin-top:10px }
.legend b{ color:var(--ink,#e7ecf3) !important }
