*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a2a3a;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
}

#game-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #2a4055 0%, #152030 100%);
  /* Native AdMob banner (BOTTOM_CENTER) — ads.js sets --ad-banner-pad when shown */
  padding-bottom: var(--ad-banner-pad, 0px);
  box-sizing: border-box;
}

#game {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.12),
    0 20px 60px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  background: #6ec6ff;
}

#hud-btns {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 10;
  display: flex;
  gap: 8px;
}

#hud-btns button {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
}

#hud-btns button:hover {
  background: rgba(0, 0, 0, 0.5);
}

#hud-btns button:active {
  transform: scale(0.92);
}

#mute-btn[aria-pressed="true"] {
  background: rgba(180, 40, 40, 0.55);
}

#extras-btn[aria-pressed="true"] {
  background: rgba(40, 120, 200, 0.55);
}

#extras-btn[aria-pressed="false"] {
  background: rgba(0, 0, 0, 0.35);
  opacity: 0.7;
}

#mute-hint,
#extras-hint {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  z-index: 10;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
}

#mute-hint {
  top: calc(max(12px, env(safe-area-inset-top)) + 52px);
}

#extras-hint {
  top: calc(max(12px, env(safe-area-inset-top)) + 76px);
}

@media (max-width: 480px) {
  #game {
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
  }
}
