:root {
  --bg-1: #1b0b2e;
  --bg-2: #3d0f3f;
  --bg-3: #5b1250;
  --pink: #ff5c9d;
  --pink-2: #ff8fc0;
  --purple: #a06bff;
  --gold: #ffd166;
  --text: #fff4fb;
  --muted: #d5b9dd;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 80% -10%, var(--bg-3), transparent 60%),
              radial-gradient(900px 700px at 10% 110%, #2a1160, transparent 55%),
              linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 40px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- قلب‌های شناور پس‌زمینه ---------- */
#sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

#sky span {
  position: absolute;
  bottom: -60px;
  font-size: 22px;
  opacity: 0;
  animation: float-up linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 92, 157, 0.5));
}

@keyframes float-up {
  0%   { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.85; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-115svh) rotate(340deg) scale(1.15); opacity: 0; }
}

/* ---------- کارت اصلی ---------- */
main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 30px 24px 34px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  text-align: center;
  animation: pop-in 0.6s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

@keyframes pop-in {
  from { transform: translateY(24px) scale(0.94); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

[hidden] { display: none !important; }

.kicker {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 10px;
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(30px, 9vw, 46px);
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(100deg, var(--pink-2), var(--gold), var(--purple));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 800;
}

.lead {
  margin: 0 auto 22px;
  font-size: clamp(15px, 4.2vw, 18px);
  line-height: 2;
  color: #f2ddf0;
  max-width: 40ch;
}

.hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
  min-height: 20px;
  transition: opacity 0.25s;
}

.emoji-big {
  font-size: 54px;
  display: block;
  margin-bottom: 10px;
  animation: bob 2.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-10px) rotate(4deg); }
}

/* ---------- دکمه‌ها ---------- */
.choices {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 190px;
  justify-content: center;
  margin-top: 8px;
}

.btn {
  font-family: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s, opacity 0.3s, filter 0.3s, background 0.3s;
  will-change: transform;
  user-select: none;
}

.btn:active { filter: brightness(1.08); }

.btn-yes {
  --scale: 1;
  transform: scale(var(--scale));
  padding: 16px 34px;
  font-size: 20px;
  color: #37062a;
  background: linear-gradient(135deg, var(--pink-2), var(--gold));
  box-shadow: 0 14px 34px -10px rgba(255, 92, 157, 0.85),
              0 0 0 0 rgba(255, 143, 192, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 14px 34px -10px rgba(255, 92, 157, 0.85), 0 0 0 0 rgba(255, 143, 192, 0.55); }
  50%      { box-shadow: 0 14px 34px -10px rgba(255, 92, 157, 0.85), 0 0 0 18px rgba(255, 143, 192, 0); }
}

.btn-no {
  --scale: 1;
  --dx: 0px;
  --dy: 0px;
  transform: translate(var(--dx), var(--dy)) scale(var(--scale));
  padding: 12px 26px;
  font-size: 16px;
  color: #e8d6ef;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-no.dead {
  opacity: 0.35;
  filter: grayscale(1);
  pointer-events: none;
  cursor: not-allowed;
  animation: fall-dead 0.7s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

@keyframes fall-dead {
  to { transform: translate(var(--dx), calc(var(--dy) + 26px)) scale(0.7) rotate(-12deg); }
}

/* ---------- انتخاب تاریخ ---------- */
.section-title {
  text-align: right;
  font-size: 15px;
  font-weight: 800;
  color: var(--pink-2);
  margin: 22px 4px 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: transform 0.18s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.chip:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.13); }

.chip.on {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-color: transparent;
  box-shadow: 0 10px 24px -10px var(--pink);
  transform: translateY(-2px) scale(1.03);
}

.chip .d1 { display: block; font-weight: 800; }
.chip .d2 { display: block; font-size: 12px; opacity: 0.85; }

textarea, input[type="time"] {
  font-family: inherit;
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font-size: 15px;
  outline: none;
  resize: vertical;
}

textarea:focus, input[type="time"]:focus { border-color: var(--pink); }

input[type="time"] { color-scheme: dark; text-align: center; }

.submit {
  margin-top: 26px;
  width: 100%;
  padding: 16px;
  font-size: 18px;
  color: #37062a;
  background: linear-gradient(135deg, var(--pink-2), var(--gold));
  box-shadow: 0 14px 34px -12px rgba(255, 92, 157, 0.9);
}

.submit[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.back {
  margin-top: 14px;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.error {
  margin-top: 12px;
  color: #ffb3c7;
  font-size: 14px;
  min-height: 18px;
}

/* ---------- صفحه نهایی ---------- */
.ticket {
  margin: 18px auto 0;
  padding: 18px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.28);
  font-size: 17px;
  line-height: 2.2;
}

.ticket b { color: var(--gold); }

.countdown {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
}

.signature {
  margin: 22px 0 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(100deg, var(--pink-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- کانفتی ---------- */
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

#confetti i {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110svh) rotate(720deg); opacity: 0.9; }
}

.shake { animation: shake 0.4s; }

@keyframes shake {
  25% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.05ms !important;
  }
}

footer {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: rgba(213, 185, 221, 0.6);
}
