/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --sun: #fbbf24;
  --sun-dark: #f59e0b;
  --sun-bright: #fde047;
  --leaf: #f59e0b;
  --sky-bg: #fffbeb;
  --text: #713f12;
  --text-soft: #a16207;
  --duck-yellow: #fcd34d;
  --duck-orange: #d97706;
  --brown: #92400e;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #fde68a 0%, #fef3c7 30%, #fefce8 60%, #fdf4ff 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== PETAL FIELD ===== */
.petal-field { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.petal {
  position: absolute;
  top: -8vh;
  width: 14px; height: 9px;
  background: linear-gradient(135deg, var(--sun), var(--sun-dark));
  border-radius: 60% 40% 60% 40%;
  opacity: 0.85;
  animation: fall linear infinite;
  will-change: transform;
}
@keyframes fall {
  0%   { transform: translateY(-8vh) translateX(0) rotate(0deg); }
  100% { transform: translateY(112vh) translateX(40px) rotate(360deg); }
}

/* ===== MUSIC BUTTON ===== */
.music-btn {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 2px solid var(--sun);
  color: var(--sun-dark); font-weight: 700;
  padding: 10px 16px; border-radius: 999px;
  cursor: pointer; box-shadow: 0 4px 12px rgba(245,158,11,.3);
  transition: transform .15s, background .15s;
}
.music-btn:hover { transform: scale(1.05); }
.music-btn:active { transform: scale(.95); }
.music-btn.playing { background: var(--sun); color: #fff; }
.music-icon { font-size: 1.2rem; display: inline-block; }
.music-btn.playing .music-icon { animation: spin 2.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* add duck button */
.add-duck-btn {
  position: fixed;
  bottom: 20px; right: 16px;
  z-index: 55;
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(90deg, var(--sun), var(--sun-dark));
  color: #fff; font-weight: 800;
  border: none; padding: 12px 18px; border-radius: 999px;
  font-size: 1.05rem; cursor: pointer;
  box-shadow: 0 6px 16px rgba(245,158,11,.45);
  transition: transform .15s;
}
.add-duck-btn:hover { transform: scale(1.06); }
.add-duck-btn:active { transform: scale(.94); }
.add-duck-btn .duck-emoji { font-size: 1.3rem; }
.add-duck-btn .duck-plus { font-size: 1.3rem; font-weight: 900; }
.add-duck-btn.shake { animation: shake .45s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 16px;
  z-index: 2;
  overflow: hidden;
}

/* kebun bunga matahari (lottie) */
.sunflower-garden { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.flower { position: absolute; animation: sway ease-in-out infinite; will-change: transform; }
.flower svg { width: 100% !important; height: 100% !important; }
@keyframes sway { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* birthday hat */
.birthday-hat {
  font-size: 3.4rem;
  animation: bob 2s ease-in-out infinite;
  margin-bottom: 8px;
}
.hat-tri { line-height: 1; }
.hat-band {
  display: block; margin-top: -6px;
  font-size: 2.2rem; font-weight: 900; color: #fff;
  background: linear-gradient(90deg, #f43f5e, var(--sun));
  padding: 4px 18px; border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* title */
.title { display: flex; flex-direction: column; gap: 6px; }
.t-big  { font-size: clamp(1.4rem, 5vw, 2.4rem); color: var(--text); }
.t-name {
  font-size: clamp(3.2rem, 13vw, 7rem);
  font-weight: 900; line-height: 1;
  background: linear-gradient(90deg, var(--sun-dark), var(--leaf));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(245,158,11,.2));
}
.t-dates { font-size: clamp(1rem, 3.6vw, 1.5rem); font-weight: 600; color: var(--sun-dark); }

/* ducks jalan ke segala arah */
.duck-field { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 3; }
.duck { position: absolute; top: 0; left: 0; width: 320px; height: 234px; will-change: transform; }
.duck svg { width: 100% !important; height: 100% !important; }

.scroll-hint { margin-top: 34px; font-weight: 600; color: var(--sun-dark); opacity: .8; animation: bob 2s ease-in-out infinite; }

/* ===== WISHES ===== */
.wishes { position: relative; z-index: 2; padding: 20px 16px 40px; display: flex; justify-content: center; overflow: hidden; }
.card {
  max-width: 640px;
  background: rgba(255,251,235,.92);
  backdrop-filter: blur(4px);
  border: 3px solid var(--sun);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 12px 30px rgba(245,158,11,.25);
}
.wish-card h2 { font-size: 1.6rem; color: var(--sun-dark); margin-bottom: 16px; }
.wish-card p { font-size: 1.15rem; line-height: 1.7; margin-bottom: 14px; }

.confetti-btn {
  margin-top: 10px;
  background: linear-gradient(90deg, var(--sun), var(--sun-dark));
  color: #fff; font-weight: 800;
  border: none; padding: 14px 22px; border-radius: 999px;
  font-size: 1.1rem; cursor: pointer;
  box-shadow: 0 6px 14px rgba(245,158,11,.4);
  transition: transform .15s;
}
.confetti-btn:hover { transform: scale(1.05); }
.confetti-btn:active { transform: scale(.95); }

/* confetti burst */
.confetti-piece {
  position: fixed; width: 10px; height: 14px; z-index: 60;
  pointer-events: none;
  animation: burst .9s ease-out forwards;
}
@keyframes burst {
  0%   { transform: translate(0,0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

.footer {
  position: relative; z-index: 2;
  text-align: center; padding: 24px 16px 36px;
  color: var(--leaf); font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) { /* tab */
  .birthday-hat { font-size: 3rem; }
}

@media (max-width: 600px) { /* hp */
  .duck { width: 280px; height: 204px; }
  .music-btn { top: 12px; right: 12px; padding: 8px 12px; }
  .add-duck-btn { bottom: 16px; right: 12px; padding: 10px 14px; }
  .wish-card p { font-size: 1.05rem; }
  .birthday-hat { font-size: 2.8rem; }
}