:root {
  --neon1: #ff2fd6;
  --neon2: #21e6ff;
  --neon3: #a855f7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: #05010f;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(168,85,247,0.25), transparent 60%),
    radial-gradient(1000px 700px at 10% 20%, rgba(33,230,255,0.18), transparent 60%),
    linear-gradient(180deg, #0a0320, #05010f 60%);
  background-attachment: fixed;
  animation: hueShift 24s ease-in-out infinite alternate;
}
@keyframes hueShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(40deg); }
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* corner badge */
.corner-badge {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 20;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(33,230,255,0.4);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(33,230,255,0.25);
}

/* HERO */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 26px;
}

.avatar {
  font-size: 90px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 0 30px rgba(255,47,214,0.6));
  animation: float 4s ease-in-out infinite;
  position: relative;
}
.avatar::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 2px solid rgba(33,230,255,0.5);
  box-shadow: 0 0 40px rgba(33,230,255,0.5), inset 0 0 30px rgba(255,47,214,0.4);
  animation: pulseRing 2.4s ease-out infinite;
}
.avatar-poke { animation: float 4s ease-in-out infinite, shake 0.3s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-8px) rotate(-6deg); }
  75% { transform: translateX(8px) rotate(6deg); }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.hero-title {
  font-size: clamp(2.6rem, 9vw, 6rem);
  font-weight: 900;
  margin: 0;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--neon1), var(--neon2), var(--neon3), var(--neon1));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientMove 6s linear infinite;
  text-shadow: 0 0 40px rgba(255,47,214,0.3);
}
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.typebox {
  font-size: clamp(1.1rem, 4vw, 2rem);
  font-weight: 500;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  gap: 2px;
}
.typed { color: #e7e2ff; }
.caret {
  color: var(--neon2);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.cta {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: #05010f;
  padding: 14px 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--neon2), var(--neon1));
  box-shadow: 0 0 30px rgba(255,47,214,0.5);
  transition: transform 0.15s, box-shadow 0.2s;
}
.cta:hover { transform: scale(1.06) translateY(-2px); box-shadow: 0 0 50px rgba(33,230,255,0.7); }
.cta:active { transform: scale(0.97); }

/* METER */
.meter-wrap {
  max-width: 640px;
  margin: 0 auto 60px;
  padding: 0 24px;
  text-align: center;
}
.meter-label {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.meter-track {
  height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--neon2), var(--neon3), var(--neon1));
  box-shadow: 0 0 20px rgba(255,47,214,0.7);
  transition: width 0.35s cubic-bezier(.2,.8,.2,1);
}

/* STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
.stat-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 28px 18px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.3s, border-color 0.3s;
}
.stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(33,230,255,0.5);
  box-shadow: 0 0 40px rgba(33,230,255,0.3);
}
.stat-num {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 900;
  background: linear-gradient(90deg, var(--neon2), var(--neon1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-cap { margin-top: 6px; font-size: 0.9rem; color: #b8b2d8; }

/* FEATURES */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
.feat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 26px 20px;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.feat-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon1), var(--neon2), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}
.feat-card:hover { transform: translateY(-8px); box-shadow: 0 0 40px rgba(168,85,247,0.35); }
.feat-card:hover::before { opacity: 1; }
.feat-icon { font-size: 42px; margin-bottom: 12px; }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.reveal-in { opacity: 1; transform: translateY(0); }

/* FOOTER */
.footer {
  text-align: center;
  padding: 40px 24px 60px;
  color: #9a94c0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer p { margin: 0 0 12px; }
.remix {
  color: var(--neon2);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px dashed rgba(33,230,255,0.5);
}
.remix:hover { color: var(--neon1); }

/* LEGEND */
.legend {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5,1,15,0.55);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s;
}
.legend-text {
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 900;
  text-align: center;
  background: linear-gradient(90deg, gold, var(--neon1), var(--neon2));
  background-size: 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientMove 3s linear infinite, pop 0.5s;
  text-shadow: 0 0 60px rgba(255,215,0,0.4);
}
@keyframes pop { 0% { transform: scale(0.3); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* responsive */
@media (max-width: 820px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
}