/* ===== MEMORY MATRIX GAME ===== */

.mm-stage {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 1; /* Keep it square */
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  position: relative;
}

.mm-grid {
  display: grid;
  gap: 8px;
  width: 100%;
  height: 100%;
}

.mm-tile {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mm-tile[disabled] {
  cursor: default;
}

/* Base interactive feedback */
.mm-tile:not([disabled]):active {
  transform: scale(0.9);
}
.mm-tile:not([disabled]):hover {
  background: rgba(255,255,255,0.12);
}

/* States */
.mm-tile.highlight {
  background: linear-gradient(135deg, var(--primary), #a855f7);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  transform: scale(1.05);
  z-index: 2;
}

.mm-tile.correct {
  background: linear-gradient(135deg, var(--accent), #34d399);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  transform: scale(1.05);
  z-index: 2;
}

.mm-tile.wrong {
  background: linear-gradient(135deg, var(--secondary), #f43f5e);
  border-color: var(--secondary);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
  animation: shake 0.3s;
  z-index: 2;
}

.mm-tile.selected-tile {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--primary);
  box-shadow: inset 0 0 0 2px var(--primary), 0 0 12px rgba(139, 92, 246, 0.4);
  transform: scale(0.96);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.mm-message {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  min-height: 1.6em;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(139, 92, 246, 0.6);
}
