.memory-game {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


/* =========================================================
   controls
   ========================================================= */

.memory-game .controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.memory-game input,
.memory-game button {
  font: inherit;
  border-radius: 6px;
}

.memory-game input {
  background: #111;
  color: #fff;
  border: 1px solid #444;
  padding: 0.6rem 0.8rem;
  min-width: 120px;
}

.memory-game button {
  background: #111;
  color: #fff;
  border: 1px solid #444;
  padding: 0.6rem 1rem;
  cursor: pointer;
}

.memory-game button:hover {
  border-color: #666;
  background: #1a1a1a;
}


/* =========================================================
   memory grid
   ========================================================= */

.memory-game .memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.8rem;
}


/* =========================================================
   memory cells
   ========================================================= */

.memory-game .cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid #333;
  border-radius: 8px;

  min-height: 100px;
  padding: 0.8rem;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.memory-game .cell:hover {
  border-color: #555;
}

.memory-game .cell.allocated {
  background: rgba(77, 163, 255, 0.15);
  border-color: #4da3ff;
}


/* =========================================================
   cell content
   ========================================================= */

.memory-game .address {
  font-size: 0.8rem;
  color: #aaa;
  font-family: monospace;
}

.memory-game .value {
  margin-top: 0.75rem;
  font-size: 1.3rem;
  font-weight: 600;
}


/* =========================================================
   info panel
   ========================================================= */

.memory-game .info {
  border: 1px solid #333;
  border-radius: 8px;

  padding: 1rem;

  background: rgba(255,255,255,0.03);

  line-height: 1.5;
}
