/* ── Reset & Base ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0047B9;
  user-select: none;
  touch-action: none;
}

canvas {
  display: block;
}

#game-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.hidden {
  display: none !important;
}

/* ── Shared Screen Overlay ── */
.screen-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: auto;
}

.screen-overlay::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(13, 63, 204, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.screen-overlay > * {
  position: relative;
  z-index: 1;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 56px;
  border: none;
  border-radius: 50px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-transform: uppercase;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.95);
}

.btn-white {
  background: #fff;
  color: #0047B9;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  min-width: 240px;
}

.btn-white:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.btn-gold {
  background: linear-gradient(135deg, #FFB300, #FF8F00);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,179,0,0.35);
  min-width: 240px;
  margin-top: 16px;
}

.btn-blue-outline {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
  min-width: 240px;
  margin-top: 10px;
}

/* ══════════════════════════════════════
   MAIN MENU — OM RUN Style
   ══════════════════════════════════════ */
#main-menu.om-menu::before {
  background: #0047B9;
}

/* Scrolling ticker bar */
.ticker-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #0a2f99;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  z-index: 10;
}

.ticker-content {
  display: inline-flex;
  gap: 16px;
  animation: ticker-scroll 20s linear infinite;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  text-transform: uppercase;
}

.ticker-arrows {
  color: rgba(255,255,255,0.6);
  letter-spacing: -2px;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Menu content */
.menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 20px;
}

/* OM HALF MARATHON — Real SVG Logo */
.om-real-logo {
  margin-bottom: 28px;
  animation: logoFadeIn 0.8s ease-out both;
  text-align: center;
}

.om-logo-img {
  width: 280px;
  height: auto;
  max-width: 80vw;
}

/* Legacy logo (kept for fallback) */
.om-logo-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 28px;
  animation: logoFadeIn 0.8s ease-out both;
}

@keyframes logoFadeIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.om-logo-runner {
  flex-shrink: 0;
  margin-right: 4px;
}

.runner-svg {
  width: 72px;
  height: 72px;
  animation: runnerBounce 1.2s ease-in-out infinite alternate;
}

@keyframes runnerBounce {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.om-logo-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.om-logo-om {
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  line-height: 1;
}

.om-logo-badge {
  display: flex;
  flex-direction: column;
  background: #E8305B;
  border-radius: 5px;
  padding: 5px 10px 4px;
  line-height: 1.2;
}

.om-logo-badge span {
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
}

.om-logo-badge span:first-child {
  font-size: 1rem;
  letter-spacing: 1px;
}

.om-logo-badge span:last-child {
  font-size: 0.55rem;
  letter-spacing: 2.5px;
}

.menu-flag {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-align: center;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.menu-desc {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.8);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 4px;
  animation: fadeInUp 0.6s ease-out 0.45s both;
}

.menu-desc strong {
  color: #fff;
  font-weight: 800;
}

/* START button — animated */
#main-menu .btn-white {
  margin-top: 28px;
  padding: 20px 80px;
  font-size: 1.3rem;
  border-radius: 16px;
}

.btn-start-animated {
  animation: fadeInUp 0.6s ease-out 0.6s both, btnPulse 2.5s ease-in-out 1.5s infinite;
  position: relative;
  overflow: hidden;
}

.btn-start-animated::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  animation: btnShine 3s ease-in-out 2s infinite;
}

@keyframes btnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 24px rgba(0,0,0,0.15); }
  50% { transform: scale(1.03); box-shadow: 0 8px 36px rgba(255,255,255,0.25); }
}

@keyframes btnShine {
  0%   { left: -60%; }
  30%  { left: 120%; }
  100% { left: 120%; }
}

/* Controls section */
.controls-section {
  margin-top: 28px;
  animation: fadeInUp 0.6s ease-out 0.8s both;
}

.controls-title {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
}

.control-icons {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-bottom: 10px;
}

.control-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.control-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.2s, background 0.2s;
}

.control-circle:active {
  transform: scale(0.9);
  background: rgba(255,255,255,0.2);
}

.arrow-icon {
  display: inline-block;
}

.control-item:nth-child(1) .arrow-icon {
  animation: arrowLeft 2s ease-in-out 2s infinite;
}
.control-item:nth-child(2) .arrow-icon {
  animation: arrowRight 2s ease-in-out 2.3s infinite;
}
.control-item:nth-child(3) .arrow-icon {
  animation: arrowUp 2s ease-in-out 2.6s infinite;
}

@keyframes arrowLeft {
  0%, 70%, 100% { transform: translateX(0); }
  35% { transform: translateX(-4px); }
}
@keyframes arrowRight {
  0%, 70%, 100% { transform: translateX(0); }
  35% { transform: translateX(4px); }
}
@keyframes arrowUp {
  0%, 70%, 100% { transform: translateY(0); }
  35% { transform: translateY(-4px); }
}

.control-item span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
}

.controls-hint {
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.6;
}

/* ══════════════════════════════════════
   HUD
   ══════════════════════════════════════ */
#hud {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50;
  pointer-events: none;
}

#hud > * {
  pointer-events: auto;
}

/* TOP: Water bar + pause */
.hud-water-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  padding-top: max(18px, calc(env(safe-area-inset-top) + 10px));
}

/* BOTTOM: stats + progress */
.hud-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0 16px 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
}

.hud-bottom-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 8px;
}

.hud-bottom-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-bottom-value {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hud-bottom-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}

.hud-bottom-item .icon {
  font-size: 1rem;
}

/* Legacy hidden bottles for JS compat */
.hud-bottles {
  display: none;
}

.hud-score, .hud-distance {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.btn-pause {
  background: rgba(0,0,0,0.35);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

/* Progress bar */
.progress-container {
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #29B6F6, #0288D1);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-label {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  font-weight: 600;
}

/* HUD Pothole ticker bar */
.hud-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #D6006D;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  z-index: 55;
  pointer-events: none;
}

.hud-ticker .ticker-content {
  display: inline-flex;
  gap: 16px;
  animation: ticker-scroll 15s linear infinite;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  text-transform: uppercase;
}

/* Boost indicator */
.boost-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #FFB74D, #FF7043);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 8px 24px;
  border-radius: 30px;
  z-index: 60;
  animation: pulse-glow 0.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pulse-glow {
  from { box-shadow: 0 0 12px rgba(255, 112, 67, 0.4); transform: translate(-50%, -50%) scale(1); }
  to   { box-shadow: 0 0 28px rgba(255, 112, 67, 0.7); transform: translate(-50%, -50%) scale(1.04); }
}

/* ══════════════════════════════════════
   WATER BALANCE BAR
   ══════════════════════════════════════ */
.water-bar-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.water-bar-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.water-bar-track {
  flex: 1;
  height: 20px;
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.25);
}

.water-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #29B6F6, #0288D1);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.water-bar-fill.low {
  background: linear-gradient(90deg, #FF9800, #F57C00);
}

.water-bar-fill.critical {
  background: linear-gradient(90deg, #F44336, #D32F2F);
  animation: waterPulse 0.6s ease-in-out infinite alternate;
}

@keyframes waterPulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.water-bar-warning {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #FF9800;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  pointer-events: none;
  padding: 2px 0;
  animation: fadeInUp 0.3s ease-out both;
}

.water-bar-warning.critical {
  color: #F44336;
}

/* ══════════════════════════════════════
   PAUSE MENU
   ══════════════════════════════════════ */
#pause-menu h2 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 24px;
  font-weight: 900;
}

#pause-menu .btn {
  margin: 8px;
}

/* ══════════════════════════════════════
   GAME OVER — Updated design
   ══════════════════════════════════════ */
.result-screen {
  text-align: center;
  width: 100%;
  max-width: 380px;
  padding: 20px;
}

.result-screen h2 {
  font-size: 2.4rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 24px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  letter-spacing: 2px;
}

/* Game Over stat rows */
.go-stats {
  width: 100%;
  margin-bottom: 16px;
}

.go-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
}

.go-stat-icon {
  font-size: 1.3rem;
  width: 32px;
}

.go-stat-label {
  flex: 1;
  text-align: left;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}

.go-stat-value {
  font-size: 1.05rem;
  color: #FFD54F;
  font-weight: 800;
}

/* New best badge */
.go-new-best {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255,213,79,0.15);
  border: 2px solid rgba(255,213,79,0.4);
  border-radius: 14px;
  padding: 10px 16px;
  margin: 8px auto 16px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.go-best-icon {
  font-size: 1.8rem;
}

.go-best-text {
  font-size: 1.1rem;
  font-weight: 900;
  color: #FFD54F;
  letter-spacing: 1px;
}

.result-screen .btn {
  margin-top: 10px;
}

/* ══════════════════════════════════════
   SHARE POPUP
   ══════════════════════════════════════ */
.share-popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-popup-content {
  background: #0047B9;
  border-radius: 20px;
  padding: 24px;
  width: 90%;
  max-width: 360px;
  position: relative;
}

.share-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 4px;
}

.share-title {
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
}

.share-preview {
  margin-bottom: 20px;
}

.share-frame {
  background: linear-gradient(135deg, #0047B9, #002D7A);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.share-frame-header {
  margin-bottom: 16px;
}

.share-logo-img {
  width: 180px;
  height: auto;
}

.share-frame-body {
  margin-bottom: 16px;
}

.share-nick {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 6px;
}

.share-result {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  margin-bottom: 8px;
}

.share-hashtag {
  font-size: 1.1rem;
  color: #FFD54F;
  font-weight: 800;
}

.share-frame-lines {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.share-line {
  width: 60px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s;
}

.share-btn:active {
  transform: scale(0.96);
}

.share-insta {
  background: linear-gradient(135deg, #E1306C, #833AB4, #F77737);
  color: white;
}

.share-fb {
  background: #1877F2;
  color: white;
}

.share-dl {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

/* ══════════════════════════════════════
   FINISH / COMPLETION — OM RUN Style
   ══════════════════════════════════════ */
#completion-screen.om-finish::before {
  background: #0047B9;
  opacity: 0.92;
}

.finish-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  padding: 20px;
  max-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.finish-title {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  font-style: italic;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-shadow: 0 3px 16px rgba(0,0,0,0.3);
}

.finish-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}

.finish-subtitle strong {
  color: #FFD54F;
}

/* Promo code card */
.promo-card {
  background: linear-gradient(135deg, rgba(41,182,246,0.4), rgba(13,63,204,0.6));
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 20px 32px;
  text-align: center;
  width: 100%;
  backdrop-filter: blur(10px);
  margin-bottom: 20px;
}

.promo-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  margin-bottom: 8px;
}

.promo-code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.promo-code {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 3px;
}

.btn-copy-promo {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  color: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.btn-copy-promo:active {
  transform: scale(0.9);
}

.btn-copy-promo.copied {
  background: rgba(76, 175, 80, 0.4);
  border-color: rgba(76, 175, 80, 0.6);
}

.promo-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}

/* Nickname section */
.nickname-section {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.nickname-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  text-align: center;
}

.nickname-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  outline: none;
  text-transform: uppercase;
}

.nickname-input::placeholder {
  color: rgba(255,255,255,0.3);
  text-transform: none;
}

/* Finish stats */
.finish-stats {
  width: 100%;
  margin-bottom: 8px;
}

.finish-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.finish-stat-row .stat-value {
  color: #FFD54F;
  font-weight: 700;
}

/* ── Leaderboard ── */
.leaderboard-section {
  width: 100%;
  background: rgba(0,20,80,0.5);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.leaderboard-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-align: center;
  margin-bottom: 12px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.lb-row.lb-highlight {
  color: #D6006D;
  font-weight: 800;
}

.lb-rank {
  width: 24px;
  font-size: 0.85rem;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
}

.lb-highlight .lb-rank {
  color: #D6006D;
}

.lb-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-left: 4px;
}

.lb-highlight .lb-name {
  color: #D6006D;
}

.lb-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}

.lb-highlight .lb-time {
  color: #D6006D;
}

/* ── Popup Text ── */
#popup-container {
  position: fixed;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  pointer-events: none;
}

.popup-text {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  animation: popup-anim 1s ease-out forwards;
}

@keyframes popup-anim {
  0%   { opacity: 0; transform: translateY(20px) scale(0.7); }
  20%  { opacity: 1; transform: translateY(0) scale(1.1); }
  80%  { opacity: 1; transform: translateY(-20px) scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(0.9); }
}

/* ── Encouragement text ── */
.encouragement-text {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 65;
  pointer-events: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  text-align: center;
  white-space: nowrap;
  animation: encourageFade 2.5s ease-out forwards;
}

@keyframes encourageFade {
  0%   { opacity: 0; transform: translateX(-50%) translateY(10px); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  75%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-15px); }
}

/* ══════════════════════════════════════
   SPRING BANNER — compact top text
   ══════════════════════════════════════ */
.spring-banner {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  pointer-events: none;
  background: rgba(0, 71, 185, 0.85);
  padding: 10px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  animation: springFadeIn 0.4s ease-out both;
}

.spring-banner span {
  color: #FFD54F;
  font-weight: 900;
}

@keyframes springFadeIn {
  0%   { opacity: 0; transform: translateX(-50%) translateY(10px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.spring-banner-out {
  animation: springFadeOut 0.4s ease-in forwards !important;
}

@keyframes springFadeOut {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ── Mobile optimizations ── */
@media (max-width: 600px) {
  .om-logo-om { font-size: 2.6rem; }
  .om-logo-badge span:first-child { font-size: 0.9rem; }
  .om-logo-badge span:last-child { font-size: 0.6rem; }
  .runner-svg { width: 64px; height: 64px; }
  .menu-flag { font-size: 1rem; }
  .menu-desc { font-size: 0.85rem; }
  .hud-score { font-size: 1.4rem; }
  .btn { padding: 16px 40px; font-size: 1rem; }
  .result-screen h2 { font-size: 1.6rem; }
  .finish-title { font-size: 2.4rem; }
  .promo-code { font-size: 1.8rem; }
  #main-menu .btn-white { padding: 18px 60px; font-size: 1.15rem; }
}

@media (max-height: 700px) {
  .menu-content { gap: 0; }
  .om-logo-new { margin-bottom: 16px; }
  .menu-flag { margin-bottom: 10px; }
  #main-menu .btn-white { margin-top: 18px; padding: 16px 60px; }
  .controls-section { margin-top: 18px; }
  .finish-title { font-size: 2rem; }
  .promo-card { padding: 14px 24px; }
}
