/*!******************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[5].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[5].use[3]!./app/games/tetris/tetris.module.css ***!
  \******************************************************************************************************************************************************************************************************************************************************************************/
.tetris_wrapper__af96v {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: var(--background);
}

.tetris_container__i9xey {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header */
.tetris_header__PQSGK {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.tetris_titleBlock__tGKuV h1 {
  font-family: var(--font-raleway, sans-serif);
  font-weight: 900;
  font-size: 2rem;
  color: var(--primary);
  line-height: 1;
  text-align: center;
}

.tetris_titleBlock__tGKuV p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 2px;
  text-align: center;
}

/* Game area: board + side panel always side-by-side */
.tetris_gameArea__CN4Y_ {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
}

/* Board */
.tetris_boardWrapper__Jro4b {
  position: relative;
  border: 3px solid #333;
  border-radius: 4px;
  background: #1a1a2e;
  overflow: hidden;
  touch-action: none;
  -webkit-touch-callout: none;
}

.tetris_board__Aeg2b {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1px;
  background: #0f0f23;
  touch-action: none;
}

.tetris_cell__4qbQk {
  width: clamp(22px, 5.5vw, 30px);
  height: clamp(22px, 5.5vw, 30px);
  border-radius: 2px;
  transition: background-color 0.05s;
}

.tetris_cellEmpty__6bsi1 {
  background: #1a1a2e;
}

/* Piece colors */
.tetris_cellI__of2Q_ { background: #00f0f0; box-shadow: inset 0 0 6px rgba(0, 240, 240, 0.4); }
.tetris_cellO__GheGj { background: #f0f000; box-shadow: inset 0 0 6px rgba(240, 240, 0, 0.4); }
.tetris_cellT__0Z8Ov { background: #a000f0; box-shadow: inset 0 0 6px rgba(160, 0, 240, 0.4); }
.tetris_cellS__D73Qm { background: #00f000; box-shadow: inset 0 0 6px rgba(0, 240, 0, 0.4); }
.tetris_cellZ__69VJK { background: #f00000; box-shadow: inset 0 0 6px rgba(240, 0, 0, 0.4); }
.tetris_cellJ__sdUUQ { background: #0000f0; box-shadow: inset 0 0 6px rgba(0, 0, 240, 0.4); }
.tetris_cellL__DQIfx { background: #f0a000; box-shadow: inset 0 0 6px rgba(240, 160, 0, 0.4); }

.tetris_cellFlash__PMk0Y {
  background: white !important;
  box-shadow: none !important;
}

.tetris_boardPaused__t5chF {
  filter: blur(8px);
  pointer-events: none;
}

.tetris_pauseOverlay__3Zli1 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.tetris_pauseOverlay__3Zli1 span {
  font-family: var(--font-raleway, sans-serif);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 24px;
  border-radius: 8px;
}

/* Side panel - always vertical column beside the board */
.tetris_sidePanel__QkYVC {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 100px;
}

.tetris_panelCard__3PXE1 {
  background: #1a1a2e;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.tetris_panelCard__3PXE1 h3 {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 4px;
}

.tetris_value__bf3Wv {
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  font-family: 'Courier New', monospace;
}

/* Next piece preview */
.tetris_previewGrid__0h9pU {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin: 0 auto;
  width: -moz-fit-content;
  width: fit-content;
}

.tetris_previewCell__vgydq {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: transparent;
}

/* Buttons */
.tetris_btn__o2dZx {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}

.tetris_btn__o2dZx:hover {
  opacity: 0.85;
}

.tetris_btnStart__19Zwg {
  background: var(--primary);
  padding: 12px 24px;
  font-size: 0.9rem;
}

/* Mobile controls — Game Boy layout */
.tetris_mobileControls__GbpE_ {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 0 8px;
  width: 100%;
  max-width: 360px;
}

/* D-pad */
.tetris_dpad__gnssk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.tetris_dpadRow__qfIZX {
  display: flex;
  gap: 0;
}

.tetris_dpadSpacer__ohXdJ {
  width: 48px;
  height: 48px;
}

.tetris_dpadCenter__Jsvd6 {
  width: 48px;
  height: 48px;
  background: #d0d0d0;
  border: 1px solid #bbb;
}

.tetris_dpadBtn__L2MqI {
  width: 48px;
  height: 48px;
  border: 2px solid #bbb;
  background: #e0e0e0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
  color: #333;
  font-weight: 700;
}

.tetris_dpadBtn__L2MqI:active {
  background: #c0c0c0;
}

/* Action buttons (right side) */
.tetris_actionBtns__3Zp2H {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.tetris_actionBtn__qlrT1 {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #999;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.tetris_actionBtn__qlrT1:active {
  transform: scale(0.92);
}

.tetris_actionBtnRotate__5avyH {
  background: #4a90d9;
  border-color: #3a7bc8;
}

.tetris_actionBtnDrop__7nrs1 {
  background: var(--primary);
  border-color: var(--primary-dark);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

/* Game over overlay */
.tetris_overlay__XXEvW {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 100;
}

.tetris_overlayTitle___0Xk6 {
  font-family: var(--font-raleway, sans-serif);
  font-weight: 900;
  font-size: 2.5rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.tetris_overlayStats__kr4Sc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  text-align: center;
  line-height: 1.8;
}

.tetris_overlayStats__kr4Sc strong {
  color: white;
  font-weight: 800;
}

.tetris_overlayBtn__jaPip {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s;
}

.tetris_overlayBtn__jaPip:hover {
  opacity: 0.85;
}

/* Start screen */
.tetris_startScreen__N_Wae {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
}

.tetris_startScreen__N_Wae p {
  color: var(--text-light);
  font-size: 0.9rem;
  max-width: 300px;
}

/* Mobile: keep side panel to the right, shrink everything to fit */
@media (max-width: 580px) {
  .tetris_wrapper__af96v {
    padding: 0.25rem;
    min-height: 100dvh;
    overflow: hidden;
  }

  .tetris_container__i9xey {
    height: calc(100dvh - 60px); /* account for navbar */
    justify-content: flex-start;
    overflow: hidden;
  }

  .tetris_header__PQSGK {
    margin-bottom: 0.35rem;
  }

  .tetris_titleBlock__tGKuV h1 {
    font-size: 1.4rem;
  }

  .tetris_titleBlock__tGKuV p {
    font-size: 0.7rem;
  }

  /* Keep row layout on mobile */
  .tetris_gameArea__CN4Y_ {
    gap: 8px;
    align-items: stretch;
  }

  .tetris_cell__4qbQk {
    width: clamp(14px, 4.2vw, 20px);
    height: clamp(14px, 4.2vw, 20px);
  }

  .tetris_sidePanel__QkYVC {
    gap: 6px;
    min-width: 70px;
    max-width: 80px;
    justify-content: flex-start;
  }

  .tetris_panelCard__3PXE1 {
    padding: 5px 4px;
    border-radius: 6px;
  }

  .tetris_panelCard__3PXE1 h3 {
    font-size: 0.5rem;
    margin-bottom: 2px;
  }

  .tetris_value__bf3Wv {
    font-size: 0.85rem;
  }

  .tetris_previewCell__vgydq {
    width: 12px;
    height: 12px;
  }

  .tetris_btn__o2dZx {
    padding: 6px 8px;
    font-size: 0.65rem;
  }

  .tetris_mobileControls__GbpE_ {
    display: flex;
    margin-top: 8px;
  }
}

@media (max-width: 380px) {
  .tetris_cell__4qbQk {
    width: 13px;
    height: 13px;
  }

  .tetris_sidePanel__QkYVC {
    min-width: 58px;
    max-width: 65px;
    gap: 4px;
  }

  .tetris_panelCard__3PXE1 {
    padding: 4px 3px;
  }

  .tetris_value__bf3Wv {
    font-size: 0.75rem;
  }

  .tetris_previewCell__vgydq {
    width: 10px;
    height: 10px;
  }

  .tetris_dpadSpacer__ohXdJ,
  .tetris_dpadCenter__Jsvd6,
  .tetris_dpadBtn__L2MqI {
    width: 42px;
    height: 42px;
  }

  .tetris_dpadBtn__L2MqI {
    font-size: 0.95rem;
  }

  .tetris_actionBtn__qlrT1 {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }

  .tetris_actionBtnDrop__7nrs1 {
    font-size: 0.6rem;
  }
}

