:root {
  --ad-h: 0px; /* altezza banner AdMob nelle liste (0 = nessun banner) */
  --viola: #9c27b0;
  --viola-chiaro: #ba68c8;
  --blu: #0084ff;
  --blu-hover: #2196f3;
  --card-bg: rgba(20, 28, 46, 0.72);
  --testo: #e8e6f0;
  --testo-soft: #b9b6cc;
}

* { box-sizing: border-box; }

/* Dimensione base BLOCCATA: il layout (tutto in rem) non eredita più la dimensione
   carattere/display del telefono. Su alcuni dispositivi (es. "carattere grande" di
   sistema, tipico dei telefoni dei genitori) tutto si gonfiava e usciva dallo schermo.
   Così l'app rende uguale e proporzionata ovunque. */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { overflow-x: hidden; }

/* Long-press neutralizzato in tutta l'app: niente selezione testo, callout o
   menù "salva immagine". Una pressione prolungata si comporta come un tap normale.
   Eccezione: input/textarea, dove devi poter scrivere e incollare. */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
img { -webkit-user-drag: none; }
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

body {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--testo);
  margin: 0;
  padding: 24px 20px 96px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(1100px 760px at 12% 6%, rgba(124, 31, 162, 0.55), transparent 60%),
    radial-gradient(900px 700px at 92% 96%, rgba(20, 40, 90, 0.45), transparent 60%),
    linear-gradient(155deg, #3a1063 0%, #1c1240 45%, #0d1b2a 100%);
  background-attachment: fixed;
}
.container { max-width: 700px; width: 100%; }

/* ---------- HEADER / LOGO ---------- */
.header {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 0.35em;
  animation: appari 0.6s ease both;
}
.logo-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  object-fit: cover;
  filter: drop-shadow(0 0 10px rgba(160, 130, 255, 0.55));
}
.logo-title {
  font-weight: 800;
  font-size: 2.7rem;
  letter-spacing: 0.5px;
  background: linear-gradient(180deg, #ffffff 0%, #cdd4e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(150, 120, 255, 0.5));
}
.sottotitolo {
  text-align: center; color: var(--testo-soft);
  margin: 0 auto 1.8em; max-width: 460px; font-size: 0.98rem;
  animation: appari 0.6s ease 0.1s both;
}

/* ---------- INPUT ---------- */
.input-area {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 1.5em;
  position: relative;
  animation: appari 0.5s ease 0.18s both;
}
.input-area:focus-within { z-index: 60; }
#titoli-container {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  max-width: 300px; margin: 0 auto;
}
#titoli-container:not(:empty) { margin-bottom: 14px; }
.titolo-card { position: relative; width: 88px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.titolo-poster {
  width: 88px; height: 132px; border-radius: 10px; overflow: hidden;
  background: #2a2347; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
}
.titolo-poster img { width: 100%; height: 100%; object-fit: cover; }
.titolo-poster .no-poster { font-size: 1.6rem; opacity: 0.5; }
.titolo-nome {
  display: block; text-align: center; font-size: 0.74rem; color: var(--testo-soft);
  margin-top: 5px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.titolo-x {
  position: absolute; top: -7px; right: -7px; z-index: 3;
  width: 22px; height: 22px; padding: 0; border-radius: 50%;
  background: #d23a5e; color: #fff; font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.titolo-x:hover { background: #e0556f; }
.add-slot { position: relative; }
.add-clear {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 26px; height: 26px; padding: 0; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; font-size: 1.1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.add-clear:hover { background: rgba(255,255,255,0.22); }
.add-clear.hidden { display: none; }
.titolo-input.con-clear, #add-input { padding-right: 44px; }
.titolo-input {
  width: 100%; padding: 14px; font-size: 1rem; text-align: center;
  font-family: inherit; color: #fff;
  background: rgba(30, 42, 58, 0.6);
  border: 2px solid var(--viola);
  border-radius: 14px;
  box-shadow: 0 0 12px rgba(156, 39, 176, 0.3);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.titolo-input::placeholder { color: #8b88a0; }
.titolo-input:focus {
  border-color: var(--viola-chiaro);
  box-shadow: 0 0 18px rgba(186, 104, 200, 0.5);
}

/* ---------- PULSANTI ---------- */
button {
  font-family: inherit; color: #fff; border: none; cursor: pointer;
  padding: 12px 20px; border-radius: 12px; font-size: 1rem;
  background: var(--blu); transition: background 0.2s, box-shadow 0.2s;
}
button:hover { background: var(--blu-hover); }
#aggiungi-btn {
  background: transparent; border: 2px dashed #7e57c2; color: #c4b3e6;
}
#aggiungi-btn:hover { background: rgba(126, 87, 194, 0.15); }
#cerca-btn {
  display: block; margin: 0 auto;
  position: relative; z-index: 1;
  font-weight: 700; font-size: 1.05rem; padding: 15px 34px;
  border-radius: 26px;
  background: var(--blu);
  box-shadow: 0 0 20px rgba(0, 132, 255, 0.5);
  animation: appari 0.6s ease 0.26s both;
}
#cerca-btn:hover { background: var(--blu-hover); box-shadow: 0 0 26px rgba(33, 150, 243, 0.6); }
.hint { text-align: center; font-size: 0.8rem; color: var(--testo-soft); margin: 12px 0 0; }
#loader { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 1rem; color: var(--testo-soft); margin: 24px 0; }
#loader.hidden { display: none; }
.spinner {
  width: 20px; height: 20px; flex-shrink: 0;
  border: 3px solid rgba(156, 39, 176, 0.25);
  border-top-color: var(--viola-chiaro);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- RISULTATI ---------- */
.risultati-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; justify-content: center; }
.card {
  background: var(--card-bg);
  border: 1px solid rgba(156, 39, 176, 0.25);
  border-radius: 14px; overflow: hidden; width: 220px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.poster-wrap { position: relative; cursor: pointer; }
.card img { width: 100%; height: auto; display: block; }
.no-poster { height: 330px; background: #2a2440; display: flex; align-items: center; justify-content: center; color: var(--testo-soft); }
.card-content { padding: 12px; }
.card h3 { margin: 0 0 5px; font-size: 1.1rem; }
.card .anno { font-size: 0.8rem; color: var(--testo-soft); }
.card .card-meta { font-size: 0.8rem; color: var(--testo-soft); margin: 2px 0 8px; }
.card .spiegazione { font-size: 0.85rem; margin-top: 8px; color: #d6d3e6; }
.card .trama { font-size: 0.78rem; margin-top: 8px; color: var(--testo-soft); }
.card .card-generi { font-size: 0.78rem; color: var(--testo-soft); }
.card .card-generi.gen-inline { margin: 0 0 6px; }
.card .card-generi.gen-blocco { margin: 4px 0 8px; }
.pd-generi { font-size: 0.82rem; color: var(--testo-soft); margin: 2px 0 6px; }
.pd-generi:empty { display: none; }
.btn-trama { width: 100%; margin-top: 10px; padding: 8px; font-size: 0.85rem; background: rgba(124, 58, 162, 0.4); }
.btn-trama:hover { background: rgba(124, 58, 162, 0.65); }
.errore { background: #7f1d1d; color: #fecaca; padding: 12px; border-radius: 8px; margin-top: 15px; text-align: center; }

/* ---------- BADGE + SOTTOMENU POSTER ---------- */
.badge {
  position: absolute; top: 8px; right: 8px; font-size: 1.05rem;
  background: rgba(13, 20, 38, 0.85); border-radius: 50%; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
}
.badge:empty { display: none; }
.badge--visto { box-shadow: 0 0 0 2px #22c55e; }
.badge--watch { box-shadow: 0 0 0 2px var(--viola-chiaro); }
.poster-menu {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.poster-menu .pm-card {
  width: 100%; max-width: 320px;
  background: rgba(13, 18, 38, 0.98);
  border: 1px solid rgba(124, 58, 162, 0.55);
  border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.poster-menu button { font-size: 1rem; padding: 14px; width: 100%; background: rgba(124, 58, 162, 0.5); border-radius: 12px; }
.poster-menu button:hover { background: rgba(124, 58, 162, 0.8); }

/* ---------- AUTOCOMPLETAMENTO ---------- */
.suggerimenti {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #1b1635; border: 1px solid rgba(156, 39, 176, 0.4); border-radius: 12px;
  overflow: hidden; z-index: 20; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.suggerimento { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; }
.suggerimento:hover, .suggerimento.attivo { background: rgba(156, 39, 176, 0.22); }
.suggerimento img, .suggerimento .no-thumb { width: 36px; height: 54px; border-radius: 4px; flex-shrink: 0; object-fit: cover; }
.suggerimento img.thumb-person { width: 40px; height: 40px; border-radius: 50%; align-self: center; }
.suggerimento .no-thumb { display: flex; align-items: center; justify-content: center; background: #2a2440; font-size: 1.1rem; }
.suggerimento .no-thumb { background: #3a3458; }
.suggerimento .info { display: flex; flex-direction: column; min-width: 0; }
.suggerimento .titolo { font-size: 0.95rem; color: var(--testo); }
.suggerimento .meta { font-size: 0.75rem; color: var(--testo-soft); }

/* ---------- VISTA LISTE ---------- */
#lista-view {
  display: none;
  position: fixed; left: 0; right: 0; top: 0; bottom: 104px;
  overflow-y: auto; padding: 24px 20px; z-index: 80;
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(124, 31, 162, 0.4), transparent 60%),
    linear-gradient(160deg, #2e0f53 0%, #16112f 60%, #0d1b2a 100%);
}
#lista-view.aperto { display: block; }
#lista-titolo { text-align: center; }
#lista-vuoto { text-align: center; color: var(--testo-soft); max-width: 400px; margin: 40px auto; }

/* ---------- BARRA IN BASSO ---------- */
#bottom-nav {
  position: fixed; left: 0; right: 0; bottom: var(--ad-h, 0px); height: 70px;
  background: rgba(20, 18, 40, 0.96); border-top: 1px solid rgba(156, 39, 176, 0.3);
  display: flex; z-index: 60; backdrop-filter: blur(8px);
}
.nav-item {
  flex: 1; background: transparent; border-radius: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 1.2rem; color: var(--testo-soft); padding: 6px 2px; overflow: hidden;
}
.nav-item span { font-size: 0.6rem; line-height: 1.1; text-align: center; display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: rgba(156, 39, 176, 0.15); }
.nav-item.attivo { color: var(--viola-chiaro); }

.hidden { display: none; }

@keyframes comparsa {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes appari {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- LOCANDINA NEGLI INPUT ---------- */
.slot-thumb {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 45px; object-fit: cover; border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5); pointer-events: none;
}
.titolo-input.con-thumb { padding-left: 50px; text-align: left; }

/* ---------- VOTO TMDB SUL POSTER ---------- */
.voto {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(13, 20, 38, 0.85); color: #ffd451;
  font-size: 0.8rem; font-weight: 600; padding: 3px 9px; border-radius: 8px;
}

/* ---------- CARICA ALTRI ---------- */
#carica-altri {
  display: block; margin: 22px auto 0;
  background: transparent; border: 2px solid var(--blu); color: #cfe4ff;
  font-weight: 600; border-radius: 22px; padding: 12px 28px;
}
#carica-altri:hover { background: rgba(0, 132, 255, 0.15); }

/* ---------- SELETTORE TIPO (Misti / Film / Serie TV) ---------- */
#tipo-selettore {
  display: flex; width: fit-content; max-width: 100%;
  margin: 0 auto 16px;
  position: relative; z-index: 1;
  background: rgba(30, 42, 58, 0.6); border: 1px solid rgba(156, 39, 176, 0.4);
  border-radius: 22px; overflow: hidden;
}
.tipo-btn {
  flex: 1 1 auto; white-space: nowrap;
  background: transparent; border: none; border-radius: 0;
  padding: 10px 16px; font-size: 0.85rem; color: var(--testo-soft); transition: background 0.2s, color 0.2s;
}
.tipo-btn:hover { background: rgba(156, 39, 176, 0.15); }
.tipo-btn.attivo { background: var(--viola); color: #fff; }

/* ---------- DOVE SI GUARDA (logo piattaforma, cliccabile) ---------- */
.provider-box {
  position: absolute; bottom: 8px; right: 8px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
}
.provider {
  width: 38px; height: 38px; border-radius: 8px; overflow: hidden;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.55);
  display: block; cursor: pointer;
}
.jw-attr {
  font-size: 7px; line-height: 1.15; color: #fff; text-align: center;
  background: rgba(0,0,0,0.6); padding: 2px 5px; border-radius: 6px; letter-spacing: .2px;
}
.poster-wrap .provider img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ---------- TRAILER YOUTUBE ---------- */
.btn-trailer {
  display: block; text-align: center; text-decoration: none;
  margin-top: 8px; padding: 9px; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
  background: #c1121f; color: #fff;
  transition: background 0.2s;
}
.btn-trailer:hover { background: #e11d2a; }

/* ---------- RIGENERA (casi limite) ---------- */
#rigenera-wrap { text-align: center; margin-top: 24px; }
.rigenera-msg { color: var(--testo-soft); margin: 0 auto 12px; max-width: 420px; }
#rigenera-btn {
  background: transparent; border: 2px solid var(--viola-chiaro); color: var(--viola-chiaro);
  font-weight: 600; border-radius: 22px; padding: 12px 28px;
}
#rigenera-btn:hover { background: rgba(186, 104, 200, 0.15); }

/* ---------- PULSANTE DISABILITATO (durante la ricerca) ---------- */
button:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- IMPOSTAZIONI ---------- */
#impostazioni-view {
  display: none;
  position: fixed; left: 0; right: 0; top: 0; bottom: 104px;
  overflow-y: auto; padding: 24px 20px; z-index: 80;
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(124, 31, 162, 0.4), transparent 60%),
    linear-gradient(160deg, #2e0f53 0%, #16112f 60%, #0d1b2a 100%);
}
#impostazioni-view.aperto { display: block; }
#imp-titolo { text-align: center; margin-bottom: 24px; }
.imp-sez {
  max-width: 460px; margin: 0 auto 22px;
  background: var(--card-bg);
  border: 1px solid rgba(156, 39, 176, 0.25);
  border-radius: 14px; padding: 16px 18px;
}
.imp-sez h3 { margin: 0 0 6px; font-size: 1.05rem; }
.imp-desc { margin: 0 0 12px; font-size: 0.82rem; color: var(--testo-soft); }
.imp-stato { margin: 10px 0 0; font-size: 0.82rem; color: var(--testo-soft); }
.imp-stato.ok { color: #4ade80; }
.imp-azioni { display: flex; gap: 10px; flex-wrap: wrap; }
.imp-azioni button { flex: 1 1 auto; }
button.secondario {
  background: transparent; border: 2px solid var(--viola-chiaro); color: var(--viola-chiaro);
}
button.secondario:hover { background: rgba(186, 104, 200, 0.15); }

/* selettore lingua */
.lingua-griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lingua-btn {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  background: rgba(30, 42, 58, 0.6); border: 2px solid transparent;
  color: var(--testo); font-size: 0.95rem; padding: 12px;
}
.lingua-btn:hover { background: rgba(156, 39, 176, 0.18); }
.lingua-btn.attivo { border-color: var(--viola-chiaro); background: rgba(156, 39, 176, 0.28); }
.lingua-btn .bandiera { font-size: 1.2rem; }

/* input chiave */
#imp-chiave-input {
  width: 100%; padding: 12px 14px; font-size: 0.95rem; margin-bottom: 12px;
  font-family: inherit; color: #fff;
  background: rgba(30, 42, 58, 0.6);
  border: 2px solid var(--viola); border-radius: 12px;
  outline: none; transition: border-color 0.2s;
}
#imp-chiave-input:focus { border-color: var(--viola-chiaro); }
#imp-chiave-input::placeholder { color: #8b88a0; }

/* ---------- IMPOSTAZIONI: fisarmonica ---------- */
.imp-sez { padding: 0; overflow: hidden; }
.imp-head {
  width: 100%; background: transparent; border: none; border-radius: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; font-size: 1.05rem; font-weight: 600; color: var(--testo);
}
.imp-head:hover { background: rgba(156, 39, 176, 0.12); }
.imp-chevron { color: var(--viola-chiaro); font-size: 0.9rem; }
.imp-body { padding: 0 18px 18px; }
.imp-body.hidden { display: none; }

/* ---------- IMPOSTAZIONI: chiavi ---------- */
.chiave-riga { margin-bottom: 16px; }
.chiave-intest { display: flex; align-items: center; gap: 8px; }
.chiave-nome { font-weight: 600; }
.chiave-tua { color: #4ade80; font-weight: 700; }
.chiave-desc { margin: 4px 0 6px; }
.chiave-input {
  width: 100%; padding: 11px 13px; font-size: 0.9rem; margin-top: 4px;
  font-family: inherit; color: #fff;
  background: rgba(30, 42, 58, 0.6); border: 2px solid var(--viola); border-radius: 10px;
  outline: none; transition: border-color 0.2s;
}
.chiave-input:focus { border-color: var(--viola-chiaro); }
.chiave-input.chiave-ko { border-color: #e53935; }
.chiave-input::placeholder { color: #8b88a0; }
#imp-chiave-salva { width: 100%; margin-top: 4px; }

/* ---------- IMPOSTAZIONI: stato servizio (pallini) ---------- */
.stato-riga { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.stato-nome { flex: 1; }
.stato-label { font-size: 0.82rem; color: var(--testo-soft); }
.pallino { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.pallino.verde { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.7); }
.pallino.rosso { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
.pallino.grigio { background: #6b7280; }
#imp-stato-aggiorna { margin-top: 12px; }

/* ---------- IMPOSTAZIONI: disclaimer / informazioni ---------- */
.disc-tit { margin: 14px 0 4px; font-size: 0.95rem; color: var(--viola-chiaro); }
.tmdb-logo { display: block; width: 116px; height: auto; margin: 2px 0 6px; opacity: 0.9; }
.disc-loghi { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 6px 0 8px; }
.disc-loghi a { display: inline-flex; align-items: center; }
.disc-logo { height: 20px; width: auto; max-width: 120px; opacity: 0.82; transition: opacity .15s; }
.disc-loghi a:hover .disc-logo { opacity: 1; }

/* Badge dorato Early Adopter */
.ea-badge {
  display: block; margin: 6px auto 0; max-width: 320px; padding: 10px 16px;
  border-radius: 999px; text-align: center; font-weight: 800; letter-spacing: .5px;
  color: #3a2a00;
  background: linear-gradient(135deg, #ffe9a8, #f5c518 42%, #d4a017 72%, #ffe9a8);
  box-shadow: 0 2px 12px rgba(245, 197, 24, .35), inset 0 1px 0 rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .45);
}
.ea-badge-home {
  display: block; width: fit-content; max-width: 90%; margin: 8px auto 0;
  padding: 3px 14px; border-radius: 999px; text-align: center; white-space: nowrap;
  font-size: .68rem; font-weight: 800; letter-spacing: .3px;
  color: #3a2a00;
  background: linear-gradient(135deg, #ffe9a8, #f5c518 45%, #d4a017 75%, #ffe9a8);
  box-shadow: 0 1px 6px rgba(245, 197, 24, .4);
}
.ea-badge.hidden, .ea-badge-home.hidden { display: none; }
#imp-ea-form { display: flex; flex-direction: column; gap: 8px; }
#imp-ea-riscatta { align-self: flex-start; }
.disc-app-tit, .disc-tit:first-of-type { margin-top: 0; }
.disc-usi { margin: 6px 0 10px; padding-left: 18px; }
.disc-usi li { font-size: 0.82rem; color: var(--testo-soft); margin-bottom: 6px; line-height: 1.45; }
.disc-usi li strong { color: var(--testo); }
.disc-meta { margin-top: 16px; font-size: 0.76rem; color: var(--testo-soft); }

/* ---------- VERSIONE IN HOME ---------- */
.versione-home {
  font-size: 0.7rem; color: var(--testo-soft); font-weight: 500;
  align-self: flex-start; margin-left: 6px; margin-top: 6px; opacity: 0.7;
}

/* ---------- CHANGELOG ---------- */
.cl-voce { margin-bottom: 12px; }
.cl-ver {
  display: inline-block; font-weight: 700; font-size: 0.78rem;
  color: var(--viola-chiaro); background: rgba(156, 39, 176, 0.18);
  padding: 1px 8px; border-radius: 10px; margin-bottom: 6px;
}
.cl-lista { margin: 4px 0 0; padding-left: 18px; }
.cl-lista li { font-size: 0.82rem; color: var(--testo-soft); margin-bottom: 4px; line-height: 1.4; }

/* nota in evidenza nel disclaimer */
.disc-nota {
  margin-top: 4px; padding: 8px 10px; border-radius: 8px;
  background: rgba(156, 39, 176, 0.12); border-left: 3px solid var(--viola-chiaro);
}

/* ---------- AIUTO: come ottenere la chiave ---------- */
.chiave-aiuto-tgl {
  background: transparent; border: none; color: var(--viola-chiaro);
  font-size: 0.78rem; padding: 6px 0 2px; cursor: pointer; text-align: left;
}
.chiave-aiuto-tgl:hover { text-decoration: underline; }
.chiave-aiuto {
  display: flex; flex-direction: column; gap: 7px;
  margin: 2px 0 4px; padding-left: 12px;
  border-left: 2px solid rgba(156, 39, 176, 0.4);
}
.chiave-aiuto.hidden { display: none; }
.chiave-link { color: #5aa9ff; font-size: 0.82rem; text-decoration: none; }
.chiave-link:hover { text-decoration: underline; }

/* ---------- CONDIVIDI ---------- */
#condividi-btn {
  display: block; margin: 0 auto 14px; padding: 10px 22px;
  background: rgba(156,39,176,0.18); color: var(--viola-chiaro);
  border: 1px solid rgba(156,39,176,0.5); border-radius: 12px; font-size: 0.9rem; font-weight: 600;
}
#condividi-btn:hover { background: rgba(156,39,176,0.3); }

/* ---------- TOAST ---------- */
#toast {
  position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%) translateY(20px);
  background: #2a2347; color: #fff; padding: 10px 18px; border-radius: 24px;
  font-size: 0.85rem; box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 200;
}
#toast.mostra { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- POLLICE SU/GIÙ ---------- */
.voti-utente { display: flex; gap: 8px; margin-top: 10px; }
.voto-btn {
  flex: 1; padding: 6px 0; font-size: 1rem; border-radius: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  opacity: 0.6; transition: opacity .15s, background .15s;
}
.voto-btn:hover { opacity: 1; }
.voto-su.attivo { opacity: 1; background: rgba(76,175,80,0.25); border-color: #4caf50; }
.voto-giu.attivo { opacity: 1; background: rgba(210,58,94,0.25); border-color: #d23a5e; }

/* ---------- PROVA CON QUESTI ---------- */
#prova-wrap { margin-top: 10px; }
.prova-titolo {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 6px 0; background: transparent; border: none; cursor: pointer;
  text-align: center; color: var(--testo-soft); font-size: 0.9rem;
}
.prova-titolo:hover { color: var(--testo); }
.prova-chev { font-size: 0.8rem; opacity: 0.8; }
.prova-body.hidden { display: none; }
.prova-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
.prova-item { width: 92px; text-align: center; }
.prova-poster { position: relative; cursor: pointer; }
.prova-poster img {
  width: 92px; height: 138px; object-fit: cover; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4); transition: transform .15s; display: block;
}
.prova-poster:hover img { transform: scale(1.04); }
.prova-poster .voto { bottom: 6px; left: 6px; font-size: 0.7rem; padding: 2px 6px; }
.prova-tit {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; margin-top: 5px; padding: 0; background: transparent; border: none; cursor: pointer;
  color: var(--testo-soft); font-size: 0.72rem; line-height: 1.2;
}
.prova-tit-nome { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prova-tit:hover { color: var(--testo); }
.prova-tit .prova-chev { flex-shrink: 0; }
.prova-scheda {
  margin-top: 6px; padding: 8px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.72rem; line-height: 1.35; color: #d6d3e6; text-align: left;
}
.prova-scheda.hidden { display: none; }
.prova-scheda-meta { color: #ffd451; font-weight: 600; margin-bottom: 4px; }

/* ---------- CONDIVIDI per scheda ---------- */
.btn-condividi {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; margin-top: 10px; padding: 8px 0;
  background: rgba(156,39,176,0.15); color: var(--viola-chiaro);
  border: 1px solid rgba(156,39,176,0.4); border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.btn-condividi svg { flex-shrink: 0; }
.btn-condividi:hover { background: rgba(156,39,176,0.28); }

/* ---------- "Prova altri" ---------- */
.prova-altri {
  display: block; margin: 14px auto 0; padding: 8px 18px;
  background: transparent; color: var(--testo-soft);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 20px;
  font-size: 0.82rem; cursor: pointer;
}
.prova-altri:hover { background: rgba(255,255,255,0.08); color: var(--testo); }
#prova-wrap { margin-top: 10px; }

/* posizione finale del blocco "Prova con questi" (sopra il bottone Trova) */
#prova-wrap { margin: 6px 0 18px; }

/* "Prova con questi" usa lo stile delle sezioni impostazioni: niente margine extra sul wrapper */
#prova-wrap { margin: 0; }
#prova-wrap .imp-sez { margin: 4px auto 16px; }

/* "Prova con questi": intestazione centrata + griglia sempre 4 per riga (4+4) */
#prova-wrap .imp-head { justify-content: center; gap: 8px; }
.prova-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: start; }
.prova-item { width: auto; }
.prova-poster img { width: 100%; height: auto; aspect-ratio: 2 / 3; }

/* ---------- ESPLORA ---------- */
#esplora-view {
  display: none;
  position: fixed; left: 0; right: 0; top: 0; bottom: 104px;
  overflow-y: auto; padding: 24px 20px; z-index: 80;
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(124, 31, 162, 0.4), transparent 60%),
    linear-gradient(160deg, #2e0f53 0%, #16112f 60%, #0d1b2a 100%);
}
#esplora-view.aperto { display: block; }
#esp-titolo { text-align: center; margin: 0 0 16px; }
.esp-seg {
  display: flex; gap: 6px; background: #16102e; border-radius: 12px; padding: 4px;
  max-width: 360px; margin: 0 auto 14px;
}
.esp-seg button {
  flex: 1; padding: 8px 0; border: none; border-radius: 9px; background: transparent;
  color: var(--testo-soft); font-size: 0.85rem; cursor: pointer;
}
.esp-seg button.attivo { background: #3c2f6b; color: #fff; font-weight: 600; }
.esp-ord { max-width: 360px; margin: 4px auto 16px; }
.esp-trova {
  display: block; width: 100%; max-width: 360px; margin: 4px auto 22px; padding: 13px 0;
  background: var(--viola); color: #fff; border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
}
.esp-trova:hover { background: #b32fc9; }
.esp-trova:disabled { opacity: 0.6; cursor: default; }
#esp-msg { text-align: center; color: var(--testo-soft); margin: 20px auto; max-width: 400px; }
#esplora-view .imp-sez {
  max-width: 360px; margin: 0 auto 8px; overflow: visible;
  background: rgba(20, 28, 46, 0.55); border: 1px solid rgba(156, 39, 176, 0.18); border-radius: 12px;
}
.esp-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.esp-chip {
  font-size: 0.78rem; padding: 6px 12px; border-radius: 20px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,255,255,0.16); color: var(--testo-soft);
}
.esp-chip.attivo { background: #ffd451; color: #3a2c00; border-color: #ffd451; font-weight: 600; }
.esp-eo { max-width: 160px; margin: 12px 0 0; }
.esp-hint { font-size: 0.72rem; color: var(--viola-chiaro); margin: 8px 0 0; }
.esp-persona { position: relative; z-index: 5; }
.esp-search { position: relative; }
.esp-search input {
  width: 100%; padding: 9px 12px; border-radius: 9px;
  background: #0d0a1f; border: 1px solid rgba(255,255,255,0.12); color: var(--testo); font-size: 0.85rem;
}
.esp-dd {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
  background: #1a1535; border: 1px solid rgba(156,39,176,0.3); border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.esp-dd.hidden { display: none; }
.esp-dd-voce { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; }
.esp-dd-voce:hover { background: rgba(156,39,176,0.18); }
.esp-dd-voce img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.esp-dd-voce span:last-child { font-size: 0.85rem; }
.esp-pph {
  width: 34px; height: 34px; border-radius: 50%; background: #2a2440;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem;
}
.esp-pchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.esp-pchip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px 4px 4px;
  background: #3c2f6b; color: #fff; border-radius: 22px; font-size: 0.8rem;
}
.esp-pchip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.esp-pchip .esp-pph { width: 28px; height: 28px; font-size: 0.85rem; }
.esp-px { background: transparent; border: none; color: #d7cdf2; font-size: 1rem; cursor: pointer; padding: 0 2px; }

/* "Prova con questi": locandine uniformi + scheda a tutta larghezza sotto la riga */
.prova-poster img { object-fit: cover; }
.prova-tit-nome { min-height: 2.1em; }
.prova-tit .prova-chev { color: var(--viola-chiaro); }
.prova-dettaglio {
  grid-column: 1 / -1;
  margin: 2px 0 6px; padding: 12px 14px; border-radius: 10px;
  background: rgba(13, 10, 31, 0.6); border: 1px solid rgba(156, 39, 176, 0.25);
  font-size: 0.82rem; line-height: 1.4; color: #d6d3e6; text-align: left;
}
.prova-dettaglio .pd-meta { color: #ffd451; font-weight: 600; margin-bottom: 6px; }

/* voto/trama a scomparsa sulle chip della sezione Suggerimenti */
.titolo-poster { position: relative; }
.titolo-card.cliccabile .titolo-poster, .titolo-card.cliccabile .titolo-nome { cursor: pointer; }
.titolo-poster.cliccabile { cursor: pointer; }
.titolo-voto {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(13, 20, 38, 0.85); color: #ffd451; font-size: 0.68rem; font-weight: 600;
  padding: 2px 6px; border-radius: 7px;
}
.titolo-dettaglio {
  max-width: 360px; margin: 0 auto 14px; padding: 12px 14px; border-radius: 10px;
  background: rgba(13, 10, 31, 0.6); border: 1px solid rgba(156, 39, 176, 0.25);
  font-size: 0.82rem; line-height: 1.4; color: #d6d3e6; text-align: left;
}
.titolo-dettaglio .td-meta { color: #ffd451; font-weight: 600; margin-bottom: 6px; }

/* freccina cliccabile sulle chip di Suggerimenti */
.titolo-chev { font-size: 0.7rem; opacity: 0.85; color: var(--viola-chiaro); }

/* pulsante "Trova altri" in Esplora */
.esp-altri {
  display: block; margin: 4px auto 24px; padding: 11px 22px; border-radius: 11px;
  background: transparent; border: 1px solid var(--viola); color: var(--viola-chiaro);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.esp-altri:hover { background: rgba(156, 39, 176, 0.14); }
.esp-altri.hidden { display: none; }
.esp-altri:disabled { opacity: 0.6; cursor: default; }

/* range voto (Da / A) */
.esp-range { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; }
.esp-range-row { display: flex; align-items: center; gap: 10px; }
.esp-range-lab { width: 28px; font-size: 0.85rem; color: var(--testo-soft); }
.esp-range-row input[type="range"] { flex: 1; accent-color: var(--viola); }
.esp-range-val { width: 34px; text-align: right; font-weight: 600; font-size: 0.9rem; }

/* tab "Ordina per" */
.esp-ordina { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0 16px; }
.esp-ordina.hidden { display: none; }
.esp-ordina-lab { font-size: 0.9rem; color: var(--testo-soft); }
.esp-ordina-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.esp-ordina button {
  padding: 9px 20px; border-radius: 999px; border: 1px solid var(--bordo);
  background: transparent; color: var(--testo); font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.esp-ordina button.attivo { background: var(--viola); border-color: var(--viola); color: #fff; }

/* ---------- LISTE: barra strumenti (ricerca + import) ---------- */
.lista-toolbar { display: flex; gap: 8px; align-items: center; margin: 0 auto 10px; max-width: 640px; }
.lista-add-wrap { position: relative; flex: 1; min-width: 0; }
.lista-add-wrap .titolo-input { width: 100%; }
.lista-import-btn {
  display: block; margin: 0 auto 14px;
  white-space: nowrap; padding: 10px 18px; border-radius: 11px;
  border: 1px solid var(--viola); background: transparent; color: var(--viola-chiaro);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.lista-import-btn:hover { background: rgba(156, 39, 176, 0.14); }
#lista-import-msg { font-size: 0.85rem; color: var(--testo-soft); margin: 0 auto 10px; max-width: 640px; text-align: center; }
#lista-import-msg.hidden { display: none; }
#lista-grid { max-width: 640px; margin: 0 auto; }

/* ---------- LISTE: griglia compatta orizzontale ---------- */
.lista-grid-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px; align-items: start; }
.card-mini { display: flex; flex-direction: column; }
.mini-poster { position: relative; cursor: pointer; border-radius: 10px; overflow: hidden; aspect-ratio: 2 / 3; background: #2a2440; }
.mini-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-poster .no-poster { height: 100%; font-size: 1.4rem; }
.mini-poster .voto { bottom: 6px; left: 6px; font-size: 0.72rem; padding: 2px 7px; }
.mini-poster .provider-box { bottom: 6px; right: 6px; }
.mini-poster .provider { width: 30px; height: 30px; }
.mini-poster .provider img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-bar { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 6px; padding: 0; background: none; border: none; color: var(--testo); cursor: pointer; text-align: left; }
.mini-tit { flex: 1; min-width: 0; font-size: 0.8rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mini-chev { color: var(--testo-soft); font-size: 0.8rem; }
.mini-trama { font-size: 0.78rem; color: var(--testo-soft); margin-top: 5px; max-height: 170px; overflow: auto; line-height: 1.35; }
.mini-trama.hidden { display: none; }

/* ---------- VOTO: barra unica a due maniglie ---------- */
.esp-dual { position: relative; height: 30px; margin-top: 4px; }
.esp-dual-bar { position: absolute; top: 13px; left: 8px; right: 8px; height: 4px; background: var(--bordo); border-radius: 2px; }
.esp-dual-fill { position: absolute; top: 0; bottom: 0; background: var(--viola); border-radius: 2px; }
.esp-dual-in {
  position: absolute; top: 0; left: 0; width: 100%; height: 30px; margin: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.esp-dual-in::-webkit-slider-runnable-track { background: none; border: none; }
.esp-dual-in::-moz-range-track { background: none; border: none; }
.esp-dual-in::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 20px; height: 20px; border-radius: 50%; background: var(--viola-chiaro);
  border: 2px solid #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.5); margin-top: 0;
}
.esp-dual-in::-moz-range-thumb {
  pointer-events: auto; width: 20px; height: 20px; border-radius: 50%;
  background: var(--viola-chiaro); border: 2px solid #fff; cursor: pointer;
}
.esp-dual-val { text-align: center; font-weight: 700; font-size: 1rem; margin-top: 6px; }

/* ---------- IMPORT: modale istruzioni ---------- */
.import-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.import-modal {
  background: var(--card, #1b1730); border: 1px solid rgba(156,39,176,0.4);
  border-radius: 16px; padding: 20px; max-width: 420px; width: 100%;
}
.import-modal h3 { margin: 0 0 12px; font-size: 1.1rem; }
.import-passi { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; line-height: 1.4; color: var(--testo-soft); }
.import-azioni { display: flex; justify-content: flex-end; gap: 10px; }
.import-azioni button { padding: 10px 18px; border-radius: 11px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: 1px solid var(--bordo); }
.import-annulla { background: transparent; color: var(--testo-soft); }
.import-scegli { background: var(--viola); border-color: var(--viola); color: #fff; }

/* provider "dove guardare" sui poster compatti delle liste */
.prova-poster .provider { width: 28px; height: 28px; }
.prova-poster .provider img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prova-poster .provider-box { bottom: 6px; right: 6px; }

/* sottotitoli dei blocchi info (Suggerimenti / Esplora / Liste) */
.disc-sub { margin: 16px 0 6px; font-size: 1rem; color: var(--viola-chiaro); font-weight: 700; }

/* ---------- LISTE: controlli filtro tipo + ordina ---------- */
.lista-controlli { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto 14px; }
.lista-controlli.hidden { display: none; }
#lista-tipo { width: fit-content; max-width: 100%; }
#lista-ordina { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#lista-ordina button {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--bordo);
  background: transparent; color: var(--testo); font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
#lista-ordina button.attivo { background: var(--viola); border-color: var(--viola); color: #fff; }

/* interruttore crescente/decrescente nelle liste */
.lista-dir {
  padding: 7px 14px; border-radius: 999px; border: 1px dashed var(--viola);
  background: transparent; color: var(--viola-chiaro); font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.lista-dir:hover { background: rgba(156, 39, 176, 0.14); }

/* ---------- FIX poster "senza locandina" nelle griglie (stessa misura dei poster) ---------- */
.prova-poster .no-poster {
  width: 100%; height: auto; aspect-ratio: 2 / 3; border-radius: 10px;
  font-size: 0.72rem; text-align: center; padding: 6px; line-height: 1.2;
}

/* ---------- SAFE-AREA: contenuto a filo schermo su telefoni con notch/angoli ---------- */
body {
  padding:
    calc(24px + env(safe-area-inset-top))
    calc(20px + env(safe-area-inset-right))
    calc(96px + env(safe-area-inset-bottom))
    calc(20px + env(safe-area-inset-left));
}
#lista-view, #esplora-view, #impostazioni-view {
  bottom: calc(70px + env(safe-area-inset-bottom) + var(--ad-h, 0px));
  padding-top: calc(24px + env(safe-area-inset-top));
  padding-left: calc(20px + env(safe-area-inset-left));
  padding-right: calc(20px + env(safe-area-inset-right));
}
#bottom-nav {
  height: calc(70px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- POSTER SEMPRE IDENTICI: rapporto 2:3 sul contenitore ---------- */
.prova-poster { aspect-ratio: 2 / 3; overflow: hidden; border-radius: 10px; }
.prova-poster img { width: 100%; height: 100%; }
.prova-poster .no-poster { width: 100%; height: 100%; aspect-ratio: auto; }

/* ---------- "Dove guardare" sotto la trama (solo Watchlist) ---------- */
.pd-dove { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pd-dove:empty { display: none; }
.pd-dove-lab { color: var(--testo-soft); font-size: 0.8rem; }
.pd-dove-link { display: inline-flex; align-items: center; gap: 6px; color: var(--testo); text-decoration: none; font-size: 0.82rem; font-weight: 600; }
.pd-dove-link img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; background: #fff; }
.pd-dove-attr { font-size: 0.62rem; color: var(--testo-soft); opacity: 0.85; }
.pd-dove-vuoto { font-size: 0.8rem; color: var(--testo-soft); font-style: italic; }

/* ---------- FIX: colonne uguali = poster uniformi ---------- */
.prova-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prova-item { min-width: 0; }
.prova-poster img { min-width: 0; max-width: 100%; }

/* ---------- FIX poster (rinforzo): titoli lunghi non allargano le colonne ---------- */
.prova-tit { min-width: 0; max-width: 100%; }
.prova-tit-nome { min-width: 0; overflow-wrap: anywhere; }

/* ===== Barra quota (contatori + bannerino annuncio) sopra la nav ===== */
#quota-bar {
  position: fixed; left: 0; right: 0; bottom: calc(70px + env(safe-area-inset-bottom) + var(--ad-h, 0px)); z-index: 90;
  height: 34px; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 12px;
  background: rgba(20, 18, 40, 0.96); border-top: 1px solid rgba(156, 39, 176, 0.22);
  font-size: 0.78rem; color: var(--testo-soft);
}
#quota-bar .quota-conta { white-space: nowrap; }
#quota-bar .quota-conta b { color: #fff; }
#quota-bar .quota-ad {
  flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: none; cursor: pointer; border-radius: 999px; padding: 5px 12px;
  font-size: 0.74rem; font-weight: bold; color: #fff;
  background: linear-gradient(135deg, #9c27b0, #5b2a9c);
}
#quota-bar .quota-ad:disabled { opacity: 0.6; }

/* ===== Bannerino annuncio nelle liste (full-width, cliccabile → rewarded) ===== */
.lista-ad {
  grid-column: 1 / -1;
  width: 100%; cursor: pointer; text-align: center;
  border: 1px dashed rgba(156, 39, 176, 0.55); border-radius: 12px;
  padding: 18px 12px; margin: 4px 0;
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.18), rgba(91, 42, 156, 0.12));
  color: #fff; font-size: 0.9rem; font-weight: bold; line-height: 1.3;
}
.lista-ad:disabled { opacity: 0.6; }

/* ===== Messaggino mostrato prima del video rewarded ===== */
.pre-video {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8, 6, 18, 0.85); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 28px;
}
.pre-video-box {
  max-width: 320px; text-align: center; white-space: pre-line;
  background: linear-gradient(160deg, #241048, #15101f);
  border: 1px solid rgba(156, 39, 176, 0.4); border-radius: 16px;
  padding: 22px 20px; color: #fff; font-size: 0.98rem; line-height: 1.45;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ===== "Grazie" sopra i risultati dopo il video (sparisce dopo 2s) ===== */
#grazie-toast {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%) translateY(-12px);
  background: linear-gradient(135deg, #9c27b0, #5b2a9c); color: #fff;
  padding: 10px 20px; border-radius: 24px; font-size: 0.92rem; font-weight: bold;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 310;
}
#grazie-toast.mostra { opacity: 1; transform: translateX(-50%) translateY(0); }

.esp-opzioni { max-width: 380px; margin: 12px auto 0; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.esp-tog { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; cursor: pointer; user-select: none; }
.esp-tog input { width: 17px; height: 17px; accent-color: #7c3aed; cursor: pointer; flex: 0 0 auto; }
.esp-sel-lab { margin: 0 0 6px; font-size: 0.8rem; color: var(--testo-soft); line-height: 1.4; }
.esp-sel-seg { width: 100%; }
