/* stacks.css - Stacks: a one-tap tower-stacking 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 board to drop the swinging block. */

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

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

@media (max-width: 480px) {
  .stacks-stats {
    padding: 0 var(--gs-bar-right-clear) 0 var(--gs-bar-left-clear);
    gap: 10px;
  }
  /* Same real-bug precedent as Numbers'/Slither's/Rodents' 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. */
  .stacks-stats .stacks-stat-compact-hide {
    display: none;
  }
}

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

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

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

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

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

/* White flash on a perfect drop -- brief, driven from stacks.js. */
.stacks-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius);
}

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

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

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

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

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

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