:root {
  --bg1: #0f1724;
  --bg2: #1f2937;
  --accent: #ffd166;
  --text: #f7f7f9;
  --glass: rgba(255, 255, 255, 0.04);
  --alt1: #2b0f3b;
  --alt2: #5d034a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Reem Kufi Fun", "Marhey", sans-serif;
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 30px;
}

/* background transition */
#bgTransition {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--alt1), var(--alt2));
  opacity: 0;
  z-index: 0;
  transition: opacity 2s ease;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 209, 102, 0.03),
    rgba(255, 255, 255, 0.02)
  );
  pointer-events: none;
  mix-blend-mode: screen;
}

.content {
  position: relative;
  z-index: 3;
  width: min(920px, 95%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* button */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 14px 32px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  z-index: 4;
}

.btn:active {
  transform: scale(0.98);
}

.btn-hide {
  opacity: 0;
  transform: scale(0.8);
  transition: 0.8s ease;
  pointer-events: none;
}

/* vignette */
.vignette {
  position: relative;
  width: 100%;
  min-height: 320px;
  padding: 30px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.light-pulse {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* text */
.text-area {
  position: relative;
  z-index: 2;
  font-family: "Marhey", sans-serif;
  font-size: 28px;
  line-height: 1.6;
  text-align: center;
  max-width: 820px;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-in {
  opacity: 1 !important;
  animation: textBreath 3.5s ease-in-out infinite;
}

.fade-out {
  opacity: 0 !important;
}

@keyframes textBreath {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
  100% {
    transform: scale(1);
  }
}

/* emoji butterflies (decorative) */
.butterflies {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.butterfly {
  position: absolute;
  font-size: 26px;
  opacity: 0.35;
  animation-timing-function: ease-in-out;
}

.butterfly::before {
  content: "🦋";
}

.b1 {
  left: 12%;
  top: 22%;
  animation: fly1 10s infinite;
}

.b2 {
  right: 14%;
  top: 40%;
  animation: fly2 12s infinite;
}

.b3 {
  left: 72%;
  top: 14%;
  animation: fly3 11s infinite;
}

@keyframes fly1 {
  0% { transform: translate(0,0) rotate(0deg) scale(0.9); }
  50% { transform: translate(18px,-14px) rotate(6deg) scale(1.05); }
  100% { transform: translate(0,0) rotate(0deg) scale(0.9); }
}

@keyframes fly2 {
  0% { transform: translate(0,0) rotate(-4deg) scale(0.95); }
  50% { transform: translate(-22px,16px) rotate(8deg) scale(1.1); }
  100% { transform: translate(0,0) rotate(-4deg) scale(0.95); }
}

@keyframes fly3 {
  0% { transform: translate(0,0) rotate(3deg) scale(0.9); }
  50% { transform: translate(20px,10px) rotate(-6deg) scale(1.03); }
  100% { transform: translate(0,0) rotate(3deg) scale(0.9); }
}

/* heart stage */
.heart-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.particles {
  position: relative;
  width: 420px;
  height: 420px;
}

.particle {
  position: absolute;
  width: 14px;
  height: 14px;
  opacity: 0;
  background: conic-gradient(
    from 180deg,
    #ff9ec9,
    #ffd166,
    #a5d8ff,
    #d9a7ff
  );
  clip-path: polygon(
    50% 0%,
    65% 20%,
    100% 50%,
    65% 80%,
    50% 100%,
    35% 80%,
    0% 50%,
    35% 20%
  );
}

/* heart label (نور) */
.heart-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0;
  background: linear-gradient(90deg, #fff, #ffd1e8, #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 20px rgba(255, 170, 220, 0.35),
    0 0 40px rgba(255, 120, 180, 0.25);
}

.heart-glow {
  animation: heartGlow 1.6s ease-in-out 3;
}

@keyframes heartGlow {
  0% { text-shadow: 0 0 0 rgba(255,160,200,0); }
  50% { text-shadow: 0 18px 60px rgba(255,120,180,0.45); }
  100% { text-shadow: 0 8px 30px rgba(255,100,150,0.25); }
}

/* responsive */
@media (max-width: 700px) {
  .text-area { font-size: 18px; }
  .particles { width: 300px; height: 300px; }
  .heart-label { font-size: 30px; }
}
