/* =========================================================
   LAB 12 – MEMORY GAME STYLES
   ========================================================= */

.memory-board-wrapper {
  display: flex;
  justify-content: center;
}

.memory-grid {
  display: grid;
  gap: 12px;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Easy: 4 columns × 3 rows */
.memory-grid-easy {
  grid-template-columns: repeat(4, minmax(70px, 1fr));
}

/* Hard: 6 columns × 4 rows */
.memory-grid-hard {
  grid-template-columns: repeat(6, minmax(55px, 1fr));
}

.memory-card {
  width: 100%;
  aspect-ratio: 3 / 4;           /* keeps cards rectangular */
  perspective: 800px;
  cursor: pointer;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.4s;
  transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 600;
}

/* Back side (hidden content) */
.memory-card-back {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transform: rotateY(180deg);
}

/* Front side (logo / question mark) */
.memory-card-front {
  background: linear-gradient(135deg, #ffb26b, #ff7b54);
  color: #fff;
  border: 2px solid #ff9966;
}

/* When card is matched, make it a bit dimmer */
.memory-card.matched .memory-card-back {
  background: #e7ffe7;
  border-color: #8bc34a;
}

/* Stats small card */
.memory-stats {
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
  font-size: 0.95rem;
}
/* ===== LAB 12 OPTIONAL – TIMER + BEST SCORE ===== */