/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Merriweather&family=Roboto:wght@400;500;700&display=swap');

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  background: #B7A3E3;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
  transition: background 0.5s ease-in-out;
  font-family: "Merriweather", serif;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(45, 29, 71, 0.9);
  backdrop-filter: blur(10px);
  padding: 12px 40px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
  font-family: "Roboto", sans-serif;
}

.menu-toggle {
  display: none;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 55px;
  border-radius: 50%;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.logo:hover {
  transform: scale(1.1);
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-links a.active,
.nav-links a:hover {
  background: linear-gradient(90deg, #df76ac, #ec4899);
  transform: scale(1.05);
}

.nav-links li a:hover {
  background-color: #d687b6;
}

/* Book Section */
.buy-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 40px;
  animation: fadeInZoom 1s ease forwards;
}

@keyframes fadeInZoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.book-display {
  display: flex;
  align-items: center;
  gap: 60px;
  background: rgba(45, 29, 71, 0.85);
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transform: scale(0.95);
  transition: all 0.5s ease;
}
.book-display:hover {
  transform: scale(1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.book-info {
  font-family: "Merriweather", serif;
}

.book-info h2 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 34px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #f472b6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.book-cover {
  width: 300px;
  border-radius: 12px;
  transition: transform 0.4s ease;
}
.book-cover:hover {
  transform: scale(1.08) rotate(2deg);
}

.description {
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 20px;
  opacity: 0.9;
}

.price {
  font-size: 26px;
  font-weight: 700;
  margin: 15px 0;
  font-family: "Roboto", sans-serif;
}

.buy-btn {
  background: linear-gradient(90deg, #10b981, #22c55e);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  transition: all 0.4s ease;
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
  font-family: "Roboto", sans-serif;
}
.buy-btn:hover {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5);
}

/* Popup Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 999;
  animation: fadeIn 0.4s ease forwards;
}

.modal-content {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  padding: 40px 50px;
  border-radius: 20px;
  width: 420px;
  position: relative;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
  color: white;
  animation: zoomIn 0.5s ease forwards;
  font-family: "Roboto", sans-serif;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 26px;
  cursor: pointer;
  color: white;
  transition: transform 0.3s ease;
}
.close:hover {
  transform: scale(1.2);
  color: #f472b6;
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 25px;
  font-weight: 700;
  background: linear-gradient(90deg, #f472b6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  font-weight: 600;
  color: #f9fafb;
}

input {
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  outline: none;
  font-family: "Merriweather", serif;
}

.pay-btn {
  background: linear-gradient(90deg, #f472b6, #ec4899);
  color: white;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(236, 72, 153, 0.4);
  font-family: "Roboto", sans-serif;
}
.pay-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.6);
}

.pay2-btn {
  display: inline-block;
  text-align: center;
  background: linear-gradient(90deg, #f472b6, #ec4899);
  color: white;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 25px;
  text-decoration: none; /* Important for links */
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(236, 72, 153, 0.4);
}

.pay2-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.6);
}


/* Footer */
footer {
  background: linear-gradient(90deg, #f472b6, #ec4899);
  color: rgba(45, 29, 71, 0.9);
  font-size: 14px;
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  backdrop-filter: blur(5px);
  font-family: "Roboto", sans-serif;
}

footer a {
  color: rgba(45, 29, 71, 0.9);
  text-decoration: none;
  font-size: 20px;
  transition: transform 0.3s ease, color 0.3s ease;
}

footer a:hover {
  transform: scale(1.2);
  color: #f472b6;
}

footer p {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Media Queries for Mobile & Tablet Responsiveness */

/* Mobile devices (up to 768px) */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 12px 20px;
  }

  .nav-links {
    flex-direction: column;
    gap: 15px;
  }

  .book-display {
    flex-direction: column;
    padding: 30px;
    gap: 30px;
  }

  .book-cover {
    width: 100%;
    max-width: 300px;
  }

  .buy-section {
    padding: 50px 20px;
  }

  footer {
    flex-direction: column;
    padding: 12px;
    text-align: center;
  }

  footer a {
    font-size: 16px;
  }
}

/* Tablet devices (up to 1024px) */
@media (max-width: 1024px) {
  .navbar {
    padding: 12px 30px;
  }

  .book-display {
    flex-direction: column;
    padding: 40px;
    gap: 40px;
  }

  .book-cover {
    width: 80%;
    max-width: 280px;
  }

  .buy-section {
    padding: 70px 30px;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }

  footer p {
    font-size: 14px;
  }
}
