/* 深渊一万层 · 可玩试玩 — Diablo 暗金 HUD */
:root {
  --bg: #07060a;
  --gold: #c9a255;
  --gold2: #e8c878;
  --gold3: #8a6d32;
  --line: #6a5428;
  --text: #d8cbb8;
  --dim: #8a8074;
  --muted: #5c564e;
  --hp: #c4453a;
  --hp2: #7a1214;
  --mp: #2a6ad4;
  --mp2: #142a6a;
  --ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --disp: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --top: 58px;
  --hud: 132px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden; background: var(--bg); color: var(--text);
  font-family: var(--ui); user-select: none;
  cursor: crosshair;
}
#stage {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; background: #05040a;
  image-rendering: auto;
  z-index: 0;
}
button, a { font-family: inherit; cursor: pointer; }
kbd { font-family: inherit; }

#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: var(--top);
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px 0 14px;
  background: linear-gradient(180deg, rgba(8,7,10,.92), rgba(8,7,10,.62) 70%, transparent);
  pointer-events: none;
  cursor: default;
}
#topbar > * { pointer-events: auto; cursor: pointer; }
#topbar .brand { cursor: pointer; }
#topbar .group, #topbar .lab, #topbar .sp { cursor: default; }

.brand {
  text-decoration: none; color: var(--gold2); line-height: 1.1; padding-right: 8px;
  border-right: 1px solid rgba(106,84,40,.45); margin-right: 4px;
}
.brand small {
  display: block; font-size: 9px; letter-spacing: .18em; color: var(--gold3);
  text-transform: uppercase;
}
.brand b { font-family: var(--disp); font-size: 15px; letter-spacing: .06em; }

.group { display: flex; align-items: center; gap: 6px; }
.group .lab {
  font-size: 10px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase;
}
.picks { display: flex; gap: 3px; }
.pick, .btn {
  appearance: none; border: 1px solid rgba(106,84,40,.7);
  background: linear-gradient(180deg, #221c16, #14110e);
  color: var(--text); font-size: 11px; padding: 4px 8px; border-radius: 3px;
  letter-spacing: .04em; text-decoration: none; display: inline-flex; align-items: center;
  gap: 4px; line-height: 1.2; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(232,200,120,.12);
}
.pick:hover, .btn:hover { border-color: var(--gold); color: var(--gold2); }
.pick.on {
  background: linear-gradient(180deg, #4a3514, #2a1c0a);
  border-color: var(--gold2); color: var(--gold2);
  box-shadow: 0 0 10px rgba(232,200,120,.25), inset 0 0 8px rgba(232,200,120,.12);
}
.pick.tier-white.on { border-color: #c9c0b1; color: #f0e8da; }
.pick.tier-blue.on { border-color: #5AB8FF; color: #bfe6ff; box-shadow: 0 0 10px rgba(90,184,255,.3); }
.pick.tier-purple.on { border-color: #A060FF; color: #d2a8ff; box-shadow: 0 0 10px rgba(160,96,255,.3); }
.pick.tier-orange.on { border-color: #FFB040; color: #ffd090; box-shadow: 0 0 10px rgba(255,176,64,.35); }
.pick.tier-legacy_fashion.on { border-color: #FFD873; color: #ffe9a8; box-shadow: 0 0 12px rgba(255,216,115,.4); }
.btn.danger { border-color: #8a2a22; color: #e8a090; }
.btn.danger:hover { border-color: #e07060; color: #ffd0c8; }
.btn.ghost { background: transparent; color: var(--dim); }
.sp { flex: 1; }

#bossbar {
  position: fixed; top: 62px; left: 50%; transform: translateX(-50%);
  z-index: 18; width: min(640px, 70vw);
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}
#bossbar[hidden] { display: none !important; }
.boss-name { font-family: var(--disp); color: var(--gold2); font-size: 13px; white-space: nowrap; }
.boss-track {
  flex: 1; height: 10px; border: 1px solid #5a2018; background: #1a0a0a;
  border-radius: 2px; overflow: hidden; box-shadow: 0 0 8px rgba(180,30,20,.25);
}
.boss-track i { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, #e06048, #8a1810); transform-origin: left; }
.boss-hp { font-size: 10px; color: #e8c8b8; min-width: 4.5em; text-align: right; }

#loadhint {
  position: fixed; top: 64px; left: 16px; z-index: 19;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--dim); letter-spacing: .08em;
  text-shadow: 0 1px 2px #000; pointer-events: none;
  transition: opacity .4s;
}
#loadhint.hide { opacity: 0; }
#loadhint i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }

#toast {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%) translateY(-8px);
  z-index: 30; pointer-events: none;
  background: rgba(12,10,8,.88); border: 1px solid var(--line);
  color: var(--gold2); font-family: var(--disp);
  padding: 8px 16px; border-radius: 3px; font-size: 13px;
  opacity: 0; transition: opacity .25s, transform .25s;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  letter-spacing: .06em;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#hud {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: var(--hud);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 18px 10px;
  background: linear-gradient(0deg, rgba(6,5,8,.94) 0%, rgba(6,5,8,.78) 55%, transparent 100%);
  pointer-events: none;
  cursor: default;
}
#hud .orb-wrap, #hud .dock, #hud .right-col, #hud button { pointer-events: auto; }
#hud .dock { cursor: default; }
#hud button { cursor: pointer; }

.orb-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.orb-cap { font-size: 10px; letter-spacing: .16em; color: var(--gold3); }
.orb {
  width: 108px; height: 108px; border-radius: 50%;
  position: relative; overflow: hidden;
  border: 3px solid var(--line);
  box-shadow:
    0 0 0 2px #140f0a,
    0 10px 22px rgba(0,0,0,.55),
    inset 0 0 18px rgba(0,0,0,.65);
  background: #12080a;
}
.orb .fill {
  position: absolute; left: -10%; right: -10%; bottom: 0;
  height: 100%;
  transition: height .2s linear;
}
.orb-wrap.hp .fill {
  background:
    radial-gradient(circle at 50% 40%, #ff6a4a 0%, #c4453a 35%, #6a1014 75%, #2a0608 100%);
}
.orb-wrap.mp .fill {
  background:
    radial-gradient(circle at 50% 40%, #7ab8ff 0%, #2a6ad4 40%, #142a6a 75%, #081028 100%);
}
.orb .glass {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.28), transparent 38%),
    radial-gradient(circle at 60% 80%, rgba(0,0,0,.25), transparent 45%);
  box-shadow: inset 0 0 12px rgba(0,0,0,.35);
  pointer-events: none;
}
.orb .val {
  position: absolute; left: 0; right: 0; bottom: 18px;
  text-align: center; font-size: 11px; font-weight: 700;
  color: #fff8e8; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.6);
  letter-spacing: .04em;
}

.dock { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 16px 2px; }
.skills { display: flex; gap: 8px; }
.slot {
  position: relative; width: 86px; height: 72px;
  border: 1px solid var(--line); border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(50,40,24,.9), rgba(16,12,10,.95));
  color: var(--text); display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding: 0 4px 8px; gap: 2px;
  box-shadow: inset 0 1px 0 rgba(232,200,120,.15), 0 4px 10px rgba(0,0,0,.35);
}
.slot kbd {
  position: absolute; top: 5px; left: 0; right: 0;
  font-size: 9px; color: var(--gold3); letter-spacing: .02em; text-align: center;
}
.slot b { font-size: 11px; font-weight: 600; color: var(--gold2); font-family: var(--disp); }
.slot.core { border-color: #7a5a20; }
.slot.ult { border-color: #a06020; box-shadow: inset 0 0 10px rgba(255,140,40,.12), 0 4px 10px rgba(0,0,0,.35); }
.slot.cooling { color: var(--dim); }
.slot .cd {
  position: absolute; inset: 0; background: rgba(4,4,8,.62);
  transform: scaleY(0); transform-origin: bottom; pointer-events: none;
}
.slot:hover { border-color: var(--gold2); }
.slot:focus { outline: 1px solid var(--gold); }

.setline {
  margin-top: 8px; display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--dim);
}
.set-lab { letter-spacing: .14em; color: var(--gold3); font-size: 10px; }
.setline ol {
  list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0;
}
.setline li {
  display: flex; align-items: center; color: var(--muted);
}
.setline li .node {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid #4a3c22; background: #16120e;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--dim);
}
.setline li .bar {
  width: 28px; height: 2px; background: #3a3020; margin: 0 2px;
}
.setline li.on .node {
  border-color: var(--gold2); color: var(--gold2);
  box-shadow: 0 0 8px rgba(232,200,120,.4); background: #2a2010;
}
.setline li.on .bar { background: var(--gold3); }
.setline li.t-blue.on .node { border-color: #5AB8FF; color: #bfe6ff; box-shadow: 0 0 8px rgba(90,184,255,.45); }
.setline li.t-purple.on .node { border-color: #A060FF; color: #d2a8ff; box-shadow: 0 0 8px rgba(160,96,255,.45); }
.setline li.t-orange.on .node { border-color: #FFB040; color: #ffd090; box-shadow: 0 0 8px rgba(255,176,64,.5); }
.setline li.t-fashion.on .node { border-color: #FFD873; color: #ffe9a8; width: auto; padding: 0 6px; border-radius: 8px; }
.set-count { color: var(--gold2); min-width: 3.2em; }

.right-col { display: flex; align-items: flex-end; gap: 12px; }
.status {
  text-align: right; padding-bottom: 14px; min-width: 132px;
  text-shadow: 0 1px 2px #000;
}
.status .fl { font-family: var(--disp); color: var(--gold2); font-size: 16px; }
.status .biome { font-size: 11px; color: var(--text); margin: 2px 0; }
.status .portal { font-size: 11px; color: var(--muted); }
.status .portal.open { color: #9ee08a; text-shadow: 0 0 8px rgba(120,220,100,.4); }

@media (max-width: 1100px) {
  .orb, #orbHp, #orbMp { width: 88px; height: 88px; }
  .slot { width: 74px; height: 66px; }
  .group .lab { display: none; }
  .brand b { font-size: 13px; }
}

/* —— 终版总整合：施法模式开关 / 小地图画布 —— */
#btnSmartCast.on {
  color: #ffe7a8;
  border-color: #c9a255;
  box-shadow: 0 0 0 1px #c9a255 inset, 0 0 12px rgba(201,162,85,.25);
}
#abyss-minimap .d2-minimap-view canvas.iso-mm {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
