@import url("https://fonts.googleapis.com/css2?family=Nunito&display=swap");
:root {
  /* Since I'll use the main colors many times, it will be easier to class it under root */
  --primary-color: #dfdfde;
  --secondary-color: #b20600;
  --white-color: #e8e8e8;
  --dark-color: #363636;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  background: #b20600;
}

button {
  padding: 8px;
  outline: none;
  cursor: pointer;
  border: 1px solid lightgray;
  border-radius: 5px;
  background: dfdfde;
}

button:hover {
  background-color: #b1abab;
}

.container {
  width: 1280px;
  margin: auto;
}

header {
  background-color: #363636;
}

#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
  padding: 0 20px;
  background: #363636;
  color: aliceblue;
}

#header button {
  font-family: inherit;
  border: 1px solid red;
  font-weight: 700;
}

#create_card {
  display: none;
  width: 370px;
  margin: auto;
  padding: 20px;
  margin-top: 10px;
  background: #363636;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.9);
}

#create_card h2 {
  color: whitesmoke;
  text-align: center;
}
#create_card label {
  color: #fff;
  font-weight: 900;
  padding: 4px;
}

#create_card textarea {
  width: 100%;
  border-radius: 5px;
  font-family: inherit;
  border: 1px solid lightgray;
  resize: none;
  color: #363636;
  font-weight: 700;
  padding: 5px;
}

#create_card button {
  width: fit-content;
}

#flashcards {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  margin: auto;
  margin-top: 10px;
  padding: 0px 10px;
}

.flashcard {
  width: 370px;
  height: 200px;
  word-wrap: break-word;
  margin: 10px;
  background: #363636;
  color: whitesmoke;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.9);
  position: relative;
}

.flashcard h2 {
  font-size: 2rem;
  color: white;
}

.fa-minus {
  top: 3%;
  right: 2%;
  position: absolute;
  color: white;
  transition: 0.3s ease-out;
}

.fa-minus:hover {
  color: red;
}

@media (max-width: 1280px) {
  .container {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .flashcard {
    margin: auto;
  }

  .flashcard {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  #header {
    padding: 20px;
    gap: 10px;
    flex-direction: column;
    align-items: center;
  }

  #create_card {
    width: 95%;
  }

  .flashcard {
    width: 100%;
  }
}
