/* Tetris — playfield canvas with side panel for the next-piece preview
   and a row of touch buttons below for mobile play. */

.tetris-container {
  margin: 16px auto;
  padding: 0 12px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tetris-area {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.t-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 110px;
  flex-shrink: 0;
}
.t-side-label {
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.85;
}

#t-next {
  width: 96px;
  height: 96px;
  background: #0b0e1a;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.t-playfield {
  position: relative;
  flex-shrink: 0;
}

#t-canvas {
  width: 240px;
  height: 480px;
  background: #0b0e1a;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  display: block;
  box-sizing: border-box;
}

.t-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  text-align: center;
  border-radius: 4px;
}
.t-overlay.hidden { display: none; }
.t-overlay h2 { margin: 0 0 8px; font-size: 24px; }
.t-overlay p  { margin: 0 0 4px; font-size: 14px; opacity: 0.9; }
.t-overlay button { margin-top: 14px; padding: 9px 18px; font-size: 14px; }

.t-controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.t-controls button {
  padding: 14px 0;
  font-size: 22px;
  font-weight: 700;
  touch-action: manipulation;
}

.t-stat {
  font-size: 12px;
  opacity: 0.85;
}
.t-stat b {
  font-weight: 700;
  font-size: 16px;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .tetris-container { padding: 0 6px; }
  #t-canvas { width: 200px; height: 400px; }
  .t-side { width: 90px; }
  #t-next { width: 80px; height: 80px; }
  .t-controls button { padding: 12px 0; font-size: 20px; }
}
@media (max-width: 360px) {
  #t-canvas { width: 180px; height: 360px; }
  .t-side { width: 80px; }
  #t-next { width: 70px; height: 70px; }
}
