/* 钻探者 · 基础主题：锈蚀钢板 + 警示黄 */
@font-face { font-family: 'DRZ'; src: url('../fonts/ui-zh.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'DRN'; src: url('../fonts/num.woff2') format('woff2'); font-display: swap; }

:root {
  --bg: #111214; --bg2: #18191c; --panel: #1d1f23; --panel2: #25282d; --panel3: #2e3238;
  --line: #3a3f47; --line2: #4c525c;
  --txt: #efe9dc; --dim: #a39d91; --dim2: #77726a;
  --hazard: #f6c21c; --hazard2: #e09a12; --amber: #ffb52e;
  --good: #66e08a; --bad: #ff5d4d; --info: #58b4ff;
  --yellow: #f6c21c; --red: #ef4b3c; --blue: #3d8bff; --green: #2fc274;
  --fuel: #ff9a1f; --move: #3d9cff; --drill: #c7d0da; --coin: #f2891b;
  --pc: var(--hazard);           /* 当前视角玩家色 */
  --zh: 'DRZ', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --num: 'DRN', 'DRZ', 'Impact', 'Arial Narrow', sans-serif;
  --body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Segoe UI', sans-serif;
  --r: 10px;
  --shadow: 0 6px 18px rgba(0,0,0,.55);
  --metal: linear-gradient(180deg, #2d3137 0%, #23262b 48%, #1d2024 100%);
  --metal-hi: linear-gradient(180deg, #3a3f47 0%, #2c3036 50%, #24272c 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--txt); font-family: var(--body); font-size: 14px; -webkit-font-smoothing: antialiased; }
body { background:
  radial-gradient(ellipse 80% 60% at 50% 0%, rgba(246,194,28,.06), transparent 60%),
  radial-gradient(ellipse at 50% 120%, rgba(255,120,30,.08), transparent 60%),
  url('../img/tex_metal.webp') center / 520px repeat, var(--bg);
  background-blend-mode: normal, normal, soft-light, normal; }
#app { height: 100%; }
.game, .lobby .seat, .modal { -webkit-user-select: none; user-select: none; }
.game input, .game textarea { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: inherit; }
input, textarea { font: inherit; }
::selection { background: rgba(246,194,28,.35); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #3b4048; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

.ic { width: 1.1em; height: 1.1em; vertical-align: -0.2em; flex: none; }
.gem { width: 1.3em; height: 1.3em; vertical-align: -0.3em; flex: none; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.65)); }
.num { font-family: var(--num); letter-spacing: .02em; }
.dim { color: var(--dim); } .bad { color: var(--bad); } .good { color: var(--good); }

/* 按钮：工业风 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border: 1px solid var(--line2);
  background: var(--metal-hi); color: var(--txt); border-radius: 8px; padding: 7px 14px; font-family: var(--zh); font-size: 14px; letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 rgba(0,0,0,.5); transition: transform .08s, border-color .15s, filter .15s, box-shadow .15s; white-space: nowrap; position: relative; }
.btn:hover:not(:disabled) { border-color: var(--hazard); filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.btn:disabled, .btn.off { opacity: .42; cursor: not-allowed; filter: saturate(.4); }
.btn.pri { background: linear-gradient(180deg, #ffd65a 0%, #f6c21c 45%, #d99a0c 100%); color: #1d1405; border-color: #ffe08a; font-weight: 700;
  text-shadow: 0 1px 0 rgba(255,255,255,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 0 #7a5200, 0 0 18px rgba(246,194,28,.25); }
.btn.pri:hover:not(:disabled) { filter: brightness(1.08); }
.btn.danger { border-color: #8e3a30; background: linear-gradient(180deg, #4a2420, #33201d); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--dim); }
.btn.ghost:hover:not(:disabled) { color: var(--txt); border-color: var(--line2); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { padding: 11px 22px; font-size: 17px; border-radius: 11px; }
.btn .ic { width: 1.25em; height: 1.25em; }
.iconbtn { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.iconbtn .ic { width: 18px; height: 18px; }

/* 面板：铆钉钢板 */
.panel { background: var(--metal); border: 1px solid var(--line); border-radius: var(--r); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--shadow); position: relative; }
.rivets::before, .rivets::after { content: ''; position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9aa3ad, #3b4148 70%); box-shadow: 0 1px 0 rgba(0,0,0,.6); }
.rivets::before { left: 6px; } .rivets::after { right: 6px; }
.hazard-stripe { background: repeating-linear-gradient(-45deg, #f6c21c 0 10px, #1a1a1a 10px 20px); }
.ttl { font-family: var(--zh); letter-spacing: .06em; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #0007; border: 1px solid var(--line); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #0008; }
.c-yellow { --pc: var(--yellow); } .c-red { --pc: var(--red); } .c-blue { --pc: var(--blue); } .c-green { --pc: var(--green); }
.dot.yellow { background: var(--yellow); } .dot.red { background: var(--red); } .dot.blue { background: var(--blue); } .dot.green { background: var(--green); }

/* 启动画面 */
.boot { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.boot-logo { width: 340px; height: 166px; background: url('../img/logo_zh.webp') center / contain no-repeat; filter: drop-shadow(0 8px 30px rgba(0,0,0,.6)); animation: bootbob 2.4s ease-in-out infinite; }
.boot-txt { color: var(--dim); font-family: var(--zh); letter-spacing: .2em; }
@keyframes bootbob { 50% { transform: translateY(-6px); } }

/* 浮层：放大、提示、吐司 */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 900; overflow: hidden; }
#zoom { position: fixed; z-index: 950; pointer-events: none; display: none; }
#zoom img { display: block; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.1); }
#zoom .zinfo { margin-top: 8px; background: rgba(16,17,19,.94); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 12px; font-size: 13px; line-height: 1.6; max-width: 320px; }
#tip { position: fixed; z-index: 960; pointer-events: none; display: none; max-width: 300px; background: rgba(14,15,17,.96); border: 1px solid var(--line2);
  border-radius: 9px; padding: 7px 11px; font-size: 13px; line-height: 1.55; box-shadow: var(--shadow); }
#tip b { color: var(--hazard); }
#tip .why { color: var(--bad); }
#toasts { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 980; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: linear-gradient(180deg, #2a2d33, #1c1e22); border: 1px solid var(--line2); border-left: 4px solid var(--hazard); color: var(--txt);
  padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; animation: toastin .25s ease-out; max-width: 80vw; }
.toast.err { border-left-color: var(--bad); background: linear-gradient(180deg, #3a1d1a, #261412); color: #ffdcd6; }
.toast.ok { border-left-color: var(--good); }
@keyframes toastin { from { transform: translateY(-10px); opacity: 0; } }

/* 卡牌说明（悬停面板里的文字） */
.ci-title { font-family: var(--zh); font-size: 16px; color: var(--hazard); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.ci-type { font-size: 11px; padding: 0 7px; border-radius: 99px; background: #0008; border: 1px solid var(--line2); color: var(--dim); font-family: var(--body); }
.ci-type.t-drill { color: #ffb36b; } .ci-type.t-move { color: #7cc0ff; } .ci-type.t-utility { color: #8ff0a8; } .ci-type.t-advanced { color: #d4a6ff; } .ci-type.t-damage { color: #ff8b80; }
.ci-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 3px 0; }
.ci-k { font-size: 11px; padding: 1px 7px; border-radius: 5px; font-family: var(--zh); }
.ci-k.main { background: #4a3a10; color: #ffd76a; } .ci-k.burn { background: #4a2610; color: #ffb36b; }
.ci-cost { color: #ffb36b; }
.fxi { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.fxi.bad { color: #ff8b80; } .fxi.abil { color: #b9e3ff; } .fxi.choice { gap: 6px; }
.fxi .or { font-style: normal; color: var(--dim); font-size: 11px; padding: 0 2px; }

/* 动画元素 */
.fly-gem .gem { width: 30px; height: 30px; display: block; filter: drop-shadow(0 0 8px rgba(255,255,255,.7)) drop-shadow(0 3px 3px rgba(0,0,0,.6)); }
.fly-card { border-radius: 8px; overflow: hidden; box-shadow: 0 14px 30px rgba(0,0,0,.6); }
.fly-card img { width: 100%; height: 100%; display: block; }
.fly-coin .ic { width: 22px; height: 22px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.float-txt { position: fixed; z-index: 2; font-family: var(--num); font-size: 26px; font-weight: 700; white-space: nowrap; color: #fff;
  text-shadow: 0 2px 0 #000, 0 0 12px rgba(0,0,0,.8); display: flex; align-items: center; gap: 3px; }
.float-txt .ic { width: 22px; height: 22px; }
.float-txt.plus { color: #8dff9f; } .float-txt.minus { color: #ff8a7a; } .float-txt.gold { color: #ffd34a; } .float-txt.blue { color: #8cc8ff; }
.float-txt.big { font-size: 34px; } .float-txt.small { font-size: 18px; } .float-txt.zh { font-family: var(--zh); font-size: 18px; }
.spark { position: fixed; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.spark.sq { border-radius: 2px; }
.ring { position: fixed; border: 3px solid; border-radius: 50%; }
.banner { position: fixed; left: 0; right: 0; top: 38%; display: flex; justify-content: center; pointer-events: none; }
.banner-in { width: 100%; padding: 16px 0; text-align: center; font-family: var(--zh); font-size: 40px; letter-spacing: .18em; color: #fff;
  background: linear-gradient(90deg, transparent, rgba(10,10,12,.88) 22%, rgba(10,10,12,.88) 78%, transparent);
  text-shadow: 0 3px 0 #000, 0 0 30px rgba(246,194,28,.35); border-top: 2px solid rgba(246,194,28,.6); border-bottom: 2px solid rgba(246,194,28,.6); }
.banner-in small { display: block; font-size: 16px; letter-spacing: .3em; color: var(--dim); margin-top: 4px; }
.banner.mine .banner-in { color: var(--hazard); }
.banner.turn .banner-in { position: relative; }
.bn-mech { position: absolute; left: 50%; top: 50%; height: 120%; transform: translate(-260%, -50%); filter: drop-shadow(0 6px 10px #000); animation: bnmech 1.4s cubic-bezier(.2,.8,.3,1) both; }
@keyframes bnmech { from { transform: translate(-420%, -50%); opacity: 0; } 30% { opacity: 1; } to { transform: translate(-260%, -50%); } }
.banner.warn .banner-in { color: #ff8a7a; border-color: rgba(255,93,77,.7); }
.banner.ms .banner-in { color: #ffe27a; }
.pulse { animation: pulseK .6s ease-out; }
@keyframes pulseK { 0% { transform: scale(1); } 30% { transform: scale(1.18); filter: brightness(1.5); } 100% { transform: scale(1); } }
.shakeX { animation: shakeX .38s ease-in-out; }
@keyframes shakeX { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
