/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Cairo", sans-serif;
  background: linear-gradient(135deg, #e6f0fa 0%, #f7f7f7 100%);
  color: #2d3748;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
} /* Header */
.main-header {
  background: linear-gradient(to right, #2b6cb0, #3182ce);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}
.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.main-header .site-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: #a3bffa;
  border-bottom: 2px solid #a3bffa;
  padding-bottom: 5px;
} /* Intro Section */
.intro {
  text-align: center;
  padding: 3rem 0;
}
.intro-title {
  font-size: 2.5rem;
  color: #2b6cb0;
  margin-bottom: 2rem;
  position: relative;
}
.intro-title::after {
  content: "";
  width: 60px;
  height: 4px;
  background: #2b6cb0;
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}
.intro-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.author-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.author-img:hover {
  transform: scale(1.05);
}
.author-bio {
  max-width: 500px;
  text-align: right;
  direction: rtl;
}
.author-bio p {
  font-size: 1.2rem;
  color: #4a5568;
} /* Dashboard Section */
.dashboard {
  padding: 3rem 0;
  text-align: center;
}
.add-book-form {
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  max-width: 600px;
  margin: 2rem auto;
}
.add-book-form input,
.add-book-form textarea {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: "Cairo", sans-serif;
  font-size: 1rem;
}
.add-book-form input[type="file"] {
  padding: 0.4rem;
}
.add-book-form textarea {
  resize: vertical;
}
.add-book-form button {
  padding: 0.8rem 1.5rem;
  background-color: #2b6cb0;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  margin: 0.5rem;
  transition: background-color 0.3s ease;
}
.add-book-form button:hover {
  background-color: #4a90e2;
}
.chapter-entry {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f7fafc;
  border-radius: 6px;
}
.chapter-entry button {
  background-color: #e53e3e;
}
.chapter-entry button:hover {
  background-color: #c53030;
} /* Works Section */
.works {
  padding: 3rem 0;
  text-align: center;
}
.section-title {
  font-size: 2.5rem;
  color: #2b6cb0;
  margin-bottom: 2rem;
  position: relative;
}
.section-title::after {
  content: "";
  width: 60px;
  height: 4px;
  background: #2b6cb0;
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.book {
  background-color: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  text-align: right;
  direction: rtl;
}
.book:hover {
  transform: translateY(-5px);
}
.book-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.book-info p {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 1rem;
}
.read-more {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background-color: #2b6cb0;
  color: white;
  text-decoration: none;
  border-radius: 25px;
  transition: background-color 0.3s ease;
}
.read-more:hover {
  background-color: #4a90e2;
} /* Book Details Section */
.book-details {
  padding: 3rem 0;
  text-align: center;
}
.book-content {
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  max-width: 800px;
  margin: 2rem auto;
  text-align: right;
  direction: rtl;
}
.chapter {
  margin-bottom: 2rem;
}
.chapter-title {
  font-size: 1.8rem;
  color: #2b6cb0;
  margin-bottom: 1rem;
}
.chapter p {
  font-size: 1.1rem;
  color: #4a5568;
} /* Main content */
main {
  flex: 1;
} /* Footer */
footer {
  background: linear-gradient(to right, #2b6cb0, #3182ce);
  color: white;
  text-align: center;
  padding: 1.5rem 0;
  border-top: 4px solid #a3bffa;
  width: 100%;
}
footer p {
  font-size: 1.1rem;
}
.visitor-counter {
  text-align: center;
  color: #ffffff;
  background-color: #333;
  padding: 10px;
  font-family: "Cairo", sans-serif;
  font-size: 16px;
  border-radius: 10px;
  margin-top: 20px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
} /* Responsive Design */
@media (max-width: 768px) {
  .main-header .container {
    flex-direction: column;
    text-align: center;
  }
  .nav-links {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }
  .intro-title,
  .section-title {
    font-size: 2rem;
  }
  .intro-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  .author-img {
    width: 150px;
    height: 150px;
  }
}
/* === Search Bar Section === */
.search-bar {
  margin: 20px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  max-width: 500px;
  padding: 10px;
}

/* Input Box */
.search-bar input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 30px;
  outline: none;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f9f9f9;
}

.search-bar input:focus {
  border-color: #ff9800;
  background: #fff;
}

/* Book Counter */
#book-count {
  background: #ff9800;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  border-radius: 20px;
  padding: 8px 15px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

