/* rodents.css - Rodents: a whack-a-mole-style lawn game. Reuses tokens
   from styles.css and game-shell.css's shell/bar/pause chrome, same as
   every other game. No joystick -- the whole interaction is tapping
   directly on the lawn to catch a rodent. */

.rodents-stage {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
  gap: 8px;
}

.rodents-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .rodents-stats {
    padding: 0 var(--gs-bar-right-clear) 0 var(--gs-bar-left-clear);
    gap: 10px;
  }
  /* Same real-bug precedent as Numbers'/Slither's own mobile stat-row
     fix -- Coins is the least essential stat mid-play, so it's the one
     dropped when the shell's own button clearance squeezes this row. */
  .rodents-stats .rodents-stat-compact-hide {
    display: none;
  }
}

.rodents-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  min-width: 56px;
}

.rodents-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--muted);
}

.rodents-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.rodents-board-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.rodents-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #2d6a35;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  touch-action: none;
}

.rodents-toast {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(52, 211, 153, .5);
  color: #06170f;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 5;
}

.rodents-toast[hidden] { display: none; }

.rodents-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

/* "Sorry, you'll scare the cat" -- per explicit instruction. Same
   pop/fade shape as the toast above but a distinct warm-warning color
   and slightly longer/slower hold so it actually gets read. */
.rodents-warning {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(251, 191, 36, .85);
  color: #2b1500;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 5;
  text-align: center;
  max-width: 80%;
}

.rodents-warning[hidden] { display: none; }

.rodents-warning.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

/* -- Overlays (start/game-over) -- same pattern as every other game. */

.rodents-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 13, 16, .72);
  border-radius: var(--radius);
}

.rodents-overlay[hidden] { display: none; }

.rodents-overlay-card {
  text-align: center;
  padding: 24px;
  max-width: 340px;
}

.rodents-overlay-title {
  font-family: Georgia, serif;
  font-size: 26px;
  color: var(--text);
  margin-bottom: 8px;
}

.rodents-overlay-text {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
}
