.cont2{background: #f0f0f0;}
.container-game {
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.container-game h2 {
  text-align: center;
}

.description {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.05rem;
  color: #444;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.grid-preview, .grid-board {
  display: grid;
  gap: 4px;
  justify-content: center;
  margin: 0 auto 1rem auto;
  width: 100%;
  max-width: 350px;
  aspect-ratio: 1 / 1; /* Ensures square grid */
}

.grid-preview {
  background: #e0e0e0;
  padding: 0.5rem;
  border-radius: 6px;
}

.grid-board {
  background: #d0eaff;
  padding: 0.5rem;
  border-radius: 6px;
  min-height: 120px;
}

.cell, .preview-cell {
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  user-select: none;
  transition: background 0.2s;
  aspect-ratio: 1 / 1; /* Ensures square cells */
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.cell.empty {
  background: #b0c4de;
  border: 1px dashed #888;
}

.cell:active {
  background: #f7d358;
}

.cell:not(.empty):hover {
  cursor: pointer; /* Hand cursor on hover */
  background: #f0e68c;
}

.win-message {
  text-align: center;
  color: #2e7d32;
  font-size: 1.3rem;
  margin-top: 1rem;
  font-weight: bold;
}

.move-counter {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #1976d2;
}

@media (max-width: 600px) {
  .container-game {
    max-width: 98vw;
    padding: 0.5rem;
  }
  .grid-preview, .grid-board {
    max-width: 98vw;
  }
  .cell, .preview-cell {
    font-size: 1rem;
  }
}