* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #f7f9fd;
}

.container {
  width: 90vw;
  max-width: 62.5em;
  position: relative;
  margin: auto;
}

.add-flashcard-con {
  display: flex;
  justify-content: flex-end;
  padding: 1.2em 1em;
}

button {
  border: none;
  outline: none;
  cursor: pointer;
}

.add-flashcard-con button {
  font-size: 1em;
  background-color: #4caf50; /* Updated color */
  color: #ffffff;
  padding: 0.8em 1.2em;
  font-weight: 500;
  border-radius: 0.4em;
}

#card-con {
  margin-top: 1em;
}

.question-container {
  width: 90vw;
  max-width: 34em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #ffffff;
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  padding: 3em 2em;
  border-radius: 0.6em;
  box-shadow: 0 1em 2em rgba(28, 0, 80, 0.1);
}

.question-container h2 {
  font-size: 2.2em;
  color: #363d55;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2em;
}

.wrapper {
  display: grid;
  grid-template-columns: 11fr 1fr;
  gap: 1em;
  margin-bottom: 1em;
}

.error-con {
  align-self: center;
}

#error {
  color: #ff5353;
  font-weight: 400;
}

.fa-xmark {
  font-size: 1.4em;
  background-color: #4caf50; /* Updated color */
  height: 1.8em;
  width: 1.8em;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  justify-self: flex-end;
}

label {
  color: #363d55;
  font-weight: 600;
  margin-bottom: 0.3em;
}

textarea {
  width: 100%;
  padding: 0.7em 0.5em;
  border: 1px solid #d0d0d0;
  outline: none;
  color: #414a67;
  border-radius: 0.3em;
  resize: none;
}

textarea:not(:last-child) {
  margin-bottom: 1.2em;
}

textarea:focus {
  border-color: #363d55;
}

#save-btn {
  font-size: 1em;
  background-color: #4caf50; /* Updated color */
  color: #ffffff;
  padding: 0.6em 0;
  border-radius: 0.3em;
  font-weight: 600;
}

.card-list-container {
  display: grid;
  padding: 0.2em;
  gap: 1.5em;
  grid-template-columns: 1fr 1fr 1fr;
}

.card {
  background-color: #ffffff;
  box-shadow: 0 0.4em 1.2em rgba(28, 0, 80, 0.08);
  padding: 1.2em;
  border-radius: 0.4em;
}

.question-div,
.answer-div {
  text-align: justify;
}

.question-div {
  margin-bottom: 0.5em;
  font-weight: 500;
  color: #363d55;
}

.answer-div {
  margin-top: 1em;
  font-weight: 400;
  color: #414a67;
}

.show-hide-btn {
  display: block;
  background-color: #4caf50; /* Updated color */
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  padding: 0.6em 0;
  border-radius: 0.3em;
}

.buttons-con {
  display: flex;
  justify-content: flex-end;
}

.edit,
.delete {
  background-color: transparent;
  padding: 0.5em;
  font-size: 1.2em;
}

.edit {
  color: #4caf50; /* Updated color */
}

.delete {
  color: #ff5353;
}

.hide {
  display: none;
}

@media screen and (max-width: 800px) {
  .card-list-container {
    grid-template-columns: 1fr 1fr;
    gap: 0.8em;
  }
}

@media screen and (max-width: 450px) {
  body {
    font-size: 14px;
  }
  .card-list-container {
    grid-template-columns: 1fr;
    gap: 1.2em;
  }
}
