/* ================================================================
   NURAXIA · GAMES HOME — la scena 3D
   Dark + oro, prospettiva CSS, bottoni che respirano e affondano.
   ================================================================ */

/* ---- FORZA TEMA TRASFORMO (dark+oro SEMPRE, indipendente da Telegram) ---- */
.nx-scene, .nx-scene * {
  color-scheme: dark;
}
.nx-scene {
  background: radial-gradient(ellipse at 50% 20%, #1a232b 0%, #0d1117 60%, #080a0d 100%) !important;
  color: #ece5d8;
}

/* ---- FORZA TEMA TRASFORMO (dark+oro SEMPRE, indipendente da Telegram) ---- */
.nx-scene, .nx-scene * {
  color-scheme: dark;
}
.nx-scene {
  background: radial-gradient(ellipse at 50% 20%, #1a232b 0%, #0d1117 60%, #080a0d 100%) !important;
  color: #ece5d8;
}

/* ---- LA SCENA ---- */
.nx-scene {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 20%, #1a232b 0%, #0d1117 60%, #080a0d 100%);
  padding: 20px 16px 40px;
  overflow: hidden;
  position: relative;
}
.nx-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(201,162,92,.04) 1px, transparent 1px),
    radial-gradient(rgba(201,162,92,.03) 1px, transparent 1px);
  background-size: 40px 40px, 80px 80px;
  pointer-events: none;
}

/* ---- IL TITOLO ---- */
.nx-title {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.nx-title h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 6px;
  color: #f5d48a;
  text-shadow: 0 2px 20px rgba(245,212,138,.3);
  margin: 0;
  animation: nx-glow 3s ease infinite;
}
.nx-title .nx-sub {
  font-size: .72rem;
  letter-spacing: 3px;
  color: rgba(201,162,92,.5);
  text-transform: uppercase;
  margin-top: 6px;
}
@keyframes nx-glow {
  0%, 100% { text-shadow: 0 2px 20px rgba(245,212,138,.2); }
  50% { text-shadow: 0 2px 30px rgba(245,212,138,.5); }
}

/* ---- I BOTTONI 3D ---- */
.nx-cards {
  perspective: 900px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* il bottone-scatola */
.nx-card-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  cursor: pointer;
  background: linear-gradient(145deg, #1e2830 0%, #141a20 100%);
  border: 1px solid rgba(201,162,92,.15);
  transform: rotateX(3deg);
  transform-style: preserve-3d;
  transition: transform .25s cubic-bezier(.4,0,.2,1), border-color .3s, box-shadow .3s;
  box-shadow:
    0 1px 3px rgba(0,0,0,.3),
    0 8px 24px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.03);
}
/* il riflesso dorato sul bordo: pseudo-elemento che scorre */
.nx-card-btn::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 20%, rgba(245,212,138,.2) 40%, rgba(245,212,138,.08) 60%, transparent 80%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.nx-card-btn:hover {
  transform: rotateX(0deg) translateY(-2px);
  border-color: rgba(201,162,92,.3);
  box-shadow:
    0 4px 8px rgba(0,0,0,.3),
    0 12px 36px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.04);
}
.nx-card-btn:hover::after { opacity: 1; }
.nx-card-btn:active {
  transform: rotateX(0deg) translateY(1px) scale(.98);
  transition: transform .1s;
}

/* l'icona nel bottone: una moneta 3D */
.nx-card-btn .nx-ico {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(145deg, #2a3540, #1a232b);
  border: 2px solid rgba(201,162,92,.25);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.05), 0 2px 8px rgba(0,0,0,.3);
  transform: translateZ(20px);
  transition: transform .25s;
}
.nx-card-btn:hover .nx-ico { transform: translateZ(30px) scale(1.05); }
.nx-card-btn:active .nx-ico { transform: translateZ(10px) scale(.95); }

/* il testo nel bottone */
.nx-card-btn .nx-txt { flex: 1; }
.nx-card-btn .nx-txt .nx-nome {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ece5d8;
  transform: translateZ(15px);
}
.nx-card-btn .nx-txt .nx-desc {
  font-size: .72rem;
  color: rgba(201,162,92,.55);
  margin-top: 2px;
  transform: translateZ(10px);
}
.nx-card-btn .nx-txt .nx-stat {
  font-size: .68rem;
  color: rgba(236,229,216,.4);
  margin-top: 4px;
  display: flex;
  gap: 10px;
  transform: translateZ(8px);
}
.nx-card-btn .nx-txt .nx-stat b { color: #c9a25c; font-weight: 700; }

/* la freccia */
.nx-card-btn .nx-arrow {
  font-size: 1.2rem;
  color: rgba(201,162,92,.3);
  transform: translateZ(15px);
  transition: transform .25s, color .25s;
}
.nx-card-btn:hover .nx-arrow {
  transform: translateZ(25px) translateX(4px);
  color: rgba(245,212,138,.6);
}

/* ---- IL PANNELLO INFERIORE (il tuo stato) ---- */
.nx-panel {
  max-width: 400px;
  margin: 24px auto 0;
  position: relative;
  z-index: 1;
}
.nx-panel-card {
  background: linear-gradient(135deg, rgba(201,162,92,.08), rgba(26,35,43,.4));
  border: 1px solid rgba(201,162,92,.12);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 10px;
}
.nx-panel-card .nx-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: .82rem;
  color: rgba(236,229,216,.7);
}
.nx-panel-card .nx-row b {
  color: #f5d48a;
  font-size: 1rem;
  font-weight: 800;
}
.nx-panel-card .nx-row .nx-small { font-size: .68rem; opacity: .5; }

/* la barra Trasformo */
.nx-tbar {
  height: 6px;
  border-radius: 3px;
  background: rgba(128,128,128,.12);
  overflow: hidden;
  margin: 6px 0;
}
.nx-tbar > div {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #8a6e3a, #c9a25c, #f5d48a);
  box-shadow: 0 0 8px rgba(245,212,138,.3);
  transition: width .5s ease;
}

/* la sfida del giorno: una gemma nel pannello */
.nx-daily {
  background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(201,162,92,.06));
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .3s, box-shadow .3s;
}
.nx-daily:hover {
  border-color: rgba(59,130,246,.4);
  box-shadow: 0 4px 16px rgba(59,130,246,.1);
}
.nx-daily .nx-daily-kicker {
  font-size: .68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(127,199,255,.5);
}
.nx-daily .nx-daily-name { font-size: .95rem; font-weight: 700; color: #ece5d8; margin-top: 4px; }
.nx-daily .nx-daily-score { font-size: .72rem; color: rgba(201,162,92,.6); margin-top: 2px; }

/* la classifica: una lista compatta */
.nx-leaderboard .nx-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(128,128,128,.06);
  font-size: .8rem;
}
.nx-leaderboard .nx-lb-row:last-child { border-bottom: none; }
.nx-leaderboard .nx-lb-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(201,162,92,.08);
  color: rgba(201,162,92,.6);
}
.nx-leaderboard .nx-lb-row.nx-me .nx-lb-rank {
  background: linear-gradient(135deg, #c9a25c, #f5d48a);
  color: #1a232b;
}
.nx-leaderboard .nx-lb-row .nx-lb-name { flex: 1; color: rgba(236,229,216,.7); }
.nx-leaderboard .nx-lb-row .nx-lb-score { color: #c9a25c; font-weight: 600; }

/* il footer discreto */
.nx-footer {
  text-align: center;
  font-size: .62rem;
  color: rgba(201,162,92,.2);
  margin-top: 20px;
  letter-spacing: 1px;
}

/* animazione di entrata */
.nx-fade-up {
  animation: nx-fade-up .5s ease both;
}
.nx-fade-up:nth-child(1) { animation-delay: 0s; }
.nx-fade-up:nth-child(2) { animation-delay: .08s; }
.nx-fade-up:nth-child(3) { animation-delay: .16s; }
.nx-fade-up:nth-child(4) { animation-delay: .24s; }
.nx-fade-up:nth-child(5) { animation-delay: .32s; }
@keyframes nx-fade-up {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* il vortice dorato di sfondo (subtle) */
.nx-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,92,.06) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: nx-orb-float 8s ease infinite;
  pointer-events: none;
}
@keyframes nx-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 30px) scale(1.1); }
}
