:root {
  --gold: #d4a843;
  --gold-light: #f0cb6a;
  --gold-pale: #ffe8a0;
  --deep-purple: #1a0a2e;
  --midnight: #0d0620;
  --dusk-blue: #1e1444;
  --violet: #2d1b69;
  --rose-gold: #c9776a;
  --cream: #fdf3e7;
  --green-emerald: #1a4a3a;
  --green-light: #2d7a5f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Amiri', serif;
  background: var(--midnight);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: crosshair;
}

/* ===== SKY BACKGROUND ===== */
.sky {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    #050212 0%,
    #0d0620 15%,
    #1a0a2e 30%,
    #2d1b4e 50%,
    #5c3a7a 70%,
    #8b4f6b 82%,
    #c4714a 90%,
    #d4a843 100%
  );
  z-index: 0;
}

.sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 40% at 50% 100%, rgba(212,168,67,0.25) 0%, transparent 60%),
              radial-gradient(ellipse 60% 30% at 30% 80%, rgba(196,113,74,0.15) 0%, transparent 50%);
}

/* ===== STARS ===== */
.stars-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: starTwinkle var(--dur) ease-in-out infinite var(--delay);
}

@keyframes starTwinkle {
  0%, 100% { opacity: var(--min-op); transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

/* ===== MOON ===== */
.moon-wrap {
  position: fixed;
  top: 6vh;
  right: 10vw;
  z-index: 2;
  animation: moonFloat 8s ease-in-out infinite;
}

@keyframes moonFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.moon {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 35% 35%, #fff9e0, #f0cb6a 40%, #d4a843 100%);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(212,168,67,0.8), 0 0 80px rgba(212,168,67,0.4), 0 0 120px rgba(212,168,67,0.2);
  position: relative;
  animation: moonGlow 4s ease-in-out infinite;
}

@keyframes moonGlow {
  0%, 100% { box-shadow: 0 0 40px rgba(212,168,67,0.8), 0 0 80px rgba(212,168,67,0.4); }
  50% { box-shadow: 0 0 60px rgba(212,168,67,1), 0 0 120px rgba(212,168,67,0.6), 0 0 180px rgba(212,168,67,0.3); }
}

.moon::after {
  content: '';
  position: absolute;
  top: 10px; left: 18px;
  width: 56px; height: 56px;
  background: radial-gradient(circle at 60% 40%, rgba(26,10,46,0.95) 0%, rgba(26,10,46,0.6) 60%, transparent 80%);
  border-radius: 50%;
}

/* ===== MOSQUE SILHOUETTE ===== */
.mosque-wrap {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 100%;
  max-width: 900px;
  animation: mosquePulse 4s ease-in-out infinite;
}

@keyframes mosquePulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(212,168,67,0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(212,168,67,0.6)) drop-shadow(0 0 40px rgba(212,168,67,0.3)); }
}

.mosque-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== MAIN CONTENT ===== */
.content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  padding-bottom: 220px;
}

/* ===== ARABIC CALLIGRAPHY ===== */
.arabic-top {
  font-family: 'Amiri', serif;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  color: var(--gold-light);
  text-align: center;
  opacity: 0;
  animation: fadeSlideDown 1.2s ease forwards 0.3s;
  letter-spacing: 0.05em;
  text-shadow: 0 0 30px rgba(212,168,67,0.6);
  margin-bottom: 0.5rem;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== ORNAMENT LINE ===== */
.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.8rem 0;
  opacity: 0;
  animation: fadeIn 1s ease forwards 0.8s;
}

.ornament-line {
  height: 1px;
  width: clamp(40px, 8vw, 100px);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ornament-diamond {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 10px var(--gold);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== MAIN TITLE ===== */
.main-title {
  text-align: center;
  margin: 0.5rem 0;
}

.title-selamat {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  color: var(--cream);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeSlideUp 1s ease forwards 1s;
}

.title-idul {
  display: block;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.9;
  background: linear-gradient(135deg, #f0cb6a 0%, #d4a843 30%, #fff2a0 50%, #d4a843 70%, #c9776a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: titleReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.2s;
  filter: drop-shadow(0 0 20px rgba(212,168,67,0.5));
}

.title-fitri {
  display: block;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.9;
  background: linear-gradient(135deg, #c9776a 0%, #d4a843 40%, #fff2a0 55%, #d4a843 70%, #f0cb6a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: titleReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.5s;
  filter: drop-shadow(0 0 20px rgba(212,168,67,0.5));
}

@keyframes titleReveal {
  from { opacity: 0; transform: scale(0.8) translateY(20px); filter: blur(8px) drop-shadow(0 0 20px rgba(212,168,67,0.5)); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0) drop-shadow(0 0 20px rgba(212,168,67,0.5)); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.title-year {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(1rem, 3vw, 1.6rem);
  color: var(--gold-pale);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  margin-top: 0.4rem;
  opacity: 0;
  animation: fadeIn 1s ease forwards 2s;
}

/* ===== SUBTITLE ===== */
.subtitle {
  font-family: 'Amiri', serif;
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: rgba(253,243,231,0.7);
  text-align: center;
  max-width: 420px;
  line-height: 1.8;
  margin-top: 1.5rem;
  opacity: 0;
  animation: fadeIn 1s ease forwards 2.4s;
  font-style: italic;
}

/* ===== CTA BUTTON ===== */
.btn-takbir {
  margin-top: 2rem;
  padding: 0.8rem 2.5rem;
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold-light);
  font-family: 'Amiri', serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.4s;
  opacity: 0;
  animation: fadeIn 1s ease forwards 2.8s;
}

.btn-takbir::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold) 0%, var(--rose-gold) 100%);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

.btn-takbir:hover::before { transform: translateX(0); }
.btn-takbir:hover { color: var(--midnight); }
.btn-takbir span { position: relative; z-index: 1; }

/* ===== FLOATING LANTERNS ===== */
.lanterns-layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.lantern {
  position: absolute;
  animation: lanternFloat var(--float-dur) ease-in-out infinite var(--float-delay),
             lanternSway var(--sway-dur) ease-in-out infinite var(--sway-delay);
}

@keyframes lanternFloat {
  0%, 100% { transform: translateY(0px) rotate(var(--rot-start)); }
  50% { transform: translateY(var(--float-y)) rotate(var(--rot-end)); }
}

@keyframes lanternSway {
  0%, 100% { margin-left: 0px; }
  33% { margin-left: var(--sway-x); }
  66% { margin-left: calc(var(--sway-x) * -0.6); }
}

/* ===== KETUPAT (DIAMOND RICE CAKE) ===== */
.ketupat-layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.ketupat {
  position: absolute;
  animation: ketupatSpin var(--ks-dur) linear infinite var(--ks-delay),
             ketupatFloat var(--kf-dur) ease-in-out infinite var(--kf-delay);
}

@keyframes ketupatSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ketupatFloat {
  0%, 100% { top: var(--kt); }
  50% { top: calc(var(--kt) - 40px); }
}

/* ===== PARTICLE SYSTEM ===== */
.particles-layer {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: particleFall var(--pf-dur) linear infinite var(--pf-delay);
  opacity: 0;
}

@keyframes particleFall {
  0% { transform: translateY(-20px) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.8; }
  100% { transform: translateY(110vh) translateX(var(--drift)) rotate(var(--spin)); opacity: 0; }
}

.sparkle {
  position: absolute;
  animation: sparkleAnim var(--sp-dur) ease-in-out infinite var(--sp-delay);
  opacity: 0;
}

@keyframes sparkleAnim {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

/* ===== CLICK RIPPLE ===== */
.ripple {
  position: fixed;
  border-radius: 50%;
  border: 2px solid var(--gold);
  pointer-events: none;
  z-index: 999;
  animation: rippleExpand 0.8s ease-out forwards;
}

@keyframes rippleExpand {
  from { width: 0; height: 0; opacity: 1; }
  to { width: 120px; height: 120px; opacity: 0; }
}

/* ===== BEDUG PULSE ===== */
.bedug-wrap {
  position: fixed;
  bottom: 180px;
  right: 5vw;
  z-index: 6;
  opacity: 0;
  animation: fadeIn 1s ease forwards 3s;
}

.bedug-pulse {
  animation: bedugPulse 2s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes bedugPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(212,168,67,0.4)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 16px rgba(212,168,67,0.8)); }
}

/* ===== BURST EFFECT ===== */
.burst-particle {
  position: fixed;
  pointer-events: none;
  z-index: 998;
  border-radius: 50%;
  animation: burstAnim 1s ease-out forwards;
}

@keyframes burstAnim {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--bx), var(--by)) scale(0); opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .moon-wrap { top: 3vh; right: 5vw; }
  .moon { width: 55px; height: 55px; }
  .bedug-wrap { display: none; }
  .content { padding-bottom: 160px; }
}

@media (max-width: 380px) {
  .mosque-wrap { max-width: 100%; }
}

/* ===== GOLD SHIMMER TEXT ANIM ===== */
.title-idul, .title-fitri {
  background-size: 200% auto;
  animation: titleReveal 1.4s cubic-bezier(0.16,1,0.3,1) forwards,
             shimmer 4s linear infinite 2.6s;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ===== DONATION BUTTON ===== */
.btn-donasi {
  position: relative;
  margin-top: 1.5rem;
  padding: 12px 20px;
  background: rgba(26, 10, 46, 0.8);
  border: 1px solid var(--gold);
  border-radius: 30px;
  color: var(--gold-light);
  font-family: 'Amiri', serif;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.btn-donasi:hover {
  background: var(--gold);
  color: var(--midnight);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(212,168,67,0.4);
}

.btn-donasi svg {
  fill: currentColor;
}

.show-donasi {
  opacity: 1;
  transform: translateY(0);
}



/* ===== LINK GENERATOR BOX ===== */
.generator-box {
  margin-top: 2rem;
  padding: 15px;
  background: rgba(26, 10, 46, 0.6);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  text-align: center;
  opacity: 0;
  animation: fadeIn 1s ease forwards 3s; /* Muncul bareng tombol Allahu Akbar */
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.generator-title {
  color: var(--gold-pale);
  font-size: 0.9rem;
  margin-bottom: 10px;
  font-style: italic;
}

.input-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap; /* Biar aman di layar HP kecil */
}

.input-group input {
  padding: 10px 15px;
  background: rgba(13, 6, 32, 0.8);
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--cream);
  font-family: 'Amiri', serif;
  font-size: 1rem;
  outline: none;
  width: 200px;
  transition: box-shadow 0.3s ease;
}

.input-group input:focus {
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.5);
}

.input-group input::placeholder {
  color: rgba(253, 243, 231, 0.4);
}

.input-group button {
  padding: 10px 18px;
  background: var(--gold);
  color: var(--midnight);
  border: none;
  border-radius: 8px;
  font-family: 'Amiri', serif;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.input-group button:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 168, 67, 0.4);
}
