:root {
  --bg-dark: #0f111a;
  --bg-card: #181b28;
  --text-main: #f4f6fb;
  --text-muted: #9aa3b8;
  --accent: #ff5e8e;
  --accent-glow: rgba(255, 94, 142, 0.35);
  --border-subtle: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 0%, #231934 0%, var(--bg-dark) 70%);
  color: var(--text-main);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* Progress Bar Atas */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 20;
}

.progress-bar {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, #ff5e8e, #ff9671);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tombol Musik */
.music-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.music-btn.playing {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
  animation: spinSlow 6s linear infinite;
}

.music-btn.hidden {
  display: none;
}

/* Canvas Konfeti */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

/* Layout Slide */
#slider {
  width: 100%;
  max-width: 440px;
  padding: 20px;
  z-index: 10;
}

.slide {
  display: none;
}

.slide.active {
  display: block;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

/* Elemen Teks & Media */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(255, 94, 142, 0.15);
  color: var(--accent);
  margin-bottom: 16px;
}

.emoji-hero {
  font-size: 3.5rem;
  margin-bottom: 14px;
}

h1, h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
}

p {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* Bingkai Foto */
.photo-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-placeholder {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  gap: 6px;
}

/* Tombol Navigasi */
.nav-group {
  display: flex;
  gap: 12px;
  justify-content: center;
}

button {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

button:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, #ff5e8e, #ff7eb3);
  color: #ffffff;
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
}

/* Animasi GPU-Friendly (Hanya berjalan di .slide.active) */
.slide.active .anim-up {
  opacity: 0;
  animation: fadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.slide.active .anim-pop {
  opacity: 0;
  animation: popIn 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.34s; }
.delay-4 { animation-delay: 0.48s; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.75);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}