body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background: #fffdfb;
  color: #333;
}
/*.return-btn {*/
/*  position: fixed;*/
/*  top: 20px;*/
/*  left: 20px;*/
/*  background-color: #4B0082;*/
/*  color: #fff;*/
/*  padding: 10px 18px;*/
/*  border-radius: 30px;*/
/*  text-decoration: none;*/
/*  font-weight: 500;*/
/*  font-size: 0.95rem;*/
/*  box-shadow: 0 2px 10px rgba(75, 0, 130, 0.25);*/
/*  transition: all 0.25s ease;*/
/*  z-index: 1000;*/
/*}*/

/*.return-btn:hover {*/
/*  transform: scale(1.05);*/
/*  box-shadow: 0 4px 15px rgba(75, 0, 130, 0.35);*/
/*}*/
/* Sticky Header */
/*.magical-header {*/
/*  position: sticky;*/
/*  top: 0;*/
/*  z-index: 100;*/
/*  text-align: center;*/
/*  background: linear-gradient(135deg, #4B0082, #6A0DAD);*/
/*  color: #fff;*/
/*  padding: 1.5rem 1rem;*/
/*  border-bottom: 3px solid #fff3;*/
/*  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);*/
/*}*/

/* Sticky Return Button */
/*.return-btn {*/
/*  position: fixed;*/
/*  top: 15px;*/
/*  left: 20px;*/
/*  background-color: #4B0082;*/
/*  color: #fff;*/
/*  padding: 10px 18px;*/
/*  border-radius: 30px;*/
/*  text-decoration: none;*/
/*  font-weight: 500;*/
/*  font-size: 0.95rem;*/
/*  box-shadow: 0 2px 10px rgba(75, 0, 130, 0.25);*/
/*  transition: all 0.25s ease;*/
/*  z-index: 1100;*/
/*  backdrop-filter: blur(6px);*/
/*}*/

/*.return-btn:hover {*/
/*  transform: scale(1.05);*/
/*  box-shadow: 0 4px 15px rgba(75, 0, 130, 0.35);*/
/*}*/

/* Sticky Header */
.magical-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #4B0082, #6A0DAD);
  color: #fff;
  padding: 1.5rem 1rem;
  border-bottom: 3px solid #fff3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Header Title */
.magical-header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
}

/* Centered Return Button */
.return-btn {
  display: inline-block;
  margin-top: 0.8rem;
  background-color: #fff;
  color: #4B0082;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 2px 10px rgba(75, 0, 130, 0.25);
  transition: all 0.25s ease;
}

.return-btn:hover {
  transform: scale(1.05);
  background-color: #f3e6ff;
  box-shadow: 0 4px 15px rgba(75, 0, 130, 0.35);
}

/* Responsive Tweaks */
@media (max-width: 600px) {
  .magical-header h1 {
    font-size: 1.5rem;
  }

  .return-btn {
    font-size: 0.85rem;
    padding: 8px 16px;
  }
}

/* Header */
.magical-header {
  text-align: center;
  background: linear-gradient(135deg, #a03721, #c55b3a);
  color: #fff;
  padding: 2rem 1rem;
  border-bottom: 3px solid rgba(255, 255, 255, 0.3);
}

.magical-header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.5px;
}

.magical-header p {
  margin-top: 0.5rem;
  font-size: 1rem;
  opacity: 0.9;
}

/* Main Section */
.stories-section {
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.loader {
  text-align: center;
  font-style: italic;
  color: #a03721;
  font-size: 1.1rem;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Story Card */
.story-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #f2e9e7;
  cursor: pointer;
}

.story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(160, 55, 33, 0.15);
}

.story-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.story-content {
  padding: 1rem;
}

.story-content h3 {
  color: #a03721;
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.story-content .author {
  font-style: italic;
  color: #777;
  font-size: 0.9rem;
}

/* Modal */
.story-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.story-modal-content {
  background: #fff;
  border-radius: 10px;
  width: 95%;
  max-width: 900px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #a03721;
  z-index: 10;
}

.close-btn:hover {
  color: #7b2918;
}

#pdfViewer {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 0 0 10px 10px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Footer */
.magical-footer {
  text-align: center;
  padding: 1.2rem;
  background: #a03721;
  color: white;
  margin-top: 2rem;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 600px) {
  .story-content h3 {
    font-size: 1rem;
  }
  .story-content p {
    font-size: 0.9rem;
  }
}
