/* Global Styles */
:root {
    --primary-color: #004452; /* A shade of blue similar to the background */
    --secondary-color: #ffffff;
    --text-color: #333333;
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Poppins', sans-serif;
    --background-color: #00b4d7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
}
#wrapper{
    display:none;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--background-color);
    padding: 20px;
}

a{
    text-decoration: none;
    color: #000;
}
/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    font-family: var(--heading-font);
    font-size: 2em;
    color: var(--secondary-color);
}

/* AI Search Bar Container */
.prompt-input {
    display: flex;
    align-items: center;
    width: 40%;
    max-width: 450px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

/* Search Input Field */
.prompt-input input {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    font-size: 1rem;
    color: #333;
    outline: none;
}

/* Search Button */
.prompt-input button {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.prompt-input button:hover {
    background-color: #002a33;
}

.prompt-input button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* -------------------------------------------------- */
/* Hero Section */
/* -------------------------------------------------- */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 500px;
    padding: 50px 0;
    color: var(--secondary-color);
    overflow: hidden;
}

.hero-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    /* This filter makes the image darker */
    filter: brightness(0.4) contrast(1.2) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-family: var(--heading-font);
    font-size: 3em;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 20px;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: #e0e0e0;
}


/* -------------------------------------------------- */
/* Featured Books & Search by Genre Sections */
/* -------------------------------------------------- */
.featured-books, .search-by-genre {
    text-align: center;
    padding: 40px 0;
}
#science-books {
    background-color: #f0f8ff; /* A light blue */
    padding: 20px; 
}

#philosophy-books {
    background-color: #fffaf0; /* A light yellow/cream color */
    padding: 20px;
}
#philosophy-books h3,#science-books h3{
    color:#000;
}

h3 {
    font-family: var(--body-font);
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.book-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.book-item {
    width: 200px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.book-item img {
    width: 100%;
    height: auto;
    display: block;
}



/* -------------------------------------------------- */
/* Footer */
/* -------------------------------------------------- */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
}

.footer-content h4 {
    font-family: var(--body-font);
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 5px;
}

.footer-content p {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.social-links-placeholder {
    opacity: 0.7;
    margin-top: 15px;
}

/* -------------------------------------------------- */
/* Modal Pop-up */
/* -------------------------------------------------- */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  border-radius: 8px;
  position: relative;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* -------------------------------------------------- */
/* Responsive Design */
/* -------------------------------------------------- */
@media (max-width: 768px) {
    /* Existing responsive styles */
    .hero-section {
        flex-direction: column;
        text-align: center;
    }
    .hero-content h2 {
        font-size: 2em;
    }
    .hero-image {
        margin-top: 10px;
    }
    .book-grid {
        justify-content: center;
    }
    
    /* Corrected header responsiveness */
    header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .prompt-input {
        width: 100%;
        max-width: 100%;
    }
}
#load-container{
    position: absolute;
    top:0;
    left:0;
    z-index: 999;
    width:100%;
    height:100%;
    display:flex;
    justify-content: center;
    align-items: center;
    background: var(--background-color);
}
.loader {
  display: inline-flex;
  gap: 5px;
}
.loader:before,
.loader:after {
  content: "";
  width: 25px;
  aspect-ratio: 1;
  box-shadow: 0 0 0 3px inset #fff;
  animation: l4 1.5s infinite;
}
.loader:after {
  --s: -1;
  animation-delay: 0.75s
}
@keyframes l4 {
  0%     {transform:scaleX(var(--s,1)) translate(0) rotate(0)}
  16.67% {transform:scaleX(var(--s,1)) translate(-50%) rotate(0)}
  33.33% {transform:scaleX(var(--s,1)) translate(-50%) rotate(90deg)}
  50%,
  100%   {transform:scaleX(var(--s,1)) translate(0) rotate(90deg)}
}