/* ====== 페이지 배경 이미지 (Pixabay) ====== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: #e8ecf1;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", Arial;
  overflow: hidden;

  /* 페이지 전체 배경 */
  background-image: url("https://cdn.pixabay.com/photo/2016/08/14/14/58/pokemon-1593048_1280.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* 캔버스는 살짝 어둡게 (게임 가독성 확보) */
#game {
  display: block;
  position: absolute;
  inset: 0;
  width: 100vw; height: 100vh;
  background: rgba(8, 12, 24, 0.45);
}

/* HUD 카드 */
#hud {
  position: fixed;
  top: 12px;
  left: 12px;
  width: fit-content;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(12,18,35,.6);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  z-index: 20;
}
#hud .row { display: flex; gap: 14px; align-items: center; }

.btn {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #e8ecf1;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.btn:hover { background: rgba(255,255,255,.16); }
.btn[aria-pressed="true"] { background: rgba(255,255,255,.25); }
.btn.btn-primary {
  border-color: rgba(64,170,255,.65);
  background: linear-gradient(180deg, rgba(64,170,255,.35), rgba(64,170,255,.15));
}

/* 오버레이(시작/게임오버) */
#overlay, #gameover {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5,8,15,.45);
  z-index: 15;
}
.hidden { display: none !important; }

.panel {
  background: rgba(15,22,40,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 20px 22px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.panel .row { display: flex; gap: 10px; justify-content: center; }
