body {
  font-family: Arial, sans-serif;
  background-color: #edf0f5;
  color: #081f5c;
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;
  font-family: "Times New Roman";
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #081f5c;
  padding: 10px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.navbar .brand {
  font-size: 27px;
  font-weight: bold;
  color: #fff9f0;
  text-decoration: none;
  font-family: "Times New Roman";
}

.navbar .nav-links {
  display: flex;
  gap: 15px;
}

.navbar .nav-links a {
  color: #edf0f5;
  text-decoration: none;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
  font-family: "Times New Roman";
}

.navbar .nav-links a.active {
  background-color: #edf0f5;
  color: #081f5c;
}

/* Card Layout (Worksheet Style) */
.book-card-form {
  display: flex;
  gap: 20px;
  background-color: #faf5ef;
  border: 2px solid #344fad;
  border-radius: 12px;
  padding: 20px;
  max-width: 800px;
  margin: 20px auto;
} /* Cover Upload */
.book-cover-upload label {
  display: inline-block;
  background-color: #344fad;
  color: white;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  font-family: "Courier New";
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.book-cover-upload label:hover {
  background-color: #344fad;
  transform: scale(1.05);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}
.book-cover-upload img {
  display: block;
  width: 150px;
  height: auto;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  align-items: center;
}

.book-cover-upload input[type="file"] {
  display: none;
}

#coverPreview {
  display: none;
  margin: 12px auto 0;
  max-width: 150px;
  max-height: 250px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}
/* Label */
label {
  font-size: 22px;
  font-family: "Courier New";
}
::placeholder {
  font-family: "Courier New";
  font-size: 18px;
} /* Info Section */
.book-info-section {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.book-info-section input,
.book-info-section textarea {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
} /* Rating */
.overall span,
.romance span,
.sadness span {
  font-size: 22px;
  cursor: pointer;
  padding: 2px;
  color: #0b1956;
}
.overall span.selected {
  color: #f8ed4c;
}
.romance span.selected {
  color: #f70000;
}
.sadness span.selected {
  color: #426cc2;
} /* Format */
.format-options {
  display: flex;
  gap: 12px;
  justify-content: center;
  border-radius: 20px;
}
legend {
  font-family: "Courier New";
  font-size: 22px;
}
.format-label {
  font-size: 35px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 5px;
  transition: border 0.3s, transform 0.2s;
}
.format-options input[type="radio"] {
  display: none;
}
.format-options input[type="radio"]:checked + .format-label {
  border: 2px solid #0b1956;
  transform: scale(1.2);
} /* Submit Button */
#submitBtn {
  background-color: #0b1956;
  color: white;
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 120px;
  margin: 15px auto 0;
  display: block;
  font-size: 16px;
}
#submitBtn:hover {
  background-color: #e9f2ff;
  color: #0b1956;
} /* Book List */
#bookList {
  max-width: 800px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.book-card {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 15px;
  background: #fff;
}
.book-card-top {
  display: flex;
  gap: 15px;
}
.book-card-top img {
  width: 100px;
  border-radius: 8px;
}

/* Library Grid */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.library-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid #344fad;
  transition: transform 0.2s;
}
.library-grid img:hover {
  transform: scale(1.05);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

#deleteBookBtn {
  background-color: #f70000;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 15px;
}
#deleteBookBtn:hover {
  background: #c40000;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
}
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}
#deleteBookBtn {
  background-color: #f70000;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 15px;
}
#deleteBookBtn:hover {
  background: #c40000;
}

/* Status dropdown */
.book-status select {
  padding: 8px 12px;
  border: 2px solid #344fad;
  border-radius: 8px;
  background-color: #f9f6ff;
  color: #08205b;
  font-family: "Courier New";
  font-size: 14px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
