:root {
  --primary-color: #212529;
  --secondary-color: #f8f9fa;
  --tertiary-color: #39ff14;
  --quanternary-color: #48a0e7;
  --quinary-color: #4700b3;
  --primary-color-transparent: hsla(210, 11%, 15%, 0.5);
  --quanternary-color-transparent: hsla(207, 77%, 59%, 0.5);
  --delete-button-color: #e03131;
  --book-color: #343a40;
}

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

body {
  background-color: var(--primary-color);
  font-family: "Roboto", sans-serif;
  font-size: 16px;
}

.icon::before {
  font-family: "Font Awesome 6 Free";
  display: inline-block;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

.body-container {
  margin: 0 auto;
  max-width: 1300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: var(--secondary-color);
  box-shadow: 0 1px 30px var(--quanternary-color);
  padding: 15px;
  margin-bottom: 60px;
}

.header-btn {
  font-weight: 900;
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.github-btn:link {
  margin-right: auto;
  margin-left: 40px;
  text-decoration: none;
  color: var(--primary-color);
}

.github-icon::before {
  content: "\f09b";
  font-family: "Font Awesome 6 Brands";
  display: flex;
  justify-content: center;
  align-items: center;
}

.add-item-btn {
  margin-left: auto;
  margin-right: 40px;
  background-color: transparent;
  border: none;
}

.add-item-icon::before {
  content: "\f055";
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-a:link {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.header-a:hover,
.github-btn:hover,
.add-item-btn:hover {
  color: var(--quanternary-color);
}

.header-a:active,
.github-btn:active,
.add-item-btn:active {
  color: var(--quinary-color);
}

.cat-paw::before {
  content: "\f1b0";
  font-weight: 900;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 6px;
  background-image: url(./background-screenshot.png);
  background-size: 1000%;
  background-clip: text;
  -webkit-background-clip: transparent;
  -webkit-text-fill-color: transparent;
}

.chrome-cat-paw::before {
  content: "\f1b0";
  font-weight: 900;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 6px;
}

.main-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: max-content;
  gap: 50px;
  margin-bottom: 90px;
}

.book-container {
  height: 200px;
  width: 350px;
  background-color: var(--book-color);
  border-radius: 10px;
  box-shadow: 0 1px 20px var(--quanternary-color);
  display: grid;
  grid-template-rows: 75% 25%;
  grid-template-columns: 75% 25%;
  transition: transform 0.3s;
}

.book-container:hover {
  transform: scale(1.1);
  box-shadow: 0 1px 40px var(--quanternary-color);
}

.book-container-inner {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px 8px 0 20px;
  overflow: hidden;
  border-right: 2px solid var(--quanternary-color-transparent);
}

.overflow-container {
  height: 100%;
  width: 100%;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--quanternary-color);
}

.book-item-margin {
  margin-bottom: 15px;
}

.book-content {
  color: var(--secondary-color);
  font-size: 1.1rem;
  font-weight: 500;
}

.book-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.btn-container {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.btn-style {
  margin: 10px;
  height: 50px;
  width: 50px;
  border: 2px solid var(--secondary-color);
  border-radius: 100px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.btn-edit:hover {
  color: var(--quinary-color);
  border-color: var(--quinary-color);
  background-color: var(--secondary-color);
}

.btn-edit:active {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
  background-color: var(--quinary-color);
}

.btn-delete:hover {
  color: var(--delete-button-color);
  border-color: var(--delete-button-color);
  background-color: var(--secondary-color);
}

.btn-delete:active {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
  background-color: var(--delete-button-color);
}

.edit::before {
  content: "\f303";
  font-weight: 900;
  font-size: 1.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.delete::before {
  content: "\f2ed";
  font-weight: 900;
  font-size: 1.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-status {
  display: flex;
  align-items: center;
  width: 100%;
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  padding: 10px 20px;
  border-top: 2px solid var(--quanternary-color-transparent);
}

.hide-modal {
  display: none;
}

.form-container {
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding-top: 20px;
  background-color: var(--quanternary-color);
  background-color: var(--quanternary-color-transparent);
}

.form {
  margin: auto;
  width: 380px;
  height: 510px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.exit-form-btn {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  margin-right: 10px;
  margin-top: 10px;
  background-color: transparent;
  border: none;
  color: var(--secondary-color);
}

.exit-icon::before {
  content: "\f057";
  font-weight: 900;
  font-size: 1.4rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.exit-form-btn:hover {
  color: var(--delete-button-color);
}

.exit-form-btn:active {
  color: var(--primary-color);
}

.hide-exit-btn {
  display: none;
}

.form-h1 {
  width: 100%;
  background-color: var(--quanternary-color);
  color: var(--secondary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  padding: 10px;
  margin-bottom: 20px;
}

.fieldset {
  padding: 0 50px;
  border: none;
  display: flex;
  flex-direction: column;
}

.legend {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal-legend-spacing {
  margin: 0 6px;
}

.book-icon::before {
  content: "\f518";
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.label {
  margin-bottom: 7px;
  font-size: 1.1rem;
  font-weight: 500;
}

.input {
  padding: 4px;
  border: 2px solid var(--quanternary-color);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.submit-btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.submit-btn,
.submit-edit-btn {
  margin: auto;
  width: 100px;
  height: 50px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  background-color: var(--quinary-color);
  color: var(--secondary-color);
}

.submit-btn:hover,
.submit-edit-btn:hover {
  background-color: var(--secondary-color);
  color: var(--quinary-color);
  border-color: var(--quinary-color);
}

.reading-status:active,
.submit-btn:active,
.submit-edit-btn:active {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.hide-submit-btn {
  display: none;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  background-color: var(--secondary-color);
}

.footer-a:link {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-color);
}

.footer-a:hover {
  color: var(--quanternary-color);
}

.footer-a:active {
  color: var(--quinary-color);
}

@media (min-width: 1700px) {
  .main-container {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 80px;
  }
}

@media (min-width: 1600px) {
  .main-container {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 60px;
  }
}

@media (min-width: 1350px) {
  .main-container {
    column-gap: 80px;
  }
}

@media (max-width: 1200px) {
  .main-container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 80px;
  }
}

@media (max-width: 850px) {
  .main-container {
    column-gap: 50px;
  }
}

@media (max-width: 790px) {
  .main-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .github-btn:link {
    margin-left: 20px;
  }
  .add-item-btn {
    margin-right: 20px;
  }
}

@media (max-width: 400px) {
  .github-btn:link {
    margin-left: 5px;
  }
  .add-item-btn {
    margin-right: 5px;
  }
}
