/* General Body Style */
body {
    font-family: Arial, sans-serif;
    background-color: #101010;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
  }
  
  /* Header Section */
  .header {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .header-title {
    font-size: 3rem;
    color: #27ae60;
  }
  
  .header-subtitle {
    font-size: 1.5rem;
    color: #ffffff;
  }
  
  .header-description {
    color: #aaaaaa;
    max-width: 800px;
    margin: 0 auto;
  }

  /* Search Bar Styles */
.search-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.search-bar input[type="text"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  margin-right: 10px;
}

.search-bar button {
  padding: 8px 16px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}

.search-bar button:hover {
  background-color: #218838;
}

.back-to-library {
  text-align: center;
  margin: 15px 0;
}

.back-btn {
  display: inline-block;
  background-color: #ff6600;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.back-btn:hover {
  background-color: #e65c00;
}

  
  /* Main Content */
  .main-content {
    max-width: 800px;
    margin: 0 auto;
  }
  
  /* Book Article */
  .book {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
  }
  
  .book-cover {
    width: 100px;
    height: auto;
    margin-right: 20px;
  }
  
  .book-details {
    flex-grow: 1;
  }

  .book-details p {
    text-align: justify;  /* Justifies text for cleaner reading */
    line-height: 1.7;  /* Improves spacing between lines */
    font-size: 16px;  /* Adjusts size for better readability */
    margin-bottom: 12px;  /* Adds spacing after paragraphs */
  }
  
  .book-title {
    font-size: 1.2rem;
    color: #27ae60;
    margin: 0;
  }
  
  .book-author {
    color: #3498db;
  }
  
  .book-date {
    color: #aaa;
    font-size: 0.9rem;
    margin: 5px 0 0 0;
  }
  
  .book-rating {
    color: #f39c12;
    font-size: 0.9rem;
    margin: 0;
  }
  
  .book-notes {
    margin: 10px 0 0 0;
    color: #d1d1d1;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 5px;
  }

  .book-links {
    margin-top: 10px;
  }
  
  .book-btn {
    display: inline-block;
    padding: 10px 15px;
    margin-right: 10px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
  }
  
  .book-btn:hover {
    background-color: #0056b3;
  }
  
  
  /* Action Buttons */
  .book-actions {
    margin-left: 20px;
  }
  
  .btn {
    display: inline-block;
    background-color: #27ae60;
    color: #fff;
    border: none;
    padding: 8px 12px;
    margin-bottom: 5px;
    cursor: pointer;
    text-decoration: none;
  }
  
  .btn.edit-btn {
    background-color: #3498db;
  }
  
  .btn.delete-btn {
    background-color: #e74c3c;
  }
  
  .btn:hover {
    opacity: 0.8;
  }
  
  /* No Books Message */
  .no-books-message {
    text-align: center;
    color: #aaaaaa;
    margin-top: 40px;
  }

  .footer {
    padding: 20px;
    background-color: #222;
    color: #fff;
  }
  
  .footer h3 {
    margin-bottom: 15px;
  }
  
  .add-book-form {
    margin-bottom: 20px;
  }
  
  .footer {
    text-align: center;
    padding: 15px;
    background-color: #222;
    color: white;
    position: relative;
    bottom: 0;
    width: 100%;
}

.recommendation-section {
  background-color: #222;
  color: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  margin: 20px auto;
  text-align: center;
}

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

.recommendation-form input,
.recommendation-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #111;
  color: white;
}

.submit-btn {
  padding: 10px;
  background-color: green;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.submit-btn:hover {
  background-color: darkgreen;
}

.top-right-container {
  display: flex;
  flex-direction: column; /* Stack elements vertically */
  align-items: flex-end; /* Align to right side */
  gap: 10px; /* Space between search and form */
  position: absolute;
  top: 20px;
  right: 20px;
}

/* Move recommend toggle to center */
.recommend-toggle {
  cursor: pointer;
  font-weight: bold;
  color: green;
  text-align: center;
  display: block; /* Ensures it takes full width */
  margin-top: 10px; /* Adds space below login button */
}

.recommend-toggle:hover {
  text-decoration: underline;
}

/* Ensure the form is centered */
.recommendation-section {
  display: none; /* Initially hidden */
  background-color: #222;
  color: white;
  padding: 15px;
  border-radius: 10px;
  max-width: 350px;
  text-align: center;
  margin: 20px auto;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Form fields */
.recommendation-form {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Adjust spacing */
  align-items: center; /* Center inputs */
}

.recommendation-form label {
  font-weight: bold;
  text-align: center;
  width: 100%;
  display: block;
}

/* Reduce input width */
.recommendation-form input,
.recommendation-form textarea {
  width: 90%; /* Make inputs slightly smaller */
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #111;
  color: white;
  font-size: 14px;
}

/* Reduce text area height */
.recommendation-form textarea {
  height: 80px;
  resize: none; /* Disable resize */
}

/* Style submit button */
.submit-btn {
  width: 90%;
  padding: 10px;
  background-color: green;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.submit-btn:hover {
  background-color: darkgreen;
}

/* Styling for Thanks Page */
.thanks-page {
  background-color: #111; /* Dark background */
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
}

.thanks-container {
  background-color: #222;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
}

.thanks-container h2 {
  font-size: 24px;
  color: #4CAF50; /* Green highlight */
}

.thanks-container p {
  font-size: 16px;
  margin: 10px 0;
}

/* Back to Books Button */
.back-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: green;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  transition: 0.3s;
}

.back-btn:hover {
  background-color: darkgreen;
}

/* Login Page Styling */
.login-page {
  background-color: #111; /* Dark background */
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
}

/* Login Form Container */
.login-container {
  background-color: #222;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  max-width: 350px;
  width: 90%;
}

/* Form Fields */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form label {
  text-align: left;
  font-weight: bold;
}

.login-form input {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #111;
  color: white;
}

/* Login Button */
.login-btn {
  width: 100px;
  padding: 10px;
  background-color: green;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

.login-btn:hover {
  background-color: darkgreen;
}

/* Error Message */
.error-message {
  color: red;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Back to Books Link */
.back-to-books {
  margin-top: 15px;
}

.back-to-books a {
  color: lightgreen;
  text-decoration: none;
  font-weight: bold;
}

.back-to-books a:hover {
  text-decoration: underline;
}


@media (max-width: 768px) {
  .book-details p {
      font-size: 14px;  /* Slightly smaller text for compact screens */
      line-height: 1.6;  /* Adjusts line spacing for mobile */
      padding: 0 10px;  /* Ensures text does not stick to screen edges */
  }
}

@media (max-width: 768px) {
  .header-description {
      font-size: 14px; /* Slightly smaller text for mobile */
      line-height: 1.7; /* Adjusted spacing */
      padding: 10px; /* Ensures padding remains balanced */
  }
}