@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;600;700&family=Poppins:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --pink-light: #FFD6E7;
  --pink-soft: #FFB3D1;
  --pink-main: #FF6BAE;
  --pink-deep: #E91E8C;
  --pink-dark: #C2185B;
  --pink-bg: #FFF0F7;
  --pink-glow: #FF4DA6;
  --white: #FFFFFF;
  --text-dark: #4A1030;
  --gold: #FFD700;
}

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

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Poppins', sans-serif;
  background: var(--pink-bg);
  overflow: hidden;
}

/* ===== PAGE SYSTEM ===== */
.page {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: translateY(30px);
  overflow-y: auto;
}

.page.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.page.exit {
  opacity: 0;
  transform: translateY(-30px);
}

/* ===== BUTTONS ===== */
.btn-next {
  background: linear-gradient(135deg, var(--pink-main), var(--pink-deep));
  color: white;
  border: none;
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(233,30,140,0.4);
  transition: all 0.3s ease;
  letter-spacing: 1px;
  margin-top: 30px;
}

.btn-next:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(233,30,140,0.5);
}

.btn-next:active {
  transform: translateY(0);
}

/* ===== FLOATING HEARTS BACKGROUND ===== */
.hearts-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.heart-float {
  position: absolute;
  bottom: -50px;
  font-size: 1.2rem;
  animation: floatHeart linear infinite;
  opacity: 0.15;
}

@keyframes floatHeart {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.15; }
  50%  { opacity: 0.3; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* ===== PAGE 1 — HER SPECIAL DAY ===== */
#page1 {
  background: linear-gradient(160deg, #FFF0F7 0%, #FFD6E7 50%, #FFC2E0 100%);
}

#page1 .content {
  text-align: center;
  z-index: 1;
  padding: 20px;
}

#page1 .subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--pink-deep);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
}

#page1 .title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--pink-dark);
  line-height: 1.1;
  opacity: 0;
  animation: fadeUp 1s 0.6s forwards;
  text-shadow: 0 4px 20px rgba(233,30,140,0.2);
}

#page1 .tagline {
  font-size: 0.95rem;
  color: var(--pink-deep);
  margin-top: 10px;
  font-style: italic;
  opacity: 0;
  animation: fadeUp 1s 0.9s forwards;
}

/* COUNTDOWN */
.countdown-wrapper {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 30px;
  opacity: 0;
  animation: fadeUp 1s 1.2s forwards;
}

.countdown-box {
  background: white;
  border-radius: 16px;
  padding: 14px 18px;
  min-width: 70px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(233,30,140,0.15);
  border: 2px solid var(--pink-soft);
  position: relative;
  overflow: hidden;
}

.countdown-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pink-main), var(--pink-deep));
}

.countdown-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pink-dark);
  font-family: 'Playfair Display', serif;
  line-height: 1;
}

.countdown-label {
  font-size: 0.65rem;
  color: var(--pink-main);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ===== PAGE 2 — GIFT ===== */
#page2 {
  background: linear-gradient(160deg, #FFC2E0 0%, #FFD6E7 100%);
}

#page2 .content {
  text-align: center;
  z-index: 1;
  padding: 20px;
}

#page2 .for-you-text {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--pink-dark);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
}

#page2 .hint-text {
  font-size: 0.9rem;
  color: var(--pink-deep);
  margin-bottom: 30px;
  font-style: italic;
  opacity: 0;
  animation: fadeUp 1s 0.5s forwards;
}

/* GIFT BOX */
.gift-container {
  cursor: pointer;
  display: inline-block;
  position: relative;
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
}

.gift-box {
  width: 140px;
  height: 120px;
  position: relative;
  transition: transform 0.3s;
}

.gift-container:hover .gift-box {
  transform: scale(1.05);
}

.gift-body {
  width: 140px;
  height: 90px;
  background: linear-gradient(135deg, #FF6BAE, #E91E8C);
  border-radius: 8px;
  position: absolute;
  bottom: 0;
  box-shadow: 0 8px 25px rgba(233,30,140,0.4);
}

.gift-body::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 20px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
}

.gift-lid {
  width: 150px;
  height: 36px;
  background: linear-gradient(135deg, #FF4DA6, #C2185B);
  border-radius: 6px;
  position: absolute;
  top: 0;
  left: -5px;
  box-shadow: 0 4px 15px rgba(233,30,140,0.4);
  transition: transform 0.6s cubic-bezier(0.34,1.56,0.64,1), opacity 0.6s;
  transform-origin: center top;
  z-index: 2;
}

.gift-lid::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 20px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.3);
}

.gift-bow {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 60px;
  height: 30px;
}

.gift-bow::before,
.gift-bow::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #FF4DA6, #C2185B);
  top: 0;
}

.gift-bow::before { left: 2px; transform: rotate(-45deg); }
.gift-bow::after  { right: 2px; transform: rotate(45deg) scaleX(-1); }

/* Gift Opening */
.gift-container.opened .gift-lid {
  transform: translateY(-60px) rotate(-15deg);
  opacity: 0;
}

.gift-particles {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0;
}

.gift-container.opened .particle {
  animation: burst 0.8s forwards;
}

@keyframes burst {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: var(--tx) scale(0.3); }
}

.gift-hint {
  font-size: 0.8rem;
  color: var(--pink-deep);
  margin-top: 15px;
  font-style: italic;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* ===== PAGE 3 — LOVE LETTER ===== */
#page3 {
  background: linear-gradient(160deg, #FFD6E7 0%, #FFF0F7 60%, #FFD6E7 100%);
}

#page3 .content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 1;
  padding: 20px;
  max-width: 900px;
  width: 100%;
}

.side-photo {
  width: 160px;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(233,30,140,0.2);
  flex-shrink: 0;
  border: 4px solid white;
  background: var(--pink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
}

.side-photo.left  { animation-delay: 0.3s; }
.side-photo.right { animation-delay: 0.6s; }

.side-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-photo .placeholder-icon {
  font-size: 3rem;
  color: var(--pink-main);
  opacity: 0.5;
}

.center-text {
  text-align: center;
  flex: 1;
  opacity: 0;
  animation: fadeUp 1s 0.9s forwards;
}

.love-letter-small {
  font-size: 0.85rem;
  color: var(--pink-deep);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 10px;
}

.special-day-big {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--pink-dark);
  line-height: 1.1;
  text-shadow: 0 4px 15px rgba(233,30,140,0.15);
}

.heart-deco {
  font-size: 1.5rem;
  margin: 12px 0;
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

/* ===== PAGE 4 — HAPPY BIRTHDAY ===== */
#page4 {
  background: linear-gradient(160deg, #FFB3D1 0%, #FFD6E7 50%, #FFF0F7 100%);
  text-align: center;
}

#page4 .content {
  z-index: 1;
  padding: 20px;
  max-width: 700px;
  width: 100%;
}

.hb-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--pink-dark);
  text-shadow: 0 0 30px rgba(233,30,140,0.3);
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
  line-height: 1;
}

.hb-subtitle {
  font-size: 0.9rem;
  letter-spacing: 3px;
  color: var(--pink-main);
  text-transform: uppercase;
  margin-top: 5px;
  opacity: 0;
  animation: fadeUp 1s 0.6s forwards;
}

/* SCROLLING TEXT */
.scroll-text-container {
  width: 100%;
  overflow: hidden;
  margin-top: 30px;
  padding: 20px 0;
  background: rgba(255,255,255,0.5);
  border-radius: 16px;
  border: 2px solid var(--pink-soft);
  position: relative;
  opacity: 0;
  animation: fadeUp 1s 0.9s forwards;
}

.scroll-message {
  display: block;
  white-space: nowrap;
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  color: var(--pink-deep);
  /* Mulai dari luar kanan, bergerak sampai habis ke kiri */
  transform: translateX(100vw);
  animation: scrollText 20s linear 1 forwards;
  animation-delay: 0.2s;
}

@keyframes scrollText {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

#next-btn-p4 {
  display: inline-block;
  opacity: 0;
  animation: fadeUp 1s 1.2s forwards;
}

/* ===== PAGE 5 — OUR MEMORIES ===== */
#page5 {
  background: linear-gradient(160deg, #FFF0F7 0%, #FFD6E7 100%);
  justify-content: flex-start;
  overflow-y: auto;
}

#page5 .content {
  z-index: 1;
  padding: 40px 20px 30px;
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.memories-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: var(--pink-dark);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
}

.memories-subtitle {
  font-size: 0.85rem;
  color: var(--pink-main);
  letter-spacing: 2px;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeUp 1s 0.5s forwards;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
}

.photo-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(233,30,140,0.15);
  border: 3px solid white;
  aspect-ratio: 1;
  background: var(--pink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  cursor: pointer;
}

.photo-card:hover { transform: scale(1.03); }

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card .placeholder-icon {
  font-size: 2.5rem;
  color: var(--pink-main);
  opacity: 0.5;
}

/* ===== PAGE 6 — VIDEO + BIRTHDAY WISHES ===== */
#page6 {
  background: linear-gradient(160deg, #FFD6E7 0%, #FFF0F7 100%);
  overflow-y: auto;
  justify-content: flex-start;
}

#page6 .content {
  z-index: 1;
  padding: 40px 20px 30px;
  max-width: 700px;
  width: 100%;
  text-align: center;
}

.moment-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--pink-dark);
  margin-bottom: 6px;
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
}

.video-wrapper {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(233,30,140,0.2);
  border: 4px solid white;
  background: #000;
  margin: 20px 0;
  opacity: 0;
  animation: fadeUp 1s 0.6s forwards;
}

.video-wrapper video {
  width: 100%;
  display: block;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(135deg, var(--pink-soft), var(--pink-light));
  color: var(--pink-dark);
  font-family: 'Dancing Script', cursive;
  font-size: 1.5rem;
}

.video-placeholder span { font-size: 3rem; margin-bottom: 10px; }

/* WISHES */
.wishes-section {
  margin-top: 30px;
  opacity: 0;
  animation: fadeUp 1s 0.9s forwards;
}

.wishes-title {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  color: var(--pink-dark);
  margin-bottom: 16px;
}

.wish-card {
  background: white;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(233,30,140,0.1);
  border-left: 4px solid var(--pink-main);
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.6;
  position: relative;
}

.wish-card::before {
  content: '"';
  font-family: 'Dancing Script', cursive;
  font-size: 3rem;
  color: var(--pink-light);
  position: absolute;
  top: -5px;
  right: 12px;
  line-height: 1;
}

/* ===== PAGE 7 — FINAL HAPPY BIRTHDAY + CANDLES ===== */
#page7 {
  background: linear-gradient(160deg, #FFB3D1 0%, #FFD6E7 40%, #FFF0F7 100%);
  text-align: center;
  overflow: hidden;
}

#page7 .content {
  z-index: 1;
  padding: 20px;
}

.final-hb {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(3rem, 10vw, 6.5rem);
  color: var(--pink-dark);
  text-shadow: 0 0 40px rgba(233,30,140,0.3);
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
  line-height: 1;
}

.final-name {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2rem, 7vw, 4rem);
  color: var(--pink-main);
  opacity: 0;
  animation: fadeUp 1s 0.6s forwards;
}

.final-message {
  font-size: 0.9rem;
  color: var(--pink-deep);
  max-width: 420px;
  margin: 12px auto;
  line-height: 1.6;
  font-style: italic;
  opacity: 0;
  animation: fadeUp 1s 0.9s forwards;
}

/* BIRTHDAY CAKE */
.cake-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  opacity: 0;
  animation: fadeUp 1s 1.2s forwards;
}

.cake-svg-container {
  position: relative;
  display: inline-block;
}

.blow-btn {
  background: linear-gradient(135deg, var(--pink-main), var(--pink-deep));
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(233,30,140,0.4);
  transition: all 0.3s;
  margin-top: 16px;
}

.blow-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(233,30,140,0.5); }

.blow-instruction {
  font-size: 0.8rem;
  color: var(--pink-main);
  margin-top: 8px;
  font-style: italic;
  animation: pulse 2s infinite;
}

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  pointer-events: none;
  z-index: 999;
}

@keyframes confettiFall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Extinguish smoke */
.smoke {
  position: absolute;
  border-radius: 50%;
  background: rgba(200,200,200,0.5);
  animation: smokePuff 1.5s forwards;
  pointer-events: none;
}

@keyframes smokePuff {
  0%   { transform: scale(0) translateY(0); opacity: 0.6; }
  100% { transform: scale(3) translateY(-40px); opacity: 0; }
}

/* ===== SHARED ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== SPARKLE DECORATION ===== */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink-main);
  animation: sparkle 2s infinite;
  pointer-events: none;
}

@keyframes sparkle {
  0%,100% { transform: scale(0); opacity: 0; }
  50%      { transform: scale(1); opacity: 1; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--pink-light); }
::-webkit-scrollbar-thumb { background: var(--pink-main); border-radius: 5px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .countdown-wrapper { gap: 10px; }
  .countdown-box { min-width: 58px; padding: 10px 12px; }
  .countdown-num { font-size: 1.6rem; }
  #page3 .content { flex-direction: column; }
  .side-photo { width: 130px; height: 180px; }
  .photos-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== WHATSAPP BUTTON ===== */
.wa-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  text-decoration: none;
  border: none;
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.45);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  margin-top: 14px;
}

.wa-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

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

.wa-btn.show {
  display: flex;
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}