:root {
  --primary-blue: #104e8b;
  --hover-blue: #0d3e6e;
  --primary-red: #dc3545;
  --hover-red: #c82333;
  --background: #F8F9FA;
  --unused-blue: #80deea;
}

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Verdana;
  background-color: var(--background);
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header styling */
header {
  display: flex;
  font-size: 29px;
  background: radial-gradient(circle, #e0f7fa, #80deea);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: 100px;
  margin-top: -23px;
  border-bottom: solid 1.5px var(--primary-blue);
}

header h1 {
  padding-left: 20px;
  padding-top: -10px;
  letter-spacing: .3px;
  text-shadow: 2px 2px 1px rgba(0, 0, 0, 0.1), 0 0 5px #1e90ff;
}

/* Body styling */
main {
  flex: 1;
}

.container {
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding-top: 30px;
  height: auto;
  width: 80%;
  gap: 30px;
  margin-bottom: 30px;
}

/* Styling for library cards */
.library-card {
  display: grid;
  justify-content: center;
  justify-items: center;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  border: 1px solid var(--primary-blue);
  background: radial-gradient(circle, #e0f7fa, #80deea);
  box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
  padding: 40px;
  border-radius: 4px;
  height: 100%;
}

.library-card h1 {
  text-shadow: 2px 2px 1px rgba(0, 0, 0, 0.1), 0 0 5px #1e90ff;
  display: flex;
  justify-content: center;
  text-align: center;
}

.library-card p {
  display: flex;
}

.card-btns {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
}

.library-card button {
  width: 95px;
  height: 30px;
  font-size: 15px;
  margin-top: 17px;
  border: none;
  border-radius: 5px;
  color: white;
  transition: background-color 0.3s ease;
  transition: transform 0.4s ease;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

.read {
  background-color: #28a745;
}

.read:hover {
  background-color: #218838;
  transform: scale(1.04);
}

.unread {
  background-color: var(--primary-red);
}

.unread:hover {
  background-color: var(--hover-red);
  transform: scale(1.04);
}

.delete-btn {
  background-color: var(--primary-blue);
}

.delete-btn:hover {
  background-color: var(--hover-blue); 
  border-color: var(--hover-blue);
  transform: scale(1.04);
}

.new-book-btn {
  margin-bottom: 40px;
  width: 200px;
  height: 40px;
  font-size: 19px;
  margin-top: 17px;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-blue);
  color: white;
  transition: transform 0.4s ease;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

.new-book-btn:hover {
  background-color: var(--hover-blue); 
  border-color: var(--hover-blue);
  transform: scale(1.05);
}

/* Styling for modal dialog */
.modal {
  background-color: var(--background);
  margin: 15% auto;
  padding: 20px;
  border: 1px solid var(--primary-blue);
  box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
  width: 75%;
  max-width: 500px;
  border-radius: 10px;
}

.modal-content h2 {
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1), 0 0 1px #1e90ff;
}

.modal-content label {
  font-weight: bold;
}

.modal-content input {
  padding: 6px;
  margin-bottom: 6px;
}

.modal-content form {
  display: grid;
  flex-direction: column;
  margin: 25px;
  padding: 10px;
  gap: 8px;
}

.close-btn {
  color: black;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1), 0 0 1px #1e90ff;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-btn:hover {
  transform: scale(1.04);
  transition: transform 0.4s ease;
}

.close-btn:hover,
.close-btn:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.modal-content  form > *:last-child {
  margin: auto;
  margin-top: 25px;
}

#read-check {
  height: 25px;
  width: auto;
}

.add-book-btn {
  width: 140px;
  height: 35px;
  font-size: 15px;
  background-color: var(--primary-blue);
  border: none;
  border-radius: 5px;
  background-color: var(--primary-blue);
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
  color: white;
  transition: transform 0.4s ease;
}

.add-book-btn:hover {
  background-color: var(--hover-blue); 
  border-color: var(--hover-blue);
  transform: scale(1.05);
}

/* Remove arrows from number input fields in Chrome, Safari, Edge, and Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove arrows from number input fields in Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

/* Styling for remove confirmation dialog */
.remove-dialog {
  border-radius: 10px;
  padding: 15px;
  border: 1px solid var(--primary-blue);
  box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
  background-color: var(--background);
  max-width: 420px;
  max-height: 200px;
  width: 100%;
  height: 100%;
  margin: auto;
  text-align: center;
}

.remove-dialog h1 {
  font-size: 24px;
  margin: 25px 0;
}

.remove-actions {
  display: flex;
  justify-content: center;
  gap: 35px;
  margin-top: 30px 0;
}

.remove-actions button {
  padding: 10px 16px;
  width: 134px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, transform 0.4s ease;
}

.confirm-remove-btn {
  background-color: #dc3545;
  color: white;
}

.confirm-remove-btn:hover {
  background-color: #c82333;
  transform: scale(1.04);
}

.cancel-remove-btn {
  background-color: var(--primary-blue);
  color: white;
}

.cancel-remove-btn:hover {
  background-color: var(--hover-blue);
  transform: scale(1.04);
}

footer {
  background: radial-gradient(circle, #e0f7fa, #80deea);
  border-top: solid 1.5px var(--primary-blue);
  color: var(--primary-blue);
  height: 3.6vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

footer a {
  color: var(--primary-blue);
}

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