/* breakout.css — immersive Brick Breaker. Shares the wg-main-game shell. */
.wg-main.wg-main-game { max-width: none; width: 100%; margin: 0; padding: 0; }

.wg-bk {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 8px 10px 10px; background: #0b1016;
}

/* HUD */
.wg-bk-hud { width: 100%; max-width: 440px; display: flex; align-items: center; gap: 10px; color: #eaf0f5; }
.wg-bk-exit {
  flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center;
  font-size: 1.5rem; line-height: 1; color: #cdd6de; text-decoration: none;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
}
.wg-bk-exit:hover { background: rgba(255,255,255,0.12); color: #fff; }
.wg-bk-score { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.05; }
.wg-bk-num { font-size: 1.7rem; font-weight: 800; }
.wg-bk-mini { font-size: 0.72rem; color: #8a99a8; font-weight: 600; }
.wg-bk-mini #wg-bk-lives { color: #f6524f; letter-spacing: 1px; }
.wg-bk-hud-btns { flex: 0 0 auto; display: flex; gap: 6px; }
.wg-bk-hbtn {
  font: inherit; font-size: 0.82rem; font-weight: 700; padding: 8px 12px; min-width: 40px;
  color: #eaf0f5; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); border-radius: 10px; cursor: pointer;
}
.wg-bk-hbtn:hover { background: rgba(255,255,255,0.16); }
.wg-bk-hbtn:disabled { opacity: 0.4; cursor: default; }

/* Board */
.wg-bk-boardwrap { position: relative; flex: 0 0 auto; }
.wg-bk-board {
  display: block; width: auto;
  height: min(131vw, calc(100vh - 150px), 720px);
  height: min(131vw, calc(100dvh - 150px), 720px);
  aspect-ratio: 400 / 560;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.10);
  background: #0f1720; box-shadow: 0 10px 40px rgba(0,0,0,0.45);
  touch-action: none; cursor: pointer;
}
@media (pointer: fine) {
  .wg-bk-board { height: min(131vw, calc(100vh - 110px), 760px); height: min(131vw, calc(100dvh - 110px), 760px); }
}

/* Overlay */
.wg-bk-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(9,14,20,0.92); border-radius: 12px; padding: 14px; }
.wg-bk-overlay[hidden] { display: none; }
.wg-bk-overlay-card { color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 300px; max-height: 100%; overflow: hidden; }
.wg-bk-overlay-card h2 { margin: 0; font-size: 1.5rem; }
.wg-bk-overlay-card p { margin: 0; display: flex; flex-direction: column; gap: 5px; font-size: 0.9rem; }
.wg-bk-overlay-card .wg-btn { min-width: 160px; }
.wg-bk-final { font-size: 1.25rem; font-weight: 800; }
.wg-bk-best-tag { color: #ffd54a; font-weight: 700; }
.wg-bk-hint { font-size: 0.82rem; opacity: 0.82; }
.wg-bk-overlay-exit { color: #9fb0be; font-size: 0.85rem; text-decoration: underline; }
.wg-bk-overlay-exit:hover { color: #fff; }

.wg-bk-help { margin: 6px 0 0; font-size: 0.78rem; color: #8a99a8; text-align: center; max-width: 440px; }

/* Leaderboard */
.wg-bk-lb { width: 100%; margin-top: 6px; text-align: left; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.wg-bk-lb-head { display: flex; align-items: baseline; gap: 8px; justify-content: center; margin-bottom: 6px; }
.wg-bk-lb-head h3 { margin: 0; font-size: 1rem; color: #eaf0f5; }
.wg-bk-lb-total { font-size: 0.78rem; color: #8a99a8; }
.wg-bk-lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.wg-bk-lb-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: 0.88rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; }
.wg-bk-lb-row.is-me { border-color: var(--wg-color); background: rgba(14,175,76,0.18); }
.wg-bk-lb-rank { flex: 0 0 auto; width: 22px; font-weight: 800; color: #8a99a8; text-align: center; }
.wg-bk-lb-row:nth-child(1) .wg-bk-lb-rank { color: #f5b301; }
.wg-bk-lb-row:nth-child(2) .wg-bk-lb-rank { color: #c4ced6; }
.wg-bk-lb-row:nth-child(3) .wg-bk-lb-rank { color: #cd7f32; }
.wg-bk-lb-name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-bk-lb-name em { color: #7ee0a2; font-style: normal; font-weight: 700; font-size: 0.85em; }
.wg-bk-lb-score { flex: 0 0 auto; font-weight: 800; }
.wg-bk-lb-empty { color: #8a99a8; font-size: 0.86rem; text-align: center; padding: 6px 2px; }
.wg-bk-lb-me { margin: 6px 0 0; font-size: 0.84rem; color: #7ee0a2; font-weight: 600; text-align: center; }
