/* =====================================================
   Happy Birthday Keysia
   Made with ❤️
===================================================== */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Poppins:wght@300;400;500;600&display=swap");

:root {
  --bg: #08070d;
  --bg2: #14111c;

  --pink: #ff90b3;
  --pink2: #ffc7d9;

  --white: #ffffff;

  --text: #fff7fb;

  --muted: #d7c6cf;

  --glass: rgba(255, 255, 255, 0.08);

  --border: rgba(255, 255, 255, 0.12);

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow: hidden;

  font-family: "Poppins", sans-serif;

  background: radial-gradient(circle at top, #241529, var(--bg));

  color: var(--text);
}

canvas {
  position: fixed;

  inset: 0;

  width: 100%;

  height: 100%;

  z-index: -1;
}

/* ========================= */

.stage {
  position: absolute;

  inset: 0;

  display: flex;

  justify-content: center;

  align-items: center;

  flex-direction: column;

  text-align: center;

  opacity: 0;

  pointer-events: none;

  transition: 1s;

  padding: 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.stage.active {
  opacity: 1;

  pointer-events: auto;
}

h1 {
  font-family: "Playfair Display", serif;

  font-size: 70px;

  font-weight: 700;
}

h2 {
  font-family: "Playfair Display", serif;

  font-size: 45px;

  color: var(--pink);

  font-style: italic;
}

p {
  line-height: 1.8;
}

/* ========================= */

.eyebrow {
  text-transform: uppercase;

  letter-spacing: 8px;

  color: var(--muted);

  font-size: 12px;

  margin-bottom: 20px;
}

/* ========================= */

.tap-surface {
  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  background: transparent;

  border: none;

  cursor: pointer;
}

/* ========================= */

.ghost-btn {
  padding: 15px 40px;

  border-radius: 999px;

  border: 1px solid var(--pink);

  color: white;

  background: transparent;

  cursor: pointer;

  transition: 0.35s;

  font-size: 14px;

  letter-spacing: 3px;
}

.ghost-btn:hover {
  background: rgba(255, 144, 179, 0.2);

  transform: translateY(-2px);
}

.ghost-btn:active {
  transform: scale(0.97);
}

/* ========================= */

.hint-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }
}
/* =====================================================
   TAMBAHAN — melengkapi bagian yang belum ada style-nya
===================================================== */

body {
  min-height: 100vh;
}
#app {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

h1,
h2 {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 8.5vw, 70px);
}
h2 {
  font-size: clamp(1.4rem, 6.5vw, 45px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Sakura petals ---------- */
#sakura-container {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.sakura-petal {
  position: absolute;
  top: -10vh;
  color: var(--pink2);
  user-select: none;
  animation-name: sakuraFall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  filter: drop-shadow(0 0 4px rgba(255, 199, 217, 0.35));
}
@keyframes sakuraFall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(115vh) translateX(var(--drift, 40px)) rotate(360deg);
    opacity: 0.1;
  }
}

/* ---------- Touch the heart ---------- */
#heart-hit {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: min(60vw, 60vh);
  height: min(60vw, 60vh);
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
}
.touch-label {
  position: relative;
  margin-top: 46vh;
  text-transform: uppercase;
  letter-spacing: 6px;
  font-size: 13px;
  color: var(--pink2);
}

/* ---------- Envelope & letter ---------- */
#envelope-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: clamp(3.2rem, 15vw, 5.4rem);
  line-height: 1;
  animation: floatY 3.2s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(255, 144, 179, 0.3));
}
@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
#envelope-btn.opened {
  transform: scale(0.85);
  opacity: 0;
  animation: none;
  transition: all 0.5s ease;
}

.letter-content {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.letter-content.show {
  display: flex;
}

.letter-paper {
  max-width: 460px;
  width: 86vw;
  max-height: 56vh;
  overflow-y: auto;
  background: var(--text);
  color: #2b2130;
  padding: clamp(24px, 6vw, 38px);
  border-radius: 4px;
  box-shadow: var(--shadow);
  transform: rotate(-1.1deg);
  font-family: "Playfair Display", serif;
  font-size: clamp(0.95rem, 2.8vw, 1.08rem);
  line-height: 1.8;
  white-space: pre-line;
  text-align: left;
}

/* ---------- Interactive note cards ---------- */
.feature-title {
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  max-width: 760px;
  margin-bottom: 8px;
}
.feature-subtitle {
  color: var(--muted);
  font-size: clamp(0.88rem, 2.5vw, 1rem);
  margin-bottom: 26px;
}
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(820px, 90vw);
  margin-bottom: 16px;
}
.note-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 190px;
  padding: 22px 18px;
  overflow: hidden;
  text-align: left;
  color: var(--text);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.09),
    rgba(255, 255, 255, 0.025)
  );
  border: 1px solid var(--border);
  border-radius: 22px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}
.note-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at top left,
    rgba(255, 144, 179, 0.2),
    transparent 65%
  );
  transition: opacity 0.3s ease;
}
.note-card:hover,
.note-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(255, 144, 179, 0.65);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  outline: none;
}
.note-card:hover::before,
.note-card.is-open::before {
  opacity: 1;
}
.note-card-icon {
  color: var(--pink);
  font-size: 1.7rem;
  line-height: 1;
}
.note-card-title {
  position: relative;
  font-weight: 600;
  font-size: 1rem;
}
.note-card-hint {
  position: relative;
  color: var(--muted);
  font-size: 0.78rem;
}
.note-card-message {
  position: relative;
  display: none;
  color: #ffeaf2;
  font-size: 0.88rem;
  line-height: 1.7;
  animation: revealNote 0.35s ease both;
}
.note-card.is-open {
  background: linear-gradient(
    145deg,
    rgba(255, 144, 179, 0.16),
    rgba(255, 255, 255, 0.045)
  );
  border-color: rgba(255, 144, 179, 0.55);
}
.note-card.is-open .note-card-hint {
  display: none;
}
.note-card.is-open .note-card-message {
  display: block;
}
@keyframes revealNote {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.notes-progress {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.ghost-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Little wish interaction ---------- */
.wish-orb {
  display: grid;
  place-items: center;
  width: clamp(100px, 22vw, 150px);
  aspect-ratio: 1;
  margin: 4px 0 18px;
  border: 1px solid rgba(255, 199, 217, 0.65);
  border-radius: 50%;
  color: white;
  font-size: clamp(2.5rem, 8vw, 4.4rem);
  background:
    radial-gradient(
      circle at 35% 25%,
      rgba(255, 255, 255, 0.28),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      rgba(255, 144, 179, 0.32),
      rgba(143, 211, 255, 0.12)
    );
  box-shadow:
    0 0 35px rgba(255, 144, 179, 0.2),
    inset 0 0 28px rgba(255, 255, 255, 0.06);
  cursor: pointer;
  animation:
    orbFloat 3s ease-in-out infinite,
    orbGlow 2.8s ease-in-out infinite;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}
.wish-orb:hover {
  transform: scale(1.06);
}
.wish-orb.revealed {
  animation: wishPop 0.6s ease both;
  box-shadow: 0 0 70px rgba(255, 144, 179, 0.48);
}
.wish-orb:disabled {
  cursor: default;
}
.wish-message {
  max-width: 500px;
  min-height: 3.5em;
  margin-bottom: 20px;
  color: var(--muted);
  font-family: "Playfair Display", serif;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  line-height: 1.7;
  opacity: 0.65;
  transition:
    color 0.4s ease,
    opacity 0.4s ease;
}
.wish-message.revealed {
  color: var(--text);
  opacity: 1;
  animation: revealNote 0.55s ease both;
}
@keyframes orbFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -9px;
  }
}
@keyframes orbGlow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
}
@keyframes wishPop {
  0% {
    transform: scale(0.85);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

/* ---------- Final ---------- */
.final-quote {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.5rem, 6.5vw, 2.5rem);
  max-width: 620px;
  line-height: 1.4;
  margin: 0 0 6px;
}

/* ---------- Mute toggle ---------- */
#mute-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: 0.3s;
}
#mute-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  #envelope-btn {
    animation: none;
  }
  .hint-pulse {
    animation: none;
  }
  .sakura-petal {
    display: none;
  }
}

/* =====================================================
   TAMBAHAN 2 — Aurora, Typing cursor, Fade+zoom transition
===================================================== */

/* ---------- Aurora background ---------- */
#aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
#aurora span {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  mix-blend-mode: screen;
  animation-name: auroraDrift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
#aurora span:nth-child(1) {
  background: radial-gradient(circle, var(--pink), transparent 60%);
  top: -25%;
  left: -15%;
  animation-duration: 26s;
}
#aurora span:nth-child(2) {
  background: radial-gradient(circle, #8fd3ff, transparent 60%);
  top: 5%;
  right: -25%;
  animation-duration: 32s;
  animation-delay: -9s;
}
#aurora span:nth-child(3) {
  background: radial-gradient(circle, var(--pink2), transparent 60%);
  bottom: -30%;
  left: 15%;
  animation-duration: 36s;
  animation-delay: -17s;
}
@keyframes auroraDrift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(6%, -8%) scale(1.15);
  }
  66% {
    transform: translate(-8%, 6%) scale(0.9);
  }
}

/* ---------- Stage transition: fade + soft zoom ---------- */
.stage {
  transform: scale(0.97);
  transition:
    opacity 1.1s ease,
    transform 1.1s ease;
}
.stage.active {
  transform: scale(1);
}

/* ---------- Typing letter cursor ---------- */
.letter-paper.typing::after {
  content: "|";
  margin-left: 2px;
  animation: blinkCursor 0.8s steps(1) infinite;
  color: var(--pink);
}
@keyframes blinkCursor {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #aurora span {
    animation: none;
  }
  .stage {
    transform: none;
  }
  .letter-paper.typing::after {
    animation: none;
  }
}

/* ---------- Responsive layout ---------- */
@media (max-width: 700px) {
  .stage {
    padding: 76px 18px 24px;
  }
  .eyebrow {
    letter-spacing: 4px;
    font-size: 10px;
  }
  .note-grid {
    grid-template-columns: 1fr;
    width: min(440px, 100%);
    gap: 10px;
  }
  .note-card {
    min-height: 0;
    padding: 16px 17px;
    border-radius: 16px;
  }
  .note-card-icon {
    font-size: 1.35rem;
  }
  .note-card-title {
    font-size: 0.95rem;
  }
  .note-card-message {
    font-size: 0.85rem;
  }
  .feature-subtitle {
    margin-bottom: 18px;
  }
  .ghost-btn {
    padding: 13px 24px;
    letter-spacing: 1.5px;
  }
  .touch-label {
    margin-top: 42vh;
    letter-spacing: 3px;
    font-size: 11px;
  }
  .letter-paper {
    max-height: 48vh;
  }
}
@media (max-height: 650px) {
  .stage {
    padding-top: 56px;
    padding-bottom: 16px;
  }
  .note-card {
    min-height: 0;
    padding: 14px;
  }
  .feature-subtitle {
    margin-bottom: 14px;
  }
  .letter-paper {
    max-height: 43vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .note-card,
  .note-card-message,
  .wish-orb,
  .wish-message {
    animation: none !important;
    transition: none !important;
  }
}
#mute-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
