* {
  box-sizing: border-box;
}

p {
  white-space: pre-line;
}

html {
  font-size: 10px; /* 1rem = 10px */
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;

  display: flex;
  flex-direction: column;

  font-family: 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

h1 {
  font-size: 3.5rem;
  font-family: 'Poppins', 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

button {
  font-family: 'Raleway', 'Lato', 'Helvetica Neue', Arial, sans-serif;

  font-size: 2.9rem;
  width: 300px;
  padding: 5px;
  border: none;
  cursor: pointer;

}

button:hover {
  filter: brightness(90%);
}

dialog {
  min-height: 65vh;
  min-width: 35vw;
  padding: 1.5rem;

  background-color: #F9FAFB ;
  border-radius: 10px;
  border: 1px solid black;
  box-shadow: 2px 4px 5px lightgray;
  

}

.dialog-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  font-size: 2rem;
}

.book-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5rem;
}

.form-row {
  display: flex;
  justify-content: row;
  align-items: center;
  gap: 5px;
}

input {
  width: 27rem;
  height: 3.5rem;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  font-size: 1em;
}

input[type='checkbox'] {
  width: 2.5rem;
  height: 2.5rem;
}

label {
  color: gray;
  font-weight: bold;
  font-family: sans-serif;
}

.header {
  background-color: #F9FAFB;
  color: #1F2937;

  padding: 1rem 4rem 1rem 3rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border: solid 1px lightgray;
  box-shadow: 2px 4px 6px gray ;
}

.header .right {
  display: flex;
  justify-content: center ;
  align-items: center;
}

.books-img {
  width: 6rem;
  height: 6rem;
}

.main {
  background-color: #E5E7EB;
  color: #333333;

  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  flex: 1;
}

.btn-add-book {
  background-color: #0e7fbc;
  border-radius: 20px;
  color: #F9FAFB;
  box-shadow: 2px 4px 5px gray ;
}

.btn-remove, form button {
  width: 300px;
  background-color: #E5E7EB;
  border-radius: 4px;
  color: #333333;
  box-shadow: 2px 4px 5px gray ;
}

button:active{
  /* Sposta leggermente in basso */
  transform: translateY(2px);

  /* Ombra più corta → effetto “schiacciato” */
  box-shadow: 0 0 0 gray;
}

.main .books-grid {
  flex: 1;
  padding: 6rem;

  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 3rem;
}

.book {
  min-width: 40rem;
  min-height: 40rem;
  padding: 3rem;

  background-color: #F9FAFB ;
  border-radius: 10px;
  border: 1px solid black;
  box-shadow: 2px 4px 5px lightgray ;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  font-size: 3.1rem;
}

.book-read {
  width: 30rem;
  text-align: center;
  border-radius: 4px;
  padding: 3px;

  cursor: pointer;
}

.book-read:hover {
  filter: brightness(90%);
}


.read-yes {
  background-color: #b0fa88;;
}

.read-no {
  background-color: #FFCCCB;
}

.footer {
  background-color: #F9FAFB;
  color: #374151;

  display: flex;
  flex-direction: row;
  justify-content: center;
}

.footer .credits {
  font-size: 0.5rem;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  padding: 1rem;
}

.credits div {
  font-size: 3.8em; /* Dipende dal font size impostato in .credits */
}

.github-logo {
  display: block;
  max-width: 2.8rem;
  max-height: 2.8rem;
  /*gestisce la transizione per la proprietà transform; la durata della transizione è di 0,3 secondi;la velocità di cambiamento non è costante: parte lenta, accelera al centro e rallenta di nuovo alla fine. */
  transition: transform 0.3s ease-in-out;
}

.github-logo:hover {
  transform: rotate(360deg) scale(1.2); 
}