
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #030817;
  color: #f3f6ff;
  font-family: Georgia, "Times New Roman", serif;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.intro,
.quote {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;
  transition: opacity 2s ease;
}

.intro.hidden {
  opacity: 0;
  visibility: hidden;
}

.moon {
  font-size: 72px;
  color: #e0eaff;
  text-shadow: 0 0 30px #8eb7ff;
  margin-bottom: 18px;
  animation: moonGlow 4s ease-in-out infinite;
}

.eyebrow,
.letter-small {
  font: 10px Arial, sans-serif;
  letter-spacing: 5px;
  color: #a9c9ff;
}

h1 {
  font-size: clamp(38px, 8vw, 72px);
  font-weight: normal;
  margin-top: 20px;
  text-shadow: 0 0 28px #6f98e8;
}

h1 span {
  color: #f5b9df;
  text-shadow: 0 0 24px #f5b9df;
}

.subtitle {
  margin-top: 18px;
  color: #b8c9ec;
  font-size: 14px;
  font-style: italic;
  letter-spacing: 1px;
}

button {
  border: 1px solid rgba(191, 213, 255, 0.4);
  border-radius: 30px;
  background: rgba(23, 43, 81, 0.88);
  color: #f3f6ff;
  padding: 12px 20px;
  cursor: pointer;
  font: 13px Arial, sans-serif;
  backdrop-filter: blur(8px);
  transition: 0.3s ease;
}

button:hover {
  background: #294779;
  box-shadow: 0 0 24px rgba(139, 180, 255, 0.35);
  transform: translateY(-2px);
}

#startBtn {
  margin-top: 35px;
  pointer-events: auto;
}

.quote {
  opacity: 0;
  visibility: hidden;
  transition: opacity 2.5s ease;
}

.quote.show {
  opacity: 1;
  visibility: visible;
}

.quote p {
  font-size: clamp(16px, 3vw, 21px);
  color: #c5d5f7;
}

.quote h2 {
  font-size: clamp(27px, 6vw, 48px);
  font-weight: normal;
  color: #f4c8e6;
  margin: 13px 0;
  text-shadow: 0 0 25px #b58bd8;
}

.quote span {
  font-size: 14px;
  color: #c4d4f3;
  font-style: italic;
}

.music-btn,
.letter-btn,
.replay-btn {
  position: fixed;
  z-index: 5;
}

.music-btn {
  top: 18px;
  right: 16px;
}

.letter-btn {
  bottom: 18px;
  right: 16px;
}

.replay-btn {
  bottom: 18px;
  left: 16px;
}

/* Surat rahasia */
.letter-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(1, 5, 18, 0.8);
  backdrop-filter: blur(9px);
  opacity: 0;
  visibility: hidden;
  transition: 0.4s ease;
  overflow-y: auto;
}

.letter-overlay.open {
  opacity: 1;
  visibility: visible;
}

.letter {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px 26px;
  text-align: center;
  border: 1px solid #809acb;
  border-radius: 18px;
  color: #263b60;
  background: linear-gradient(145deg, #f8f5ff, #dce9ff);
  box-shadow: 0 0 45px rgba(112, 151, 226, 0.3);
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.letter-overlay.open .letter {
  transform: translateY(0);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 3px 10px;
  background: transparent;
  color: #263b60;
  border: none;
  font-size: 27px;
}

.letter-heart {
  color: #d67db8;
  font-size: 40px;
  margin-bottom: 10px;
}

.letter-small {
  color: #7084b0;
  letter-spacing: 3px;
}

.letter h2 {
  margin: 14px 0 22px;
  font-size: 30px;
  font-weight: normal;
  color: #304a78;
}

.letter-body {
  white-space: pre-line;
  font-size: 15px;
  line-height: 1.9;
  text-align: left;
}

.letter-sign {
  margin: 20px 0;
  text-align: right;
  font-style: italic;
  color: #a54f92;
}

.close-letter {
  background: #304a78;
  color: white;
}

@keyframes moonGlow {
  0%, 100% {
    text-shadow: 0 0 18px #8eb7ff;
    transform: translateY(0);
  }

  50% {
    text-shadow: 0 0 38px #d4e3ff;
    transform: translateY(-5px);
  }
}

@media (max-width: 500px) {
  .eyebrow {
    letter-spacing: 3px;
  }

  .music-btn,
  .letter-btn,
  .replay-btn {
    font-size: 11px;
    padding: 10px 12px;
  }

  .letter-body {
    font-size: 14px;
  }
}
