/* ================= لایهٔ دوم ================= */

/* پس‌زمینهٔ WebGL؛ اگر کار کرد، لکه‌های CSS کنار می‌روند */
#bg-gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
body.has-gl .aurora { display: none; }
body.has-gl { background: #070b12; }

/* ---------- نوارِ قیمتِ متحرک ---------- */
.ticker {
  border-block: 1px solid rgba(255,255,255,.05);
  background: rgba(7,11,18,.55); backdrop-filter: blur(10px);
  overflow: hidden; font-size: 12px; color: var(--muted);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ticker-track > div { display: flex; align-items: center; gap: 18px; padding: 8px 9px; white-space: nowrap; }
.ticker b { color: var(--text); font-weight: 600; margin-right: 4px; }
.ticker i { font-style: normal; opacity: .35; }
.ticker em, .mkt em { font-style: normal; font-weight: 600; }
.up { color: var(--mint); } .down { color: var(--bad); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- کارت‌های بازار ---------- */
.market { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mkt {
  background: rgba(14,20,33,.72); border: 1px solid var(--line-soft);
  border-radius: 17px; padding: 13px 14px; backdrop-filter: blur(12px);
  transition: transform .25s, border-color .25s;
}
.mkt:hover { transform: translateY(-2px); border-color: #2a3750; }
.mkt-top { display: flex; align-items: center; gap: 9px; line-height: 1.3; }
.mkt-top b { display: block; font-size: 13.5px; }
.mkt-top small { color: var(--muted); font-size: 11px; }
.mkt-bot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 10px; line-height: 1.3; }
.mkt-bot strong { display: block; font-family: "Space Grotesk", Inter, sans-serif; font-size: 17px; }
.mkt-bot em { font-size: 11.5px; }
.spark { width: 64px; height: 30px; flex: none; }
.spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s .4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.peg { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.market.reveal { animation-delay: .24s; }

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 200; }

@media (prefers-reduced-motion: reduce) {
  .ticker-track, .spark-line { animation: none !important; stroke-dashoffset: 0; }
}

