/* ============================================================
   Premium Cyberpunk Background — CSS positioned SVG assets
   All elements: position:fixed, pointer-events:none
   ============================================================ */

/* ── Scene container ───────────────────────────────────────── */
.bg-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ── Nebula atmosphere layers ──────────────────────────────── */
.bg-nebula {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.bg-nebula--1 {
  width: 900px;
  height: 700px;
  top: -200px;
  left: -150px;
  background: radial-gradient(ellipse at center, rgba(139,92,246,0.18) 0%, rgba(109,40,217,0.08) 40%, transparent 70%);
  filter: blur(70px);
  animation: nbDrift1 32s ease-in-out infinite;
}
.bg-nebula--2 {
  width: 800px;
  height: 650px;
  top: -100px;
  right: -180px;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.14) 0%, rgba(37,99,235,0.06) 40%, transparent 70%);
  filter: blur(80px);
  animation: nbDrift2 38s ease-in-out infinite;
}
.bg-nebula--3 {
  width: 700px;
  height: 600px;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(168,85,247,0.10) 0%, transparent 65%);
  filter: blur(90px);
  animation: nbDrift1 45s ease-in-out infinite reverse;
}
.bg-nebula--4 {
  width: 600px;
  height: 550px;
  bottom: 5%;
  left: -100px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.12) 0%, transparent 65%);
  filter: blur(75px);
  animation: nbDrift2 42s ease-in-out infinite reverse;
}
.bg-nebula--5 {
  width: 650px;
  height: 500px;
  bottom: 10%;
  right: -120px;
  background: radial-gradient(ellipse at center, rgba(139,92,246,0.10) 0%, transparent 65%);
  filter: blur(80px);
  animation: nbDrift1 36s ease-in-out infinite;
}

/* ── Energy streaks ────────────────────────────────────────── */
.bg-streak {
  position: absolute;
  pointer-events: none;
  height: 1px;
  border-radius: 1px;
  opacity: 0.3;
  animation: streakFade 8s ease-in-out infinite;
}
.bg-streak--1 {
  width: 300px;
  top: 18%;
  left: 5%;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.8), transparent);
  transform: rotate(-12deg);
  animation-delay: 0s;
}
.bg-streak--2 {
  width: 220px;
  top: 42%;
  right: 8%;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.8), transparent);
  transform: rotate(8deg);
  animation-delay: 2.5s;
}
.bg-streak--3 {
  width: 180px;
  bottom: 28%;
  left: 12%;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.7), transparent);
  transform: rotate(-6deg);
  animation-delay: 5s;
}
.bg-streak--4 {
  width: 250px;
  bottom: 15%;
  right: 15%;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.7), transparent);
  transform: rotate(15deg);
  animation-delay: 1.5s;
}

/* ── Base element ──────────────────────────────────────────── */
.bg-ball,
.bg-coin {
  position: absolute;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

/* ── Float / rotation keyframes ────────────────────────────── */
@keyframes floatA {
  0%,100% { transform: translateY(0px) rotate(var(--rot,0deg)); }
  40%      { transform: translateY(-22px) rotate(calc(var(--rot,0deg) + 4deg)); }
  70%      { transform: translateY(12px)  rotate(calc(var(--rot,0deg) - 3deg)); }
}
@keyframes floatB {
  0%,100% { transform: translateY(0px) rotate(var(--rot,0deg)); }
  35%     { transform: translateY(18px) rotate(calc(var(--rot,0deg) - 5deg)); }
  65%     { transform: translateY(-14px) rotate(calc(var(--rot,0deg) + 3deg)); }
}
@keyframes floatC {
  0%,100% { transform: translateY(0px) scale(1) rotate(var(--rot,0deg)); }
  50%      { transform: translateY(-16px) scale(1.02) rotate(calc(var(--rot,0deg) + 6deg)); }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes nbDrift1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(50px,-40px) scale(1.08); }
  66%     { transform: translate(-35px,55px) scale(0.94); }
}
@keyframes nbDrift2 {
  0%,100% { transform: translate(0,0) scale(1); }
  40%     { transform: translate(-60px,30px) scale(1.06); }
  70%     { transform: translate(40px,-50px) scale(0.96); }
}
@keyframes streakFade {
  0%,100% { opacity: 0.05; }
  50%      { opacity: 0.28; }
}
@keyframes coinPulse {
  0%,100% { opacity: var(--op,0.25); filter: drop-shadow(0 0 12px var(--glow,#a855f7)); }
  50%      { opacity: calc(var(--op,0.25) * 1.35); filter: drop-shadow(0 0 24px var(--glow,#a855f7)); }
}

/* ═══════════════════════════════════════════════════════
   HERO ZONE — large impressive balls, strong glow
═══════════════════════════════════════════════════════ */

/* Soccer ball — top-right, large, partially off-screen */
.bg-ball--soccer-hero {
  width: 480px;
  height: 480px;
  top: -80px;
  right: -160px;
  background-image: url('/assets/img/bg/ball-soccer.svg');
  opacity: 0.22;
  --rot: 18deg;
  filter: drop-shadow(0 0 40px rgba(168,85,247,0.5)) blur(0.4px);
  animation: floatA 14s ease-in-out infinite;
}

/* Basketball — left edge, large */
.bg-ball--basketball-hero {
  width: 420px;
  height: 420px;
  top: 60px;
  left: -140px;
  background-image: url('/assets/img/bg/ball-basketball.svg');
  opacity: 0.20;
  --rot: -15deg;
  filter: drop-shadow(0 0 35px rgba(249,115,22,0.5)) blur(0.4px);
  animation: floatB 16s ease-in-out infinite;
}

/* Volleyball — right side, mid hero */
.bg-ball--volleyball-hero {
  width: 280px;
  height: 280px;
  top: 300px;
  right: -60px;
  background-image: url('/assets/img/bg/ball-volleyball.svg');
  opacity: 0.18;
  --rot: 8deg;
  filter: drop-shadow(0 0 28px rgba(96,165,250,0.45));
  animation: floatA 18s ease-in-out infinite;
  animation-delay: -3s;
}

/* Rugby — top center-right, partially off top */
.bg-ball--rugby-hero {
  width: 260px;
  height: 280px;
  top: -50px;
  left: 45%;
  background-image: url('/assets/img/bg/ball-rugby.svg');
  opacity: 0.15;
  --rot: -30deg;
  filter: drop-shadow(0 0 24px rgba(192,132,252,0.4));
  animation: floatB 20s ease-in-out infinite;
  animation-delay: -7s;
}

/* Tennis — mid-page crossing, right of center */
.bg-ball--tennis-hero {
  width: 200px;
  height: 200px;
  top: 420px;
  left: 55%;
  background-image: url('/assets/img/bg/ball-tennis.svg');
  opacity: 0.17;
  --rot: 22deg;
  filter: drop-shadow(0 0 20px rgba(163,230,53,0.45));
  animation: floatC 13s ease-in-out infinite;
  animation-delay: -5s;
}

/* ═══════════════════════════════════════════════════════
   MID-PAGE ZONE
═══════════════════════════════════════════════════════ */

/* American football — left edge, mid page */
.bg-ball--football-mid {
  width: 300px;
  height: 330px;
  top: 60vh;
  left: -110px;
  background-image: url('/assets/img/bg/ball-football.svg');
  opacity: 0.16;
  --rot: -20deg;
  filter: drop-shadow(0 0 26px rgba(251,191,36,0.4));
  animation: floatA 17s ease-in-out infinite;
  animation-delay: -9s;
}

/* Soccer — right mid, smaller */
.bg-ball--soccer-mid {
  width: 210px;
  height: 210px;
  top: 75vh;
  right: -50px;
  background-image: url('/assets/img/bg/ball-soccer.svg');
  opacity: 0.13;
  --rot: 35deg;
  filter: drop-shadow(0 0 18px rgba(168,85,247,0.35));
  animation: floatB 22s ease-in-out infinite;
  animation-delay: -4s;
}

/* Basketball — right side mid */
.bg-ball--basketball-mid {
  width: 190px;
  height: 190px;
  top: 55vh;
  right: 3%;
  background-image: url('/assets/img/bg/ball-basketball.svg');
  opacity: 0.11;
  --rot: 10deg;
  filter: drop-shadow(0 0 16px rgba(249,115,22,0.35));
  animation: floatC 19s ease-in-out infinite;
  animation-delay: -12s;
}

/* ═══════════════════════════════════════════════════════
   LOWER PAGE ZONE
═══════════════════════════════════════════════════════ */

/* Tennis — lower left */
.bg-ball--tennis-low {
  width: 180px;
  height: 180px;
  bottom: 18%;
  left: 2%;
  background-image: url('/assets/img/bg/ball-tennis.svg');
  opacity: 0.11;
  --rot: -10deg;
  filter: drop-shadow(0 0 14px rgba(163,230,53,0.3));
  animation: floatA 24s ease-in-out infinite;
  animation-delay: -16s;
}

/* Rugby — lower right */
.bg-ball--rugby-low {
  width: 220px;
  height: 240px;
  bottom: 8%;
  right: -60px;
  background-image: url('/assets/img/bg/ball-rugby.svg');
  opacity: 0.12;
  --rot: 25deg;
  filter: drop-shadow(0 0 18px rgba(192,132,252,0.3));
  animation: floatB 21s ease-in-out infinite;
  animation-delay: -8s;
}

/* Volleyball — bottom center */
.bg-ball--volleyball-low {
  width: 160px;
  height: 160px;
  bottom: 22%;
  left: 42%;
  background-image: url('/assets/img/bg/ball-volleyball.svg');
  opacity: 0.09;
  --rot: -5deg;
  filter: drop-shadow(0 0 12px rgba(96,165,250,0.25));
  animation: floatC 26s ease-in-out infinite;
  animation-delay: -19s;
}

/* ═══════════════════════════════════════════════════════
   CRYPTO COINS — scattered across entire page
═══════════════════════════════════════════════════════ */

.bg-coin--btc-1 {
  width: 110px; height: 110px;
  top: 8%; left: 28%;
  background-image: url('/assets/img/bg/coin-btc.svg');
  --op: 0.28; --glow: #f59e0b;
  animation: coinPulse 6s ease-in-out infinite, floatB 18s ease-in-out infinite;
  animation-delay: 0s, -2s;
}
.bg-coin--eth-1 {
  width: 90px; height: 90px;
  top: 22%; right: 20%;
  background-image: url('/assets/img/bg/coin-eth.svg');
  --op: 0.22; --glow: #818cf8;
  animation: coinPulse 7s ease-in-out infinite, floatA 20s ease-in-out infinite;
  animation-delay: -1s, -6s;
}
.bg-coin--sol-1 {
  width: 130px; height: 130px;
  top: 5%; right: 38%;
  background-image: url('/assets/img/bg/coin-sol.svg');
  --op: 0.24; --glow: #a855f7;
  animation: coinPulse 8s ease-in-out infinite, floatC 16s ease-in-out infinite;
  animation-delay: -3s, -9s;
}
.bg-coin--bnb-1 {
  width: 85px; height: 85px;
  top: 38%; left: 8%;
  background-image: url('/assets/img/bg/coin-bnb.svg');
  --op: 0.20; --glow: #fbbf24;
  animation: coinPulse 5s ease-in-out infinite, floatB 22s ease-in-out infinite;
  animation-delay: -2s, -4s;
}
.bg-coin--xrp-1 {
  width: 75px; height: 75px;
  top: 50%; right: 5%;
  background-image: url('/assets/img/bg/coin-xrp.svg');
  --op: 0.18; --glow: #22d3ee;
  animation: coinPulse 9s ease-in-out infinite, floatA 17s ease-in-out infinite;
  animation-delay: -4s, -11s;
}
.bg-coin--ada-1 {
  width: 95px; height: 95px;
  top: 65%; left: 20%;
  background-image: url('/assets/img/bg/coin-ada.svg');
  --op: 0.20; --glow: #3b82f6;
  animation: coinPulse 7s ease-in-out infinite, floatC 19s ease-in-out infinite;
  animation-delay: -5s, -3s;
}
.bg-coin--ltc-1 {
  width: 80px; height: 80px;
  top: 78%; right: 25%;
  background-image: url('/assets/img/bg/coin-ltc.svg');
  --op: 0.18; --glow: #a855f7;
  animation: coinPulse 6s ease-in-out infinite, floatB 21s ease-in-out infinite;
  animation-delay: -6s, -7s;
}
.bg-coin--btc-2 {
  width: 65px; height: 65px;
  bottom: 12%; left: 35%;
  background-image: url('/assets/img/bg/coin-btc.svg');
  --op: 0.15; --glow: #f59e0b;
  animation: coinPulse 8s ease-in-out infinite, floatA 23s ease-in-out infinite;
  animation-delay: -7s, -15s;
}
.bg-coin--eth-2 {
  width: 70px; height: 70px;
  bottom: 30%; left: 5%;
  background-image: url('/assets/img/bg/coin-eth.svg');
  --op: 0.16; --glow: #818cf8;
  animation: coinPulse 10s ease-in-out infinite, floatC 25s ease-in-out infinite;
  animation-delay: -8s, -20s;
}
.bg-coin--sol-2 {
  width: 60px; height: 60px;
  top: 90%; right: 40%;
  background-image: url('/assets/img/bg/coin-sol.svg');
  --op: 0.14; --glow: #a855f7;
  animation: coinPulse 7s ease-in-out infinite, floatB 28s ease-in-out infinite;
  animation-delay: -9s, -22s;
}

/* Apply opacity from CSS variable */
.bg-coin--btc-1  { opacity: 0.28; }
.bg-coin--eth-1  { opacity: 0.22; }
.bg-coin--sol-1  { opacity: 0.24; }
.bg-coin--bnb-1  { opacity: 0.20; }
.bg-coin--xrp-1  { opacity: 0.18; }
.bg-coin--ada-1  { opacity: 0.20; }
.bg-coin--ltc-1  { opacity: 0.18; }
.bg-coin--btc-2  { opacity: 0.15; }
.bg-coin--eth-2  { opacity: 0.16; }
.bg-coin--sol-2  { opacity: 0.14; }

/* ── Reduce motion (accessibility) ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .bg-ball, .bg-coin, .bg-nebula, .bg-streak {
    animation: none !important;
  }
}

/* ── Hide on very small screens to preserve perf ───────────── */
@media (max-width: 480px) {
  .bg-ball--soccer-hero  { width: 280px; height: 280px; right: -120px; top: -40px; }
  .bg-ball--basketball-hero { width: 240px; height: 240px; left: -100px; }
  .bg-ball--volleyball-hero,
  .bg-ball--rugby-hero,
  .bg-ball--tennis-hero { display: none; }
  .bg-coin--bnb-1, .bg-coin--xrp-1, .bg-coin--ada-1,
  .bg-coin--btc-2, .bg-coin--eth-2, .bg-coin--sol-2 { display: none; }
}
