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

body {
  background-color: #F9FAFB;
  font-family: 'Poppins', sans-serif;
}

/* -------------------- Navbar -------------------- */
.nav-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  top: 0;
  z-index: 100;
  position: fixed;
  width: 100%;
  background-color: #F9FAFB;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.logo {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
}

.logo img {
  height: 35px;
  width: auto;
}

.logo h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.nav-links a {
  display: inline-block;
  text-decoration: none;
  color: rgb(95, 95, 95);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: black;
  background-color: hsl(210, 17%, 95%);
  transform: translateY(-2px);
}

.nav-links .active {
  color: #3B82F6;
}

/* -------------------- Main Section -------------------- */
main {
  padding-top: 80px;
}

.intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  text-align: center;
}

.header-intro {
  font-size: 3.5rem;
  font-family: 'Poppins', sans-serif;
}

#header-intro2 {
  color: #3B82F6;
}

.main-p {
  font-family: 'Inter', sans-serif;
  color: rgb(95, 95, 95);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 1rem auto 2rem auto;
  line-height: 1.6;
  text-align: center;
}

.Get-Started {
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  color: white;
  background-color: #3B82F6;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
}

.Get-Started:hover {
  background-color: #5a99ff;
  transform: translateY(-3px);
}


/* ---Dashboard --- */
.dashboard{
    padding: 3rem 2rem;
    margin-top: 50px;
}

.dashboard h1{
    font-family: Poppins, sans-serif;
    text-align: left;
    font-size: 2rem;
}

.dashboard p{
    font-family: Inter;
    font-size: 1rem;
    color: rgb(95, 95, 95);
}

.stats{
    display: flex;
    gap: 2.5rem;
    justify-content: space-around;
    align-items: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-card{
    width: 300px;
    display: flex;
    flex-direction: column;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.stat-card:hover{
    transform: translateY(-4px);
}

.stat-card h2{
    font-family: Inter, sans-serif;
    font-size: 1rem;
    color: rgb(95, 95, 95);
    font-weight: 500;
}

.stat-card p{
    font-family: Poppins, sans-serif;
    font-size: 2rem;
    margin-top: 10px;
    color: black;
}

.sc{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.sc img{
    height: 30px;
    width: auto;
    object-fit: contain;
    margin-right: 15px;
}

.graph{
    width: 100%;
    margin: 3rem 2rem;
    margin: 3rem auto;
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.graph h2{
    font-family: Poppins, sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
/* -------------------- More Info Section -------------------- */
.more-info {
  background-color: #f6f8f7;
  padding: 1rem 1.5rem;
  margin-top: 40px;
}

.mi-text {
  font-family: 'Poppins', sans-serif;
  text-align: center;
  margin-top: 100px;
  font-size: 1.875rem;
}

.card-section {
  display: flex;
  gap: 25px;
  justify-content: space-around;
  align-items: center;
  margin-top: 50px;
  flex-wrap: wrap;
}

.cards {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 500px;
  gap: 15px;
}

.cards img {
  height: 50px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.cards h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.cards p {
  margin: 0;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: rgb(95, 95, 95);
}

.cards:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* -------------------- Footer -------------------- */
.footer {
  text-align: center;
  padding: 1rem;
  margin-top: 50px;
}

.footer h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.footer p {
  font-family: 'Inter', sans-serif;
  color: rgb(95, 95, 95);
  font-size: 1rem;
  margin-top: 0.5rem;
}

.footer a {
  color: #3B82F6;
  text-decoration: none;
}

/* -----Books Page----- */
.books {
    padding: 3rem 2rem;
    margin-top: 60px;
}

.books h1{
    font-family: Poppins, sans-serif;
    text-align: left;
    font-size: 2rem;
}

.books p{
    font-family: Inter;
    font-size: 1rem;
    color: rgb(95, 95, 95);
}

.search-book{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
}

#searchInput{
    width: 80%;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

#searchInput:focus{
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
}

#searchBtn{
    text-decoration: none;
    background-color: #3B82F6;
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    font-family: Inter, sans-serif;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#searchBtn:hover{
    background-color: #5a99ff;
    transform: translateY(-2px);
}

/*Book List Layout*/
.books-list{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.book-card{
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.book-card:hover{
    transform: translateY(-4px);
}

.book-card h3{
    font-family: Poppins, sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.book-card p{
    font-family: Inter, sans-serif;
    font-size: 1rem;
    color: rgb(95, 95, 95);
    margin: 0;
}

.add-book{
    padding: 3rem 2rem;
    margin-top: 60px;
}
.back-btn{
    text-decoration: none;
    background-color: white;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: Inter, sans-serif;
    font-size: 0.9rem;
    color: black;
    font-weight: 500;
}

.back-btn:hover{
    background-color: #F59E0B;
    color: white;
    transform: translateY(-2px);
}

.form{
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 2rem auto 0 auto;
}

.form label{
    display: block;
    font-family: Inter, sans-serif;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: rgb(95, 95, 95);
}

.form input, .form textarea{
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.buttons{
    display: flex;
}

.save-btn{
    background-color: #3B82F6;
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    font-family: Inter, sans-serif;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.save-btn:hover{
    background-color: #5a99ff;
}

.cancel-btn{
    text-decoration: none;
    background-color: white;
    color: black;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1.2rem;
    font-family: Inter, sans-serif;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cancel-btn:hover{
    background-color: #F59E0B;
    color: white;
}

/* ---------- Book Actions (Edit / Delete Buttons) ---------- */
.book-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.edit-btn,
.delete-btn {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Edit Button */
.edit-btn {
  background-color: #3B82F6; /* Same blue as site theme */
  color: white;
}

.edit-btn:hover {
  background-color: #5a99ff;
  transform: translateY(-2px);
}

/* Delete Button */
.delete-btn {
  background-color: #F87171; /* Soft red */
  color: white;
}

.delete-btn:hover {
  background-color: #EF4444;
  transform: translateY(-2px);
}

/* Responsive Button Layout */



.settings-page{
    padding: 3rem 2rem;
    margin-top: 60px;
}

.settings-page h1{
    font-family: Poppins, sans-serif;
    text-align: left;
    font-size: 2rem;
}

.settings-page p{
    font-family: Inter;
    font-size: 1rem;
    color: rgb(95, 95, 95);
}
.data{
    width: 100%;
    margin: 3rem 2rem;
    margin: 3rem auto;
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.data h2{
    font-family: Poppins, sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.data p{
    font-family: Inter, sans-serif;
    font-size: 1rem;
    color: rgb(95, 95, 95);
}

.data-buttons{
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.import-btn, .export-btn, .reset-btn{
    text-decoration: none;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1.2rem;
    font-family: Inter, sans-serif;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.import-btn:hover, .export-btn:hover{
    background-color: #3B82F6;
    color: white;
    transform: translateY(-2px);
}

.reset-btn:hover{
    background-color: #F87171;
    color: white;
    transform: translateY(-2px);
}

.data-management{
    width: 100%;
    margin: 3rem 2rem;
    margin: 3rem auto;
    background-color: #f8f5ee;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.data-management h2{
    font-family: Poppins, sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.data-management p{
    font-family: Inter, sans-serif;
    font-size: 1rem;
    color: rgb(95, 95, 95);
}

.data-management ul{
    list-style-type: disc;
    margin-left: 20px;
    color: rgb(95, 95, 95);
    font-family: Inter, sans-serif;
    line-height: 1.5;
}

/* ----- Intro Section Animation ----- */
.intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    text-align: center;
}

.header-intro,
#header-intro2,
.main-p,
.Get-Started {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.header-intro {
    animation-delay: 0.3s;
}

#header-intro2 {
    color: #3B82F6;
    animation-delay: 0.5s;
}

.main-p {
    font-family: 'Inter', sans-serif;
    color: rgb(95, 95, 95);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 1rem auto 2rem auto;
    line-height: 1.6;
    text-align: center;
    animation-delay: 0.7s;
}

.Get-Started {
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    color: white;
    background-color: #3B82F6;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease;
    animation-delay: 0.9s;
}

.Get-Started:hover {
    transform: translateY(-3px) scale(1.05);
    background-color: #5a99ff;
}

/* ----- Cards Animation ----- */
.cards {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 500px;
    gap: 15px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.card-section .cards:nth-child(1) { animation-delay: 0.5s; }
.card-section .cards:nth-child(2) { animation-delay: 0.7s; }
.card-section:nth-of-type(2) .cards:nth-child(1) { animation-delay: 0.9s; }
.card-section:nth-of-type(2) .cards:nth-child(2) { animation-delay: 1.1s; }

.cards:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* ----- Keyframes ----- */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Footer Animation ----- */
.footer {
    text-align: center;
    padding: 1rem;
    margin-top: 50px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
    animation-delay: 1.3s;
}

/* ----- Floating Shapes Behind Intro ----- */
.intro-container {
    position: relative;
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* shapes won’t block clicks */
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 12s infinite ease-in-out;
}

.shape1 {
    width: 120px;
    height: 120px;
    background: #3B82F6;
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.shape2 {
    width: 80px;
    height: 80px;
    background: #FBBF24;
    top: 30%;
    left: 70%;
    animation-delay: 3s;
}

.shape3 {
    width: 100px;
    height: 100px;
    background: #10B981;
    top: 60%;
    left: 25%;
    animation-delay: 6s;
}

.shape4 {
    width: 60px;
    height: 60px;
    background: #F87171;
    top: 75%;
    left: 80%;
    animation-delay: 9s;
}

/* Edit mode */
.book-card.editing {
  background-color: #f0f8ff;
  border: 1px solid #3b82f6;
}

/* Confirmation modal */
.confirm-box {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.confirm-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.confirm-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.yes-btn {
  background-color: #dc2626;
  color: white;
}

.no-btn {
  background-color: #e5e7eb;
  color: black;
}

/* ----- Keyframes for Floating Animation ----- */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(15deg);
    }
    50% {
        transform: translateY(20px) translateX(-10px) rotate(-15deg);
    }
    75% {
        transform: translateY(-10px) translateX(5px) rotate(10deg);
    }
}


/* -------------------- Tablet View -------------------- */
@media (max-width: 768px) {
  /* Navbar */
  .nav-bar {
    flex-direction: column;
    align-items: center;
    padding: 0.8rem 1rem;
  }

  .logo img {
    height: 30px;
  }

  .logo h3 {
    font-size: 1rem;
    text-align: center;
  }

  .nav-links {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links a {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }

  /* Books Section */
  .books {
    padding: 2rem 1.2rem;
    margin-top: 70px;
  }

  .books h1 {
    font-size: 1.8rem;
    text-align: center;
  }

  .books p {
    text-align: center;
    font-size: 1rem;
  }

  .search-book {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem 0;
  }

  #searchInput {
    width: 100%;
  }

  #searchBtn {
    width: 100%;
  }

  .books-list {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .book-card {
    padding: 1.2rem;
  }

  .book-card h3 {
    font-size: 1rem;
  }

  .book-card p {
    font-size: 0.9rem;
  }

  /* Footer */
  .footer p {
    font-size: 0.9rem;
  }
}


/* -------------------- Mobile View -------------------- */
@media (max-width: 480px) {
  /* Navbar */
  .nav-bar {
    flex-direction: column;
    padding: 0.6rem 1rem;
  }

  .logo img {
    height: 25px;
  }

  .logo h3 {
    font-size: 0.9rem;
  }

  .nav-links {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  /* Books Section */
  .books {
    padding: 1.5rem 1rem;
    margin-top: 70px;
  }

  .books h1 {
    font-size: 1.5rem;
    text-align: center;
  }

  .books p {
    font-size: 0.9rem;
    text-align: center;
  }

  .search-book {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    padding: 1rem 0;
  }

  #searchInput {
    width: 100%;
    font-size: 0.9rem;
  }

  #searchBtn {
    width: 100%;
    font-size: 0.9rem;
  }

  .books-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .book-card {
    padding: 1rem;
  }

  .book-card h3 {
    font-size: 1rem;
  }

  .book-card p {
    font-size: 0.85rem;
  }

  /* Footer */
  .footer p {
    font-size: 0.8rem;
  }


}

@media (max-width: 480px) {
  .book-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .edit-btn,
  .delete-btn {
    width: 100%;
    font-size: 0.85rem;
    text-align: center;
  }
}


/* -------------------- Add Book Responsiveness -------------------- */

/* Tablet view */
@media (max-width: 768px) {
  .add-book {
    padding: 2rem 1rem;
    margin-top: 70px;
  }

  .back-btn {
    display: inline-block;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
  }

  .form {
    padding: 1.5rem;
    max-width: 90%;
  }

  .form h2 {
    font-size: 1.5rem;
    text-align: center;
  }

  .form label {
    font-size: 0.95rem;
  }

  .form input,
  .form textarea {
    font-size: 0.95rem;
    padding: 0.6rem 0.9rem;
  }

  .buttons {
    flex-direction: column;
    gap: 0.8rem;
  }

  .save-btn,
  .cancel-btn {
    width: 100%;
    text-align: center;
  }
}

/* Mobile view */
@media (max-width: 480px) {
  .add-book {
    padding: 1.5rem 1rem;
    margin-top: 70px;
  }

  .back-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }

  .form {
    padding: 1rem;
    width: 100%;
    margin: 1.5rem auto;
  }

  .form h2 {
    font-size: 1.3rem;
    text-align: center;
  }

  .form label {
    font-size: 0.9rem;
  }

  .form input,
  .form textarea {
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .buttons {
    flex-direction: column;
    gap: 0.8rem;
  }

  .save-btn,
  .cancel-btn {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.7rem;
  }
}

