body {
  background: #fdeff4; /* soft pink */
  color: #5a4b52;
  font-family: "Gamja Flower", cursive;
  line-height: 1.7;
  font-size: 1.3rem;
  text-align: center;
  padding-top: 60px;
}

.main-container {
  max-width: 750px;
  margin: auto;
  padding: 0 20px;
}

h1 {
  font-size: 3.2rem;
  margin-bottom: 25px;
}

.filter-group {
  margin-bottom: 30px;
}

.filter-group button {
  font-family: "Schoolbell", cursive;
  margin: 0 8px;
  padding: 6px 14px;
  background: #fff5fa;
  border: 1px solid #e3b7c5;
  cursor: pointer;
}

.filter-group button:hover {
  background: #ffe6f0;
}
.home-link {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 1rem;
  text-decoration: none;
  color: #b07b91;
  transition: 0.2s ease;
}

.home-link:hover {
  transform: translateX(-4px);
  color: #e48fb1;
}
/* Grid */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 30px;
}

.card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: rotate(-2deg) scale(1.05);
}

.card img {
  width: 100%;
  border: 2px solid #f3c7d5;
  box-shadow: 4px 4px 0px #f8dce6;
}

.title {
  margin-top: 8px;
}

/* Modal */

/* ✨ Binder Style Modal */

.modal-content {
  width: 908px;
  height: 608px;
  background: #f5c2d6;
  border-radius: 25px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1500px;
}
.book {
  display: flex;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}
/* Floral frame effect */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 220, 235, 0.85);
  justify-content: center;
  align-items: center;
}

/* Notebook pages */

.modal-content::before,
.modal-content::after {
  content: "";
  flex: 1;
  background: radial-gradient(#e6e6e6 1px, transparent 1px);
  background-size: 14px 14px;
}

/* Binder spine */

.spine {
  width: 30px;
  background: linear-gradient(to right, #caa2ff, #b88df5, #caa2ff);
  position: relative;
  flex-shrink: 0;
}

/* Binder rings */

.spine::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 50%;
  width: 6px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 40px, #a88ee8 40px, #a88ee8 55px);
}
.page {
  flex: 1;
  padding: 50px;
  background: radial-gradient(#e6e6e6 1px, transparent 1px);
  background-size: 14px 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* ← THIS allows scrolling */
}
.page::-webkit-scrollbar {
  width: 6px;
}

.page::-webkit-scrollbar-thumb {
  background: #e6b6c7;
  border-radius: 10px;
}
.left-page {
  border-right: 1px solid #eee;
}

.right-page {
  border-left: 2px solid #f3b4c7;
  line-height: 1.8;

  transform-origin: left center;
  transform: rotateY(90deg);
  backface-visibility: hidden;
}
.right-page.opening {
  animation: openPage 1.4s ease forwards;
  animation-delay: 0.2s;
}

@keyframes openPage {
  0% {
    transform: rotateY(90deg);
  }

  100% {
    transform: rotateY(0deg);
  }
}
/* Text styling */

.meta {
  color: #b07b91;
  font-size: 0.9em;
}
.date {
  font-size: 0.85em;
  color: #c58aa2;
  margin-bottom: 15px;
}

.review,
.notes {
  margin-top: 18px;
}

/* Page turn animation */

.page-turn.animate {
  animation: pageFlip 0.5s ease;
}

@keyframes pageFlip {
  0% {
    transform: rotateY(-90deg);
    opacity: 0;
  }
  100% {
    transform: rotateY(0);
    opacity: 1;
  }
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 20px;
  cursor: pointer;
  color: #444;
}
/* 💗 Favorite Heart Stamp */

.heart-stamp {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #ff6fa5;
  font-size: 1.2em;
  transform: rotate(-15deg);
  opacity: 0.85;
}
.cover-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.cover-wrapper img {
  width: 160px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  transform: rotate(-2deg);
  background: white;
  padding: 6px;
}

/* Optional polaroid vibe */
.cover-wrapper img:hover {
  transform: rotate(0deg) scale(1.03);
  transition: 0.3s ease;
}
.notes {
  margin-top: 30px;
}

.notes p {
  text-indent: 20px;
}
/* Initial state */
.book {
  transform: rotateY(-8deg) scale(0.98);
  opacity: 0;
  transform-origin: center;
}

/* When opened */
.book.open {
  animation: openBook 0.6s ease forwards;
}

@keyframes openBook {
  0% {
    transform: rotateY(-8deg) scale(0.98);
    opacity: 0;
  }

  60% {
    transform: rotateY(2deg) scale(1.02);
    opacity: 1;
  }

  100% {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
  }
}
