@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* === GLOBAL === */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url("oursawithd.png") no-repeat center center/cover;
  overflow-y: auto;
  color: #fff;
  text-align: center;
  position: relative;
}

/* Overlay gelap */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

/* Container utama */
.container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === SUBMENU (Storytime & Other) === */
.page {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem;
  display: none;
  opacity: 0;
  transform: translateY(30px);
}
.page.active {
  display: block;
  animation: fadeInUp 0.8s ease forwards;
}

/* Judul submenu */
.page.active h2 {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

/* Paragraf submenu */
.page.active p {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.4s;
}

/* Gambar submenu */
.page.active img {
  opacity: 0;
  transform: scale(0.95);
  animation: fadeInUp 0.9s ease forwards;
  animation-delay: 0.6s;
}

/* Tombol submenu */
.page.active button,
.page.active a {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.8s;
}

/* === CERITA === */
.story-box {
  background: rgba(0, 0, 0, 0.7);
  padding: 50px 40px;
  border-radius: 24px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 750px;
  backdrop-filter: blur(12px);
  margin-bottom: 30px;
  animation: fadeInUp 1s ease;
  text-align: center;
}

/* Judul utama */
.story-title {
  margin-bottom: 30px;
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffdde1, #ee9ca7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Subjudul */
.section-title {
  margin: 25px 0 20px;
  font-size: 22px;
  font-weight: 600;
  background: linear-gradient(135deg, #a18cd1, #fbc2eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Semua paragraf & teks khusus */
.story-box p,
.story-box .intro,
.story-box .closing,
.story-box .quote {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px;
  margin-bottom: 20px;
  max-width: 650px;
  text-align: center !important;
  line-height: 1.9;
  color: #f1f1f1;
  font-size: 17px;
}

/* Intro */
.intro {
  font-size: 18px;
  font-style: italic;
  color: #e0e0e0;
}

/* Kutipan */
.quote {
  font-size: 18px;
  font-style: italic;
  color: #fff;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.08);
  padding: 20px 25px;
  margin: 35px auto;
  border-radius: 12px;
  max-width: 600px;
  box-shadow: inset 0 0 15px rgba(255,255,255,0.1);
}

/* Closing */
.closing {
  font-weight: 500;
  font-size: 17px;
  color: #e6e6fa;
}

/* Gambar responsif */
.story-img {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 20px auto 0;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}
.story-img:hover {
  transform: scale(1.02);
}

/* Tombol kembali */
.back-btn {
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #a18cd1, #fbc2eb);
  border-radius: 30px;
  text-decoration: none;
  transition: 0.3s;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
.back-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 22px rgba(0,0,0,0.6);
}

/* === ANIMASI === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIF === */
@media (max-width: 768px) {
  .story-box {
    padding: 25px;
  }
  .story-title {
    font-size: 26px;
  }
  .story-box p {
    font-size: 15px;
    line-height: 1.7;
  }
  .story-img {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .story-box {
    padding: 20px;
    border-radius: 15px;
  }
  .story-title {
    font-size: 22px;
  }
  .story-box p {
    font-size: 14px;
  }
  .back-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}
