/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== BASE ===== */
body {
  font-family: 'Poppins', sans-serif;
  background: #E8F5E9;
  color: #2d3748;
  position: relative;
}

/* ===== NAVBAR SAFE ===== */
#navbar-container {
  width: 100%;
  position: relative;
  z-index: 10000;
}

/* ===== MAIN CONTAINER ===== */
.resources-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  position: relative;
  z-index: 1;
  margin-top: 120px;
}

/* ===== 🔥 FIXED WATERMARK ===== */
body::before {
  content: "";
  position: fixed;   /* 🔥 FIX */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  background: url('images/logo.png') no-repeat center/contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

/* ===== TITLE ===== */
#pageTitle {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  margin-bottom: 25px;
  text-align: left;

  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

/* ===== LIST ===== */
#chapterList {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 800px;
  margin: auto;
}

/* ===== ITEM ===== */
#chapterList li {
  background: #ffffff;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);

  display: flex;
  justify-content: space-between;
  align-items: center;

  transition: all 0.25s ease;

  /* 🔥 ANIMATION FIX */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
}

/* 🔥 STAGGER EFFECT */
#chapterList li:nth-child(1) { animation-delay: 0.1s; }
#chapterList li:nth-child(2) { animation-delay: 0.2s; }
#chapterList li:nth-child(3) { animation-delay: 0.3s; }
#chapterList li:nth-child(4) { animation-delay: 0.4s; }
#chapterList li:nth-child(5) { animation-delay: 0.5s; }
#chapterList li:nth-child(6) { animation-delay: 0.6s; }
#chapterList li:nth-child(7) { animation-delay: 0.7s; }
#chapterList li:nth-child(8) { animation-delay: 0.8s; }

/* HOVER */
#chapterList li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* ===== LINKS ===== */
#chapterList li a {
  font-size: 0.9rem;
  color: #187A6F;
  text-decoration: none;
  font-weight: 600;
}

#chapterList li a:hover {
  text-decoration: underline;
}

/* ===== POPUP ===== */
.theme-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(0,0,0,0.6);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 20000;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

  .resources-container {
    padding: 15px;
  }

  #pageTitle {
    font-size: 1.6rem;
  }

  #chapterList li {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

}
