*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,body{
    height: 100%;
    width: 100%;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
}
#main{
    height: 100%;
    width: 100%;
    background-color: rgb(19, 16, 16);
   
}
#cursor{
    z-index: 1000;
    height: 80px;
    width: 80px;
    border-radius: 50%;
    position: fixed;
    background: rgba(228, 168, 38, 0.432);
    border: 3px solid rgba(0,0,0,0.15);
    transform: translate3d(0,0,0);
    pointer-events: none;
    transition: transform 160ms ease, width 160ms ease, height 160ms ease;
}
#pg1{
    height: 100vh;
    width: 100%;
   position: relative;
background: rgba(228, 168, 38, 0.432);
}

#pg2{
    height: 100vh;
    width: 100%;
    background-color: rgb(20, 12, 1);
  position: relative;
}
#section {
  overflow: hidden;
  width: 100%;

}

.carousel-track {
  display: flex;
  width: max-content;
}

.carousel-slide {
  flex: 0 0 4%;
  margin-right: 2%;

}

.carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
    border: 2px solid #ccc;
}

#pg3 {
    min-width: 100vh;
    width: 100%;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.about-container {
    max-width: 800px;
    background-color: #fff;
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
}

.about-container h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #5a3e1b;
}

.about-container p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-container ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.about-container ul li {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
}

.about-container ul li::before {
    content: "✔️";
    position: absolute;
    left: 0;
}

.about-container .cta {
    font-weight: bold;
    font-size: 1.3rem;
    color: #2e7d32;
}

#navbar{
    height: 15vh;
    width: 100%;
    background-color:rgba(97, 58, 6, 0.781);
position: fixed;
top: 0;
left: 0;
z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    justify-content: center;
    color: #f0eaea;
}
#pg1, #pg2, #pg3 {
    padding-top: 15vh; 
}
html {
    scroll-behavior: smooth;
}


#navleft{
    display: flex;
    gap: 2rem;       
    margin: 0 auto;      
    justify-content: center;
    align-items: center;
}
#navleft img{
    height: 90px;
    width: 80px;
    border-radius: 50%;
    margin-right: 10px;
    margin-right: .5px;
}
#browse>a{
 height: 8vh;
 width: 8vh;
text-decoration: none;
color: wheat;
font-size: 6.7vh;
}

#navleft a{
    color: wheat; 
    font-size: 3vh;
    font-weight: 600;
    text-decoration: none;
}

#navleft a:hover{
    text-decoration: underline;
    opacity: 0.9;
}

#navright{
    display: flex;
    margin-right: 5px;
    align-items: end;
}

#navright a{
    color: #161514; 
    font-size: 3vh;
    font-weight: 600;
    text-decoration: none;
}
#navright button {
    border-radius: 30px;
    padding: 10px 15px;
    background: burlywood;
}
#loginToggleBtn{
  border-radius: 30px;
    padding: 10px 15px;
      font-size: 3vh;
    font-weight: 600;
}
#hero{
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    overflow: hidden;
    padding-left: 6rem; 
}
#hero h1{
  white-space: nowrap;
}

#hero1{
    position: absolute;
    inset: 0;
    z-index: 0;

}
#hero button{
    position: relative;
    z-index: 1;
    margin-left: 20px;
    padding: 10px 20px;
    font-size: 1.2rem;
background-color: transparent;
    color: #fdf6f6;
    border:3px solid burlywood;
    
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    left: 50%;
  top: 30%;
}

#hero1 img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    filter: brightness(0.45);
}
#bookBtn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
#bookBtn a{
  text-decoration: none;
}
#bookBtn h3{
  text-decoration: none;
  color: wheat; 
  
}

.bookburst-container {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.book-icon {
  position: absolute;
  width: 24px;
  height: 24px;
  background-image: url('https://cdn-icons-png.flaticon.com/512/29/29302.png'); /* Replace with your preferred book icon */
  background-size: cover;
  opacity: 0;
}




#hero h1{
font-size: 10vh;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    text-align: left;
    margin-top: 25px;
    margin-bottom: 59px;
   padding: 3rem 1rem 0 0;
    max-width: 38ch; 
    line-height: 1.05;
    color: #ffffff;
    width: 30%;
}
#pg3 {
  
  width: 100%;
  color: #492312;
  background-color:rgba(110, 66, 8, 0.863);
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#pg3 > h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
  white-space: nowrap;
  color: #291004;
}

#pg3 p {
  font-size: 1.2rem;
  line-height: 1.6;
color: #291906;
  margin-bottom: 1.5rem;
  max-width: 1200px;
  text-align: left; 
  font-weight: 600;
}

#container{
  
    width: 100%;
     display: flex;
     flex-direction: column;
     
    
}
#steps1, #steps3, #steps4 {
  display: flex;
  align-items: center; 
  gap: 2rem;
  height: auto; 
text-transform: capitalize;
font-size: 2.8vh;
font-weight: 800;
color: #000;
}
#steps2{
      display: flex;
  align-items: center; 
  gap: 2rem; 
  height: auto;
  text-transform: capitalize;
  font-size: 2.8vh;
font-weight: 800;
color: #000;
}


 #steps2 img {
    height: 40vh;
    object-fit: cover;
 
}
  #steps4 img {
    height: 45vh;
    object-fit: cover;
   
}
#steps1 img{
   height: 40vh;
    object-fit: cover;
    margin-left: 2vh;
  
}
#steps3 img{
    height: 50vh;
    object-fit: cover;
    margin-top: 7vh;
}
#pg4{
    height: 60%;
    width: 100%;
    background-color: #4e2804;
    overflow-x: hidden;
}
#pg4 h1{
    font-size: 22vw;
    white-space: nowrap;
    text-transform: uppercase;
    color: #b6733df3;
}
.footer {
  background-color: #1e1e1e;
  color: #f0f0f0;
  padding: 40px 20px;
  font-family: 'Inter', sans-serif;
}
.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}
.footer-column {
  flex: 1 1 200px;
  min-width: 200px;
}
.footer-column h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: #ffcc70;
}
.footer-column ul {
  list-style: none;
  padding: 0;
}
.footer-column ul li {
  margin-bottom: 8px;
}
.footer-column a {
  color: #f0f0f0;
  text-decoration: none;
}
.footer-column a:hover {
  color: #ff6b6b;
}
.footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9rem;
  color: #aaa;
}
#pg5{
  height: 90vh;
  width: 100%;
      background-color: #4e2804;
}
#pg5 h3{
  text-align: center;
  font-size: 6vh;
  text-transform: capitalize;
  color:rgb(233, 172, 58);
  
}
#pg5 >h1{
  text-align: center;
  font-size: 6vh;
  margin-top: 1vh;
  text-transform: capitalize;
  color: #3a1c0e;
  color: rgb(223, 175, 73);
}
#box1 h1, #box2 h1, #box3 h1{
  text-align: center;
  font-size: 6vh;
  margin-top: 1vh;
  text-transform: capitalize;
  color: #3a1c0e;
  
}
#pg5 h4{
  text-align: left;
  padding: 1.5vw;
  font-size: 3vh;
}
#box{
 height: 70vh;
  width: 100%;
  padding: 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
    background-color: #4e2804;
  
}
#box1{
  height: 60vh;
  width: 30%;
background-color: rgb(214, 180, 147);
border-radius: 5%;
}
#box2{
  height: 60vh;
  width: 30%;
background-color: rgb(214, 180, 147);
border-radius: 5%;
}
#box3{
  height: 60vh;
  width: 30%;
background-color: rgb(214, 180, 147);
border-radius: 5%;
}

@media (max-width: 900px){
 
#pg2{
    height: 80vh;
    width: 100%;
    background-color: rgb(20, 12, 1);
  position: relative;
}
#section {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  width: max-content;
}

.carousel-slide {
  flex: 0 0 3%;
  margin-right: 2%;
  margin-bottom: 3%;

}

.carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
    border: 2px solid #ccc;
}   


#navbar{
    height: 15vh;
    width: 100%;
    background-color:rgba(97, 58, 6, 0.781);
position: fixed;
top: 0;
left: 0;
z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    justify-content: center; 
    color: #f0eaea;
}
#pg1, #pg2, #pg3 {
    padding-top: 15vh;
}
html {
    scroll-behavior: smooth;
}


#navleft{
    display: flex;
    gap: 1rem;          
    margin: 0 auto;      
    justify-content: center;
    align-items: center;
}
#navleft img{
    height: 70px;
    width: 80px;
    border-radius: 50%;
    margin-right: 10px;
    margin-right: .5px;
}

#navleft a{
    color: #291004; 
    font-size: 1.9vh;
    font-weight: 700;
    text-decoration: none;
}

#navleft a:hover{
    text-decoration: underline;
    opacity: 0.9;
}
#navright{
    display: flex;
    margin-right: 3px;
    align-items: end;
}

#navright a{
    color: #111; /* dark text on light navbar */
    font-size: 3vh;
    font-weight: 600;
    text-decoration: none;
}


#hero{
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    overflow: hidden;
    padding-left: 6rem;
}

#hero1{
    position: absolute;
    inset: 0;
    z-index: 0;

}
#hero button{
    position: relative;
    z-index: 1;
    margin-left: 20px;
    padding: 10px 20px;
    font-size: 1.2rem;
background-color: transparent;
    color: #fdf6f6;
    border:3px solid burlywood;
    
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    left: 50%;
  top: 30%;
}

#hero1 img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    
    filter: brightness(0.45); /* darken so text is readable */
}

#hero h1{
font-size: 5vh;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    text-align: left; 
    margin-top: 18px;
    margin-bottom: 100px;
   padding: 3rem 1rem 0 0;
    
    line-height: 1.05; 
    color: #ffffff;
    width: 60%;
}

#pg3 {
  width: 100%;
  color: #492312;
  background-color:rgba(110, 66, 8, 0.863);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#pg3 > h1 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
  white-space: nowrap;
  color: #291004;
}

#pg3 p {
    width: 75%;
  font-size: 1.2rem;
  line-height: 1.6;
color: #291906;
  margin-bottom: 1.5rem;
  max-width: 1200px;
  text-align: left; 
  font-weight: 600;
  padding: 1vw;
}

#container{
  
    width: 100%;
     display: flex;
     flex-direction: column;
     justify-content: space-evenly;
     
    
}
#steps1, #steps3, #steps4 {
  display: flex;
  align-items: center; 
  justify-content: center;
  height: auto; 
text-transform: capitalize;
font-size: 1.4vh;
font-weight: 800;
color: #000;
text-align: right;
}
#steps2{
      display: flex;
  align-items: center; 
   
  height: auto;
  text-transform: capitalize;
  font-size: 1.8vh;
font-weight: 800;
color: #000;
}


 #steps2 img {
    height: 15vh;
    object-fit: cover;
 
}
  #steps4 img {
    height: 15vh;
    object-fit: cover;
   
}
#steps1 img{
   height: 17vh;
    object-fit: cover;
    margin-left: 0.5vh;
  
}
#steps3 img{
    height: 20vh;
    object-fit: cover;
    margin-top: 7vh;

}


}

@media (max-width: 768px) {
  
  
#pg4{
   height: 50%;
    width: 100%;
    background-color: #4e2804;
    margin-top: 20vh;
    overflow-x: hidden;
}
#pg4 h1{
    font-size: 40vw;
    white-space: nowrap;
    text-transform: uppercase;
    color: #b6733df3;
    display: flex;
    position: fixed;
    width: 300%;
}
}

/* --- Dashboard & Backend Styles --- */
.dashboard-container {
    padding: 15vh 5vw 5vh 5vw;
    background-color: #f4f4f4;
    min-height: 100vh;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card h1 {
    font-size: 3rem;
    color: #3a1c0e;
    margin: 10px 0;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-card {
    background: #4e2804;
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s;
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-5px);
    background: #6e3b0b;
}

.action-card i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Library Styles */
.library-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f4f4f4;
    min-height: 100vh;
    padding-bottom: 50px;
}

.add-book-section, .my-books-list {
    width: 90%;
    max-width: 800px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #3a1c0e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.book-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: shadow 0.3s;
}

.book-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.book-info {
    padding: 10px;
}

.book-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* --- Browse & Request Styles --- */
.search-bar-container {
    width: 90%;
    max-width: 800px;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar-container input {
    flex: 2;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.search-bar-container select {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.swap-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background-color: #2e7d32;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.swap-btn:hover {
    background-color: #1b5e20;
}

.request-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.request-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.req-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 5px;
    color: white;
}

.accept-btn { background-color: #2e7d32; }
.reject-btn { background-color: #d93025; }

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.5); 
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 20px; 
    border: 1px solid #888; 
    width: 90%; max-width: 500px; border-radius: 10px;
}
.close-modal { float: right; font-size: 28px; font-weight: bold; cursor: pointer; }

/* --- New Action Buttons & Contact Styles --- */
.book-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.edit-btn, .delete-btn {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-weight: 600;
}

.edit-btn { background-color: #b6733d; }
.edit-btn:hover { background-color: #8c562d; }

.delete-btn { background-color: #d93025; }
.delete-btn:hover { background-color: #b71c1c; }

.contact-box {
    margin-top: 15px;
    padding: 15px;
    background: #fdf6f6;
    border: 1px solid #e0c09e;
    border-radius: 8px;
    color: #3a1c0e;
}

.chat-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #2e7d32;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}
.chat-btn:hover { background-color: #1b5e20; }

/* --- Chat Modal Styles --- */
.chat-container { /* Replaces .modal-content.chat-content */
    background-color: #fdf6f6; /* Light parchment background for the whole modal */
    margin: 5vh auto; 
    padding: 0; 
    border: 1px solid #d3c5b4; 
    width: 95%; 
    max-width: 600px; 
    border-radius: 10px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* To keep rounded corners */
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.chat-header-bar {
    background-color: #3a1c0e; /* Dark brown header */
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-header-bar h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-header-bar .close-modal {
    color: white;
    opacity: 0.8;
    font-size: 2rem;
    font-weight: normal;
}
.chat-header-bar .close-modal:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 10px;
    background-color: #f0eade; /* A slightly darker footer background */
    border-top: 1px solid #d3c5b4;
    align-items: center;
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 20px; /* Rounded input field */
    font-size: 1rem;
    background: white;
}
.chat-input-area input:focus {
    outline: none;
    border-color: #8c562d;
}

.chat-action-btn {
    background: #3a1c0e; /* Dark brown */
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: background-color 0.2s;
    flex-shrink: 0;
}
.chat-action-btn:hover {
    background: #5a2d16;
}

.message-bubble {
    padding: 8px 14px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.45;
    word-wrap: break-word;
    box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}

.msg-sent {
    align-self: flex-end;
    background-color: #e0c09e; /* Theme brown-gold */
    color: #3a1c0e;
    border-bottom-right-radius: 4px;
}

.msg-received {
    align-self: flex-start;
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-bottom-left-radius: 4px;
}
