/* ═══════════════════════════════════════════════
   💖 Pink Crush — Glassmorphism 3D
   ═══════════════════ border-radius: 30px */
:root {
  --pink-100: #fff0f7;
  --pink-200: #ffd6ec;
  --pink-300: #ffb8de;
  --pink-400: #ff8fc9;
  --pink-500: #ff5eb0;
  --pink-600: #e04497;
  --pink-700: #a62870;
  --pink-900: #3d1029;
  --plum: #2c0f22;
  --glass-bg: rgba(255, 255, 255, .45);
  --glass-brd: rgba(255, 255, 255, .6);
  --glass-sh: 0 25px 60px -12px rgba(224, 68, 151, .35);
  --shadow-c: 0 20px 35px -12px rgba(224, 68, 151, .5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Vazirmatn, Tahoma, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--pink-900);
  background: linear-gradient(135deg, #ffd6ec 0%, #ffb8de 30%, #ff8fc9 70%, #ff5eb0 100%);
  background-attachment: fixed;
}

/* ─── حباب‌های پس‌زمینه (عمق سه‌بعدی) ─── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  z-index: 0;
  animation: drift 18s ease-in-out infinite alternate;
}
.blob-1 { width: 55vmax; height: 55vmax; top: -20%; right: -15%; background: radial-gradient(circle, #ffe3f1, transparent 70%); animation-duration: 20s; }
.blob-2 { width: 45vmax; height: 45vmax; bottom: -18%; left: -12%; background: radial-gradient(circle, #ff9ed4, transparent 70%); animation-duration: 26s; animation-direction: alternate-reverse; }
.blob-3 { width: 35vmax; height: 35vmax; top: 30%; left: 30%; background: radial-gradient(circle, #ffc4e6, transparent 70%); animation-duration: 32s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { transform: translate(40px, -30px) scale(1.12) rotate(8deg); }
}

/* ─── قلب/ذرات شناور ─── */
#floatField { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

/* ─── فیلد شکل‌های سیمی سه‌بعدی (قلب‌های مورف‌شونده) ─── */
#morphField {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floaty { position: absolute; bottom: -60px; will-change: transform, opacity; opacity: 0; }
.floaty .gl { display: block; filter: drop-shadow(0 6px 10px rgba(224, 68, 151, .3)); animation: spin 4s ease-in-out infinite alternate; }
.floaty:nth-child(even) .gl { animation-duration: 6s; }

@keyframes spin { from { transform: rotate(-18deg) scale(1); } to { transform: rotate(18deg) scale(1.15); } }

/* ─── صحنه سه‌بعدی ─── */
.scene { position: relative; z-index: 2; min-height: 100vh; perspective: 1100px; display: flex; align-items: center; justify-content: center; padding: 24px 14px; }

.page { display: none; width: 100%; max-width: 640px; animation: popIn .65s cubic-bezier(.34,1.56,.64,1) both; }
.page.active { display: block; }

@keyframes popIn {
  0% { opacity: 0; transform: translateY(40px) rotateX(-8deg) scale(.92); }
  100% { opacity: 1; transform: translateY(0) rotateX(0deg) scale(1); }
}

/* ─── کارت شیشه‌ای اصلی ─── */
.glass-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.25));
  border: 1.5px solid var(--glass-brd);
  border-radius: 30px;
  padding: 44px 34px;
  text-align: center;
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: var(--glass-sh), inset 0 1px 0 rgba(255,255,255,.8), inset 0 -1px 0 rgba(255,255,255,.3);
  transition: box-shadow .3s ease;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 45%, transparent 60%);
  transform: translateX(-120%);
  transition: none;
}
.glass-card:hover::before { transform: translateX(120%); transition: transform .9s ease; }
.glass-card:hover { box-shadow: 0 30px 70px -12px rgba(224, 68, 151, .5), inset 0 1px 0 rgba(255,255,255,.9); }

/* ─── تیلت سه‌بعدی با موس ─── */
.tilt { transform-style: preserve-3d; transition: transform .12s ease-out; will-change: transform; }
.tilt.hovering { transition: transform .1s ease-out; z-index: 5; }

/* ─── شناوری معلق کارت‌ها ─── */
.float-wrap { animation: hoverFloat 6s ease-in-out infinite; transform-style: preserve-3d; will-change: transform; }
@keyframes hoverFloat {
  0%, 100% { transform: translateY(0) rotateZ(0deg); }
  25%      { transform: translateY(-11px) rotateZ(-.5deg); }
  55%      { transform: translateY(-4px) rotateZ(.4deg); }
  80%      { transform: translateY(-9px) rotateZ(-.3deg); }
}

/* ─── تایپوگرافی ─── */
.hearts-row { font-size: 1.6rem; letter-spacing: 8px; margin-bottom: 14px; }
.question { font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 800; line-height: 1.6; margin-bottom: 8px; transform: translateZ(40px); }
.grad {
  background: linear-gradient(90deg, var(--pink-500), var(--pink-700));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sub { color: var(--pink-700); font-size: 1.02rem; margin-bottom: 26px; transform: translateZ(25px); }

/* ─── جداکننده و سوال دوم (بریم بیرون؟) ─── */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 34px 0 22px; color: var(--pink-700); font-size: .92rem; font-weight: 700; opacity: .9;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1.5px; border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
}
.question.q2 { font-size: clamp(1.35rem, 3.6vw, 1.85rem); margin-bottom: 22px; }

/* ─── دکمه‌ها ─── */
.buttons { display: flex; gap: 18px; justify-content: center; align-items: center; min-height: 84px; flex-wrap: wrap; transform: translateZ(55px); }

.btn {
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  padding: 15px 44px;
  border-radius: 999px;
  color: #fff;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease, opacity .45s ease, filter .3s ease, padding .45s cubic-bezier(.34,1.56,.64,1), font-size .45s cubic-bezier(.34,1.56,.64,1);
  will-change: transform;
  position: relative;
  overflow: hidden;
}
.btn:active { animation: press .25s ease; }
@keyframes press { 0% { transform: scale(.92); } 100% { transform: scale(1); } }

.btn-yes {
  background: linear-gradient(135deg, #ff8fc9, #ff5eb0 55%, #e04497);
  box-shadow: 0 12px 28px -6px rgba(255, 94, 176, .55), inset 0 1px 0 rgba(255,255,255,.5);
  text-shadow: 0 1px 3px rgba(166, 40, 112, .35);
}
.btn-yes:hover { filter: brightness(1.07); box-shadow: 0 16px 36px -6px rgba(255, 94, 176, .7), inset 0 1px 0 rgba(255,255,255,.6); }

.btn-no {
  background: rgba(255, 255, 255, .35);
  color: var(--pink-700);
  border: 1.5px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px -8px rgba(166, 40, 112, .25);
}
.btn-no:hover { background: rgba(255, 255, 255, .5); }

/* لرزش بامزه هنگام کلیک روی «نه» */
.jiggle { animation: jiggle .4s ease; }
@keyframes jiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-7deg) scale(.95); }
  60% { transform: rotate(6deg) scale(.92); }
}

/* محو شدن کامل «نه» */
.gone { opacity: 0 !important; transform: scale(0); pointer-events: none; }

/* ضربان قلب «آره» وقتی «نه» غیب می‌شود */
.pulse { animation: heartbeat 1.15s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.08); }
  45% { transform: scale(.97); }
  65% { transform: scale(1.05); }
}

/* لرزش تکست‌آریا وقتی خالی ارسال شود */
.shake { animation: shakeX .5s ease; }
@keyframes shakeX {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* ─── متن ریز زیر دکمه‌ها ─── */
.tease { min-height: 22px; margin-top: 18px; color: var(--pink-600); font-size: .92rem; font-weight: 600; opacity: 0; transition: opacity .3s ease; }
.tease.show { opacity: 1; }
.tease.err { color: #d63b6b; }

/* ─── تکست‌آریا ─── */
textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1.5px solid rgba(255,255,255,.65);
  border-radius: 18px;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 1.02rem;
  color: var(--pink-900);
  background: rgba(255,255,255,.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  outline: none;
  transition: box-shadow .3s ease, border .3s ease;
  box-shadow: inset 0 2px 8px rgba(224, 68, 151, .12);
}
textarea::placeholder { color: #c96ba4; }
textarea:focus { border-color: var(--pink-500); box-shadow: 0 0 0 4px rgba(255, 94, 176, .18), inset 0 2px 8px rgba(224, 68, 151, .1); }

.char-count { text-align: left; direction: ltr; font-size: .8rem; color: var(--pink-700); margin: 6px 2px 16px; }

.send-btn { width: 100%; font-size: 1.2rem; }
.send-state { min-height: 24px; margin-top: 14px; font-weight: 600; color: var(--pink-600); }
.send-state.err { color: #d63b6b; }

/* ─── صفحه تشکر ─── */
.big-heart { display: inline-block; font-size: 4rem; animation: beat 1.1s ease-in-out infinite; margin-bottom: 6px; }
@keyframes beat { 0%,100% { transform: scale(1); } 25% { transform: scale(1.22); } 40% { transform: scale(1.02); } 60% { transform: scale(1.18); } }

/* ═══════════ پنل ادمین ═══════════ */
.admin-card { max-width: 760px; margin: 0 auto; }

.password-wrap { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.password-wrap input {
  flex: 1 1 220px;
  max-width: 320px;
  border: 1.5px solid rgba(255,255,255,.65);
  border-radius: 999px;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--pink-900);
  background: rgba(255,255,255,.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  outline: none;
  transition: box-shadow .3s ease;
  box-shadow: inset 0 2px 8px rgba(224, 68, 151, .12);
}
.password-wrap input:focus { border-color: var(--pink-500); box-shadow: 0 0 0 4px rgba(255, 94, 176, .18); }

.badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff8fc9, #ff5eb0);
  color: #fff;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 16px;
  box-shadow: 0 8px 18px -6px rgba(255, 94, 176, .5);
}

.admin-toolbar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }

.icon-btn {
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.4);
  color: var(--pink-700);
  padding: 9px 18px;
  border-radius: 999px;
  transition: all .25s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.icon-btn:hover { background: rgba(255,255,255,.65); transform: translateY(-2px); box-shadow: 0 8px 16px -6px rgba(224,68,151,.35); }
.icon-btn.danger { color: #d63b6b; border-color: rgba(214, 59, 107, .4); }
.icon-btn.danger:hover { background: rgba(214, 59, 107, .1); }

.admin-list { display: grid; gap: 14px; max-height: 56vh; overflow-y: auto; padding: 4px; text-align: right; }
.admin-list::-webkit-scrollbar { width: 8px; }
.admin-list::-webkit-scrollbar-thumb { background: rgba(224, 68, 151, .35); border-radius: 99px; }

.a-item {
  background: rgba(255,255,255,.38);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 18px;
  padding: 14px 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .2s ease;
}
.a-item:hover { transform: translateX(-4px); }

.a-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .8rem; color: var(--pink-700); }
.a-date { font-weight: 700; }
.a-del { background: none; border: none; cursor: pointer; font-size: 1rem; opacity: .55; transition: opacity .2s, transform .2s; padding: 2px 6px; }
.a-del:hover { opacity: 1; transform: scale(1.15); }

.a-text { color: var(--pink-900); line-height: 1.9; font-size: .98rem; white-space: pre-wrap; word-break: break-word; }

.a-outing {
  display: inline-block;
  align-self: flex-start;
  font-size: .85rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
}
.a-outing.yes { background: linear-gradient(135deg, #ff8fc9, #ff5eb0); color: #fff; box-shadow: 0 6px 14px -6px rgba(255,94,176,.6); }
.a-outing.no { background: rgba(214,59,107,.1); color: #d63b6b; border: 1px solid rgba(214,59,107,.35); }
.a-meta { font-size: .78rem; color: var(--pink-600); }

.empty { text-align: center; color: var(--pink-700); padding: 30px 0; font-weight: 600; }

/* ─── ریسپانسیو ─── */
@media (max-width: 480px) {
  .glass-card { padding: 34px 20px; border-radius: 24px; }
  .buttons { gap: 12px; min-height: 76px; }
  .btn { padding: 13px 30px; font-size: 1.05rem; }
  .admin-toolbar { gap: 8px; }
  .icon-btn { padding: 8px 14px; font-size: .85rem; }
}

/* ─── prefers-reduced-motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .blob { animation: none; }
}
