* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #05070a;
  font-family: ui-monospace, "Sarasa Gothic SC", "Noto Sans SC", monospace;
  color: #d7fbff;
  user-select: none;
}
#game { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 48px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: #05070a;
  border-bottom: 2px solid #1b4c56;
  z-index: 3;
}
.chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #8ad4e0;
}
.chip.center { position: absolute; left: 50%; transform: translateX(-50%); }
.chip.peak b { color: #ffe066; }
.chip b { font-size: 18px; color: #f4fdff; }
.chip .gem {
  width: 12px; height: 12px; background: #3ad4e8;
  transform: rotate(45deg); display: inline-block;
}
.chip .crest {
  width: 16px; height: 16px; border: 2px solid #d4a84a; border-radius: 50%;
  display: inline-block;
}
.chip .soul {
  width: 10px; height: 14px; background: #e8e6df; display: inline-block;
  border: 1px solid #888;
}
#btn-horde {
  margin-top: 8px; padding: 6px 10px; cursor: pointer;
  background: #140c10; color: #e8e6df; border: 2px solid #8a3030; font: inherit;
}
#btn-horde:hover { border-color: #ff9a6a; }
#fw-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
.fw-btn {
  padding: 6px 10px; cursor: pointer;
  background: #140c10; color: #e8e6df; border: 2px solid #3ad4e8; font: inherit;
  font-size: 12px;
}
.fw-btn:hover { border-color: #7ee7ff; }
.chip.hot.hot-on b { color: #ff9a4a; }
#dock {
  position: fixed; left: 0; right: 0; bottom: 0; height: 148px;
  display: grid;
  grid-template-columns: 1fr 1.1fr 132px;
  gap: 10px;
  padding: 10px 12px;
  background: #05070a;
  border-top: 2px solid #1b4c56;
  z-index: 3;
}
#build-row { display: flex; gap: 8px; }
.slot {
  width: 84px; background: #0a1216; border: 2px solid #2a6d7a;
  color: #d7fbff; cursor: pointer; padding: 8px 6px;
}
.slot:hover { border-color: #7ee7ff; }
.slot.locked { opacity: 0.45; cursor: not-allowed; }
.slot .ico {
  display: block; width: 36px; height: 36px; margin: 0 auto 6px;
  background: #101820; border: 2px solid #3ad4e8;
}
.slot .ico.cc { box-shadow: inset 0 0 0 8px #101820, inset 0 0 0 14px #3ad4e8; }
.slot .ico.miner { background: #1a3a44; }
.slot .ico.turret { border-radius: 2px 2px 0 0; }
.slot .ico.bar { border-style: double; }
.slot .ico.lure {
  background: #e8e6df;
  border-color: #3ad4e8;
  box-shadow: inset 0 8px 0 0 #cfc8b8;
}
.slot em { display: block; font-style: normal; font-size: 12px; }
.slot small { color: #7aa8b4; font-size: 10px; }
#sel-panel {
  border: 2px solid #1b4c56; padding: 8px 10px; background: #080c10;
  font-size: 13px;
  overflow: auto;
}
#hud-sel { font-size: 15px; margin-bottom: 6px; color: #f4fdff; }
#hud-rule { color: #7aa8b4; font-size: 11px; line-height: 1.4; }
#minimap { width: 112px; height: 112px; border: 2px solid #1b4c56; background: #000; image-rendering: pixelated; }
#paused-overlay {
  position: fixed; inset: 48px 0 148px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35); pointer-events: none; z-index: 2;
}
#paused-overlay .pause-en { font-size: 56px; letter-spacing: 0.2em; color: #7ee7ff; font-weight: 800; }
#paused-overlay .pause-zh { font-size: 22px; color: #ffd866; letter-spacing: 0.25em; }
#paused-overlay.hidden, #modal.hidden { display: none; }
#modal {
  position: fixed; inset: 0; background: rgba(2,6,8,0.72);
  display: flex; align-items: center; justify-content: center; z-index: 5;
}
.modal-card {
  background: #071014; border: 2px solid #3ad4e8; padding: 22px 24px;
  min-width: 420px; max-width: 760px;
}
.modal-card h2 { font-size: 22px; margin-bottom: 8px; }
.modal-card p { color: #9ecad6; margin-bottom: 16px; font-size: 14px; }
.cards { display: flex; gap: 12px; flex-wrap: wrap; }
.draft-btn, .restart-btn {
  flex: 1; min-width: 160px; background: #0a1a20; border: 2px solid #4ae0f0;
  color: #eefbff; padding: 14px 12px; cursor: pointer; font-size: 14px; text-align: left;
}
.draft-btn:hover, .restart-btn:hover { background: #103038; }
.draft-btn.picked { border-color: #ffe066; background: #1a2810; }
.draft-btn strong { display: block; font-size: 16px; margin-bottom: 6px; color: #9ef4ff; }
.restart-btn { text-align: center; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
