/* ═══════════════════════════════════════════════════════════
   HOLLOWDEEP — Floor 1 cavern mine
   Loaded alongside game.css. Scoped under .hd-theme.
═══════════════════════════════════════════════════════════ */

.hd-theme {
  --hd-bg:        #1a1410;
  --hd-bg2:       #0e0b09;
  --hd-bar:       rgba(8, 6, 4, 0.72);
  --hd-gold:      #c9a227;
  --hd-stone:     #d8c8a8;
  --hd-rock:      #6b5a48;
  --hd-rock-hi:   #8a7660;
  --hd-rock-lo:   #3a2e24;
  --hd-text:      #f0e6d2;
  --hd-text2:     #9a8a72;
  --hd-edge:      rgba(255, 230, 170, 0.12);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse at 50% 20%, #2a2218 0%, transparent 55%),
    linear-gradient(180deg, #1c1610 0%, #0a0806 100%);
  color: var(--hd-text);
  overflow: hidden;
  touch-action: none;
  /* No browser long-press selection / callout / magnifier (Josh, iPhone).
     -webkit-touch-callout is what suppresses the iOS callout + magnifier. */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.hd-topbar {
  flex: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: var(--hd-bar);
  border-bottom: 1px solid var(--hd-edge);
  backdrop-filter: blur(6px);
  z-index: 5;
}

.hd-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: var(--hd-stone);
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.hd-stat-ico { font-size: 18px; }

.hd-topbtns { display: flex; gap: 6px; }
.hd-iconbtn {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--hd-edge);
  color: var(--hd-text);
  cursor: pointer;
}
.hd-iconbtn:disabled { opacity: 0.35; cursor: default; }

.hd-floorlabel {
  flex: 0 0 auto;
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 8px 2px;
  color: var(--hd-text2);
}

.hd-progwrap {
  flex: 0 0 auto;
  height: 6px;
  margin: 4px 40px 8px;
  background: rgba(0,0,0,0.45);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--hd-edge);
}
.hd-progfill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8a6a18, var(--hd-gold));
  transition: width .25s ease;
}

.hd-field {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(80,60,30,0.18), transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(40,30,20,0.35), transparent 55%);
}

.hd-nodezone {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 66.6%;
  pointer-events: none;
}
.hd-reserved {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 33.3%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.28));
  border-top: 1px dashed rgba(201,162,39,0.18);
}

.hd-node {
  position: absolute;
  width: 56px; height: 56px;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}
.hd-rock {
  width: 100%; height: 100%;
  border-radius: 46% 54% 48% 52% / 52% 46% 54% 48%;
  background:
    radial-gradient(circle at 32% 28%, var(--hd-rock-hi), var(--hd-rock) 55%, var(--hd-rock-lo));
  box-shadow:
    inset 0 -8px 12px rgba(0,0,0,0.35),
    0 6px 10px rgba(0,0,0,0.45);
  filter: saturate(calc(1 - var(--dmg, 0) * 0.4)) brightness(calc(1 - var(--dmg, 0) * 0.25));
}
.hd-node.dmgd .hd-rock {
  clip-path: polygon(8% 18%, 28% 4%, 62% 10%, 92% 22%, 98% 52%, 84% 86%, 52% 96%, 14% 82%, 4% 48%);
}
.hd-hpbar {
  position: absolute;
  left: 10%; right: 10%;
  bottom: -8px;
  height: 4px;
  background: rgba(0,0,0,0.55);
  border-radius: 99px;
  overflow: hidden;
}
.hd-hpfill {
  height: 100%;
  background: var(--hd-gold);
}

.hd-aoe {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(201,162,39,0.85);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(201,162,39,0.45);
  pointer-events: none;
  z-index: 3;
  animation: hd-aoe-pop 0.32s ease-out;
}
@keyframes hd-aoe-pop {
  from { opacity: 0.95; transform: translate(-50%, -50%) scale(0.55); }
  to   { opacity: 0;    transform: translate(-50%, -50%) scale(1); }
}

.hd-float {
  position: absolute;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 16px;
  color: var(--hd-gold);
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
  z-index: 4;
  animation: hd-float-up 0.8s ease-out forwards;
}
@keyframes hd-float-up {
  from { opacity: 1; transform: translate(-50%, -50%); }
  to   { opacity: 0; transform: translate(-50%, -140%); }
}

.hd-menustrip {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--hd-bar);
  border-top: 1px solid var(--hd-edge);
  z-index: 5;
}
.hd-menubtn {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--hd-edge);
  font-size: 20px;
  color: var(--hd-text);
  opacity: 0.4;
  cursor: default;
}
