body {
  margin: 0;
  background: #f5f7fa;
}

.memory-page {
  font-family: Arial, sans-serif;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px;
  text-align: center;
}

h1 {
  font-size: 30px;
  color: #003d52;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.instructions {
  font-size: 19px;
  background: #e8f8ff;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  justify-items: center;
}

.card {
  width: 110px;
  height: 110px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 55px;
  cursor: pointer;
  transition: transform .2s;
}

.card.hidden {
  background: #d0eaff;
  color: transparent;
}

.card.matched {
  background: #c6ffd1;
  border: 3px solid #2e8b57;
}

#resetBtn, #winResetBtn {
  margin-top: 18px;
  padding: 12px 32px;
  background: #0077cc;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

#winMessage {
  display: none;
  background: #d4ffd6;
  padding: 26px;
  border-radius: 15px;
  margin-top: 26px;
  font-size: 24px;
  color: #006622;
  font-weight: bold;
}

/* Responsivo */
@media (max-width: 480px) {
  .board {
    grid-template-columns: repeat(3, 1fr);
  }
  .card {
    width: 95px;
    height: 95px;
    font-size: 48px;
  }
}
