/* Import the Nokora font */
@import url('https://fonts.googleapis.com/css2?family=Nokora:wght@400;700&display=swap');

/* Apply a full-page gradient background and Nokora font */
body {
  font-family: 'Nokora', serif;
  background: linear-gradient(135deg, #74ABE2, #5563DE);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
}

/* Center the search container with a semi-transparent background */
.search-container {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 600px;
  margin-top: 20px;
}

/* Heading styling */
.search-container h1 {
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Customize form controls */
.form-control, .btn {
  border-radius: 0.5rem;
}

.btn {
  padding: 0.5rem 1.5rem;
}

/* Navbar styling */
.navbar {
  width: 100%;
  background-color: #007bff !important;
  padding: 10px 20px;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
  color: white !important;
}

.navbar-nav {
  margin-left: auto;
}

.navbar-nav .nav-item {
  margin: 0 10px;
}

.navbar-nav .nav-link {
  color: white !important;
  font-size: 1rem;
  transition: 0.3s;
}

.navbar-nav .nav-link:hover {
  color: #f8f9fa !important;
  text-decoration: underline;
}

/* Navbar mobile responsiveness */
.navbar-toggler {
  border: none;
  outline: none;
  background-color: white;
  padding: 5px;
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* Fix for mobile dropdown menu */
@media (max-width: 991px) {
  .navbar-collapse {
    background-color: #007bff;
    padding: 10px;
    border-radius: 5px;
  }
}

/* Book Viewer Styles */
.book-container {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 1200px;
  margin-top: 20px;
}

.book-title {
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #fff;
}

.contents {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  color: #333; /* Darker text for readability on white background */
}

.contents h2 {
  color: #2c3e50;
  margin-top: 0;
  font-weight: 700;
}

.page-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.page-list li a {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: #2980b9;
  border: 1px solid #ddd;
  border-radius: 0.5rem; /* Match button radius */
  transition: all 0.3s;
}

.page-list li a:hover {
  background-color: #2980b9;
  color: white;
  border-color: #2980b9;
}

.viewer {
  text-align: center;
}

.page-image {
  max-width: 90%;
  height: auto;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 0.5rem; /* Match button radius */
}

.nav-buttons {
  margin-top: 20px;
}

.nav-buttons .btn, .back-button .btn {
  border-radius: 0.5rem; /* Already defined in .btn, but ensuring consistency */
  padding: 0.5rem 1.5rem; /* Already defined in .btn, but ensuring consistency */
}

/* Ensure button colors match the navbar and other buttons */
.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #5a6268;
}