* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
}

.navbar {
  padding: 1rem;
  background-color: #6262cf;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  gap: 1rem;
}

.books {
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.books .card {
  --card-background-color: cornflowerblue;

  background-color: var(--card-background-color);
  color: white;
  border-radius: 8px;
  padding: 1rem;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.books .card.not-read {
  --card-background-color: gray;
}

.books .card .book-title {
  color: wheat;
  align-self: center;
}

.books .card .info-text {
  color: wheat;
  border-bottom: 2px solid wheat;
}

.books .card .interaction-buttons {
  align-self: flex-end;
}

.books .card .delete-btn {
  cursor: pointer;
  font-size: 1.25rem;
  user-select: none;
}

.books .card .book-title {
  font-size: 1.5rem;
}

.books .card .read-toggle-button {
  --button-color: white;
  --text-color: #6262cf;

  align-self: flex-end;
  margin-top: auto;
  width: 100px;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: none;
  outline: none;
  background-color: var(--button-color);
  color: var(--text-color);
}

.books .card .read-toggle-button.not-read {
  --button-color: #6262cf;
  --text-color: white;
}

.create-btn {
  cursor: pointer;
  width: 60px;
  height: 60px;
  font-size: 30px;
  margin-right: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #6262cf;
  color: white;
  border: none;
  border-radius: 100%;
  position: fixed;
  right: 0;
  bottom: 0;

  display: flex;
  justify-content: center;
  align-items: center;
}

.create-btn:hover {
  background-color: #4b4b96;
}

.create-btn:active {
  background-color: #66669c;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: 200ms ease-in-out;
  border: 1px solid white;
  border-radius: 10px;
  z-index: 10;
  background-color: cornflowerblue;
  color: white;
  width: 500px;
  max-width: 80%;
}

.modal.active {
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid white;
}

.modal-header .title {
  font-size: 1.25rem;
  font-weight: bold;
}

.modal-header .close-button {
  cursor: pointer;
  color: white;
  border: none;
  outline: none;
  background: none;
  font-size: 1.25rem;
  font-weight: bold;
}

.modal-body {
  padding: 10px 15px;
}

.modal-body form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-body input[type="text"] {
  padding: 8px 5px;
  border: none;
  border-radius: 10px;
  outline: none;
}

.modal-body input[type="text"]:hover {
  background-color: aliceblue;
}

.modal-body .modal-input label {
  margin-right: 10px;
}

.modal-body .form-checkbox {
  display: flex;
  align-items: center;
}

.modal-body .submit-btn {
  cursor: pointer;
  align-self: center;
  background-color: #6262cf;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 10px;
}

.modal-body .submit-btn:hover {
  background-color: #4b4b96;
}

.modal-body .submit-btn:active {
  background-color: #66669c;
}

#overlay {
  position: fixed;
  opacity: 0;
  transition: 200ms ease-in-out;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

#overlay.active {
  opacity: 1;
  pointer-events: all;
}
