/* Raccoon Rescue — game shell styles
 * Game is canvas-based; CSS just centers the canvas, kills mobile scroll,
 * and styles a couple of HTML overlays we render outside canvas. */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #b6e0ee;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: 'Fredoka One', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  touch-action: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top, #cfeaf3 0%, #a2d3e0 60%, #92c4d2 100%);
}

#game-canvas {
  display: block;
  touch-action: none;
  background: transparent;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  border-radius: 6px;
}

/* Loading splash */
#splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  background:
    radial-gradient(ellipse at top, #cfeaf3 0%, #a2d3e0 60%, #92c4d2 100%);
  z-index: 50;
  transition: opacity 0.4s ease;
  color: #4f4767;
}

#splash.hidden { opacity: 0; pointer-events: none; }

#splash .title {
  font-size: clamp(28px, 6vw, 56px);
  letter-spacing: 1px;
  text-shadow: 0 4px 0 #ffffff80;
}

#splash .bar-wrap {
  width: min(60vw, 380px);
  height: 18px;
  background: #ffffff80;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

#splash .bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a3d34a, #7bb728);
  transition: width 0.2s ease-out;
  box-shadow: 0 2px 0 #5a8a14 inset;
}

#splash .hint {
  font-size: 14px;
  color: #6a6385;
  opacity: 0.85;
}

/* Rotate hint for very small landscape phones */
#rotate-hint {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  background: rgba(0,0,0,0.85);
  color: white;
  z-index: 100;
  font-size: 18px;
}

#rotate-hint .icon {
  font-size: 64px;
  animation: rotateHint 1.6s ease-in-out infinite;
}

@keyframes rotateHint {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 480px) {
  #rotate-hint { display: flex; }
}
