/* TradePlexa 3.3.5 — Animated Atmosphere: Saldo Attuale
   Il background 3.3.4 e l'immagine delle monete sono INVARIATI.
   L'animazione resta dietro al contenuto dinamico e non disegna grafici fittizi.
   Nessuna modifica a JavaScript, backend, database o layout. */

/* La gerarchia della card rimane quella originale: layer decorativo a z-index 0,
   testi, monete e curva reale a z-index >= 1. */
html body #dashboard .tp68-hero-grid .tp68-balance-card {
  isolation: isolate !important;
}
html body #dashboard .tp68-hero-grid .tp68-balance-card > .tp335-ambient {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: none !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 0 !important;
  border-radius: inherit;
}
html body #dashboard .tp68-hero-grid .tp68-balance-card > :not(.tp335-ambient) {
  z-index: 2 !important;
}

.tp335-ambient > * {
  position: absolute;
  display: block;
  pointer-events: none;
}
/* Il tenue alone sulla superficie del globo pulsa gradualmente; restano liberi
   i primi ~40% della card (monete, saldo e percentuali). */
.tp335-ambient .tp335-glow {
  border-radius: 50%;
  opacity: .08;
  will-change: transform, opacity;
  transform: translateZ(0);
}
.tp335-ambient .tp335-glow-one {
  left: 47%;
  top: -85%;
  width: 53%;
  height: 170%;
  background: radial-gradient(ellipse at center,
    rgba(23,177,228,.42) 0%,rgba(12,117,190,.16) 42%, transparent 71%);
  animation: tp335-globe-breath 16s ease-in-out infinite;
}
.tp335-ambient .tp335-glow-two {
  right: -17%;
  bottom: -130%;
  width: 67%;
  height: 190%;
  background: radial-gradient(ellipse at center,
    rgba(17,219,195,.26),rgba(13,119,167,.08) 48%,transparent 71%);
  animation: tp335-globe-breath 19s ease-in-out -8s infinite reverse;
}
@keyframes tp335-globe-breath {
  0%,100% { opacity:.04; transform:translate3d(0,0,0) scale(1); }
  47% { opacity:.19; transform:translate3d(-1.2%,1%,0) scale(1.045); }
}

/* Piccoli nodi, sempre sotto il grafico vero. Nessuna linea grafica artificiale. */
.tp335-ambient .tp335-spark {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(122,244,255,.72);
  box-shadow: 0 0 5px rgba(87,227,255,.55), 0 0 12px rgba(49,156,227,.18);
  opacity: .08;
  animation: tp335-faint-twinkle 11s ease-in-out infinite;
}
.tp335-ambient .tp335-spark-one {left:53%;top:23%;animation-delay:-3s;}
.tp335-ambient .tp335-spark-two {left:69%;top:14%;width:2px;height:2px;animation-delay:-8s;animation-duration:13s;}
.tp335-ambient .tp335-spark-three {left:82%;top:29%;animation-delay:-2s;animation-duration:16s;}
.tp335-ambient .tp335-spark-four {left:94%;top:64%;width:2px;height:2px;animation-delay:-10s;animation-duration:17s;}
@keyframes tp335-faint-twinkle {
  0%,19%,52%,100%{opacity:.06;transform:scale(.85)}
  32%,39%{opacity:.78;transform:scale(1.2)}
}

/* Un unico lieve arco di luce, nascosto lungo il bordo superiore del globo.
   Non interseca il tracciato dei trade, che rimane dinamico e ben visibile. */
.tp335-ambient .tp335-soft-orbit {
  left: 44%;
  top: -48%;
  width: 48%;
  height: 86%;
  border-radius: 50%;
  border: 1px solid rgba(53,168,225,.10);
  border-left-color: transparent;
  border-bottom-color: transparent;
  opacity: .20;
  transform: rotate(-12deg);
  animation: tp335-orbit-gleam 17s ease-in-out infinite;
}
@keyframes tp335-orbit-gleam {
  0%,100% {opacity:.13;}
  45% {opacity:.37;}
}

/* Riflesso sulle MONETE, non uno spostamento dell'icona. */
html body #dashboard .tp68-hero-grid .tp68-balance-card .tp68-balance-icon {
  isolation: isolate !important;
}
html body #dashboard .tp68-hero-grid .tp68-balance-card .tp68-balance-icon::after {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  inset: -18% !important;
  z-index: 2 !important;
  pointer-events: none !important;
  border-radius: inherit;
  background: linear-gradient(112deg,
    transparent 0%, transparent 41%,
    rgba(198,255,255,.00) 45%,rgba(219,255,255,.30) 50%,
    rgba(198,255,255,.00) 55%,transparent 59%,transparent 100%) !important;
  transform: translateX(-145%) rotate(3deg);
  animation: tp335-coin-reflection 14s ease-in-out infinite;
}
@keyframes tp335-coin-reflection {
  0%,24%{transform:translateX(-145%) rotate(3deg);opacity:0;}
  26%{opacity:.42;}
  34%{transform:translateX(145%) rotate(3deg);opacity:.36;}
  36%,100%{transform:translateX(145%) rotate(3deg);opacity:0;}
}

/* Su schermi piccoli riduciamo ulteriormente i bagliori vicino alla curva. */
@media(max-width:760px){
  .tp335-ambient .tp335-glow-one { opacity:.055; }
  .tp335-ambient .tp335-glow-two { opacity:.045; }
  .tp335-ambient .tp335-soft-orbit { display:none; }
}

/* Accessibilita': mantenere la grafica senza movimento se richiesto dal sistema. */
@media(prefers-reduced-motion:reduce){
  .tp335-ambient .tp335-glow,
  .tp335-ambient .tp335-spark,
  .tp335-ambient .tp335-soft-orbit,
  html body #dashboard .tp68-hero-grid .tp68-balance-card .tp68-balance-icon::after {
    animation: none !important;
  }
  .tp335-ambient .tp335-glow{opacity:.06!important;transform:none!important;}
  .tp335-ambient .tp335-spark{opacity:.23!important;transform:none!important;}
  .tp335-ambient .tp335-soft-orbit{opacity:.13!important;}
  html body #dashboard .tp68-hero-grid .tp68-balance-card .tp68-balance-icon::after{opacity:0!important;}
}
