@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Rajdhani:wght@500;600;700&display=swap');

:root{
  --acid: #a6ff1e;
  --acid-dim: #6fbf12;
  --ink: #0a0710;
  --blood: #d1263a;
  --warn: #ffce33;
  --font-display: 'Creepster', 'Rajdhani', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}
*{ box-sizing:border-box; }
html,body{
  margin:0; padding:0; width:100%; height:100%; background:#000; font-family:var(--font-body); color:#eae6f0;
  -webkit-font-smoothing:antialiased; position:fixed; inset:0; overscroll-behavior:none; touch-action:none;
}

body{ display:flex; align-items:center; justify-content:center; overflow:hidden; }
.viewport-frame{
  position:relative;
  width: min(480px, 56.25vh);
  height: min(853px, 100vh);
  aspect-ratio: 9 / 16;
  overflow:hidden;
  background: var(--ink);
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
}

.bg-photo{
  position:absolute; inset:0; z-index:0;
  background-image: url('/assets/bg/home.webp');
  background-size: cover; background-position: center 62%; background-repeat: no-repeat;
}
.bg-photo.store-bg{ background-image: url('/assets/bg/store.webp'); }
#fogCanvas{ position:absolute; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; opacity:0.55; mix-blend-mode:screen; }
.bg-vignette{ position:absolute; inset:0; z-index:1; pointer-events:none; background: radial-gradient(120% 100% at 50% 20%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.75) 100%); }
.scanlines{ position:absolute; inset:0; z-index:1; pointer-events:none; opacity:0.05; background: repeating-linear-gradient(0deg,#fff 0 1px, transparent 1px 3px); mix-blend-mode:overlay; }

.view{ position:absolute; inset:0; z-index:2; width:100%; height:100%; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; display:flex; flex-direction:column; padding:18px 16px 28px; box-sizing:border-box; opacity:0; pointer-events:none; transition: opacity 0.2s ease; }
.view.active{ opacity:1; pointer-events:auto; z-index:3; }

/* logo */
.logo-wrap{ text-align:center; margin-bottom:12px; }
.logo-wrap img{ width:62%; max-width:230px; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.6)); animation: logoGlow 2.6s ease-in-out infinite; }
@keyframes logoGlow{
  0%,100%{ filter: drop-shadow(0 4px 14px rgba(0,0,0,0.6)) drop-shadow(0 0 10px rgba(166,255,30,0.25)); }
  50%{ filter: drop-shadow(0 4px 14px rgba(0,0,0,0.6)) drop-shadow(0 0 22px rgba(166,255,30,0.55)); }
}

/* logo, smaller variant for the lobby header */
.logo-wrap.sm img{ width:38%; max-width:150px; }

/* ---------- shared "toxic mucus glass" panel style ---------- */
.glass{
  position:relative;
  background: linear-gradient(160deg, rgba(140,255,60,0.16), rgba(10,30,10,0.4) 55%, rgba(6,16,8,0.52));
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(166,255,30,0.32);
  border-radius: 22px 22px 26px 26px / 22px 22px 32px 32px;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.28),
    inset 0 -8px 16px rgba(60,180,10,0.14),
    0 8px 18px rgba(0,0,0,0.4);
  overflow: visible;
}
.glass::before{
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none; z-index:0;
  background: linear-gradient(115deg, rgba(255,255,255,0.26) 0%, transparent 26%);
  mix-blend-mode: screen;
}
.glass > *{ position:relative; z-index:1; }

.drip-blob{
  position:absolute; bottom:-6px; width:8px; height:13px; z-index:2; pointer-events:none;
  background: linear-gradient(180deg, rgba(166,255,30,0.95), rgba(120,200,20,0.3));
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35));
  animation: dripFall 3.2s ease-in infinite;
}
@keyframes dripFall{
  0%{ transform: translateY(0) scaleY(1); opacity:0.95; }
  60%{ transform: translateY(11px) scaleY(1.4); opacity:0.85; }
  100%{ transform: translateY(19px) scaleY(0.5); opacity:0; }
}

/* ---------- top bar: balance mini + avatar ---------- */
.top-bar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
/* pillola ToxicCoin disegnata (coin+saldo+bottone "+" gia' incorporati
   nell'immagine) -- qui sovrapponiamo solo il numero vero e un'area
   cliccabile trasparente sul "+", niente ridisegnato sopra */
.mini-balance{
  position:relative; display:block; width:136px; max-width:36vw; aspect-ratio:283/142; cursor:default;
  background-image:url('/assets/icons/balance-pill.webp'); background-size:100% 100%; background-repeat:no-repeat;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}
.mini-icon{ display:none; }
.coin-ico{ width:1em; height:1em; object-fit:contain; vertical-align:-0.15em; flex-shrink:0; }
.mini-balance #balanceVal{
  position:absolute; left:33%; width:44%; top:0; height:100%;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-size:14px; color: var(--acid); text-shadow: 0 0 6px rgba(166,255,30,0.6);
}
.mini-plus{
  position:absolute; left:76.7%; width:23.3%; top:0; height:100%; cursor:pointer;
  background:none; border:none; box-shadow:none; border-radius:0; color:transparent; font-size:0;
}
.avatar-btn{
  width:38px; height:38px; min-width:38px; min-height:38px; max-width:38px; max-height:38px;
  border-radius:50%; flex-shrink:0; flex-grow:0; cursor:pointer; overflow:hidden;
  background: radial-gradient(circle at 35% 30%, #6a6f74, #232527 70%);
  padding:2px; box-shadow: 0 0 0 2px rgba(10,11,12,0.8), 0 0 8px rgba(166,255,30,0.35);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}
.avatar-btn img{ width:100%; height:100%; max-width:100%; max-height:100%; border-radius:50%; object-fit:cover; display:block; }

/* profile dropdown menu */
.profile-menu-name{ font-size:13px; font-weight:700; color:#d8f5b0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.profile-menu-item{
  display:flex; align-items:center; gap:10px; padding:12px 8px; border-radius:8px; cursor:pointer;
  font-size:14px; font-weight:600; color:#eae6f0;
  border-bottom:1px solid rgba(166,255,30,0.12);
}
.profile-menu-item:last-child{ border-bottom:none; }
.profile-menu-item:active{ background: rgba(166,255,30,0.15); }
.profile-menu-item.close{ color:#ff9aa8; }
.profile-menu-item svg{ flex-shrink:0; }

/* ---------- spacer pushes the bottom stack down, showing the background art ---------- */
.home-spacer{ flex:1; min-height:20px; }

/* ---------- bottom stack ---------- */
.home-bottom{ flex-shrink:0; }

/* PLAY button */
.play-btn{
  display:flex; align-items:center; justify-content:center; gap:10px;
  padding: 18px 0; cursor:pointer; margin-bottom:14px;
  background: linear-gradient(160deg, rgba(180,255,90,0.5), rgba(90,200,20,0.38) 60%, rgba(40,110,5,0.42)) !important;
  border-color: rgba(200,255,140,0.55) !important;
  box-shadow: inset 0 2px 2px rgba(255,255,255,0.4), inset 0 -6px 12px rgba(20,80,5,0.22), 0 5px 0 #2e5c05, 0 8px 16px rgba(0,0,0,0.45) !important;
  animation: playBtnGlow 2.8s ease-in-out infinite;
}
@keyframes playBtnGlow{
  0%,100%{ box-shadow: inset 0 2px 2px rgba(255,255,255,0.4), inset 0 -6px 12px rgba(20,80,5,0.22), 0 5px 0 #2e5c05, 0 8px 16px rgba(0,0,0,0.45), 0 0 0 rgba(166,255,30,0); }
  50%{ box-shadow: inset 0 2px 2px rgba(255,255,255,0.4), inset 0 -6px 12px rgba(20,80,5,0.22), 0 5px 0 #2e5c05, 0 8px 20px rgba(0,0,0,0.45), 0 0 18px rgba(166,255,30,0.4); }
}
.play-btn:active{ transform: translateY(3px) scaleY(0.97); box-shadow: 0 2px 0 #2e5c05, 0 4px 8px rgba(0,0,0,0.45), inset 0 2px 3px rgba(0,0,0,0.2) !important; animation:none; }
.play-btn .tri{ width:0; height:0; border-left:18px solid #0d2005; border-top:12px solid transparent; border-bottom:12px solid transparent; filter: drop-shadow(0 1px 0 rgba(255,255,255,0.3)); }
.play-btn .label{ font-family: var(--font-display); font-size:23px; color:#0d2005; letter-spacing:2px; text-shadow: 0 1px 0 rgba(255,255,255,0.35); }

/* slot teaser section */
.slots-section{ padding:0 2px; margin-bottom:12px; }
.slots-section h4{ margin:0 0 8px; font-size:10.5px; letter-spacing:2px; color:#a8d888; font-weight:700; text-transform:uppercase; }
.teaser-row{ display:flex; gap:8px; overflow-x:auto; }
.teaser-card{
  flex:0 0 auto; width:60px; height:60px; border-radius:12px; overflow:hidden; cursor:pointer;
  background: rgba(10,25,10,0.4); border:1px solid rgba(166,255,30,0.3);
  display:flex; align-items:center; justify-content:center; font-size:20px; color:#6a8a50;
  transition: transform 0.12s;
}
.teaser-card:active{ transform: scale(0.92); }
.teaser-card img{ width:100%; height:100%; object-fit:cover; }

/* bottom dock — phone-style icon grid */
.dock-row{ display:flex; gap:10px; justify-content:space-between; }
.dock-tile{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; cursor:pointer; min-width:0;
  background:none; border:none;
  transition: transform 0.12s;
}
.dock-tile:active{ transform: scale(0.9); }
.dock-icon{
  width:112px; height:112px; padding:3px; box-sizing:border-box; border-radius:28px;
  display:flex; align-items:center; justify-content:center; position:relative;
  overflow:hidden;
  /* vetro smerigliato: resta SOLO nello spazio tra il bordo verde e il
     disegno dell'icona (clippato da overflow:hidden qui sopra), non piu'
     un alone grande fuori dal bottone */
  background: linear-gradient(160deg, rgba(140,255,60,0.22), rgba(6,14,6,0.88));
  backdrop-filter: blur(2px);
  border:1px solid rgba(166,255,30,0.5);
  box-shadow: 0 0 0 1px rgba(166,255,30,0.18), 0 10px 22px rgba(0,0,0,0.85), 0 0 22px rgba(166,255,30,0.45);
  animation: dockFloat 3.2s ease-in-out infinite;
}
/* piccolo riflesso in alto per dare l'effetto vetro, resta dentro il bottone */
.dock-icon::before{
  content:""; position:absolute; inset:0; border-radius:26px; z-index:0; pointer-events:none;
  background: linear-gradient(200deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 32%);
}
.dock-tile:nth-child(2) .dock-icon{ animation-delay: 0.55s; }
@keyframes dockFloat{
  0%,100%{ transform: translateY(0); box-shadow: 0 0 0 1px rgba(166,255,30,0.18), 0 16px 32px rgba(0,0,0,0.9), 0 0 22px rgba(166,255,30,0.45); }
  50%{ transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(166,255,30,0.35), 0 18px 36px rgba(0,0,0,0.9), 0 0 32px rgba(166,255,30,0.7); }
}
/* i png delle icone hanno un margine trasparente incorporato: li ingrandiamo
   dentro la cornice (che clippa con overflow:hidden qui sopra) cosi' il
   disegno vero riempie il bordo verde invece di sembrare piccolo dentro */
.dock-icon img{ position:relative; z-index:1; width:100%; height:100%; object-fit:contain; display:block; transform:scale(1.32); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
/* ogni png sorgente ha un margine trasparente diverso incorporato --
   scala calcolata per icona cosi' il disegno arriva davvero a toccare
   il bordo verde su tutte e 4, non solo su quelle che gia' avevano poco margine */
#topupBtn .dock-icon img{ transform:scale(1.33); }
#profileBtn .dock-icon img{ transform:scale(1.23); }
#leaderboardBtn .dock-icon img{ transform:scale(1.23); }
#storeBtn .dock-icon img{ transform:scale(1.21); }
.dock-lb{
  position:relative; z-index:2; font-size:11.5px; font-weight:800; color:#f3ffe0; letter-spacing:0.4px;
  text-shadow: 0 1px 3px #000, 0 1px 3px #000, 0 0 8px rgba(0,0,0,0.95), 0 0 10px rgba(166,255,30,0.55);
}
/* provvisorio: l'icona di Ricarica ritinta per stonare meno, finche' non ne generi una nuova */
#topupBtn .dock-icon img{ filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)) saturate(0.75) brightness(0.92) hue-rotate(6deg); }

.footnote{ margin-top:10px; font-size:10.5px; color:#5c4d70; text-align:center; line-height:1.5; }

/* ---------- LOBBY ---------- */
.lobby-head{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.back-btn{
  width:34px; height:34px; border-radius:10px; flex-shrink:0; cursor:pointer;
  background: rgba(10,25,10,0.4); border:1px solid rgba(166,255,30,0.3);
  display:flex; align-items:center; justify-content:center; color:var(--acid);
}
.lobby-head h2{ margin:0; font-family:var(--font-display); font-size:20px; color:var(--acid); letter-spacing:1px; }

.tab-row{ display:flex; gap:8px; margin-bottom:14px; overflow-x:auto; }
.tab{
  flex:0 0 auto; padding:8px 14px; border-radius:20px; font-size:12.5px; font-weight:700; cursor:pointer;
  background: rgba(10,25,10,0.35); border:1px solid rgba(166,255,30,0.25); color:#a8c890;
}
.tab.active{ background: var(--acid); color:#0a0710; border-color:var(--acid); }

.game-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.game-card{
  border-radius:16px; overflow:hidden; cursor:pointer; position:relative;
  background: rgba(10,25,10,0.4); border:1px solid rgba(166,255,30,0.25);
  aspect-ratio: 4/5;
}
.game-card .banner{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.game-card .banner.placeholder{ display:flex; align-items:center; justify-content:center; font-size:34px; color:#4a6a38; background: linear-gradient(160deg, rgba(166,255,30,0.08), rgba(0,0,0,0.3)); }
.game-card .scrim{ position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(3,10,3,0.92) 100%); }
.game-card .info{ position:absolute; left:0; right:0; bottom:0; padding:10px; }
.game-card .name{ font-size:13px; font-weight:700; color:#fff; text-shadow: 0 1px 3px rgba(0,0,0,0.8); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.game-card .badges{ position:absolute; top:8px; left:8px; display:flex; gap:4px; }
.badge{ font-size:9px; font-weight:700; padding:3px 7px; border-radius:20px; letter-spacing:0.5px; backdrop-filter: blur(4px); }
.badge.hot{ background:rgba(224,71,92,0.35); color:#ff9aa8; border:1px solid rgba(224,71,92,0.5); }
.badge.new{ background:rgba(166,255,30,0.3); color:#d8ffb0; border:1px solid rgba(166,255,30,0.5); }
.empty-state{ text-align:center; padding:40px 20px; color:#6a8a50; font-size:13px; }

/* ---------- TOPUP MODAL ---------- */
.modal-backdrop{
  display:none; position:absolute; inset:0; z-index:20;
  background: rgba(3,10,3,0.7); align-items:center; justify-content:center; padding:20px;
}
.modal-backdrop.open{ display:flex; }
.modal-card{ width:100%; padding:18px; }
.modal-head{ display:flex; justify-content:space-between; align-items:center; font-size:12px; letter-spacing:2px; color:#d8f5b0; font-weight:700; margin-bottom:4px; }
.modal-close{ cursor:pointer; color:#a8c890; padding:2px 6px; }
.modal-sub{ font-size:11.5px; color:#a8c890; margin-bottom:14px; }
.topup-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.topup-chip{
  display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:12px 6px; border-radius:10px; cursor:pointer;
  background: rgba(10,25,10,0.5); border:1px solid rgba(166,255,30,0.3);
  color:#fff; font-family:var(--font-body); font-weight:700; font-size:14px;
}
.topup-chip small{ font-size:10px; color:#a8d888; font-weight:600; }
.topup-chip:active{ transform:scale(0.95); }
.topup-status{ margin-top:12px; font-size:12px; color:#a8c890; text-align:center; min-height:16px; }

/* ---------- STORE ---------- */
.demo-banner{
  background: rgba(255,206,51,0.15); border:1px solid rgba(255,206,51,0.5); border-radius:10px;
  padding:8px 12px; font-size:11px; font-weight:700; color:#ffe9a8; text-align:center; margin-bottom:12px;
}
/* ---------- STORE / TOXIC SHOP (sfondo pieno, stesso schema della Ricarica) ---------- */
.store-scene{ background:#050805; }

/* il pulsante indietro e la pillola saldo sono gia' disegnati nello sfondo
   (store-full.webp) -- qui non ridisegniamo nulla sopra, solo aree
   cliccabili trasparenti + il numero vero del saldo */
.store-back-float{
  position:absolute; z-index:7; cursor:pointer; aspect-ratio:1;
}
.store-back-float:active{ opacity:0.6; }

.store-balance-float{
  position:absolute; z-index:7;
}
.store-balance-float .pill-val{
  position:absolute; z-index:1; left:33%; width:44%; top:0; height:100%;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-size:14px; color:var(--acid); text-shadow:0 0 8px rgba(166,255,30,0.7);
}
.store-balance-float .pill-plus-hit{ position:absolute; left:76.7%; top:0; width:23.3%; height:100%; z-index:2; cursor:pointer; }

.store-filters-float{
  position:absolute; z-index:7; display:flex; align-items:center; justify-content:space-between;
  overflow-x:auto; gap:6px; scrollbar-width:none;
}
.store-filters-float::-webkit-scrollbar{ display:none; }
.filter-btn{ height:100%; flex-shrink:0; cursor:pointer; opacity:0.88; transition:opacity 0.15s, transform 0.15s; }
.filter-btn img{ height:100%; width:auto; display:block; }
.filter-btn:active{ transform: scale(0.94); }
.filter-btn.active{ opacity:1; }

.store-content-float{
  position:absolute; z-index:6; overflow-y:auto; -webkit-overflow-scrolling:touch;
}
.store-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; padding-bottom:6px; }
.store-card{
  position:relative; aspect-ratio:1; cursor:pointer;
  transition: transform 0.15s;
  animation: storeCardIn 0.35s ease backwards;
}
@keyframes storeCardIn{ from{ opacity:0; transform:translateY(8px) scale(0.96); } to{ opacity:1; transform:translateY(0) scale(1); } }
.store-card:active{ transform: scale(0.96); }
.store-card .card-frame-bg{ position:absolute; inset:0; width:100%; height:100%; z-index:0; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.6)); }
.store-card .img-wrap{ position:absolute; top:6%; left:20%; width:60%; height:56%; z-index:1; display:flex; align-items:center; justify-content:center; }
.store-card .img-wrap img{ width:100%; height:100%; object-fit:contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }
.store-card .img-wrap .ph{ font-size:26px; opacity:0.5; }
.store-card .name{
  position:absolute; top:68%; left:8%; width:84%; height:7.5%; z-index:1;
  display:flex; align-items:center; justify-content:center;
  font-size:10px; font-weight:700; color:#e6dcff; text-align:center; text-shadow:0 1px 3px rgba(0,0,0,0.9);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.store-card .cost{
  position:absolute; top:79%; left:28.5%; width:48%; height:13%; z-index:1;
  display:flex; align-items:center; justify-content:center; box-sizing:border-box;
  font-size:12.5px; font-weight:800; color:var(--acid); text-shadow:0 0 6px rgba(166,255,30,0.6);
}
/* Three card states, all full-color/appealing — nothing ever looks "spento":
   - .locked        shop-side unavailable (Tesoreria) — red ribbon + red price
   - .insufficient   player doesn't have enough Toxic Coin — yellow ribbon + yellow price
   - plain          affordable and available — green price (default, see .cost)
   'color' set here is only so the neon glow keyframe below can reuse it via
   currentColor without repeating hex values; it does not affect the name/cost
   text, which set their own explicit colors. */
.store-card.locked{ cursor:default; overflow:hidden; color:#ff3d6e; }
.store-card.insufficient{ cursor:pointer; overflow:hidden; color:#ffcc33; }
.store-card:not(.locked):not(.insufficient){ color:#a6ff1e; }

.unavailable-ribbon, .insufficient-ribbon{
  position:absolute; top:11px; right:-32px; z-index:4;
  width:128px; padding:3px 0; text-align:center;
  font-size:8.5px; font-weight:800; letter-spacing:0.6px;
  text-transform:uppercase; transform:rotate(40deg);
  box-shadow:0 2px 6px rgba(0,0,0,0.55);
}
.unavailable-ribbon{
  background:linear-gradient(135deg,#ff3d6e,#8f0030);
  color:#fff; text-shadow:0 1px 2px rgba(0,0,0,0.6);
}
.insufficient-ribbon{
  background:linear-gradient(135deg,#ffd93d,#a67300);
  color:#241900; text-shadow:0 1px 1px rgba(255,255,255,0.25);
}
.store-card.locked .cost{ color:#ff3d6e; text-shadow:0 0 6px rgba(255,61,110,0.6); }
.store-card.insufficient .cost{ color:#ffcc33; text-shadow:0 0 6px rgba(255,204,51,0.6); }

/* Neon glow pulse on tap, color follows the card's state via currentColor. */
@keyframes glowPulse{
  0%{ box-shadow:0 0 0 0 transparent; }
  35%{ box-shadow:0 0 26px 7px currentColor; }
  100%{ box-shadow:0 0 0 0 transparent; }
}
.store-card.glow-pulse{ animation: glowPulse 0.48s ease-out; }
.locked-hint{
  position:absolute; left:50%; bottom:6px; transform:translateX(-50%);
  background:rgba(10,25,10,0.92); border:1px solid rgba(166,255,30,0.4); border-radius:20px;
  padding:4px 10px; font-size:10px; color:#d8f5b0; white-space:nowrap;
  animation: hintFade 1.4s ease forwards;
}
@keyframes hintFade{ 0%{opacity:0; transform:translateX(-50%) translateY(4px);} 15%{opacity:1; transform:translateX(-50%) translateY(0);} 80%{opacity:1;} 100%{opacity:0;} }
#storeHistory .tx-row{ background:rgba(10,25,10,0.3); border-radius:8px; padding:8px 10px; margin-bottom:6px; }
.redeem-cost{ text-align:center; font-size:14px; color:#fff; margin-top:10px; }
.redeem-cost b{ color:var(--acid); }

/* ---------- PROFILE ---------- */
.profile-card{ padding:14px; }
.profile-card-top{ display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.profile-avatar{
  width:52px; height:52px; border-radius:50%; flex-shrink:0;
  background: radial-gradient(circle at 35% 30%, #6a6f74, #232527 70%);
  padding:3px; box-shadow: 0 0 0 2px #0a0b0c, 0 0 10px rgba(166,255,30,0.4);
}
.profile-avatar img{ width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }
.profile-info{ flex:1; min-width:0; }
.profile-info .name{ font-weight:700; font-size:16px; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.level-tag{ font-size:11px; font-weight:700; color:#ffce33; margin-top:2px; letter-spacing:0.3px; }
.xp-bar-track{ height:8px; border-radius:6px; background:rgba(0,0,0,0.4); overflow:hidden; border:1px solid rgba(255,206,51,0.25); }
.xp-bar-fill{ height:100%; background: linear-gradient(90deg, #ffce33, #ffe9a8); box-shadow:0 0 8px rgba(255,206,51,0.6); transition: width 0.4s ease; }
.xp-bar-label{ font-size:10px; color:#a8c890; margin-top:5px; text-align:right; }

.stat-row{ display:flex; gap:10px; margin-top:14px; }
.stat-box{ flex:1; padding:12px 8px; text-align:center; }
.stat-box .v{ font-family:var(--font-display); font-size:20px; color:var(--acid); text-shadow:0 0 8px rgba(166,255,30,0.6); }
.stat-box .l{ font-size:9.5px; color:#a8c890; letter-spacing:1px; text-transform:uppercase; font-weight:700; margin-top:2px; }
.section-h{ margin:0 0 10px; font-size:10.5px; letter-spacing:2px; color:#a8d888; font-weight:700; text-transform:uppercase; }
.tx-row{ display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px solid rgba(166,255,30,0.12); font-size:12px; }
.tx-row:last-child{ border-bottom:none; }
.tx-row .type{ color:#c9e8ae; }
.tx-row .amt{ font-weight:700; }
.tx-row .amt.pos{ color:var(--acid); } .tx-row .amt.neg{ color:#a8c890; }
.tx-row .date{ font-size:10px; color:#6a8a50; }

/* ---------- LEADERBOARD ---------- */
.sub-note{ font-size:11px; color:#a8c890; margin-bottom:12px; }
.lb-row{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; margin-bottom:8px; }
.lb-row .rank{ font-family:var(--font-display); font-size:16px; width:26px; text-align:center; color:#a8d888; }
.lb-row.top1 .rank{ color:#ffd54a; } .lb-row.top2 .rank{ color:#d8dee6; } .lb-row.top3 .rank{ color:#d99a5c; }
.lb-row .lb-name{ flex:1; font-weight:700; font-size:13px; color:#fff; }
.lb-row .lb-level{ display:inline-block; margin-left:6px; font-size:9.5px; font-weight:700; color:#ffce33; background:rgba(255,206,51,0.15); border-radius:8px; padding:1px 6px; }
.lb-row .lb-won{ font-weight:700; font-size:13px; color:var(--acid); }
.lb-row.me{ border:1px solid rgba(166,255,30,0.5); }


/* ---------- INTRO (cutscene primo avvio: principale -> cammina) ---------- */
#view-intro{ padding:0; cursor:pointer; }
.intro-bg{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top;
  opacity:1; transition: opacity 0.55s ease;
}
.intro-vignette{
  position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 68%, rgba(0,0,0,0.8) 100%);
}
.intro-skip{
  position:absolute; top:16px; right:16px; z-index:3;
  background: rgba(10,10,14,0.5); border:1px solid rgba(166,255,30,0.35); border-radius:20px;
  color:#eae6f0; font-family:var(--font-body); font-weight:700; font-size:12px; letter-spacing:0.5px;
  padding:7px 14px; cursor:pointer;
}
.intro-skip:active{ transform: scale(0.94); }
.intro-hint{
  position:absolute; left:0; right:0; top:16px; z-index:3; text-align:center;
  font-family:var(--font-body); font-weight:700; font-size:11px; letter-spacing:1px; color:#eae6f0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
  animation: introHintPulse 1.8s ease-in-out infinite;
}
@keyframes introHintPulse{ 0%,100%{ opacity:0.55; } 50%{ opacity:1; } }

/* ---------- MR. CARL nel cutscene (mezzo busto, angolo basso-sinistra) ---------- */
.intro-mascot-wrap{
  position:absolute; left:-6%; bottom:0; width:56%; max-width:240px; height:44%;
  overflow:hidden; z-index:4; pointer-events:none;
}
.intro-mascot-img{
  position:absolute; left:0; bottom:-42%; width:100%; height:auto; display:block;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.65));
  animation: mascotBob 3.4s ease-in-out infinite;
}
@keyframes mascotBob{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-6px); } }

.intro-caption{
  position:absolute; right:14px; left:40%; bottom:9%; z-index:5;
  padding:10px 14px; font-size:12px; line-height:1.45; font-weight:600; color:#eae6f0;
  opacity:1; transition: opacity 0.5s ease;
}
/* cursore lampeggiante mentre la didascalia si scrive, tipo dialoghi di gioco */
.intro-caption.is-typing::after{
  content:"\2588"; display:inline-block; margin-left:2px; color:var(--acid);
  animation: caretBlink 0.8s steps(1) infinite;
}
@keyframes caretBlink{ 50%{ opacity:0; } }

/* ---------- SALA DEI PORTONI (home / mode-select) ---------- */
#view-home{ padding:0; }
.portal-scene{
  position:relative; width:100%; flex:1; min-height:0; border-radius:18px; overflow:hidden;
  margin-top:4px; margin-bottom:10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(166,255,30,0.18);
}
.portal-scene > img,
.portal-scene > video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 18%; display:block; }
/* schermo pieno per la home: niente riquadro, l'immagine riempie tutto */
.portal-scene-full{
  position:absolute; inset:0; width:100%; height:100%; flex:none;
  border-radius:0; margin:0; box-shadow:none;
}
.top-bar-float{
  position:absolute; top:16px; left:16px; right:16px; z-index:6; margin:0;
  display:flex; align-items:center; justify-content:space-between;
}
.dock-float{
  position:absolute; bottom:14px; z-index:6; display:flex; flex-direction:column; gap:12px;
}
.dock-float-left{ left:10px; }
.dock-float-right{ right:10px; }
.dock-float .dock-lb{ text-shadow: 0 1px 5px rgba(0,0,0,0.95), 0 0 8px rgba(0,0,0,0.9); }
.footnote-float{
  position:absolute; left:12px; right:12px; bottom:4px; z-index:6; margin:0; text-align:center;
}
.portal-hotspot{
  position:absolute; top:32%; height:31%; cursor:pointer;
  -webkit-tap-highlight-color: transparent;
}
/* alone ovale e sfumato invece del vecchio rettangolo col bordo netto --
   piu' piccolo, senza spigoli ne' bordo visibile, solo una nuvola di luce
   che si accende sotto l'arco quando lo tocchi */
.portal-glow{
  position:absolute; left:6%; right:6%; top:10%; bottom:10%; border-radius:50%; opacity:0; pointer-events:none;
  filter: blur(7px);
  background: radial-gradient(55% 55% at 50% 50%, rgba(180,90,255,0.55), rgba(120,40,200,0.22) 55%, transparent 80%);
  transition: opacity 0.18s ease;
}
.portal-hotspot.picked .portal-glow{ opacity:0.9; }
.portal-hotspot:active .portal-glow{ opacity:0.6; }

/* ---------- RICARICA (schermo pieno, card viola come nel tuo bozzetto) ---------- */
#view-topup{ padding:0; }
.topup-scene{ position:absolute; inset:0; width:100%; height:100%; overflow:hidden; }
.topup-scene > img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top; display:block; }
.lobby-head-float{
  position:absolute; top:16px; left:16px; right:16px; z-index:6; margin:0;
}
.lobby-head-float .back-btn{ background: rgba(8,10,8,0.55); }
.lobby-head-float h2{ text-shadow: 0 2px 8px rgba(0,0,0,0.9); }
/* posizione/dimensioni di questi elementi arrivano da
   assets/config/topup-layout.json (in percentuale) -- qui solo lo stile */
.topup-balance-float{ position:absolute; z-index:6; box-sizing:border-box; }
.topup-card-grid{ position:absolute; inset:0; z-index:6; pointer-events:none; }
.topup-card{
  /* le card viola sono gia' disegnate nell'immagine, stella compresa: qui
     NIENTE sfondo/bordo/stella nuova -- solo zona cliccabile. Il numero di
     stelle sta in basso, sotto la stella gia' disegnata; la conversione in
     ToxicCoin sta FUORI dalla card, in ".topup-card-label" sotto di essa */
  position:absolute; box-sizing:border-box; pointer-events:auto;
  background: transparent; border:none; border-radius:14px; padding:5px 4px 6px; text-align:center; cursor:pointer;
  color:#f5eeff; display:flex; flex-direction:column; gap:2px; align-items:center; justify-content:flex-end;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease;
}
.topup-card:active{ background: rgba(255,255,255,0.10); transform:scale(0.96); }
.topup-card .stars{ font-size:14px; font-weight:800; line-height:1.1; text-shadow: 0 2px 5px rgba(0,0,0,0.95), 0 0 9px rgba(0,0,0,0.9); }
.topup-card-more .stars{ font-size:13px; }
.topup-card-label{
  position:absolute; box-sizing:border-box; pointer-events:none; z-index:6;
  display:flex; align-items:center; justify-content:center; gap:2px;
  font-size:9.5px; color:#e6dcff; font-weight:700; line-height:1.1; white-space:nowrap;
  text-shadow: 0 2px 5px rgba(0,0,0,0.95), 0 0 9px rgba(0,0,0,0.9);
}
.topup-status-float{ position:absolute; left:14px; right:14px; bottom:2px; z-index:6; text-align:center; font-size:11px; }

/* ---------- CLASSIFICA / PROFILO -- "bacheca" col foglio appeso ---------- */
#view-profile{ padding:0; }
#view-leaderboard{ padding:0; }
.bacheca-scene{ position:absolute; inset:0; width:100%; height:100%; overflow:hidden; }
.bacheca-scene > img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top; display:block; }

/* posizione/dimensioni di questi elementi arrivano da
   assets/config/bacheca-layout.json (in percentuale) -- qui solo lo stile */
.bacheca-title-float{
  position:absolute; z-index:6; box-sizing:border-box;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-size:13.5px; letter-spacing:1.2px; font-weight:700;
  color:#3a2a10; text-shadow: 0 1px 0 rgba(255,235,180,0.5), 0 -1px 1px rgba(0,0,0,0.4);
}
.bacheca-avatar-float{
  position:absolute; z-index:6; border-radius:50%; overflow:hidden; box-sizing:border-box;
}
.bacheca-avatar-float img{ width:100%; height:100%; object-fit:cover; display:block; }

.bacheca-paper{
  position:absolute; z-index:6; box-sizing:border-box; overflow-y:auto;
  -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  padding:6px 10px; color:#3a2a1c; font-family:var(--font-body);
}
.bacheca-paper::-webkit-scrollbar{ width:0; height:0; }

.bp-sub-note{ font-size:11px; color:#6b5438; margin-bottom:8px; font-weight:700; }
.bp-name{ font-weight:800; font-size:17px; color:#2a1c10; text-align:center; }
.bp-level{ font-size:11px; color:#7a4a1c; text-align:center; font-weight:700; margin-bottom:8px; }
.bp-section-h{ margin:12px 0 6px; font-size:10px; letter-spacing:1.5px; color:#6b5438; font-weight:800; text-transform:uppercase; border-bottom:1px solid rgba(58,42,28,0.25); padding-bottom:4px; }
.bp-stat-row{ display:flex; gap:8px; margin-top:8px; }
.bp-stat{ flex:1; text-align:center; padding:6px 2px; border-left:1px solid rgba(58,42,28,0.2); }
.bp-stat:first-child{ border-left:none; }
.bp-stat .v{ font-family:var(--font-display); font-size:16px; color:#5a2a6b; }
.bp-stat .l{ font-size:8.5px; color:#6b5438; letter-spacing:0.5px; text-transform:uppercase; font-weight:700; margin-top:1px; }

/* le voci della classifica e i movimenti recenti, in stile "scritto a
   penna" sul foglio invece delle card verdi neon di prima */
.bacheca-paper .lb-row{
  display:flex; align-items:center; gap:8px; padding:7px 2px;
  border-bottom:1px solid rgba(58,42,28,0.18); border-radius:0; margin-bottom:0;
  background:none;
}
.bacheca-paper .lb-row:last-child{ border-bottom:none; }
.bacheca-paper .lb-row .rank{ font-family:var(--font-display); font-size:14px; width:22px; text-align:center; color:#6b5438; }
.bacheca-paper .lb-row.top1 .rank{ color:#a3781a; } .bacheca-paper .lb-row.top2 .rank{ color:#6a6a6a; } .bacheca-paper .lb-row.top3 .rank{ color:#8a5a2a; }
.bacheca-paper .lb-row .lb-name{ flex:1; font-weight:700; font-size:12.5px; color:#2a1c10; }
.bacheca-paper .lb-row .lb-level{ display:inline-block; margin-left:6px; font-size:9px; font-weight:700; color:#7a4a1c; background:rgba(122,74,28,0.12); border-radius:8px; padding:1px 6px; }
.bacheca-paper .lb-row .lb-won{ font-weight:800; font-size:12.5px; color:#5a2a6b; }
.bacheca-paper .lb-row.me{ background: rgba(90,42,107,0.08); border-radius:8px; }
.bacheca-paper .lb-avatar{
  width:24px; height:24px; border-radius:50%; flex-shrink:0; object-fit:cover;
  border:1px solid rgba(58,42,28,0.35);
}

.bacheca-paper .tx-row{ display:flex; justify-content:space-between; align-items:center; padding:6px 0; border-bottom:1px solid rgba(58,42,28,0.15); font-size:11.5px; }
.bacheca-paper .tx-row:last-child{ border-bottom:none; }
.bacheca-paper .tx-row .type{ color:#3a2a1c; }
.bacheca-paper .tx-row .date{ font-size:9.5px; color:#8a7355; }
.bacheca-paper .tx-row .amt{ font-weight:700; }
.bacheca-paper .tx-row .amt.pos{ color:#3a6b1c; } .bacheca-paper .tx-row .amt.neg{ color:#8a7355; }
.bacheca-paper .empty-state{ color:#8a7355; padding:20px 8px; font-size:12px; }
.bacheca-paper .xp-bar-track{ margin-top:2px; }

/* saldo dentro il riquadro verde acido gia' disegnato nell'immagine --
   niente sfondo/bordo nostro, ma il testo deve essere SCURO qui (il verde
   neon di --acid sparirebbe sopra un fondo dello stesso identico verde) */
.topup-balance-float{ background:none; border:none; box-shadow:none; padding:0; display:flex; flex-direction:row; align-items:center; justify-content:center; gap:6px; }
.topup-balance-float .balance-label{ display:none; }
.topup-balance-float .balance-value{
  font-size:17px; font-weight:800; line-height:1; display:flex; align-items:center; gap:5px;
  color:#0d1c06; text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.topup-balance-float .balance-value .coin-ico{ filter: drop-shadow(0 1px 1px rgba(255,255,255,0.4)); }

/* ---------- STANZE "IN ARRIVO" (Poker&Blackjack / Roulette / Gratta e Vinci) ---------- */
.room-scene{
  position:relative; width:100%; border-radius:18px; overflow:hidden; margin-bottom:14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(166,255,30,0.18);
}
.room-scene img,
.room-scene video{ width:100%; display:block; }

.room-mascot-wrap{
  position:absolute; left:-4%; bottom:0; width:38%; max-width:150px; height:48%;
  overflow:hidden; z-index:3; pointer-events:none;
}
.room-mascot-img{
  position:absolute; left:0; bottom:-36%; width:100%; height:auto; display:block;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.6));
}
.room-caption-plaque{
  position:absolute; right:3%; left:36%; bottom:4%; z-index:4;
  background-repeat:no-repeat; background-position:center; background-size:100% 100%;
  display:flex; align-items:center; justify-content:center; text-align:center;
  padding:6% 12%; box-sizing:border-box;
}
.room-caption-plaque span{
  font-size:10px; line-height:1.3; font-weight:700; color:#f3ecff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.85);
}
.room-soon-card{ padding:16px; text-align:center; }
.room-soon-title{
  font-family: var(--font-display); font-size:18px; color: var(--warn);
  text-shadow: 0 0 10px rgba(255,206,51,0.5); letter-spacing:1px; margin-bottom:6px;
}
.room-soon-text{ font-size:12.5px; color:#c9e8ae; line-height:1.5; }

/* Sala Slot Machines -- finche' non arriva una plaque disegnata come le
   altre 3, uso un fumetto semplice nello stesso punto */
.room-caption-plaque-fallback{
  position:absolute; right:3%; left:36%; bottom:4%; z-index:4;
  padding:8px 10px; text-align:center;
}
.room-caption-plaque-fallback span{
  font-size:11px; line-height:1.3; font-weight:700; color:#f3ecff;
}
.room-enter-btn{
  margin-top:10px; padding:10px 22px; border-radius:22px; border:none; cursor:pointer;
  background: linear-gradient(160deg, var(--acid), var(--acid-dim));
  color:#0a0710; font-family:var(--font-body); font-weight:800; font-size:13px; letter-spacing:0.5px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4), 0 0 16px rgba(166,255,30,0.35);
}
.room-enter-btn:active{ transform:scale(0.96); }

/* bottone "Gioca" della Sala Slot Machines -- fluttua sopra la scena
   animata, un po' sopra la meta' verticale, cosi' e' subito visibile e
   ovviamente cliccabile (niente a che fare con l'arco, quello resta
   invariato) */
.room-play-btn{
  position:absolute; left:50%; top:42%; transform:translate(-50%,-50%);
  z-index:5; padding:12px 36px; border-radius:24px; border:none; cursor:pointer;
  background: linear-gradient(160deg, var(--acid), var(--acid-dim));
  color:#0a0710; font-family:var(--font-body); font-weight:800; font-size:15px; letter-spacing:0.5px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5), 0 0 18px rgba(166,255,30,0.5);
  animation: roomPlayPulse 1.8s ease-in-out infinite;
}
.room-play-btn:active{ transform:translate(-50%,-50%) scale(0.94); }
@keyframes roomPlayPulse{
  0%, 100%{ box-shadow: 0 6px 16px rgba(0,0,0,0.5), 0 0 14px rgba(166,255,30,0.4); }
  50%{ box-shadow: 0 6px 16px rgba(0,0,0,0.5), 0 0 26px rgba(166,255,30,0.75); }
}
