/* ===================================================================
   game.css, Brine Run HUD/visuals, PRESERVED from the original game.
   Scoped under .game-scene. The leaderboard/high-score UI is intentionally
   omitted (replaced by the progression reward summary), per spec.
   =================================================================== */
.game-scene { position: absolute; inset: 0; overflow: hidden; background-color: #0b1220; touch-action: none; }
.game-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }

/* HUD respects notches / safe areas and the mobile address bar. */
.game-scene .ui-layer { padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }

/* Rotate-device screen (portrait). Pauses gameplay. */
.game-scene .rotate-screen {
  position: absolute; inset: 0; z-index: 30; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center;
  padding: 24px; background: radial-gradient(circle at 50% 40%, #12203a, #0b1220); color: #fff;
}
.game-scene.is-portrait .rotate-screen { display: flex; }
.game-scene .rotate-icon { font-size: 4rem; animation: rotateHint 2s ease-in-out infinite; }
.game-scene .rotate-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--brine-gold); }
.game-scene .rotate-sub { font-family: var(--font-ui); font-size: .95rem; opacity: .8; }
@keyframes rotateHint { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-90deg); } }

.game-scene .ui-layer { position: absolute; inset: 0; z-index: 10; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between; padding: 24px; }
.game-scene .interactive { pointer-events: auto; }

.game-scene .glass-panel { background: var(--panel-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,1); border-radius: 24px; box-shadow: 0 20px 40px rgba(0,0,0,.08), inset 0 2px 0 rgba(255,255,255,1); }

.game-scene .hud-header { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1200px; margin: 0 auto; }
.game-scene .hud-badge { padding: 12px 22px; display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 1.15rem;
  letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 10px 25px rgba(0,0,0,.05); font-family: var(--font-ui); }
.game-scene .hud-badge .lbl { color: var(--text-sub); font-size: .8rem; }
.game-scene .brine-tag { background: linear-gradient(135deg, #fef08a, #f59e0b); color: #451a03; padding: 4px 12px; border-radius: 12px;
  font-size: .9rem; font-weight: 900; border: 1px solid #fde047; box-shadow: 0 4px 10px rgba(245,158,11,.2); }

/* Countdown */
.game-scene .countdown { position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%);
  font-size: 10rem; font-weight: 900; font-style: italic; color: #fff; font-family: var(--font-ui);
  text-shadow: 0 10px 30px rgba(0,0,0,.15), 0 0 40px var(--brine-gold); pointer-events: none; opacity: 0; z-index: 15;
  -webkit-text-stroke: 3px var(--brine-gold-dark); }

/* Taunt bubble (in-game Pickle King) */
.game-scene .taunt-bubble { position: absolute; padding: 14px 24px; background: #fff; color: var(--text-main); border-radius: 20px;
  font-weight: 900; font-size: 1rem; box-shadow: 0 15px 35px rgba(0,0,0,.1); pointer-events: none; z-index: 12;
  transform: translate(-50%,-100%); opacity: 0; white-space: nowrap; border: 2px solid #e2e8f0; font-family: var(--font-ui); }
.game-scene .taunt-bubble::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  border-width: 10px 10px 0; border-style: solid; border-color: #fff transparent; }

/* Start + Game-over overlays */
.game-scene .g-overlay { position: absolute; inset: 0; z-index: 20; background: rgba(248,250,252,.6); backdrop-filter: blur(12px);
  display: flex; justify-content: center; align-items: center; pointer-events: auto; padding: 20px; }
.game-scene .g-card { width: 100%; max-width: 460px; padding: 40px; text-align: center; display: flex; flex-direction: column; gap: 20px;
  border: 2px solid #e2e8f0; border-radius: 26px; }
.game-scene .g-title { font-size: 2.6rem; font-weight: 900; font-style: italic; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--pickle-dark), var(--pickle-green)); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; font-family: var(--font-ui); }
.game-scene .g-sub { font-size: 1rem; color: var(--brine-gold-dark); text-transform: uppercase; letter-spacing: 4px; font-weight: 800; font-family: var(--font-ui); }

/* Reward summary (replaces leaderboard) */
.game-scene .reward-grid { display: flex; justify-content: space-around; background: #f8fafc; padding: 20px; border-radius: 16px;
  border: 1px solid #e2e8f0; box-shadow: inset 0 2px 4px rgba(0,0,0,.02); }
.game-scene .reward-grid .r { text-align: center; }
.game-scene .reward-grid .r .rk { font-size: .78rem; color: var(--text-sub); font-weight: 800; font-family: var(--font-ui); text-transform: uppercase; }
.game-scene .reward-grid .r .rv { font-size: 1.6rem; font-weight: 900; font-family: var(--font-ui); }
.game-scene .reward-grid .r .rv.brine { color: var(--brine-gold-dark); }
.game-scene .reward-grid .r .rv.xp { color: var(--pickle-green); }
.game-scene .g-hint { font-family: var(--font-ui); font-size: .82rem; color: var(--text-sub); }
.game-scene .lvlup-flag { font-family: var(--font-ui); font-weight: 800; color: var(--pickle-dark);
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4); border-radius: 12px; padding: 8px 12px; }

@media (max-width: 480px) {
  .game-scene .g-title { font-size: 2rem; }
  .game-scene .countdown { font-size: 7rem; }
}
