* {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #ebebeb;
  color: #000000;
}

header {
  background-color: #000000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  box-shadow: 0px 0px 10px rgb(0,0,0);
}

header .logo {
  font-size: 1.8em;
  font-weight: bold;
  color: #ffffff;
}

.search-bar {
  display: flex;
  width: 30%;
}

.search-bar input {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px 0 0 6px;
  outline: none;
}

.search-bar button {
  background-color: #ffc800;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: 0.3s;
}

.search-bar button:hover {
  background-color: #ffd336;
}

nav a {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin-left: 20px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover {
  color: #ffc800;
  text-decoration: none;
}

.banner-carousel {
  position: relative;
  width: 100%; 
  margin: 0 0 40px 0;
  overflow: hidden;
  border-radius: 0; 
  box-shadow: 0px 5px 15px rgb(0, 0, 0); 
}

.banner-carousel .carousel-item {
  display: none;
  position: relative;
  width: 100%;
  height: 450px;
}

.banner-carousel .carousel-item.active {
  display: block;
}

.banner-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0px;
  filter: brightness(0.65); 
}

.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  padding: 20px;
  max-width: 80%;
}

.banner-text h2 {
  font-size: 2.4em;
  margin-bottom: 10px;
  font-weight: 700;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.6);
}

.banner-text p {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.5);
}

.banner-btn-link {
  background-color: #ffc800;
  color: #000;
  padding: 10px 22px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s;
}

.banner-btn-link:hover {
  background-color: #ffe32a;
}

.banner-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 200, 0, 0.2);
  color: #000;
  border: none;
  border-radius: 0;
  width: 60px;
  height: 100%;
  font-size: 1.5em;
  cursor: pointer;
  transition:  0.3s;
  z-index: 10;
}

.banner-btn:hover {
  background-color: #ffae00;
}

.banner-btn.left {
  left: 0px;
}

.banner-btn.right {
  right: 0px;
}

.dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: #ffc800;
}

.banner .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.6);
  border: none;
  color: white;
  font-size: 2em;
  font-weight: bold;
  border-radius: 50%;
  cursor: pointer;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  z-index: 10;
}

.banner .carousel-btn:hover {
  background-color: #ffc800;
  color: black;
}

.banner .carousel-btn.left {
  left: 10px;
}

.banner .carousel-btn.right {
  right: 10px;
}

.banner .carousel-btn.left::before {
  content: '<';
  font-size: inherit;
  font-weight: inherit;
}

.banner .carousel-btn.right::before {
  content: '>';
  font-size: inherit;
  font-weight: inherit;
}

main {
  padding: 40px;
  text-align: center;
}

main h2 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.8em;
  margin-bottom: 30px;
}

.carousel-wrapper {
  position: relative;
  width: 85%;
  max-width: 1200px;
  margin: 0 auto 40px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible; 
}

.carousel {
  display: flex;
  gap: 20px;
  width: 100%;
  transition: transform 0.5s ease;
  overflow: hidden;
  scroll-behavior: smooth;
}

.author-box {
  flex: 0 0 calc((100% - (20px * 5)) / 6); 
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s;
  background: #fff;
}

.author-box:hover {
  background-color: #ffc800;
  transition: 0.3s;
}

.author-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: #ddd;
  background-size: cover;       
  background-position: center;  
  margin: 20px auto 10px auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.author-box h3 {
  font-size: 1.1em;
  margin-bottom: 20px;
}

.book-box {
    flex: 0 0 calc((100% - (20px * 5)) / 6); 
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
    padding-bottom: 10px;
}

.book-box:hover {
    background-color: #ffc800;
    transition: 0.3s;
}

.book-img {
    width: 150px;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin: 20px auto 10px auto;
    display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.book-text {
    font-size: 1.1em;
    margin-top: 5px;
    padding: 0 8px;
    font-weight: 600;
}

.genre-box {
  flex: 0 0 180px;
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.genre-box:hover {
  transform: scale(1.05);
}

.genre-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto 10px auto;
  font-size: 14px;
  color: #000;
}

.genre-box h3 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.1em;
  margin: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #ffc800;
  color: #000;
  font-size: 1.5em;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  width: 45px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: 0.3s;
  z-index: 20; 
}

.carousel-btn:hover {
  background-color: #ffe32a;
}

.carousel-btn.left {
  left: -55px;
}

.carousel-btn.right {
  right: -55px;
}

.carousel-btn.left::before {
  content: '❮';
}

.carousel-btn.right::before {
  content: '❯';
}

footer {
  background-color: #111;
  color: #b0b0b0;
  padding: 60px 20px 20px;
  margin-top: auto;
  border-top: 4px solid #ffc800;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr; 
  gap: 40px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.8em;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 0.95em;
  margin-bottom: 20px;
  color: #888;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  color: #fff;
  background-color: #333;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85em;
  text-decoration: none;
  transition: 0.3s;
}

.social-icons a:hover {
  background-color: #ffc800;
  color: #000;
}

.footer-links-group h4 {
  color: #fff;
  font-size: 1.1em;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links-group a {
  display: block;
  text-decoration: none;
  color: #b0b0b0;
  margin-bottom: 10px;
  font-size: 0.95em;
  transition: color 0.2s, transform 0.2s;
}

.footer-links-group a:hover {
  color: #ffc800;
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid #333;
  font-size: 0.9em;
  color: #666;
}

.menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  z-index: 1001; 
}

.menu-toggle-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 3px;
  transition: transform 0.3s, background-color 0.3s;
}

@media (max-width: 768px) {
  
  header {
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center;
    flex-wrap: wrap; 
    padding: 15px 20px;
    gap: 15px; 
    position: relative; 
  }

  .menu-toggle-btn {
    display: flex;
    order: 2; 
  }

  .search-bar {
    width: 100%;
    order: 3; 
  }

  nav#main-nav {
    display: none; 
    order: 4; 
    flex-direction: column;
    width: 100%; 
    background-color: #000000;
    position: absolute;
    top: 100%; 
    left: 0;
    z-index: 1000; 
    border-top: 1px solid #333;
  }

  nav#main-nav.nav-active {
    display: flex;
  }

  nav#main-nav a {
    margin-left: 0;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid #222;
  }
  
  nav#main-nav a:hover {
      background-color: #222;
  }

  #theme-toggle-btn {
      position: static; 
      margin: 10px auto;
      padding: 10px;
  }

  .banner-carousel .carousel-item {
    height: 350px; 
  }
  .banner-text h2 {
    font-size: 1.8em; 
  }
  .banner-text p {
    font-size: 1em;
  }
  .banner-btn {
    display: none;
  }

  main {
    padding: 20px;
  }
  .carousel-wrapper {
    width: 100%;
  }

  .carousel-btn {
    display: none;
  }

  .carousel {
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
  }

  .author-box,
  .book-box,
  .genre-box {
    flex: 0 0 150px;
    scroll-snap-align: start;
  }
  
  .author-box {
    flex: 0 0 calc((100% - 20px) / 2); 
  }
  
  footer {
    padding: 40px 20px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px 15px;
  }

  .footer-brand {
    grid-column: 1 / -1; 
    text-align: center;
    margin-bottom: 10px;
  }

  .social-icons {
    justify-content: center;
  }

  .footer-links-group {
    text-align: left;
  }
}