/** Define styles for all screen sizes */

body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background-color: #c1b8b896;
  color: #252323;
  width: 100%;
  overflow-x: hidden;
}

header,
footer {
  background-color: #1971b8f9;
  color: #fff;
  /* White text color */
  padding: 20px;
  text-align: center;
  width: 100%;
}

.power-memory-game {
  text-align: center;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%;
  background-color: #d2691e;
}

h2 {
  color: #000;
  /** Black header text color */
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding: 10px;
  background-color: #c1b8b896;
  border: 2px solid #252323;
  /** Add border around all the cards */
}

.card {
  width: 150px;
  height: 100px;
  background-color: #1971b8f9;
  background-size: cover;
  background-position: center;
  color: #fff;
  /** White text color */
  font-size: 20px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid #000;
  /** Add border around each card */
}

.matched {
  color: #00FF00;
  /** Green text color for matched cards */
}

button {
  margin-top: 22px;
  margin-bottom: 22px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #1971b8f9;
  color: #fff;
  /** White text color */
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #00FF00;
}

/** Media queries for responsiveness */

/** Tablet */
@media (max-width: 768px) {
  .cards {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 80px;
    height: 120px;
    font-size: 18px;
  }
}

/** Mobile */
@media (max-width: 576px) {

  header,
  footer {
    padding: 15px;
  }

  .card {
    width: 60px;
    height: 90px;
    font-size: 14px;
  }
}