/* =====================================================
   QABAS — thanks.css
   Color palette: Gold #f5c842 + Dark Navy #0d1b2a
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
  --gold:       #f5c842;
  --gold-light: #ffd96a;
  --gold-dark:  #c89a10;
  --gold-glow:  rgba(245, 200, 66, 0.35);
  --navy:       #0d1b2a;
  --navy-mid:   #112336;
  --transition: 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* DARK */
:root {
  --bg:             #0d1b2a;
  --surface:        rgba(17, 35, 54, 0.92);
  --surface-border: rgba(245, 200, 66, 0.15);
  --text:           #f0ead6;
  --text-muted:     rgba(240, 234, 214, 0.5);
  --shadow:         0 20px 64px rgba(0,0,0,0.65);
}

/* LIGHT */
@media (prefers-color-scheme: light) {
  :root {
    --bg:             #f4edd4;
    --surface:        rgba(255, 252, 240, 0.94);
    --surface-border: rgba(13, 27, 42, 0.1);
    --text:           #0d1b2a;
    --text-muted:     rgba(13, 27, 42, 0.5);
    --shadow:         0 20px 64px rgba(13,27,42,0.12);
  }
}

/* ===================== BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* ===================== CANVAS ===================== */
#particleCanvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

/* ===================== ORBS ===================== */
.orb {
  position: fixed; border-radius: 50%;
  pointer-events: none; z-index: 0; filter: blur(100px);
}
.orb-a {
  width: min(65vw,460px); height: min(65vw,460px);
  background: rgba(245,200,66,0.07);
  top:-20%; right:-10%;
  animation: orbDrift 10s ease-in-out infinite alternate;
}
.orb-b {
  width: min(55vw,400px); height: min(55vw,400px);
  background: rgba(13,27,42,0.6);
  bottom:-10%; left:-10%;
  animation: orbDrift 13s ease-in-out infinite alternate-reverse;
}
.orb-c {
  width: min(40vw,280px); height: min(40vw,280px);
  background: rgba(245,200,66,0.06);
  top:40%; left:40%; transform:translate(-50%,-50%);
  animation: orbDrift 16s ease-in-out infinite alternate;
}
@keyframes orbDrift {
  0%   { transform:translate(0,0) scale(1); opacity:.6; }
  100% { transform:translate(5%,8%) scale(1.1); opacity:1; }
}

/* ===================== FLOATING EMOJIS ===================== */
.floating-emojis {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.emoji {
  position: absolute; font-size: 1.4rem;
  animation: floatEmoji linear infinite; opacity: 0;
}
.e1 { left:5%;  animation-duration:12s; animation-delay:0s;   font-size:1.7rem; }
.e2 { left:20%; animation-duration:15s; animation-delay:-3s; }
.e3 { left:38%; animation-duration:10s; animation-delay:-6s;  font-size:1.2rem; }
.e4 { left:52%; animation-duration:14s; animation-delay:-2s;  font-size:1.9rem; }
.e5 { left:65%; animation-duration:11s; animation-delay:-8s; }
.e6 { left:75%; animation-duration:16s; animation-delay:-1s;  font-size:1.1rem; }
.e7 { left:85%; animation-duration:13s; animation-delay:-4s;  font-size:1.5rem; }
.e8 { left:93%; animation-duration:12s; animation-delay:-7s; }

@keyframes floatEmoji {
  0%   { transform:translateY(110vh) rotate(0deg); opacity:0; }
  5%   { opacity:.65; }
  95%  { opacity:.65; }
  100% { transform:translateY(-10vh) rotate(360deg); opacity:0; }
}

/* ===================== MAIN CONTAINER ===================== */
.thanks-container {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 2.5rem 1.25rem 3rem; gap: 2.25rem;
  min-height: 100dvh;
}

/* ===================== HERO ===================== */
.hero-section {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; text-align: center;
  animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(36px); }
  to   { opacity:1; transform:translateY(0); }
}

/* Heart burst */
.heart-burst {
  position: relative; width: 105px; height: 105px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.4rem;
}
.heart-ring {
  position: absolute; border-radius: 50%; border: 2px solid;
  animation: ringOut ease-out infinite;
}
.r1 { width:65px;  height:65px;  border-color:rgba(245,200,66,0.5); animation-duration:2.4s; animation-delay:0s; }
.r2 { width:85px;  height:85px;  border-color:rgba(245,200,66,0.3); animation-duration:2.4s; animation-delay:0.4s; }
.r3 { width:105px; height:105px; border-color:rgba(245,200,66,0.15); animation-duration:2.4s; animation-delay:0.8s; }
@keyframes ringOut {
  0%   { transform:scale(0.7); opacity:.8; }
  100% { transform:scale(1.3); opacity:0; }
}

.heart-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 32px var(--gold-glow);
  animation: heartPump 1.2s ease-in-out infinite;
  z-index: 2;
}
@keyframes heartPump {
  0%,100% { transform:scale(1); }
  15%      { transform:scale(1.15); }
  30%      { transform:scale(1); }
  45%      { transform:scale(1.1); }
}
.heart-icon svg { width:24px; height:24px; color:var(--navy); }

/* Title */
.hero-title {
  font-family: 'Tajawal', sans-serif;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}
.hero-subtitle {
  font-size: clamp(0.82rem, 3.3vw, 0.96rem);
  color: var(--text-muted); font-weight: 500;
  max-width: 260px; line-height: 1.65;
}

/* ===================== QUOTES ===================== */
.quotes-section {
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
  animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.2s both;
}

.quotes-track {
  width: 100%; position: relative; min-height: 155px;
}

.quote-card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--surface-border);
  border-radius: 1.4rem;
  padding: 1.65rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow);
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.85rem;
  opacity: 0; transform: translateX(35px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.quote-card.active   { opacity:1; transform:translateX(0); pointer-events:auto; position:relative; }
.quote-card.exit-left{ opacity:0; transform:translateX(-35px); }

.quote-icon {
  font-size: 2rem; line-height: 1;
  animation: iconFloat 3s ease-in-out infinite;
}
@keyframes iconFloat {
  0%,100% { transform:translateY(0); }
  50%      { transform:translateY(-6px); }
}

.quote-text {
  font-size: clamp(0.88rem, 3.4vw, 1.02rem);
  font-weight: 600; line-height: 1.8; color: var(--text); font-style: normal;
}
.quote-source {
  font-size: 0.73rem; color: var(--gold);
  font-weight: 700; letter-spacing: 0.06em; font-style: normal;
}

/* Dots */
.quote-dots { display:flex; gap:0.5rem; justify-content:center; }
.quote-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--text-muted); border: none; cursor: pointer;
  transition: all 0.3s ease; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.quote-dot.active {
  background: var(--gold); width: 22px;
  box-shadow: 0 0 8px var(--gold-glow);
}

/* ===================== STATS ===================== */
.stats-strip {
  width: 100%; max-width: 460px;
  background: var(--surface);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  border-radius: 1.2rem;
  padding: 1.3rem 1rem;
  display: flex; align-items: center; justify-content: space-around;
  box-shadow: var(--shadow);
  animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.35s both;
}
.stat-item { display:flex; flex-direction:column; align-items:center; gap:.25rem; flex:1; }
.stat-num {
  font-family: 'Tajawal', sans-serif;
  font-size: clamp(1.6rem,6vw,2.1rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}
.stat-label { font-size:.7rem; color:var(--text-muted); font-weight:600; letter-spacing:.04em; }
.stat-divider { width:1px; height:38px; background:var(--surface-border); flex-shrink:0; }

/* ===================== FINAL MESSAGE ===================== */
.final-message {
  width: 100%; max-width: 460px;
  animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.5s both;
}
.final-card {
  background: linear-gradient(135deg,
    rgba(245,200,66,0.07),
    rgba(17,35,54,0.6),
    rgba(245,200,66,0.05));
  border: 1px solid rgba(245,200,66,0.25);
  border-radius: 1.4rem;
  padding: 1.9rem 1.4rem;
  text-align: center;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.final-line {
  font-size: clamp(0.93rem,3.7vw,1.08rem);
  font-weight: 700; color: var(--text); line-height: 1.5;
}
.line-1 { animation: lineIn 0.7s ease 0.7s both; }
.line-2 { animation: lineIn 0.7s ease 0.95s both; }
.line-3 {
  animation: lineIn 0.7s ease 1.2s both;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-size: clamp(1rem,4vw,1.18rem); font-weight: 900;
}
@keyframes lineIn {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ===================== BACK BUTTON ===================== */
.back-btn {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 2rem;
  background: var(--surface);
  border: 1px solid rgba(245,200,66,0.3);
  border-radius: 999px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  text-decoration: none; cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.65s both;
  -webkit-tap-highlight-color: transparent;
}
.back-btn svg { width:18px; height:18px; transform:rotate(180deg); }
.back-btn:hover,
.back-btn:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 8px 28px var(--gold-glow);
  color: var(--gold); transform: translateY(-2px); outline: none;
}
.back-btn:active { transform: scale(0.97); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 360px) {
  .thanks-container { padding: 2rem 1rem 2.5rem; gap: 1.75rem; }
  .hero-title { font-size: 1.75rem; }
  .quote-card { padding: 1.35rem 1rem; }
  .stats-strip { padding: 1.1rem 0.7rem; }
  .final-card { padding: 1.4rem 1rem; }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  .heart-ring, .heart-icon, .quote-icon, .orb, .emoji { animation: none !important; }
  .quote-card, .final-line, .back-btn,
  .hero-section, .quotes-section, .stats-strip, .final-message {
    animation: none !important; opacity: 1; transform: none;
  }
}

