/* roller3d.css - Roller 3D: roll a ball through a 3D maze. Reuses
   tokens from styles.css and game-shell.css's shell/bar/pause chrome,
   same as every other game. The stats row above the board is the shared
   pattern (Level / Time / Lives / Balance). */

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

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

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

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

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

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

.roller3d-board-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Level-clear banner -- a brief "Level 2!" beat between mazes. */
.roller3d-banner {
  position: absolute;
  top: 22%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}

.roller3d-banner[hidden] { display: none; }

.roller3d-banner-text {
  background: rgba(13, 24, 36, .72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.25rem;
  text-shadow: 0 1px 8px rgba(20, 40, 60, .5);
}

.roller3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #0b1226;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

/* -- Overlays (start/game-over) -- same pattern as every other game.
   The start overlay stays transparent so the 3D track shows through. */

.roller3d-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px;
  border-radius: var(--radius);
}

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

.roller3d-kicker {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 8px rgba(20, 40, 60, .4);
  margin: 0 0 6px;
}

.roller3d-overlay-title {
  font-family: Georgia, serif;
  font-size: 3.4rem;
  line-height: .95;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #fff;
  margin: 0;
  text-shadow: 0 3px 0 rgba(20, 40, 60, .15), 0 10px 30px rgba(20, 40, 60, .35);
}

.roller3d-overlay-text {
  margin: 12px 0 0;
  max-width: 32ch;
  color: rgba(255, 255, 255, .94);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 500;
  text-shadow: 0 1px 10px rgba(20, 40, 60, .45);
}

.roller3d-tap-hint {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(13, 24, 36, .55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  animation: roller3d-pulse 1.6s ease-in-out infinite;
}

@keyframes roller3d-pulse {
  0%, 100% { transform: scale(1); opacity: .92; }
  50% { transform: scale(1.05); opacity: 1; }
}

.roller3d-how {
  margin: 18px 0 0;
  max-width: 34ch;
  color: rgba(255, 255, 255, .8);
  font-size: .86rem;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(20, 40, 60, .5);
}

.roller3d-how b { color: #fff; }

/* Game-over panel -- same pattern as Wings. */

.roller3d-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  max-width: 340px;
}

.roller3d-panel h2 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--text);
}

.roller3d-newbest {
  display: none;
  margin-top: 6px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f2b134;
}

.roller3d-newbest.show { display: inline-block; }

.roller3d-panel-stats {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 16px 0 18px;
}

.roller3d-panel-stat { text-align: center; }

.roller3d-panel-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.roller3d-panel-lab {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.roller3d-again-hint {
  margin: 12px 0 0;
  font-size: .82rem;
  color: var(--muted);
}
