@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css');

/* Global Reset */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      line-height: 1.5;
    }

    body {
      /*font-family: "Comic Relief", system-ui;*/
      font-family: "Josefin Sans", sans-serif;
      background: #076585;
      background: -webkit-linear-gradient(to right, #076585, #fff);
      background: linear-gradient(to right, #076585, #fff);
      /*background-color: #f5f7fa;*/
      color: #333;
    }

    a {
      text-decoration: none;
      color: inherit;
    }

    /* Navbar */
    header { 
      background: #0f0c29;
      background: -webkit-linear-gradient(to right, #24243e, #302b63, #0f0c29);
      background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
      color: #fff;
      padding: 15px 20px;
      position: relative;
    }

    .nav-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      max-width: 1100px;
      margin: auto;
    }

    .logo {
      font-size: 1.5rem;
      font-weight: bold;
      cursor: pointer;
    }

    .logo:hover {
      color: #00fcff;
    }
    
    
    ul {
      list-style-type: none;
      }

    nav {
      display: flex;
      gap: 20px;
      align-items: center;
    }
    
    /* nav ul li {
      list-style-type: none;
      display: flex;
      gap: 20px;
    } */
    
    nav a {
      color: #ecf0f1;
      font-size: 1rem;
      padding: 6px 10px;
      transition: color 0.3s ease;
    }

    nav a:hover {
      color: #1abc9c;
    }

    .hamburger {
      display: none;
      flex-direction: column;
      cursor: pointer;
      gap: 5px;
    }

    .hamburger span {
      width: 25px;
      height: 3px;
      background-color: white;
      transition: all 0.3s ease;
    }

    .mobile-nav {
      display: none;
      flex-direction: column;
      background-color: #34495e;
      position: absolute;
      top: 60px;
      right: 20px;
      width: 200px;
      border-radius: 5px;
      overflow: hidden;
      box-shadow: 0 4px 10px rgba(0,0,0,0.2);
      z-index: 999;
    }

    .mobile-nav a {
      padding: 12px 16px;
      color: #ecf0f1;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-nav a:hover {
      background-color: #1abc9c;
      color: #fff;
    }

    /* Book Review List */
    .book-list-container {
      max-width: 1100px;
      margin: 40px auto;
      /*display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));*/
      gap: 30px;
      padding: 0 20px;
    }

    .book-item {
      background-color: #fff;
      padding: 15px;
      border-radius: 10px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
      text-align: center;
      transition: transform 0.3s ease;
      /*background: #e0f7e9;*/
      background: #e0eff7;
      border-left: 5px solid #27ae60;
    }

    /*.book-item:hover {
      transform: translateY(-10px);
    }*/

    .book-item img {
      width: 75%;
      height: 75%;
      object-fit: cover;
      border-radius: 8px;
    }

    .book-title {
      font-size: 1.4rem;
      font-weight: bold;
      margin-top: 10px;
      color: #000080;
    }

    .book-author {
      font-size: 1.2rem;
      color: #255c54;
      text-align: justify;
      text-indent: 25px;
    }
    
    .book-author a {
      border-bottom: 2px dotted;
    }
    
    .book-author a:hover {
      border-bottom: none;
      text-decoration:1.5px underline;
    }

    .book-link {
      /* display: inline-block; */
      display:inline;
      transition: background-color 0.3s ease;
      font-style: italic;
      text-indent: 0;
      color: #000080; 
      animation: glow 1.8s infinite alternate;
      font-weight: bold;
      word-wrap: break-word; /* Allows breaking long words if needed */
      max-width: 100%; /* Prevents overflow in smaller containers */
    }

 @keyframes glow {
      from {
        text-shadow:
          0 0 5px #39ff14,
          0 0 10px #39ff14,
          0 0 20px #39ff14,
          0 0 30px #00ffcc,
          0 0 40px #00ffcc;
      }
      to {
        text-shadow:
          0 0 10px #39ff14,
          0 0 20px #00ffcc,
          0 0 30px #00ffff,
          0 0 40px #00ffff,
          0 0 60px #00ffff;
      }
    }


    .book-link:hover {
      color: red;
    }

    /* Footer */
    footer {
      /*background-color: #2c3e50;*/
      color: #ecf0f1;
      background: #0f0c29;
      background: -webkit-linear-gradient(to right, #24243e, #302b63, #0f0c29);
      background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
      padding: 10px 10px;
      text-align: center;
      margin-top: 40px;
    }

    .social-links a {
      margin: 0 10px;
      color: #ecf0f1;
      font-size: 1rem;
      transition: color 0.3s;
    }

    footer .social-links a:hover {
      color: #1abc9c;
    }

    /* Responsive Behavior */
    @media (max-width: 768px) {
      nav {
        display: none;
      }
      .book-item img {
      width: 50%;
      height: 50%;
      }

      .hamburger {
        display: flex;
      }

      .mobile-nav.show {
        display: flex;
      }

      .book-item img {
        height: 180px;
      }
    }


/* Disclaimer Styling - Subtle with Close Button */
.disclaimer {
  background-color: #f0f0f0;
  color: #555;
  text-align: center;
  padding: 12px 40px 12px 20px;
  font-size: 0.95rem;
  position: relative;
  border-bottom: 1px solid #ddd;
}

.disclaimer .close-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  cursor: pointer;
  color: #888;
  transition: color 0.3s ease;
}

.disclaimer .close-btn:hover {
  color: #e74c3c;
}



.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #34495e;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
  min-width: 160px;
  padding: 5px 0;

}

/* Make the dropdown smaller and neater */
.dropdown-content a {
  display: block;
  padding: 10px 15px;
  font-size: 0.95rem;
  color: #ecf0f1;
  white-space: nowrap;
}

.dropdown-content a:hover {
  background-color: #1abc9c;
  color:#ffffff;
}

.dropdown:hover .dropdown-content {
  display: block;
}
.mobile-dropdown {
  width: 100%;
}

.mobile-dropdown a {
  display: block;
  width: 100%;
  padding: 12px 16px;
  color: #ecf0f1;
}

.mobile-dropdown-content {
  display: none;
  background-color: #2c3e50;
  padding-left: 16px;
}

.mobile-dropdown-content a {
  display: block;
  padding: 10px 16px;
  color: #ecf0f1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-dropdown-content a:hover {
  background-color: #1abc9c;
  color: #fff;
}
.dropdown-toggle {
  background: none;
  border: none;
  color: #ecf0f1;
  font-size: 1rem;
  padding: 12px 16px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.dropdown-toggle:hover {
  color: #1abc9c;
}

ul.bullet {
  list-style: square inside url("sqpurple.gif");
  padding-left: 25px;
}
h1{
  text-align: center;
  padding-top: 35px;
  padding-inline: 5px;
  color:#000080;
  text-decoration: underline dotted #04465d;
  text-underline-offset: 5px;
}

code {
    color:#e83e8c;
    word-wrap: break-word;
    font-size:90%;
  }

code a {
    border-bottom:2px dotted;
  }

code a:hover {
    color:#d81f74;
    text-decoration:underline;
    border-bottom:none;
  }
  
#helpLine {
    font-size: 14px;
    white-space: nowrap;
    background: linear-gradient(90deg, rgba(106, 17, 203, 0.2) 0%, rgba(37, 117, 252, 0.2) 100%);
    color:#000080;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    box-shadow: 0 4px 8px rgba(37, 117, 252, 0.4);
    transition: box-shadow 0.3s ease;
    text-indent: 0;
  }
  #helpLine:hover {
    box-shadow: 0 6px 12px rgba(37, 117, 252, 0.7);
  }
  #toggleBtn {
    border: none;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    font-size: 13px;
    background: rgba(0, 123, 255, 0.8); /* bluish color */
    color: white;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.4); /* greenish shadow */
    font-family: "Comic Relief", system-ui;
  }
  #toggleBtn:hover {
    transform: scale(1.1);
    background: rgba(0, 105, 230, 0.9); /* deeper bluish on hover */
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.6); /* brighter green shadow */
  }
  #toggleBtn:active {
    transform: scale(0.95);
  }
  #email {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.8);
    color: rgba(37, 117, 252, 0.9);
    box-shadow: 0 2px 6px rgba(37, 117, 252, 0.2);
    user-select: text;
    transition: background-color 0.3s ease;
    font-family: Courier New;
    font-weight:bold;
  }
  #email:hover {
    background-color: #e6f0ff;
  }
  
  
  .help-line-top {
  width: 100%;
}

.help-line-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

/* Responsive layout */
@media (max-width: 700px) {
  #helpLine {
    flex-direction: column;
    align-items: flex-start;
    white-space: normal;
    gap: 4px;
  }

  .help-line-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    font-size: 13px;
  }

  #toggleBtn {
    padding: 4px 10px;
    font-size: 13px;
  }

  #email {
    font-size: 13px;
    padding: 2px 8px;
    margin-left: 0;
  }
}


  
  /* for scrolling, have to test*/
  
  /* 1. Hardware-accelerated scrolling and animations */
/*body, .book-list-container, .book-item, .book-link {
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform, opacity;
  -webkit-overflow-scrolling: touch;
}*/

/* 2. Explicit GPU hint for glow animation */
/*.book-link {
  will-change: text-shadow;
  contain: paint;
}*/

/* 3. Enable smoother scrolling */
/*html {
  scroll-behavior: smooth;
}/*

/* 4. Prevent hover animations from triggering on touch devices */
@media (hover: hover) and (pointer: fine) {
  /*.book-item:hover {
    transform: translateY(-10px);
  }
}*/

/* 5. Ensure fixed mobile nav doesn't cause reflow on scroll */
/*.mobile-nav {
  will-change: transform;
}*/

 /* 6. Responsive Behavior in scroll in mobile */
    /*@media (max-width: 768px) {
     .book-item:hover {
      transform: none;
    }
    
   }*/