
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.menu {
    display: none;
    flex-direction: column;
    background-color: #333;
    position: absolute;
    top: 50px;
    right: 20px;
    width: 200px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.menu a {
    color: white;
    padding: 10px;
    text-decoration: none;
    border-bottom: 1px solid #444;
    display: block;
}

.menu a:hover {
    background-color: #555;
}

/* Show menu when active */
.menu.active {
    display: flex;
    right: 1220px;
    ;
}
.logo{
    margin-left: 55px;
}
.logo img{
    width: 350px;
    height: 90px;

}
.nav{
    display: flex;
    flex-direction: row;
    background-color: #ffe600cc;
}
/*menubar*/


/*search bar*/

    /* From Uiverse.io by ZAKARIAE48CHELLE */ 
.input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    padding-left: 300px;
  }
  
  .input {
    border-style: none;
    height: 50px;
    width: 50px;
   
    outline: none;
    border-radius: 50%;
    transition: 0.5s ease-in-out;
    background-color: #1557c0;
    box-shadow: 0px 0px 3px #1557c0;
 
    color: #fff;
  }
  
  .input::placeholder,
  .input {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
      "Lucida Sans", Arial, sans-serif;
    font-size: 17px;
  }
  
  .input::placeholder {
    color: #8f8f8f;
  }
  
  .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    outline: none;
    border-style: none;
    border-radius: 50%;
    pointer-events: painted;
    background-color: transparent;
    transition: 0.2s linear;
  }
  
  .icon:focus ~ .input,
  .input:focus {
    box-shadow: none;
    width: 250px;
    border-radius: 0px;
    background-color: transparent;
    border-bottom: 3px solid #1557c0;
    transition: all 500ms cubic-bezier(0, 0.11, 0.35, 2);
  }
  
  
  
  .input::placeholder {
    color: #8f8f8f;
  }
  
  .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    outline: none;
    border-style: none;
    border-radius: 50%;
    pointer-events: painted;
    background-color: transparent;
    transition: 0.2s linear;
  }
  
  .icon:focus ~ .input,
  .input:focus {
    box-shadow: none;
    width: 250px;
    border-radius: 0px;
    background-color: transparent;
    border-bottom: 3px solid #1557c0;
    transition: all 500ms cubic-bezier(0, 0.11, 0.35, 2);
  }
  
.icons{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100px;
    padding-left: 50px;
}
.icons i{
    font-size: 30px;
    color: #333;
    
    margin: 20px 0;

    

}
/* Hide menu bar by default on small screens */
.menu-bar {
    display: flex;
    justify-content: center;
    background-color: #f8f9fa;
}

@media (max-width: 768px) {
    .menu-bar {
        display: none;
        flex-direction: column;
        background-color: #f8f9fa;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        z-index: 1000;
    }

    .menu-bar.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: black;
        margin-right: 20px;
    }

    .nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        background-color: #fff;
    }

    .menu-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .menu-links li {
        text-align: center;
        padding: 10px 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
    }

    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Hide toggle on large screens */
.menu-toggle {
    display: none;
}


   /*login and register page*/

/* From Uiverse.io by andrew-demchenk0 */ 
.wrapper {
    --input-focus: #2d8cf0;
    --font-color: #323232;
    --font-color-sub: #666;
    --bg-color: #fff;
    --bg-color-alt: #ffffb4 ;
    --main-color: #228b22;
      display: flex; 
       flex-direction: column; 
      align-items: center; 
      margin-top: 300px;
  }
  
  /* switch card */
  .switch {
    transform: translateY(-200px);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;  
    align-items: center;
    gap: 30px;
    width: 50px;
    height: 20px;
  }
  
  .card-side::before {
    position: absolute;
    content: 'Log in';
    left: -70px;
    top: 0;
    width: 100px;
    text-decoration: underline;
    color: var(--font-color);
    font-weight: 600;
  }
  
  .card-side::after {
    position: absolute;
    content: 'Sign up';
    left: 70px;
    top: 0;
    width: 100px;
    text-decoration: none;
    color: var(--font-color);
    font-weight: 600;
  }
  
  .toggle {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    box-sizing: border-box;
    border-radius: 5px;
    border: 2px solid var(--main-color);
    box-shadow: 4px 4px var(--main-color);
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-colorcolor);
    transition: 0.3s;
  }
  
  .slider:before {
    box-sizing: border-box;
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    border: 2px solid var(--main-color);
    border-radius: 5px;
    left: -2px;
    bottom: 2px;
    background-color: var(--bg-color);
    box-shadow: 0 3px 0 var(--main-color);
    transition: 0.3s;
  }
  
  .toggle:checked + .slider {
    background-color: var(--input-focus);
  }
  
  .toggle:checked + .slider:before {
    transform: translateX(30px);
  }
  
  .toggle:checked ~ .card-side:before {
    text-decoration: none;
  }
  
  .toggle:checked ~ .card-side:after {
    text-decoration: underline;
  }
  
  /* card */ 
  
  .flip-card__inner {
    width: 300px;
    height: 350px;
    position: relative;
    background-color: transparent;
    perspective: 1000px;
      /* width: 100%;
      height: 100%; */
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
  }
  
  .toggle:checked ~ .flip-card__inner {
    transform: rotateY(180deg);
  }
  
  .toggle:checked ~ .flip-card__front {
    box-shadow: none;
  }
  
  .flip-card__front, .flip-card__back {
    padding: 20px;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: #ffff8f;
    gap: 20px;
    border-radius: 5px;
    border: 2px solid var(--main-color);
    box-shadow: 4px 4px var(--main-color);
  }
  
  .flip-card__back {
    width: 100%;
    transform: rotateY(180deg);
  }
  
  .flip-card__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  
  .title {
    margin: 20px 0 20px 0;
    font-size: 25px;
    font-weight: 900;
    text-align: center;
    color: var(--main-color);
  }
  
  .flip-card__input {
    width: 250px;
    height: 40px;
    border-radius: 5px;
    border: 2px solid var(--main-color);
    background-color: var(--bg-color);
    box-shadow: 4px 4px var(--main-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--font-color);
    padding: 5px 10px;
    outline: none;
  }
  
  .flip-card__input::placeholder {
    color: var(--font-color-sub);
    opacity: 0.8;
  }
  
  .flip-card__input:focus {
    border: 2px solid var(--input-focus);
  }
  
  .flip-card__btn:active, .button-confirm:active {
    box-shadow: 0px 0px var(--main-color);
    transform: translate(3px, 3px);
  }
  
  .flip-card__btn {
    margin: 20px 0 20px 0;
    width: 120px;
    height: 40px;
    border-radius: 5px;
    border: 2px solid var(--main-color);
    background-color: var(--bg-color);
    box-shadow: 4px 4px var(--main-color);
    font-size: 17px;
    font-weight: 600;
    color: var(--font-color);
    cursor: pointer;
  } 



.menu-bar{
    background-color: #228b22;
}

.menu-links{
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 25px;
    width: 100%;
    padding: 10px 0;
    margin: 0;
}

.menu-links li{
    list-style: none;
}

.menu-links a{
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bolder;
}
.menu-links a:hover {
  color: #ffcc00;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}
/* SCROLLING HEADER */

.header {
  font-family: Arial, sans-serif;
  display: flex;
  height: 25vh;
  background-color: #f4f4f4;
  box-sizing: border-box;

}
.poster-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
 
}
.poster-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.poster {
  min-width: 100%;
  height: 100%;
  text-align: center;
}

.poster img{
 width: 100%;
  height: 194px;
}


.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 5px;
}
.arrow:hover {
  background-color: rgba(0, 0, 0, 0.8);
}
.left { left: 10px; }
.right { right: 10px; }

/* SCROLLING HEADER END */



/*products*/

.category-container {
    width: 90%;
    margin: auto;
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start; /* or center */
    overflow: hidden; /* remove horizontal scroll */
    white-space: normal; /* allow wrapping */
}
.book-card { background: white; width: 200px; height: auto; display: inline-block; padding: 15px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); text-align: center; transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; cursor: pointer; }
.book-card:hover { transform: scale(1.05); box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); }
.book-card img { width: 100%; height: 300px;  border-radius: 5px; }
.book-card h3 { margin: 10px 0; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}
.book-card p { font-size: 14px; color: #555; }
.price { font-size: 16px; font-weight: bold; color: #e67e22; margin: 10px 0; }
.action { margin-top: 10px; }
.action button { margin: 5px; padding: 8px; border: none; border-radius: 5px; cursor: pointer; }
.edit { background: #f1c40f; }
.delete { background: #e74c3c; color: white; }
.add { background: #2ecc71; color: white; margin: 10px 0 10px; width: 100px; height: 65px; border-radius: 5%; }

/* Container for the user menu */
.user-menu {
  position: relative;
  display: inline-block;
}

/* Button to display user's name */
.user-btn {
  background-color: #4CAF50;
  color: white;
  padding: 10px 16px;
  width: 200px;
  margin-top: 15px;
  margin-left: 20px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.user-btn:hover {
  background-color: #45a049;
}

/* Dropdown content (hidden by default) */
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 6px;
  overflow: hidden;
}

/* Links inside the dropdown */
.dropdown-menu a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
  background-color: #f1f1f1;
}

/* Show dropdown on button hover */
.user-menu:hover .dropdown-menu {
  display: block;
}

/* Style for login button when not logged in */
.login-btn {
  background-color: #2196F3;
  color: white;
  padding: 10px 16px;
  font-size: 16px;
  margin-left: 15px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.login-btn:hover {
  background-color: #0b7dda;
}








/* add books css */
.addbooks-container {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0 541px;
  padding: 0;
  align-items: center;
  /* display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; */
}

.addbooks-container h2 {
  text-align: center;
  color: #333;
}

.addbooks-container form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  width: 400px;
}

.addbooks-container label {
  display: block;
  font-weight: bold;
  margin-top: 10px;
  color: #555;
}

.addbooks-container input,.addbooks-container select,.addbooks-container textarea {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.addbooks-container button {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}

.addbooks-container button:hover {
  background-color: #218838;
}

.addbooks-container input[type="file"] {
  border: none;
}
/* Book Details Section */
.book-details {
    width: 70%;
    background: #ffffff;
    padding: 25px;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
}

/* Book Info Layout */
.book-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}





/* Book Cover Image */
.book-info img {
    max-width: 200px;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

/* Book Details (Text) */
.book-info div {
    flex: 1;
}

.book-info h2 {
    font-size: 26px;
    color: #333;
    margin-bottom: 10px;
}

.book-info p {
    font-size: 18px;
    color: #555;
    margin: 6px 0;
}

/* Highlight Labels */
.book-info p strong {
    color: #222;
}

/* Book Description */
.book-details p {
    font-size: 16px;
    color: #444;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .book-details {
        width: 90%;
        padding: 20px;
    }

    .book-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-info img {
        max-width: 180px;
    }
}
.actions button {
  width: 200px;
  background-color: #00d0ff;
  color: white;
    margin: 5px;
    padding: 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}
/* === Review Section === */
.review-section {
  margin-top: 40px;
  padding: 20px;
  border-top: 2px solid #eee;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.review-section h2, .review-section h3 {
  margin-bottom: 15px;
  color: #333;
}

/* Review form */
.review-form {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.review-form input[type="text"],
.review-form input[type="number"],
.review-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.review-form button {
  padding: 10px 20px;
  background-color: #4CAF50;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.review-form button:hover {
  background-color: #45a049;
}

/* Displayed reviews */
.review {
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.review strong {
  font-size: 16px;
  color: #222;
}

.review .rating {
  font-weight: bold;
  color: #ff9900;
}

.review p {
  margin-top: 10px;
  margin-bottom: 5px;
  line-height: 1.5;
}

.review small {
  color: #777;
}

