/* Variabili di configurazione */
:root {
    --color-background: white; /* Sfondo principale */

    --color-border: #c29e7d; /* Colore del bordo */
    --color-shadow: rgba(0,0,0,0.2); /* Colore dell'ombra */
    --color-overlay: rgba(0,0,0,0.75); /* Colore dell'overlay */
    --font-family-title: 'Dante', serif; /* Font per i titoli */
    --font-family-description: 'IMFellEnglish', serif; /* Font per le descrizioni */
	--font-family-numeri-carte: 'Cinzel', serif;
	--font-family-testo-carte: 'IM Fell English', serif;
	--color-text: #000000;
	--color-success: #07bc0c;
	--color-error: #e74c3c;
    --background-image: url('./img/sfondo.webp'); 
	--color-fame: #d43d3c;
    --color-sete: #64B5F6; 
    --color-stanchezza: #e9b647; 
    --color-soldi: #FFD54F; 
	--color-hp:#E57373; 
	--color-fz:#FFD54F;
	--color-pt:#FFD54F;
	--color-fortuna:#81C784;
    --stat-icon-size: 25px; /* Dimensione delle icone delle statistiche */

}





@font-face {
  font-family: 'Cinzel';
  src: url('./font/Cinzel-VariableFont_wght.ttf') format('truetype');
}

@font-face {
  font-family: 'IMFellEnglish';
  src: url('./font/IMFellEnglish-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Dante';
  src: url('./font/Dante.ttf') format('truetype');
}



body, html {
    margin: 0;
    overflow: hidden;
    padding: 0;
    font-family: var(--font-family-description);
	    background: black;
}
.stat-image {
    text-align: center;
    margin-bottom: 10px;
}

.stat-image img {
    width: 100px; /* o dimensione che preferisci */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

div#selezioneCantica {
    position: absolute;
    z-index: 1;
}
.contenitore-inventario-retro {
    z-index: 2;
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: auto; /* IMPORTANTE: serve per far passare gli eventi qui */
}

.panel-dashboard {
    position: absolute;
    top: 0%;
    left: 50%;
    transform: translateX(-50%);
 /*    width: min(90%, 520px); */
    padding: 0.4rem 2rem;
    background: radial-gradient(ellipse at center, #fdf4db 0%, #f4e2b7 100%);
    border: 4px solid #8b5a33;
    border-radius: 16px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
    font-family: 'IM Fell English', serif;
    color: #2b1a0f;
    z-index: 10;
}


.decor-separator {
  width: 100%;
  height: 50px;
  background: url('./img/ui/ramo.png') center center no-repeat;
  background-size: contain;
  margin: 1.4rem 0;
  opacity: 0.9;
}


.nome-giocatore {
  font-size: 1.2em;
  text-align: center;
  margin-bottom: 1rem;
}

.riga-info {
  display: flex;
  justify-content: space-between;
  font-size: 1em;
  margin: 0.2rem 0;
  align-items: center;
}

.icona-info {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
}

.panel-dashboard .cardstat {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;

}

.panel-dashboard .cardstat h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.5em;
  color: #4e2b13;
  text-align: center;
  margin-bottom: 0.6rem;
}

.cardstat p, .cardstat div {
font-size: 1.2em;
  line-height: 1.2;
  margin: 0.1rem 0;
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.progress-bar-container {
  height: 6px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffe14d, #f3b72b);
  transition: width 0.4s ease-in-out;
}

.info-riga {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.3rem 0;
  gap: 0.5rem;
}

.info-label {
  flex: 1;
  font-size: 0.9em;
  color: #432d16;
}

.info-valore {
  font-weight: bold;
  color: #2b1a0f;
  font-size: 0.9em;
  text-align: right;
  min-width: 50px;
}

.icona-info {
  width: 18px;
  height: 18px;
  margin-right: 0.3rem;
}

.section {
  margin-bottom: 1.2rem;
}


.info-row-horizontal {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.info-row-horizontal .mini-info {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  font-size: 0.85em;
  justify-content: center;
  white-space: nowrap;
}


.mini-info span {
  font-weight: normal;
  color: #3a2b1a;
}

.mini-info img {
  height: 5vh;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.4rem 0.8rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.stats-grid .mini-info {
  font-size: 0.85em;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats-grid .mini-info span {
  color: #3a2b1a;
}


div#selezioneMinion {
    position: absolute;
    height: 100%;
    display: flex;
    width: 100%;
    /* top: 14%; */
    background-color: black;
    z-index: 1;
    justify-content: flex-start;

}

#benvenutoRow {
    position: absolute;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3em;
    font-weight: bold;
    color: #312100;
	width: 80%;
    text-shadow: 0 0 4px #fffad2, 0 0 1px #f8e39a;
    z-index: 11;
    pointer-events: none;
}
#statsRow {
    position: absolute;
    top: 10%;
	width: 80%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3em;
    font-weight: bold;
    color: #312100;
    text-shadow: 0 0 4px #fffad2, 0 0 1px #f8e39a;
    z-index: 11;
    pointer-events: none;
}

#statsRow{
    position: absolute;
    top: 7%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5em 1em;
    border-radius: 4px;
}

#statoRow {
    position: absolute;
    top: 40%;
	width: 80%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3em;
    font-weight: bold;
    color: #312100;
    text-shadow: 0 0 4px #fffad2, 0 0 1px #f8e39a;
    z-index: 11;
    pointer-events: none;
}

#portaleMenu{
width: 22%;
    height: auto;
    left: 50%;
    top: 60%;
    transform: translate(-50%, -50%);
    position: absolute;
    pointer-events: auto;
    opacity: 1;
    z-index: 2;
    cursor: pointer;
    transition: opacity 1s ease-out, transform 1s ease-out;
    filter: none;
}


.game-state-container {
    display: flex
;
    flex-direction: column;
    gap: 20px;
    position: absolute;
    z-index: 1;
}

.player-companion {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}


.companion-img {
    display: block;
    width: 100px;
    height: 100px;
    margin: 10px auto;
    border-radius: 8px;
}
/* Contenitore delle statistiche */
.stat-box {
    background: var(--color-overlay);
    border: 4px solid var(--color-border);
    box-shadow: 0 0 12px var(--color-shadow);
    /* padding: 20px; */
    /* margin: 20px auto; */
    width: 100%;
    /* max-width: 400px; */
    font-family: var(--font-family-description);
    color: white;
    text-align: left;

    line-height: 1.5;
    font-size: 1.5vh;
}

.stat-box2 {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}



.stat-box2:hover {
    transform: scale(1.2);

    z-index: 10;
}

.carta-bloccata {
    filter: grayscale(100%) brightness(60%);
    cursor: not-allowed;
}

.carta-bloccata:hover {
    transform: none; /* Evita l'ingrandimento */
    box-shadow: none; /* Evita ombre */
}

.carta-bloccata {
    filter: grayscale(100%);
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

/* .minion-container .stat-box2 {

    width: 100%;

}
 */



.personaggi-container .stat-box2 {

    width: 29%;

    justify-items: center;

}


.btn-indietro:hover {
    transform: scale(1.05);
	
}


.stat-box2 {

    width: 29%;
    justify-items: center;
}

/* Titolo delle statistiche */
.stat-title {
    font-family: var(--font-family-title);
    text-transform: uppercase;
    font-size: 2vh;
    color: var(--color-success);
    text-align: center;
    margin-bottom: 10px;
    padding: 10px;
}

/* Singola riga delle statistiche */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5vh;
    padding: 5px 0;
line-height: 9px;
}

/* Icone delle statistiche */
.stat-icon {
    width: var(--stat-icon-size);
    height: var(--stat-icon-size);
    margin-right: 10px;
}

/* Colori personalizzati per diverse statistiche */
.hp { color: var(--color-hp); }
.scudo { color: var(--color-border); }
.forza { color: var(--color-fz); }
.fortuna { color: var(--color-fortuna); }
.fame { color: var(--color-fame); }
.sete { color: var(--color-sete); }
.stanchezza { color: var(--color-stanchezza); }
.soldi { color: var(--color-soldi); }
.punteggio { color: var(--color-pt); }


button#pauseMusicButton {
    position: absolute;
}
button {
	align-items: center;
    gap: .6rem;
    padding: .6rem .9rem;
    border-radius: .8rem;
    /* border: none; */
    border: 4px solid #8b5a33;
    border-radius: 16px;
    cursor: pointer;
    background: radial-gradient(ellipse at center, #fdf4db 0%, #f4e2b7 100%);
    color: #7e5d39;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
}
div#menuPrincipale {
    background: white;
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: 1; 

	justify-items: center;
    align-items: center;
    align-content: center;
}

div#coverTransizione {
    background: #ffffff;
	opacity:0;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
	pointer-events: none;
}

.entrata1 {
    position: absolute;
    background-position: center;
    z-index: 1;
    scale: 1.1;
    left: 7px;
    width: 100%;
    background-image: url(./img/entrata1.webp);
    /* background-size: cover; */
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
	pointer-events: none;
}



.contenitore-entrate {
    display: flex;
	pointer-events: none;
}

.entrata2, .entrata3 {
    position: relative;
    top: -46px;
    max-width: 480px;
    transition: transform 8s ease, opacity 0.5s ease;
}

.entrata2 {
    left: 0px;
    transform-origin: left center; /* Origine della trasformazione a sinistra */
}

.entrata3 {
    right: 0px;
    transform-origin: right center; /* Origine della trasformazione a destra */
}



.entrata2.aperto {
    transform: translateX(-100%);
}

.entrata3.aperto {
    transform: translateX(100%);
}
.main-menu.aperto {
    transform: scale(3);
    opacity: 0;
    transition: transform 8s ease-in, opacity 6s ease-in;
}


.main-menu {
    align-items: center;
    display: flex;
    background-repeat: no-repeat;
    background-position: center;
    flex-direction: column;
    transform: scale(1);
    opacity: 1;
    transition: opacity 8s ease;
	pointer-events: none;
}




.screen {
	display: none;
	height: 100%;
	position: fixed;
	width: 100%;


}

.screen.active {
	display: block
}

#testata-gioco{
	position:relative;
	height: 70px;
	background-color:#fff;
	    border-bottom: 3px solid var(--color-border);
}



div#game-area {
     height: 100%; 
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
	background: #000;
}

div#area-gioco {
/*     height: 100%;
	width: 100%; */
}


#copertura9 {

    display: flex;
    height: 10vh;
    position: fixed;
    /* text-align: center; */

    z-index: 2;
	    padding: 10px;
     justify-content: center; 
    align-items: center;
}

#copertura10 {
    bottom: 8vh;
    display: flex;
    height: 14vh;
    position: absolute;

    z-index: 2;
    justify-content: center; /* Discanticaisce gli elementi ai lati */
    align-items: center;
    padding: 0 10px; /* Aggiungi spazio tra gli elementi e i bordi */
}

#copertura11 {

    display: flex;
    height: fit-content; /* Si adatta all'altezza del contenuto */
    width: fit-content;  /* Si adatta alla larghezza del contenuto */
    position: absolute;
    margin: auto;
    left: 50%;
    transform: translate(-50%, -50%);

    align-items: center;
    justify-content: center;
    transition: top 0.3s ease;
	z-index: 2;
}

#copertura12 {
    display: flex;
    height: fit-content; /* Si adatta all'altezza del contenuto */
    width: fit-content;  /* Si adatta alla larghezza del contenuto */
    position: absolute;
    margin: auto;
    left: 50%;
    transform: translate(-50%, -50%);

    align-items: center;
    justify-content: center;
    transition: top 0.3s ease;
	z-index: 2;
}

.deck-container-sx, .deck-container-dx {
    position: absolute;
    top: -110%;
}

.deck-container-dx {
    right: 0;
}

.porta-deck-left, .porta-deck-right {
    width: 75px;
    height: auto;
    position: absolute;
    top: 22px;
}
.porta-deck-right {
right:0%;
}
.porta-deck-left{
left:0%;
}

#fz #pt, #hp {
	margin: 10px10px
}



.bg-img {
  position: absolute;
  z-index: -10;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0; /* Inizia invisibile */
  transform: scale(1.1); /* Inizia leggermente ingrandito */
  transition: opacity 0.3s ease-in-out, transform 0.5s ease-in-out; /* Transizioni per effetto */
}

/* layer "attivo" */
.bg-img.bg-top { z-index: -9; }

/* stato visibile */
.bg-img.bg-on { opacity: 1; transform: scale(1); }

#main-content {
    display: none;
    position: relative;
        top: 15%;
    justify-content: center;
}

#score-screen {
	align-items: center;
	align-items: center;
	display: flex;
	display: none;
	flex-direction: column;
	height: 100%;
	justify-content: center;
	left: 0;
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 2
}




#morphText1, #morphText2 {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  
  width: 100%;
  text-align: center;
    transition: opacity 0.25s ease-out, filter 0.25s ease-out;
}



#card-text {
    flex-grow: 1;
    position: absolute;
    top: 32vh;
    left: 50%;
    font-size: 2.5vh;
    width: 80%;
    transform: translateX(-50%);
}

#descrizioneCarta {
    font-size: clamp(18px, 1.3vw, 18px);
    line-height: 1.5;
    text-align: center;
    padding: 0 10px;
    user-select: none;
    pointer-events: none;
}


#immagineCarta {
    position: absolute;
    flex-shrink: 0;
    width: 100%;
    height: 42%;
    top: 0%;
    /* border-radius: 10px; */
    border: 0px;
    /* object-fit: cover; */
    /* padding: 3px; */
    pointer-events: none;
    user-select: none;
    z-index: -2;
}



.descrizione-carta {
  position: absolute;
  left: 6px; right: 6px; bottom: 6px;
  padding: 6px 8px;
  font-family: var(--font-family-testo-carte, 'IM Fell English', serif);
  font-size: 12px;
  line-height: 1.2;
  color: #fef7e6;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  pointer-events: none; /* non blocca drag */
  z-index: 2;
}



.card .drop-box img {
  border: none; /* Rimuove il bordo per le immagini specificamente all'interno di .drop-box */
  width: auto;
height: 10vh;  /* Reimposta la larghezza a quella predefinita o a un valore specifico desiderato */
  /* Altre proprietà per sovrascrivere le impostazioni ereditate da .card img */
}


#titoloCarta {
    /* cursor: default; */
    font-family: var(--font-family-title);
    font-size: 3vh;
    margin-bottom: 0vh;
    margin-top: 1vh;
    pointer-events: none;
    user-select: none;
    /* padding: 5px; */
    flex-shrink: 0;
}

#button-container {
	padding:10px;
	margin-top: auto;
	align-items: center;
	bottom: 0px;
}



/* Assicurati che il contenitore genitore abbia una posizione relativa per funzionare come punto di riferimento */
.contenitore-genitore { /* Sostituisci .contenitore-genitore con il selettore effettivo del genitore */
    position: relative;
    display: flex;
    justify-content: center; /* Centra orizzontalmente i figli */
    align-items: center; /* Centra verticalmente i figli */
    height: 100%; /* Assicurati che il genitore abbia un'altezza definita */
}

#scelta-destra, #scelta-sinistra, #scelta-alto, #scelta-basso, #scelta-basso2 {
position: absolute;
    top: 29vh;
    width: 71vw;
    left: 2vw;
    height: 37vh;
    align-content: center;
    font-size: 3vh;
    font-weight: bold;

    opacity: 0;
    transition: opacity 0.4s ease-out;
    z-index: 1;

}



.scelta-overlay {
	

	color: #fff;
	display: none;
	height: 110px;
	line-height: 50px;
	position: absolute;
	text-align: center;
	    background: var(--color-background);

	transform: translateY(-50%);
	width: 150px;
	z-index: 1
}







.stella-effetto {
	position: absolute;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: white;
	box-shadow:
		0 0 10px 3px #fff6cc,
		0 0 20px 5px #ffe299,
		0 0 30px 10px #ffd96c;
	opacity: 0.9;
	animation: stellaScia 4s ease-out forwards;
	pointer-events: none;
	z-index: 9999;
}

@keyframes stellaScia {
	0% {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
	100% {
		transform: translateY(30px) scale(0.3);
		opacity: 0;
	}
}



.animazione-premio-container {
	animation: ingressoPremioGiroCompleto 2.6s linear forwards;
	transform-style: preserve-3d;
	perspective: 1200px;
}

@keyframes ingressoPremioGiroCompleto {
	0% {
		opacity: 0.5;
		transform: translateY(-380px) rotateY(0deg) scale(0.1);
		filter: brightness(2.5) saturate(2) drop-shadow(0 0 10px #fff5cc);
	}
	15% {
		transform: translateY(-300px) rotateY(180deg) scale(0.1);
		filter: brightness(2.3) saturate(1.9) drop-shadow(0 0 18px #fff0aa);
	}
	30% {
		transform: translateY(-200px) rotateY(360deg) scale(0.1);
		filter: brightness(2.0) saturate(1.7) drop-shadow(0 0 20px #ffeb99);
	}
	45% {
		transform: translateY(-100px) rotateY(540deg) scale(0.1);
		filter: brightness(1.8) saturate(1.5) drop-shadow(0 0 22px #ffe580);
	}
	60% {
		transform: translateY(-20px) rotateY(720deg) scale(0.1);
		filter: brightness(1.5) saturate(1.3) drop-shadow(0 0 24px #ffdd66);
	}
	80% {
		transform: translateY(5px) rotateY(1080deg) scale(1.2);
		filter: brightness(1.2) saturate(1.1);
	}
	100% {
		opacity: 1;
		transform: translateY(0) rotateY(1080deg) scale(1);
		filter: brightness(1) saturate(1);
	}
}






.card-fade-out {
  animation: fadeOut 0.2s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

.card-container {
	overflow: visible !important;
	transform-style: preserve-3d;
	perspective: 1000px;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative; /* oppure absolute/fixed se necessario */
}





/* canvas {
    position: relative;
    z-index: 10;
}

div#contenitorePersonaggio {
    display: grid;
    background: white;
    position: relative;
    bottom: 38px;
    height: 78px;
    border-radius: 8px;
    min-width: 80px;
    justify-items: center;
}

div#contenitorePersonaggio::before {
    content: "";
    position: absolute;
    top: +5px; 
    left: +5px;
    right: +5px;
    bottom: +5px;
    background: var(--color-background);
    z-index: 0;
    border: 3px solid var(--color-border);
	border-radius: 8px;
}
 */
 

.front {
    backface-visibility: hidden;
}

.back {
    backface-visibility: hidden;

    transform: rotateY(180deg);
    z-index: 1;
    position: absolute !important;
    top: 0vh;
}

.card.back::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -4%;
    width: 110%;
    height: 111%;
    z-index: 2;
    background: var(--cornice-back-url, none);
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;

    border-radius: 12px;
}




.back-image {
    pointer-events: none;
	visibility: hidden;
}


.front::before {
    content: "";
    position: absolute;
    top: -7%;
    left: -5%;
    width: 110%;
    height: 111%;
    z-index: 2;
    pointer-events: none;
    background-image: var(--cornice-front-url, none);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.card {
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    position: absolute;
    /* border-radius: 8px; */
    /* box-shadow: 0 4px 8px var(--color-shadow); */
    display: flex
;
    flex-direction: column;
    /* max-height: 68vh; */
    /* max-width: 45vh; */
    /* margin: 10px 10px 10px 10px; */
    background-color: white;
    min-width: 45vh;
    min-height: 68vh;
    pointer-events: auto;
    position: relative;
    text-align: center;
    /* top: 7vh; */
    transition: transform 4.5s ease-out;
    user-select: none;
    background-size: contain;
    background-repeat: no-repeat;
}

.sfondo-fuoco::before {
    background: url('img/carta-test5.png'); /* Cambia il bordo in base alla tipologia */
	background-size: contain;
    background-repeat: no-repeat;
}

.sfondo-premio::before {
    background: url('img/cornici/cornice-gialla.png'); /* Cambia il bordo in base alla tipologia */
	background-size: contain;
    background-repeat: no-repeat;
}


.punteggio {
    font-size: 16px; /* Dimensione del testo */
    color: #FFFFFF; /* Colore del testo */
    background-color: #007BFF; /* Colore dello sfondo */
    padding: 5px; /* Spaziatura interna */
    border-radius: 5px; /* Angoli arrotondati */
    text-align: center; /* Allineamento del testo */
    width: fit-content; /* Larghezza in base al contenuto */
    margin: auto; /* Centrato orizzontalmente */
}

/* 
.circle {
    position: absolute;
    bottom: 99%;
    right: 50%;
    transform: translate(50%, 50%);
    width: 3vh;
    height: 3vh;
    border-radius: 100% 100% 100% 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3vh;
    background: var(--color-background);
    border: 3px solid var(--color-border);
	z-index:100;
}
.circle2 {
    position: absolute;
bottom: 73%;
    right: 2%;
    transform: translate(50%, 50%);
    width: 3vh;
    height: 3vh;
    border-radius: 100% 100% 100% 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3vh;
    background: var(--color-background);
    border: 3px solid var(--color-border);
	z-index:100;
}
.circle3 {
    position: absolute;
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    width: 3vh;
    height: 3vh;
    border-radius: 100% 100% 100% 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3vh;
    background: var(--color-background);
    border: 3px solid var(--color-border);
	z-index:100;
}
.circle4 {
    position: absolute;
    bottom: 73%;
    left: -7%;
    transform: translate(50%, 50%);
    width: 3vh;
    height: 3vh;
    border-radius: 100% 100% 100% 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3vh;
    background: var(--color-background);
    border: 3px solid var(--color-border);
	z-index:100;
}
 */

/* Stili comuni a tutte le frecce */
.circle, .circle2, .circle3, .circle4 {
    position: absolute;
    width: 50px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-repeat: no-repeat;
    background-size: 100%;
    z-index: 100;
}

/* Posizionamenti specifici */
.circle {
    position: absolute;
    width: auto;
    top: -5%;
    right: 44%;
    left: 44%;
    background-image: url(img/freccia-nord.png);
}
.circle2 {
    top: 16%;
    width: auto;
    right: -7%;
    background-image: url(img/freccia-est.png);
    position: absolute;
    left: 94%;
}
.circle3 {
    width: auto;
    position: absolute;
    top: 37%;
    right: 44%;
    left: 44%;
    background-image: url(img/freccia-sud.png);
}
.circle4 {
    position: absolute;
    top: 16%;
    width: auto;
    left: -7%;
    right: 94%;
    background-image: url(img/freccia-ovest.png);
}

/* Stati accesi */
.circle.on { background-image: url(img/freccia-nord-accesa.png); }
.circle2.on { background-image: url(img/freccia-est-accesa.png); }
.circle3.on { background-image: url(img/freccia-sud-accesa.png); }
.circle4.on { background-image: url(img/freccia-ovest-accesa.png); }



.circle5 {
    position: absolute;
    bottom: -15px;
    width: 4vh;
    height: 4vh;
    border-radius: 100% 100% 100% 100%;
    display: flex;
    background: var(--color-background);
    border: 3px solid var(--color-border);
    z-index: 1;
}

.circle6 {
    position: absolute;
    top: -22px;
    width: 4vh;
    height: 4vh;
    border-radius: 100% 100% 100% 100%;
    display: flex;
    background: var(--color-background);
    border: 3px solid var(--color-border);
    z-index: 1;
}

    .arrow {
        width: 1vh;
        height: 1vh;
        border: 4px solid var(--color-background);
        position: absolute;
    }
.arrow.up {
    border-left: none;
    border-bottom: none;
    transform: rotate(-45deg);
    top: 24px;
    right: 23px;
}
    .arrow.right {
        border-top: none;
        border-left: none;
        transform: rotate(-45deg);
        right: 30%;
    }
    .arrow.down {
        border-right: none;
        border-top: none;
        transform: rotate(-45deg);
        bottom: 30%;
    }
    .arrow.left {
        border-right: none;
        border-bottom: none;
        transform: rotate(-45deg);
        left: 30%;
    }

.angolo1, .angolo2 {
    position: absolute;
    width: 2vh;
    height: 2vh;
    border-radius: 10% 10% 100% 10%;
}

.angolo1 {
    top: 0.8vh; /* Allineato allo spessore del bordo di ::before */
    left: 0.8vh; /* Allineato allo spessore del bordo di ::before */
    border-left: 0px;
    border-top: 0px;
    /* transform: none; Non necessario dopo l'aggiustamento */
}

.angolo2 {
    top: 0.8vh; /* Allineato allo spessore del bordo di ::before */
    right: 0.8vh; /* Allineato allo spessore del bordo di ::before */
    border-right: 0px;
    border-top: 0px;
    border-radius: 10% 10% 10% 100%;
    /* transform: none; Non necessario dopo l'aggiustamento */
}




.card-fade-in {
	opacity: 0;
	transition: opacity 0.5s ease
}

.card.dragging ~ .scelta-overlay {
	display: block;
	transition: all 0.3s ease
}

.dragging {
	box-shadow: 0 8px 16px rgba(0,0,0,0.2);
	cursor: grabbing;
	opacity: 1
}












#final-message-container {
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

#final-image {
    max-width: 200px;
    margin-bottom: 20px;
}

#game-stats-effettiSpecialiCarta {
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
}








.retro-carta-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1em;
  opacity: 0.9;
  pointer-events: none;
}


.drop-box {
    /* border: 2px dashed #bead4b; */
    /* border: inset; */
    height: 10vh;
    display: flex;
     width: 7vh; 
    /* align-items: baseline; */
    /* position: absolute; */
    margin: auto;
    bottom: 10px;
    /* z-index: 500; */
    pointer-events: none;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-end;
    margin-bottom: 2vh;
}
.npc-image-container {
    display: flex
;
    position: absolute;
    width: 100%;
    height: 50%;
    z-index: 1000;
    top: -26px;
    left: 0px;
    pointer-events: none;
    /* flex-direction: row-reverse; */
    /* flex-wrap: nowrap; */
    justify-content: space-evenly;
    animation: npcTalkAnimation 0.1s infinite;
    animation-play-state: paused;
}


@keyframes npcTalkAnimation {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(1px);
    }
}

[data-js="typing"] {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}




[data-js="typing"] {
    word-break: keep-all;
}

#inventario-minion {
    display: grid;

    left: 10%;
    right: 10%;
    top: 10%;
    bottom: 30%;

    position: absolute;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 10px;
    justify-items: center;
    justify-content: center;
}

#inventario-personaggi {
    display: grid;

    left: 10%;
    right: 10%;
    top: 10%;
    bottom: 30%;

    position: absolute;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 10px;
    justify-items: center;
    justify-content: center;
}


.carta-intro {
    pointer-events: none;
    position: absolute;
    transform: scale(0.4);
    opacity: 0.9;
    transition: all 0.5s ease;
}

.carta-flip {
    width: 240px;
    height: 300px;
    perspective: 800px;
    position: absolute;
}

.flip-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
    position: relative;
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

.flip-front {
    transform: rotateY(0deg);
}

.flip-back {
    transform: rotateY(180deg);
}

.carta-flip.rivelata .flip-inner {
    transform: rotateY(180deg);
}

.carta-frame {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, #f5f5f5, #e0e0e0);
    border: 2px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}














.cursor {
    display: inline-block;
    animation: blinkCursor 1s infinite;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}



#inventarioDeckBattaglia {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px 0px;
    justify-items: center;
}
#inventarioDeckUsate {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px 0px;
    justify-items: center;
}

#inventarioGriglia1 {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px 0px;
    justify-items: center;
}



#compendioGrid {
    position: relative;
    display: grid;
/*     grid-template-columns: repeat(4, 4fr); */
    gap: 25px 0px;
    justify-items: center;
}


#inventarioGriglia2  {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Crea 5 colonne di uguale larghezza */
    gap: 0px;
	justify-items: center;

}
#inventarioCompagni {
    display: grid;
transform: scale(0.6);
    grid-template-columns: repeat(2, 1fr);
    margin: -24px;
    gap: 56px;
    justify-items: center;
}

#inventarioGriglia2 .grid-cell {
    position: absolute;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Posizioni personalizzate SOLO per inventarioGriglia2 */
#inventarioGriglia2 .grid-cell[data-index="0"] { left: 111px; top: 84px; }
#inventarioGriglia2 .grid-cell[data-index="1"] { left: 52%; top: 150px; transform: translateX(-50%);}
#inventarioGriglia2 .grid-cell[data-index="2"] { left: 52%; top: 24px;transform: translateX(-50%); }
#inventarioGriglia2 .grid-cell[data-index="3"] { right: 111px; top: 84px; }
#inventarioGriglia2 .grid-cell[data-index="4"] { left: 52%; top: 260px;transform: translateX(-50%); }


#inventario  {
	position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Crea 5 colonne di uguale larghezza */
    gap: 0px;
	justify-items: center;
}

#inventarioGrigliaInventarioTemporaneo  {
	position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Crea 5 colonne di uguale larghezza */
    gap: 0px;
	justify-items: center;
}

div#versioneGioco {
    color: aliceblue;
    position: absolute;
    bottom: 1%;
}
div#dimensioniSchermo {
    color: aliceblue;
}


.stat2.stordimento {
    position: absolute;
    bottom: -9px;
    left: 14px;
    width: 28px;
    height: 28px;
    background: url(img/cuscino.webp) no-repeat center center;
    background-size: contain;
}

.stat2.stordimento .zz {
  position: absolute;
  bottom: 20px;
  left: 14px;
  font-size: 1em;
  color: #fff;
  animation: floatZ 2s ease-out infinite;
}

@keyframes floatZ {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(-30px); opacity: 0; }
}


.deck-in-alto {
    position: absolute;
    top: 10%; /* un po' in alto */
    left: 50%; /* punto centrale della finestra */
    transform: translateX(-50%); /* lo centra rispetto al suo centro */
    width: 150px;
    height: 190px;
    transition: 0.4s ease;
    z-index: 1000;
}

.clone-cantica-volante {
    pointer-events: none;
    border-radius: 10px;
    overflow: hidden;
}

#inventario-cantiche {
    flex-direction: row;
    justify-content: center;
    gap: 40px;
}

.inventario-container.orizzontale {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 20px;
}

.clone-cantica-volante {
    pointer-events: none;
}
.btn-conferma-minion {

    /* border: none; */
    /* border-radius: 12px; */
    max-width: 100px;
    /* color: black; */
    /* font-weight: bold; */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); */
    transition: transform 0.2s;
    z-index: 1;
    right: 3%;
    /* left: 10%; */
    position: absolute;
    bottom: 7%;
}

.btn-conferma-personaggio {

    /* border: none; */
    /* border-radius: 12px; */
    max-width: 100px;
    /* color: black; */
    /* font-weight: bold; */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); */
    transition: transform 0.2s;
    z-index: 1;
    right: 3%;
    /* left: 10%; */
    position: absolute;
    bottom: 7%;
}
.btn-conferma-cantica {

    /* border: none; */
    /* border-radius: 12px; */
    max-width: 100px;
    /* color: black; */
    /* font-weight: bold; */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); */
    transition: transform 0.2s;
    z-index: 1;
    right: 3%;
    /* left: 10%; */
    position: absolute;
    bottom: 7%;
}

.deck-clone-ridotto {
    transform: scale(0.2);  /* o 0.5, a seconda di quanto piccolo vuoi */
    transform-origin: center center; /* scala dal centro */
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    pointer-events: none; /* se non vuoi che il clone intercetti il mouse */
}


.btn-conferma-cantica:hover {
    transform: scale(1.05);
}


/* Stile predefinito per tutte le grid-cell */
.grid-cell {
    width: 100%;
    min-width: 50px;
    max-width: 90px;
    height: 12vh;
    display: flex;
    scale: 1.1;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    border: none;
    background-image: url(img/test30.png);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

#inventarioGriglia2 .grid-cell {
/* background-image: url(img/segnaposto2.png); */
}

#inventarioGrigliaCombattimento .grid-cell {
background-image: url(img/segnaposto5.png);
}

#campoMostro .grid-cell {
background-image: url(img/segnaposto6.png);
}

#inventario-container {
  display: flex;
  justify-content: center;
}

#cantiche-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    padding: 30px;
    margin-top: 20px;
}

#cantiche-container::-webkit-scrollbar {
    height: 8px;
}

#cantiche-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#cantiche-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}





:root {
  --translate-x: 0px;
  --translate-y: 0px;
}

.cella-inventario {
    transition: transform 0.5s ease, opacity 1s ease;
    transform: translateX(var(--translate-x)) translateY(var(--translate-y));
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */
    /* width: 10vh; */
    /* height: 10vh; */
    /* position: relative; */
}

/* 1) definisci i keyframes */
@keyframes bgZoom {
  0%, 100% { background-size: 100% 100%; }
  50%      { background-size: 110% 110%; }
}

/* 2) applica l’animazione in hover (o rimuovi :hover per farla funzionare sempre) */
.grid-cell:hover .cella-con-cornice {
  animation: bgZoom 4s ease-in-out infinite;
}

/*--- poi mantieni il resto così com’è: ---*/
.grid-cell:hover .img-celle {
  animation: sinuousBounce 1s ease-in-out infinite;
  transform-origin: center bottom;
  transition: transform 0.3s ease;
}



.cella-con-cornice {
    position: relative;
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
overflow: visible;
 /*    border: 1px solid black;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3), 0 0 12px rgb(0 0 0 / 50%); */
}

.cella-con-cornice::before {
    content: "";
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
 /*    background-color: rgb(0 0 0 / 43%); */

    border-radius: 5px;
    z-index: 0;
/*     border: 1px solid black;
    box-shadow: inset 0 0 10px rgb(0 0 0 / 58%), 0 0 10px rgba(255, 255, 255, 0.3); */
}


/* Per evitare che il before copra il contenuto */

.immagine-personaggio {
    width: 64px;
    height: 64px;
    image-rendering: pixelated; /* se è sprite */
}


.img-celle {
    position: absolute;
    bottom: 0%;
    width: 12vh;
    height: auto;
    z-index: 2;
}

.cornice-img {
    position: absolute;
    width: 100%;
    height: 112%;
    z-index: 1;
}

.descrizione-wrapper {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    pointer-events: none; /* Non interferisce con il drag */
}

.descrizione-sfondo {
    height: 89%;
    width: 119%;
    display: block;
    z-index: 2;
    position: absolute;
    bottom: -5%;
}
.descrizione-testo {
    position: absolute;
    top: 62%;
    left: 6%;
    right: 6%;
    /* transform: translateX(-50%); */
    font-size: clamp(7px, 9px, 9px);
    color: #000000;
    /* font-weight: bold; */
    z-index: 3;
    text-align: center;
    max-width: 100%;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    white-space: normal;
	font-family: var(--font-family-testo-carte);
}


.titolo-sfondo {
    position: absolute;
    top: 0%;
    left: 50%;
    transform: translateX(-50%);
    width: 101%;
    z-index: 2;
}
.titolo-testo {
    position: absolute;
    top: 37%;
    /* left: 50%; */
    /* transform: translateX(-50%); */
    color: #ffffff;
    font-size: 10px;
    /* font-weight: bold; */
    text-align: center;
    z-index: 3;
}


.frame-img {
    position: absolute;
    top: -6px;
    left: -4px;
    width: 108%;
    height: 110%;
    pointer-events: none;
    z-index: 2;
}


#drop-zone {
    left: 25%;
    top: -20%;
    position: absolute;
    height: 100%;
    width: 50%;
    background-color: #fff;
    text-align: center;
    line-height: 100px;
    opacity: 0.5;
	    z-index: 1;
}

span#deck-count {
    position: absolute;
    top: 45px;
    right: 88px;
    background-color: rgb(241 234 197);
    color: #745f3d;
    font-size: 24px;
}

span#scarti-count {
    position: absolute;
    top: 45px;
    right: 88px;
    background-color: rgb(241 234 197);
    color: #745f3d;
    font-size: 24px;
    /* font-weight: bold; */
    /* padding: 2px 5px; */
    /* border-radius: 4px; */
}



#avvisi{
	position: absolute;
    width: 422px;
    top: 235px;
    height: 363px;
    z-index: 100;
    left: 150px;
    right: 150px;
    margin: auto;
    opacity: 0.9;
}

.spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: grayscale(1);
  -webkit-backdrop-filter: grayscale(1);
  z-index: 1000;
  pointer-events: none;
  transition: mask-image 0.3s ease, -webkit-mask-image 0.3s ease;
  mask-mode: alpha;
  -webkit-mask-mode: alpha;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.spotlight-wrapper {
  position: fixed;
  inset: 0;
  z-index: 1002;
  pointer-events: none;
}

.spotlight-balloon {
  background: white;
  color: black;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  max-width: 300px;
  pointer-events: auto;
  z-index: 1003;
}

.spotlight-balloon .btn-avanti {
  margin-top: 10px;
  cursor: pointer;
}








.spotlight-balloon {
  background: #222;
  color: white;
  padding: 1em;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
  font-size: 1.1em;
  pointer-events: auto;
  position: fixed;
  z-index: 1003;
  opacity: 1;
  max-width: 320px;
  transition: opacity 0.3s ease;
}

.spotlight-balloon .btn-avanti {
  margin-top: 1em;
  background: #ffc107;
  border: none;
  padding: 0.5em 1.2em;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
}

.spotlight-wrapper {
  pointer-events: none;
  z-index: 1002;
}

.spotlight-freccia {
  width: 0;
  height: 0;
  margin: auto;
  border-style: solid;
}

.spotlight-balloon.top .spotlight-freccia {
  border-width: 10px 10px 0 10px;
  border-color: #222 transparent transparent transparent;
  margin-bottom: 0.5em;
}

.spotlight-balloon.bottom .spotlight-freccia {
  border-width: 0 10px 10px 10px;
  border-color: transparent transparent #222 transparent;
  margin-top: 0.5em;
}

.spotlight-balloon.left .spotlight-freccia {
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #222;
  float: right;
}

.spotlight-balloon.right .spotlight-freccia {
  border-width: 10px 10px 10px 0;
  border-color: transparent #222 transparent transparent;
  float: left;
}




#selezioneMinion {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

.minion-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 80%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
}

/* Pulsanti */
.minion-btn {
    padding: 12px 20px;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Effetti hover */
.minion-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}


#selezioneCantica {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
/*     background-color: rgb(0 0 0 / 93%); */
    padding: 20px;
    border-radius: 10px;
    width: 100vw;
    height: 100vh;
    display: flex
;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* background-image: url(img/ui/ui-sfondo.webp); */
    background-size: cover;
    background-position: center;
}
body {
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;      /* Internet Explorer/Edge */
}

div#inventarioGrigliaPremioOggetto {
    position: absolute;
    width: 100%;
    /* height: 100%; */
    bottom: 50%;
    display: flex
;
    /* height: 13%; */
    z-index: 12;
    align-items: flex-end;
    justify-content: center;
}

div#inventarioGrigliaPremioPersonaggio {
    position: absolute;
    width: 100%;
    /* height: 100%; */
    bottom: 50%;
    display: flex
;
    /* height: 13%; */
    z-index: 12;
    align-items: flex-end;
    justify-content: center;
}

div#inventarioGrigliaPremioPotenziamento {
    position: absolute;
    width: 100%;
    /* height: 100%; */
    bottom: 50%;
    display: flex
;
    /* height: 13%; */
    z-index: 12;
    align-items: flex-end;
    justify-content: center;
}

#inventarioGrigliaPremioNegozio {
    position: absolute;
    width: 100%;
    top: 25%;
    z-index: 12;
    align-items: flex-end;
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(4, 3fr); /* Crea 5 colonne di uguale larghezza */
    gap: 0px;
	justify-items: center;
}

div#inventario-cloni {
    position: absolute;
    width: 50%;
    bottom: 5%; 
    display: flex;
    height: 13%;
    z-index: 12;
    align-items: flex-end;
    justify-content: center;
}

div#inventario-cantiche {
    position: absolute;
    width: 50%;
    bottom: 20%; 
    display: flex;
    height: 13%;
    z-index: 12;
    align-items: flex-end;
    justify-content: center;
}

div#gameContent {

    justify-content: center;
}

#selezioneCantica {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.titolo-cantica,
.btn-indietro {
    position: fixed;
    bottom: 8vh;
    z-index: 100;
    left: 6vw;
}

.inventario-grid .grid-cell.slot-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.titolo-cantica {
top: 10%;
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: white;
    text-shadow: 0 0 10px black;
}



.cantica-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 100px;
    transition: opacity 0.3s ease;
}

.cantica-box {
    width: 100%;
    /* height: 300px; */
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.4);
    text-align: center;
    cursor: pointer;
    transition: transform 0.4s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cantica-img {
    width: 100%;
    border-radius: 10px;
    pointer-events: none;
}

.cantica-nascosta {
    opacity: 0;
    pointer-events: none;
}

.cantica-espansa {
    width: 400px !important;
    height: auto;
    transform: scale(1.1);
    margin-top: 160px;
    background-color: rgba(0,0,0,0.7);
    transition: all 0.4s ease;
}

.cantica-descrizione {
    color: white;
    padding: 15px;
    display: none;
}

.carte-introduttive {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.carta-intro img {
    width: 100px;
    height: auto;
    border-radius: 10px;
}

.cantica-clone {

    border-radius: 12px;
    overflow: hidden;
    transition: all 0.5s ease;
    left: 0%;
    top: -10%;
    z-index: 111;
    position: absolute;
}
.cantica-descrizione {
    padding: 10px;
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    animation-delay: 0.2s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.griglia-carte-introduttive {
    position: absolute;
    top: 10%;
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: flex
;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px;
    z-index: 10;
}




.carta-intro {
    width: 100px;
    height: 140px;
    transition: transform 0.3s;
}

.carta-intro img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
}
.tooltip-conferma {
    text-align: center;
    margin-top: 15px;
    font-size: 1rem;
    color: #ffc;
    opacity: 0;
    animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.cantica-clone.pronta-conferma {
    box-shadow: 0 0 20px rgba(255, 255, 100, 0.5);
    transition: box-shadow 0.4s ease-in-out;
}



.carta-intro img {
    width: 80px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.carta-intro img:hover {
    transform: scale(1.1);
}

.cantica-descrizione {
    margin-top: 20px;
    padding: 10px;
    font-size: 16px;
    text-align: center;
    color: #eee;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
}



/* Contenitore principale */
#selezionePersonaggio {
    height: 100%;
width: 100%;
    z-index: 11;

    position: absolute;
    background-color: rgb(0 0 0);
}
/* Titolo */
#selezionePersonaggio h2 {
    color: white;
    text-shadow: 2px 2px 5px black;
    font-size: 24px;
    margin-bottom: 20px;
	text-align: center;
}

#selezioneMinion h2 {
    color: white;
    text-shadow: 2px 2px 5px black;
    font-size: 24px;
    margin-bottom: 20px;
	text-align: center;
}

#selezioneCantica h2 {
    color: white;
    text-shadow: 2px 2px 5px black;
    font-size: 24px;
    margin-bottom: 20px;
	text-align: center;
}


/* Contenitore dei pulsanti */
.personaggi-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 100%;
    padding: 20px;

    border-radius: 10px;
}

/* Pulsanti */
.personaggio-btn {
    padding: 12px 20px;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Effetti hover */
.personaggio-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}







.avvisoElement {
    top: 7%;
    /* left: 50%; */
    width: 100%;
    display: flex;
	z-index: 15;
    position: absolute;
    flex-direction: row;
    justify-content: center;
}

.titolo1
{
	position:absolute;

	transform:translate(-50%,-50%);
	border-bottom:5px solid black;

	overflow:hidden;
	z-index:11;
	  width: 0; /* Assicurati che queste proprietà siano coerenti con l'animazione */
  height: 0; /* Assicurati che queste proprietà siano coerenti con l'animazione */


	
}
.titolo1 > h1 {
  text-align: center;
  padding: 0;
  margin: 0;  
  color: black;
  font-size: 72px;
  font-weight: 600; /* '600' è corretto, 'px' non è necessario qui */
  letter-spacing: 3px;
  font-family: 'Domine', serif;
  /* Aumenta l'opacità e modifica gli offset se necessario */
  text-shadow: 3px 3px 5px rgba(255, 255, 255, 1), 
               5px 5px 8px rgba(255, 255, 255, 1);
}






.parola-corta{
	z-index:11;
	transform:translate(-200%,-70%);
}


.titolo-gioco {
    font-size: 32px;
    /* color: #492a09; */
    /* font-weight: bold; */
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); */
    /* font-family: var(--font-family-description); */
    padding: 31px;
    /* padding-top: 0px; */
    /* background-color: rgba(0, 0, 0, 0.2); */
    border-radius: 10px;
    /* text-align: center; */
    margin: 16px auto;
    max-width: 50%;
    /* overflow: hidden; */
}






.benvenuto {
    text-align: center;
}

.stroke {
   
    width: 92%;
    left: 22%;
    top: 50%;
    height: 75px;
    stroke-width: 1.5px;
    stroke: white;
    fill: none;
    animation: stroke 3s infinite ease-in-out;
    /* right: 32%; */
}

@keyframes stroke {
	from {
		stroke-dasharray: 50 660;
		stroke-dashoffset: 780;
	}
	to {
		stroke-dasharray: 50 660;
		stroke-dashoffset: 70;		
	}
}



#start-game {
    background-image: url(./ui/legno6.webp);
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    height: 62px;
    cursor: pointer;
    color: white;
    background-color: transparent;
    width: 106px;
    transition: box-shadow 0.3s ease; /* Aggiunge una transizione per l'effetto di alone */
}

#start-game:hover {
    box-shadow: 0 0 10px 3px white; /* Crea un alone bianco attorno al pulsante */
}








#stats {
    /* height: 100%; */

  /*   width: 100%; */
}

#informazioni {
    height: 330px;
	    width: 100%;
    position: absolute;
    border: black;

    bottom: -600px;
    background-image: url('./ui/legno3.webp'); 

    background-repeat: no-repeat;
    background-position: center; 
}

#copertura {
    margin: auto;
 	bottom:-20%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    height: 4vh;
    width: 100%;
    display: flex;
    position: absolute;
    min-width: 40vh;
    max-width: 50vh;
    background-color: white;
z-index: 1;
    left: 50%;

}
#scudo, #forza {
    position: absolute;
    height: 100%;
    width: 10vh;
    display: flex;
    top: -15%;
    justify-content: center;
    align-items: center;
    font-family: var(--font-family-title);
    font-size: 28px;
    color: white;
    z-index: 2;
}

#energia {
    height: 100%;
    /* display: flex
; */
    position: absolute;
    /* bottom: -400px; */
    top: -13%;
    left: 32%;
    display: flex
;
    right: 32%;
    align-items: center;
    justify-content: center;
}

#scudo {

    left: 12%;
}

#forza {
	right: 12%;
}







#scudo2, #forza2 {
    position: absolute;
    height: 100%;
    width: 10vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-family-title);
    font-size: x-large;
    color: black;
	
    /* background-image: url(./ui/legno5.webp); */
    /* background-repeat: no-repeat; */
    /* background-position: center; */
}



#energia2 {
    height: 100%;
    /* display: flex; */
    position: absolute;
    /* bottom: -400px; */
    left: 10vh;
display: flex;
    right: 10vh;
    align-items: center;
    justify-content: center;

}

#scudo2 {
left: 0;
}

#forza2 {

	right: 0;
}

#copertura4 {
    margin: auto;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    height: 4vh;
    width: 100%;
    display: flex;
    position: absolute;
    min-width: 40vh;
    max-width: 50vh;
    background-color: white;
    z-index: 2;
    left: 50%;
}

.hp2-bar-fill {
    height: 58%; 
    background-color: var(--color-hp);; 
    position: absolute;

}

.hp2-value, .hp2Max-value {
    z-index: 0;
    position: relative;
    font-family: var(--font-family-title);
    font-size: x-large;
}

div#scoperti-counter {
    position: absolute;
    bottom: 6vh;
    left: 6vh;
}

#copertura5 {
    display: flex;
    height: 17vh;
    width: 100%;
    min-width: 40vh;
    max-width: 48vh;
    position: absolute;
    margin: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    background-color: white;
    align-items: center;
    justify-content: center;
    z-index: -2;
    transition: top 0.3s ease;
}

#copertura6.no-transition {
    transition: none;
}

#copertura6 {
    display: flex;
    height: 6vh;
    width: 100%;
    min-width: 40vh;
    max-width: 44vh;
    position: absolute;
    margin: auto;/* 
    left: 50%;
    transform: translate(-50%, -50%); */
    border-radius: 8px;
    background-color: white;
    align-items: center;
    justify-content: center;
    z-index: -2;
    transition: top 0.3s ease;
}

#copertura5.no-transition {
    transition: none;
}



#copertura3 {
    display: flex;
    height:46vh;
    width: 100%;
    min-width: 40vh;
    max-width: 50vh;
    position: absolute;
    margin: auto;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    background-color: white;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: top 0.3s ease;
}

#copertura3.no-transition {
    transition: none;
}


#copertura2 {
    display: flex;
    height: 50vh;
    width: 100%;
    min-width: 40vh;
    max-width: 50vh;
    position: absolute;
    margin: auto;

    left: 50%;
    transform: translate(-50%, -50%);

    border-radius: 8px;
    background-color: white;
    align-items: center;
    justify-content: center;
	z-index: 10;
}

#copertura7 {
    display: flex;
    height: 10vh;
    width: 30%;
    /* min-width: 90%; */
    /* max-width: 12vh; */
    position: absolute;
    /* margin: auto; */
    top: 9.5vh;
    /* bottom: -1.5%; */
    left: 10%;
    /* transform: translate(-50%, -50%); */
    border-radius: 8px;
    background-color: white;
    align-items: center;
    justify-content: center;
    z-index: -2;
}

#copertura2::before,#copertura::before,#copertura4::before,#copertura3::before,#copertura5::before, #copertura6::before, #copertura7::before , #copertura8::before, #copertura9::before, #copertura10::before{
    content: "";
    position: absolute;
    top: +3px; /* Regola questi valori per controllare la distanza del bordo esterno */
    left: +3px;
    right: +3px;
    bottom: +3px;
    background: var(--color-background);
    z-index: -1;
    border: 3px solid var(--color-border);
	border-radius: 8px;
}










.modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* width: 80%; */
    /* max-width: 600px; */
    padding: 5px;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
    background-color: #fff;
    z-index: 1000;
    display: none;
font-size: 2vh;
    font-family: var(--font-family-description);
}

.volume-control-container {
    margin: 20px 0;
}

.volume-control-container label {
    display: block;
    font-size: 1.2em;
    color: #c29e7d;
    margin-bottom: 10px;
}

.styled-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: #c29e7d;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
    border-radius: 5px;
    margin: 0 5px;
}

.styled-slider:hover {
    opacity: 1;
}

.styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c29e7d;
    cursor: pointer;
}

.styled-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c29e7d;
    cursor: pointer;
}

.menu-image {
    width: 100%;
    margin-bottom: 20px;
}

.container {
    display: grid;
	
    padding: 5vh;
}
.partita-global {
    display: flex
;
}

div#datiSalvataggio {
	display: none;
    position: absolute;
    top: 2%;
    left: 2%;
    right: 2%;
    width: auto;
    font-size: 1.4em;
    font-family: var(--font-family-title);
	    z-index: 5;
}



#debugModal {
    display: flex;

    -moz-user-select: none;

    min-width: 45vh;


    align-items: center;
}


textarea#debugMessage {
    min-height: 25vh;
}


#optionsModal {
    display: flex;

    -moz-user-select: none;
    -ms-user-select: none;

	
    min-width: 45vh;
    min-height: 62vh;

    align-items: center;
}

.outer-border {
    border: 1px solid var(--color-border);
    /* height: 100%; */
    width: 100%;
    padding: 2px;
    /* margin: 0 auto; */
}

.mid-border {
    border: 4px solid var(--color-border);
    height: 100%;
    width: 96%;
    padding: 3px;
    /* margin: auto; */
}

.inner-border {
    position: relative;
    border: 2px solid var(--color-border);
    height: 100%;
    width: 99%;
}

.corner-decoration {
    position: absolute;
    width: 3em;
    margin: -3px;
}

.corner-decoration.corner-left-top {
    left: 0;
    top: 0;
}

.corner-decoration.corner-right-top {
    top: 0;
    right: 0;
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}

.corner-decoration.corner-right-bottom {
    right: 0;
    bottom: 0;
    -webkit-transform: scale(-1);
    transform: scale(-1);
}

.corner-decoration.corner-left-bottom {
    left: 0;
    bottom: 0;
    -webkit-transform: scaleY(-1);
    transform: scaleY(-1);
}

.vertical-decoration {
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    width: 11em;
}

.vertical-decoration.top {
    top: 0;
}

.vertical-decoration.bottom {
    bottom: 0;
    -webkit-transform: scaleY(-1);
    transform: scaleY(-1);
}

@media (min-width: 768px) {
    .corner-decoration {
        width: 3.5em;
        margin: -4px;
    }

    .vertical-decoration {
        width: 16em;
    }
}

@media (min-width: 992px) {
    .corner-decoration {
        width: 4em;
        margin: -5px;
    }

    .vertical-decoration {
        width: 20em;
    }
}

@media (min-width: 1200px) {
    .corner-decoration {
        width: 5em;
        margin: -6px;
    }

    .vertical-decoration {
        width: 27em;
    }
}




























.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: none;
}


.message {
    font-size: 16px;
    color: #333;
}

.closeBtn {
    border: none;
    background: none;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 14px;
    color: #999;
}


.bottoni-container {
    position: absolute;
    display: grid;
    grid-gap: 6px;
    z-index: 1;
    flex-direction: column;
    flex-wrap: wrap;
}
.bottone {
    margin: 0 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    font-size: 16px;
}


.toast {
    display: grid;
    justify-items: center;
}


.toast-container {
    transition: opacity 0.5s, transform 0.5s;
}

/* CSS per Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Posizionare il tooltip sopra l'elemento */
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}


@keyframes pulsate {
    0% {
        box-shadow: 0 0 10px red;
    }
    50% {
        box-shadow: 0 0 40px red;
    }
    100% {
        box-shadow: 0 0 10px red;
    }
}

.fusione-possibile {

    animation: pulsate 1s ease infinite;
}


button#openDeck {
    position: absolute;
    /* height: 45px; */
    /* width: 40px; */
    /* position: absolute; */
    right: 0%;
    top: 0%;
    /* padding: 0; */
}

#svgContainer {
    position: relative;
    width: 100%; /* Occupa tutta la larghezza del contenitore genitore */
    height: 50vh; /* Altezza adattabile alla viewport */
	    z-index: 1;
}

#svgContainer svg {
    max-width: 100%; /* Adatta la larghezza al contenitore */
    height: auto; /* Mantiene le proporzioni */
}



.stats-grid {
    display: flex
;
    justify-content: center;
    gap: 20px;
}
#openOptionsModal {
    position: absolute;
    left: 0%;
}
div#buttoniMenu {
    z-index: 2;
    position: absolute;
    width: auto;
    left: 0;
    bottom: 30%;
    right: 90%;
    display: grid
;
}
span#deck-numerocarte {
    position: absolute;
    top: 23px;
    right: 7px;
    /* background-color: rgba(0, 0, 0, 0.8); */
    color: #96f6cc;
    font-size: 23px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 4px;
    pointer-events: none;
}
.panel-right {
    right: 17px;
    display: flex;
    top: 0px;
    width: 25%;
    /* bottom: 10px; */
    /* pointer-events: none; */
    position: absolute;
    justify-content: flex-end;
}

/* Stile base per i gruppi */
.stat-group {
display: flex;
    color: white;

}





/* Effetto al passaggio del mouse */


/* Stile per i valori */
.stat-value {
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Icone e allineamento */
.stat {
    display: flex;
    align-items: center;
    /* gap: 5px; */
    font-size: 18px;
    font-weight: bold;
    flex-direction: column;
}



#bagIcon {
    width: 5vh;
    height: 5vh;
    /* position: absolute; */
    top: 3vh;
    right: 15vw;
    z-index: 1;
    user-select: none;
    background-image: url(img/borsa-chiusa.webp);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


       #startButton {
            padding: 10px 20px;
            font-size: 16px;
            color: white;
			width: 30vh;
            background-color: grey;
            border: none;
            border-radius: 8px;
            cursor: not-allowed;
            transition: background-color 0.3s, cursor 0.3s;
        }
		
	#loader {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		height: 100vh;
    transition: opacity 1s ease;
    opacity: 1;
	
	}
	#loader.hide {
    opacity: 0;
}

        #startButton.active {
            background-color: green;
            cursor: pointer;
        }

#progressContainer {
    width: 100%;
    height: 4vh;
    max-width: 30vh;
    background-color: #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
    /* margin-top: 20px; */
}

        #progressBar {
					display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
            width: 0%;
            height: 100%;
            background-color: #4caf50;
        }

        #messages {
            margin-top: 20px;
            max-width: 30vh;
            text-align: center;
            font-family: Arial, sans-serif;
        }

        .message {
            margin-bottom: 10px;
            padding: 10px;
            border-radius: 5px;
        }

        .message.offline {
            background-color: #ffcc00;
        }

        .message.error {
            background-color: #ff4444;
            color: white;
        }

        .message.success {
            background-color: #4caf50;
            color: white;
        }

        .message.info {
            background-color: #2196f3;
            color: white;
        }
		
		
		
		
#effetti-con-timer {
    position: fixed;
    top: 4vh;
    /* right: 10px; */
    width: 90%;
    max-width: 500px;
    background: var(--color-background);
    border: 3px solid var(--color-border);
    border-radius: 8px;
    padding: 10px;
    color: black;
    font-family: var(--font-family-title);
    z-index: 1;
}

.effetto-con-timer {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.nome-effetto {
    font-size: 14px;
    margin-bottom: 5px;
}

.progresso {
    width: 100%;
    height: 10px;
    background-color: #555;
    border-radius: 5px;
    overflow: hidden;
}

.riempimento {
    height: 100%;
    background-color: #4caf50;
    transition: width 1s linear;
}





















/* Griglia del campo */
.campo {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne */
    grid-template-rows: repeat(2, 1fr); /* 2 righe */
    gap: 10px; /* Spazio tra gli slot */
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin: 20px 0; /* Spazio tra le griglie */
}



/* Stile per gli slot */
.slot {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
    background-color: #f2f2f2;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s ease; /* Transizione quando il mouse è sopra */
}

/* Slot vuoto */
.slot-vuoto::before {
    content: "Slot Vuoto";
    color: #888;
    font-size: 14px;
    text-align: center;
}

/* Stile per le carte dei minion */
.minion-card img,
.giocatore-card img {
    max-width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Quando la carta appare (transizione) */
.minion-card img.appear,
.giocatore-card img.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Immagini delle carte SVG */
.minion-card svg {
    width: 100%; /* L'SVG occuperà il 100% dello spazio della carta */
    height: auto; /* Mantiene le proporzioni */
}

/* Effetto hover sugli slot */
.slot:hover {
    background-color: #e0e0e0; /* Cambia colore quando il mouse è sopra */
    cursor: pointer;
}


.carta-apparizione {
    opacity: 1;
    transform: translateY(0);
}







#copertura8 {
    display: none;
}


#copertura8 {
    display: flex;
    height: 23vh;
    width: 100%;
    min-width: 40vh;
    max-width: 50vh;
    position: absolute;
    margin: auto;

    left: 50%;
    transform: translate(-50%, -50%);

    border-radius: 8px;
    background-color: white;
    align-items: center;
    justify-content: center;
	z-index: 10;
}



#inventarioGrigliaCombattimento {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
	justify-items: center;
 
}

#inventarioCarteInMano {
    display: grid
;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 0px;
    /* padding: 10px; */
    /* padding-right: 15%; */
    /* padding-left: 15%; */
    justify-items: center;
    /* justify-content: space-around; */
}

#campoGiocatore {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 40px 10px;
    padding: 10px;
	justify-items: center;
}

#campoMostro {
    display: grid
;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 40px 10px;
    padding: 10px;
    justify-items: center;
}

:root {
  --size: 200vw;
  --lights-color: lightseagreen;
  --fade-duration: 0.5s;
  --rotation-duration: 20s;
}

/* Sfondo con raggi di luce rotanti */
.animated-background {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max(200vw, 200vh); /* Sempre almeno il doppio dello schermo */
  height: max(200vw, 200vh);
  background: radial-gradient(rgb(255, 255, 255), var(--lights-color) 80vw),
              repeating-conic-gradient(rgba(255, 255, 255, 1) 0 10deg, var(--lights-color) 0 20deg) 50% no-repeat;
  background-blend-mode: multiply;
  border-radius: 50%;
  animation: spin var(--rotation-duration) linear infinite; /* Rotazione infinita */
  will-change: transform;
  z-index: 0;
  opacity: 0; /* Partenza invisibile */
  transition: opacity var(--fade-duration) ease-out;
}


@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Effetto comparsa immagine avversario */
.animated-image {
  position: absolute;
  top: 20vh;
  left: 50%;
  transform: translateX(-50%) scale(1);
  opacity: 0; /* Parte invisibile */
  transition: opacity var(--fade-duration) ease-out; /* Aggiunta della transizione di opacità */
  z-index: 1; /* Assicurati che sia sopra lo sfondo */
}

@keyframes zoomIn {
  from { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, calc(-50% + 0px)); }
  50% { transform: translate(-50%, calc(-50% - 20px)); }
}

/* Effetto per la comparsa graduale */
.appear {
  opacity: 1;
  transition: opacity var(--fade-duration) ease-out;
}

/* Classe per la dissolvenza graduale */
.fade-out {
  opacity: 0;
  transition: opacity var(--fade-duration) ease-out;
}



.fade-out-background {
  opacity: 0;
  transition: opacity var(--fade-duration) ease-out;
}




span#turniProssimaOndata {
    position: absolute;
    top: 41%;
    left: 47%;
    /* right: +5px; */
    /* bottom: +5px; */
    padding: 1vh;
    background: var(--color-background);
    z-index: 20;
    border: 3px solid var(--color-border);
    border-radius: 8px;
}






.stat2-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
	z-index: 2;
    pointer-events: none;  /* Disabilita l'interazione con il mouse per gli span */
}

.stat2 {
    position: absolute;
    display: flex;
font-family: var(--font-family-numeri-carte);
    color: black;
    /* border-radius: 4px; */
    font-size: 20px;
    width: 30px;
    height: 30px;
    background-repeat: no-repeat;
    background-size: cover;
    align-items: center;
    justify-content: center;
}

.stat2.hp {
top: -9px;
    left: -4px;
    background-image: url(./carte/hp.svg);
}
.stat2.scudo {
    top: 16px;
    left: -4px;
    background-image: url(./carte/scudo.svg);
}

.stat2.forza {
    top: -10px;
    right: -5px;
    padding-right: 3px;
    background-image: url(./carte/attacco.svg);
}

.stat2.turni {
    bottom: -9px;
    left: 10%;
    transform: translateX(-50%);
    background-image: url(./carte/turni.svg);
}

.stat2.attacchi {
    bottom: -13px;
    right: -10px;

    background-image: url(./carte/attacchi.svg);
}

@keyframes pulsazione2 {
    0% {
        box-shadow: 0px 0px 15px 5px #b9f7cd;
    }
    50% {
        box-shadow: 0px 0px 20px 7px #b9f7cd;
    }
    100% {
        box-shadow: 0px 0px 15px 5px #b9f7cd;
    }
}

.mazzo-pronto {
    box-shadow: 0px 0px 15px 5px #b9f7cd;
    border-radius: 10px;
    transition: box-shadow 0.3s ease-in-out;
    animation: pulsazione2 1.5s infinite ease-in-out;
}


@keyframes blink {
    50% {
        opacity: 0.5;
    }
}


@keyframes colpo {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background-color: red; }
    100% { transform: scale(1); background-color: initial; }
}

.animazione-danno {
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}


.cantica-nascosta {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: all 0.4s ease;
}

.cantica-espansa {
    transform: scale(1.5);
    transition: all 0.6s ease;
    max-width: 90%;
    margin: 0 auto;
}



.animazione-aggiornamento {
    animation: lampeggio 0.5s ease-in-out;
}

@keyframes lampeggio {
    0%, 100% {
        transform: scale(1);
        background-color: transparent;
    }
    50% {
        transform: scale(1.1);
        background-color: rgba(255, 215, 0, 0.5); /* Colore giallo chiaro */
    }
}


.animazione-rimbalzo {
    animation: rimbalzo-turno 0.5s ease-out;
}

@keyframes rimbalzo-turno {
    0% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(10px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes rimbalzoAlto {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* Giocatore attacca - rimbalzo verso l'alto */
.animazione-attacco-giocatore {
    animation: attacco-rimbalzo-alto 0.5s ease-out;
    will-change: transform;
}

@keyframes attacco-rimbalzo-alto {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

/* Nemico attacca - rimbalzo verso il basso */
.animazione-attacco-nemico {
    animation: attacco-rimbalzo-basso 0.5s ease-out;
    will-change: transform;
}

@keyframes attacco-rimbalzo-basso {
    0% { transform: translateY(0); }
    50% { transform: translateY(15px); }
    100% { transform: translateY(0); }
}

 #game-area {
  perspective: 1200px;
}

/* keyframes per un lancio più naturale */
@keyframes death-throw-realistic {
  0% {
    transform: translate3d(0,0,0) rotate3d(1,1,0,0deg) scale(1);
    opacity: 1;
  }
  /* Fase di lancio: salita rapida, rotazione moderata */
  40% {
    transform: translate3d(60px, -120px, 0) rotate3d(0.5,1,0,120deg) scale(1.05);
    opacity: 1;
    animation-timing-function: ease-out;
  }
  /* Picco e inizio discesa: lenta accelerazione */
  70% {
    transform: translate3d(120px, 40px, 0) rotate3d(0,1,1,240deg) scale(0.9);
    opacity: 0.8;
    animation-timing-function: ease-in;
  }
  /* Fine caduta: rotazione completa e sparizione */
  100% {
    transform: translate3d(180px, 300px, 0) rotate3d(1,0,1,360deg) scale(0.7);
    opacity: 0;
  }
}

/* la classe da applicare al clone */
.death-animation-3d {
  transform-style: preserve-3d;
  animation: death-throw-realistic 1.5s forwards;
}




.animazione-morte {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

@keyframes glow-scale {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.animazione-contatore {
    animation: glow-scale 0.5s ease-in-out;
    color: yellow; /* Evidenzia il cambiamento */
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}


@keyframes pulse {
    0% { 
        scale: 1;
        color: white; 
        text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
    }
    20% { 
        scale: 1.3;
        color: yellow; 
        text-shadow: 0 0 15px rgba(255, 255, 0, 1), 0 0 30px rgba(255, 255, 0, 0.8);
    }
    100% { 
        scale: 1;
        color: white; 
        text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
    }
}

.animazione-turni {
    animation: pulse 0.4s ease-in-out;
    font-weight: bold;
}

@keyframes pulseForza {
    0% {
        scale: 1;
        color: white;
        text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    }
    20% {
        scale: 1.4;
        color: yellow;
        text-shadow: 0 0 10px rgba(0, 255, 0, 0.8), 0 0 25px rgba(0, 255, 0, 0.6);
    }
    100% {
        scale: 1;
        color: white;
        text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    }
}

.animazione-forza-stat {
    animation: pulseForza 1s ease-in-out;
    font-weight: bold;
}



#pannelliInterfaccia {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
	pointer-events: none;
    flex-direction: column;

}
.panel {
	position: absolute;
	max-width: 480px; 
	width: 100%;

	color: #000000;
	text-align: center;
	transition: top 0.3s ease;
	pointer-events: auto;
	left: 50%;

	transform: translateX(-50%);

	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

#panel14,
#panel13  {
    max-width: 100%;
	    z-index: 14;
}

#panel1 {
	height: 75%;
	    z-index: 14;
}
#panel1::before {
    content: "";
    position: absolute;
    top: -14%;
    left: -16%;
    width: 132%;
    height: 134%;
    background-image: url(img/sfondo-deck.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
	
}
#panel25 {
	height: 75%;
	    z-index: 14;
}
#panel25::before {
    content: "";
    position: absolute;
    top: -14%;
    left: -16%;
    width: 132%;
    height: 134%;
    background-image: url(img/sfondo-deck.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
	
}
#panel26 {
	height: 75%;
	    z-index: 14;
}
#panel26::before {
    content: "";
    position: absolute;
    top: -14%;
    left: -16%;
    width: 132%;
    height: 134%;
    background-image: url(img/sfondo-deck.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
	
}
#panel27 {
	height: 75%;
	    z-index: 14;
}
#panel27::before {
    content: "";
    position: absolute;
    top: -14%;
    left: -16%;
    width: 132%;
    height: 134%;
    background-image: url(img/sfondo-deck.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
	
}

#panel28 {
	height: 75%;
	    z-index: 14;
}
#panel28::before {
    content: "";
    position: absolute;
    top: -14%;
    left: -16%;
    width: 132%;
    height: 134%;
    background-image: url(img/sfondo-deck.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
	
}

#panel29 {
	height: 75%;
	    z-index: 14;
}
#panel29::before {
    content: "";
    position: absolute;
    top: -14%;
    left: -16%;
    width: 132%;
    height: 134%;
    background-image: url(img/sfondo-deck.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
	
}



#panel30 {
	height: 75%;
	    z-index: 14;
}
#panel30::before {
    content: "";
    position: absolute;
    top: -14%;
    left: -16%;
    width: 132%;
    height: 134%;
    background-image: url(img/sfondo-deck.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
	
}

.hub-panel-inner {
    position: relative;
    z-index: 1;
}


#panel2 {
	height: 40%;
	    z-index: 14;
}
#panel2::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0%;
    width: 100%;
    height: 100%;
/*     background-image: url(img/sfondo-barra15.png); */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;

}

#panel3 {
	height: 7%;
/* 	background-image: url(img/sfondo-barra1-2.png); */
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	    z-index: 14;
}

#panel4 {
	height: 10%;
	z-index: 15;
}
#panel4::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0%;
    width: 100%;
    height: 100%;
    /* background-image: url(img/pannelli/pannello1.webp); */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

#panel5 {
	height: 30%;
	z-index: 14;
}
#panel5::before {
    content: "";
    position: absolute;
    top: -24px;
    left: 0%;
    width: 100%;
    height: 100%;
/*     background-image: url(img/sfondo-barra7-3.png); */
    background-size: auto;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

#panel6 {
	height: 40%;
	z-index: 14;

}
#panel6::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0%;
    width: 100%;
    height: 100%;
  /*   background-image: url(img/sfondo-barra11.png); */
    background-size: auto;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}
#panel7 {
	height: 40%;
	z-index: 14;

}
#panel7::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0%;
    width: 100%;
    height: 100%;
 /*    background-image: url(img/sfondo-barra13.png); */
    background-size: auto;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

#panel8 {
	height: 12%;
	z-index: 14;

}
#panel8::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0%;
    width: 100%;
    height: 100%;
/* background-image: url(img/sfondo-barra8-2.png); */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}
#panel9 {
	height: 12%;
	z-index: 16;

}
#panel9::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0%;
    width: 100%;
    height: 100%;
 /*    background-image: url(img/sfondo-barra8-2.png); */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}
#panel12 {
	height: 12%;
	z-index: 14;

}
#panel13 {
	height: 12%;
	z-index: 10;
	background-color:black;

}
#panel14 {
	height: 12%;
z-index: 10;
background-color:black;
}
#panel12::before {
    content: "";
    position: absolute;
    left: 40%;
    width: auto;
    right: 40%;
    height: 124px;
/*     background-image: url(img/test12.webp); */
    background-size: contain;
    background-repeat: no-repeat;
    /* background-position: center; */
    z-index: -1;
}
#panel10 {
	height: 5%;
	z-index: 14;

}
#panel10::before {
    content: "";
    position: absolute;
    top: -21px;
    left: 10%;
    width: 76%;
    height: 180%;
/*     background-image: url(img/sfondo-barra6.png); */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}
#panel10::after {
    content: "";
    position: absolute;
    top: -21px;
    left: 10%;
    width: 76%;
    height: 180%;
/*     background-image: url(img/sfondo-barra6cover.png); */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

#panel11 {
	height: 10%;
    position: relative;
    overflow: visible;
	z-index: 14;
}

#panel11::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0%;
    width: 100%;
    height: 100%;
/*     background-image: url(img/sfondo-barra8-2.png); */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

#panel15 {
	height: 75%;
	z-index: 14;
}
#panel15::before {
    content: "";
    position: absolute;
    top: -17%;
    left: -16%;
    width: 132%;
    height: 144%;
    background-image: url(img/sfondo-barra7-2.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}
#panel16 {
	height: 75%;
	z-index: 14;
}
#panel16::before {
    content: "";
    position: absolute;
    top: -17%;
    left: -16%;
    width: 132%;
    height: 144%;
    background-image: url(img/sfondo-barra7-2.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

#panel17 {
	height: 100%;
	z-index: 14;
}
#panel17::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;
    /* background-image: url(img/sfondo-barra7-2.png); */
    /* background-size: cover; */
    /* background-repeat: no-repeat; */
    /* background-position: center; */
    z-index: 1;
}

#panel18 {
	height: 100%;
	z-index: 14;
}
#panel18::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;
    /* background-image: url(img/sfondo-barra7-2.png); */
    /* background-size: cover; */
    /* background-repeat: no-repeat; */
    /* background-position: center; */
    z-index: 1;
}

.premio-oggetto-container {
    position: relative;
    z-index: 10;
    height: inherit;
    background: transparent;
}
.premio-personaggio-container {
    position: relative;
    z-index: 10;
    height: inherit;
    background: transparent;
}

.premio-potenziamento-container {
    position: relative;
    z-index: 10;
    height: inherit;
    background: transparent;
}


#panel19 {
	height: 100%;
	z-index: 14;
}
#panel19::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;
    /* background-image: url(img/sfondo-barra7-2.png); */
    /* background-size: cover; */
    /* background-repeat: no-repeat; */
    /* background-position: center; */
    z-index: 1;
}

#panel20 {
	height: 100%;
	z-index: 14;
}
#panel20::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;
    /* background-image: url(img/sfondo-barra7-2.png); */
    /* background-size: cover; */
    /* background-repeat: no-repeat; */
    /* background-position: center; */
    z-index: 1;
}

#panel21 {
	height: 100%;
	z-index: 14;
}
#panel21::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;

    z-index: 1;
}

#panel22 {
	height: 100%;
	z-index: 14;
}
#panel22::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;

    z-index: 1;
}

#panel23 {
	height: 100%;
	z-index: 14;
}
#panel23::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;

    z-index: 1;
}
button#chiudiStatisticheBtn {
    position: absolute;
    z-index: 1;
}



/* Adatta la dashboard a un contenitore panel centrato */
#panel23 .statistiche-dashboard {
    position: relative; /* non absolute */
    z-index: 2;
    background: rgba(255,255,255,0.94);
    border-radius: 2em;
    padding: 2.2em 1.8em 2em 1.8em;
    box-shadow: 0 8px 32px #0002;
    max-width: 430px;
    margin: 0 auto;
}

#panel23 .hero-flex {
    display: flex;
    gap: 1.4em;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1em;
}

#panel23 .hero-section {
    display: flex;
    align-items: center;
    gap: 1.1em;
}

#panel23 .avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 2px solid #e8c56d;
    background: #fff5e1;
    object-fit: cover;
}

#panel23 .giocatore-nome {
    font-size: 1.19em;
    font-weight: 700;
    margin-bottom: 0.18em;
    color: #333;
}
#panel23 .personaggi-row {
    font-size: 0.98em;
    color: #b18d32;
}
#panel23 .statistiche-tabs {
    display: flex;
    flex-direction: row;      /* <-- Ora i tab sono in riga */
    justify-content: center;  /* Centra i tab orizzontalmente */
    gap: 0.6em;
    margin: 1em 0 0.6em 0;
}

#panel23 .tab {
    font-size: 1.05em;
    background: #ffe8ae;
    color: #b08019;
    border: none;
    border-radius: 1em;
    padding: 0.45em 1.2em;
    cursor: pointer;
    min-width: 130px;
    margin-bottom: 0;
    transition: background .18s, color .18s;
}
#panel23 .tab.active, #panel23 .tab:hover {
    background: #ffd257;
    color: #442900;
}

#panel23 .stats-content-box {
    margin-top: 1.2em;
    background: #fff8e1;
    padding: 1em 1.1em;
    border-radius: 1.1em;
    min-height: 140px;
}
#panel23 .stats-box .stat-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e5cb8b;
    padding: 0.32em 0;
    font-size: 1em;
    color: #87651c;
}
#panel23 .btn-chiudi-statistiche {
    background: #ffd257;
    color: #62310c;
    border: none;
    border-radius: 1em;
    padding: 0.5em 1.2em;
    font-size: 1em;
    position: absolute;
    top: 1em;
    right: 1em;
    z-index: 4;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
#panel23 .btn-chiudi-statistiche:hover {
    background: #ffab23;
    color: #fff;
}
.stats-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2em;
    width: 100%;
}
.close-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}
.cards-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2em;
    width: 100%;
}
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}



#panel24 {
	height: 12%;
	z-index: 16;

}
#panel24::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0%;
    width: 100%;
    height: 100%;
 /*    background-image: url(img/sfondo-barra8-2.png); */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

#panel27 {
	height: 100%;
}
#panel27::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;

    z-index: 1;
}
#panel26 {
	height: 100%;
}
#panel26::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;

    z-index: 1;
}


.negozio-container {
    position: absolute;
    z-index: 1;
}

#panel25 {
	height: 100%;
}
#panel25::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;

    z-index: 1;
}



div#mapparun {
    background-color: #fcdbab;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
/*   background-image: url('img/mappa/sfondo.webp');
  background-repeat: repeat;
  background-size: cover; 
  background-position: center; */
}

/* Aggiungi questo nel tuo CSS */
.mappa-indicatore {
  width: 40px;
  animation: floatArrow 2s ease-in-out infinite;
  /* aggiungi questo: */
  transform-origin: center bottom;
}

@keyframes floatArrow {
  0%   { transform: translate(-50%,-100%); }
  50%  { transform: translate(-50%,-120%); }
  100% { transform: translate(-50%,-100%); }
}

/* Overlay sfondo semi-trasparente */
.overlay-scelta-partita {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 30, 0.78);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    0% { opacity: 0 }
    100% { opacity: 1 }
}

/* Contenitore centrale */
.scelta-partita-container {
    display: flex;
    gap: 48px;
    background: rgba(255,255,255,0.10);
    padding: 32px 48px;
    border-radius: 32px;
    box-shadow: 0 4px 48px 0 rgba(0,0,0,0.18);
}

.scelta-partita-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 24px;
    transition: background 0.14s, transform 0.2s;
    background: rgba(255,255,255,0.07);
}
.scelta-partita-btn:hover {
    background: rgba(255,255,255,0.22);
    transform: scale(1.08);
}

.scelta-partita-btn img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 8px;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.13);
}

.scelta-partita-btn .label {
    font-size: 1.2em;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 8px #000, 0 2px 10px #111;
    margin-top: 6px;
    letter-spacing: 1px;
    text-align: center;
}


img#openDeck {
    width: 54%;
}

@keyframes dash-line {
  from {
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dashoffset: 0;
  }
}



@keyframes pulsazione {
    0% {
        transform: scale(1, 1) rotate(-5deg) translateY(1%);
    }
    20% {
        transform: scale(1, 1.5) rotate(0deg) translateY(-5%); /* Si allunga */
    }
    40% {
        transform: scale(1.5, 1.5) rotate(5deg) translateY(-10%); /* Inizia ad allargarsi */
    }
    60% {
        transform: scale(1.5, 1) rotate(-5deg) translateY(5%); /* Si allarga completamente */
    }
    80% {
        transform: scale(1.2, 1.2) rotate(3deg) translateY(0%); /* Piccola pulsazione */
    }
    100% {
        transform: scale(1, 1) rotate(-5deg) translateY(1%); /* Torna normale */
    }
}




.pulsazione-animata {
    animation: pulsazione 1s ease-in-out infinite;
}


/* Animazione sinuosa per l'immagine */
@keyframes sinuousBounce {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.05, 1.03);
  }
  50% {
    transform: scale(1.03, 1.05);
  }
  75% {
    transform: scale(1.05, 1.03);
  }
}














@keyframes spawnEffect {
    0% { 
        transform: scale(0); 
        opacity: 0; 
        filter: blur(10px); 
        box-shadow: 0px 0px 5px rgba(255, 0, 0, 0.8);
    }
    30% { 
        transform: scale(1.3); 
        opacity: 1; 
        filter: blur(2px); 
        box-shadow: 0px 0px 25px rgba(255, 50, 0, 0.8);
    }
    70% { 
        transform: scale(0.9); 
        filter: blur(0); 
        box-shadow: 0px 0px 15px rgba(255, 50, 0, 0.5);
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
        filter: blur(0); 
        box-shadow: 0px 0px 10px rgba(255, 0, 0, 0.3);
    }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-2px) rotate(-1deg); }
    50% { transform: translateX(2px) rotate(1deg); }
    75% { transform: translateX(-1px) rotate(-0.5deg); }
    100% { transform: translateX(0); }
}

.boss-spawn {
  animation: comparsaBoss 1.2s ease-out;
  box-shadow: 0 0 20px gold;
}

@keyframes comparsaBoss {
  0% {
    transform: scale(0.2) rotate(0deg);
    opacity: 0;
    filter: brightness(1.2) grayscale(1);
  }
  50% {
    transform: scale(1.4) rotate(10deg);
    opacity: 1;
    filter: brightness(1.6) grayscale(0);
  }
  100% {
    transform: scale(1) rotate(0deg);
    filter: none;
  }
}


.minion-spawn {
    animation: spawnEffect 0.7s ease-out, shake 0.15s ease-in-out 0.2s;
    box-shadow: 0px 0px 10px rgba(255, 0, 0, 0.5);
    transition: box-shadow 0.4s ease-in-out;
}

div#turniProssimaOndata {
    position: absolute;
    left: 50%;
    top: -50vh;
    font-size: 50px;
    color: red;
    margin-top: 50px;
}

span#turniRicaricaMazzo {
    position: absolute;
    left: 7%;
    font-size: 50px;
    color: green;
    margin-top: 50px;
}

div#contatore-mazzo {
    position: absolute;
    left: 50%;
    top: -60%;
    transform: translateX(-50%);
}

div#turniProssimaOndataContainer {
    position: absolute;
    top: -86vh;
    width: 100vw;
	max-width: 480px;
}




.quadratino-turno {
    width: 35px;
    height: 24px;
    background-color: white;
    border-radius: 2px;
    transition: opacity 0.5s;
}

.quadratino-turno.fade-out {
    opacity: 0.3;
}

.quadratino-turno.attivo {
    background-color: red; /* Cambia colore per evidenziare il decremento */
}





.stat-group.economy {
    display: flex;
}



@keyframes personaggioSpawnEffect {
    0% { 
        transform: scale(0) rotate(5deg); 
        opacity: 0; 
        filter: blur(15px) brightness(1.5);
        box-shadow: 0px 0px 60px rgba(0, 150, 255, 1);
    }
    20% { 
        transform: scale(1.4) rotate(-3deg); 
        opacity: 1; 
        filter: blur(5px) brightness(1.2);
        box-shadow: 0px 0px 80px rgba(0, 150, 255, 0.9);
    }
    50% { 
        transform: scale(0.9) rotate(1deg);
        filter: blur(2px) brightness(1);
        box-shadow: 0px 0px 40px rgba(0, 150, 255, 0.6);
    }
    70% {
        transform: scale(1.05) rotate(0deg);
        box-shadow: 0px 0px 25px rgba(0, 150, 255, 0.4);
    }
    100% { 
        transform: scale(1) rotate(0deg); 
        filter: blur(0); 
        box-shadow: 0px 0px 10px rgba(0, 150, 255, 0.2);
    }
}


@keyframes pulsazioneGlow {
    0%, 100% { 
        box-shadow: 0px 0px 15px rgba(0, 150, 255, 0.5);
    }
    50% { 
        box-shadow: 0px 0px 30px rgba(0, 150, 255, 0.8);
    }
}

.personaggio-spawn {
    animation: 
        personaggioSpawnEffect 1.5s ease-out,
        
        pulsazioneGlow 2.5s ease-in-out 1.8s infinite;
}



.evidenzia-inventario {
    animation: bagliore 1s infinite alternate ease-in-out;
    border: 3px solid #ffc107;
    box-shadow: 0px 0px 15px #ffc107;
}

@keyframes bagliore {
    from {
        box-shadow: 0px 0px 10px #ffc107;
    }
    to {
        box-shadow: 0px 0px 25px #ffcc00;
    }
}






/* 🌟 Brillantezza: Effetto scintillante */
.effetto-brillante {
    animation: brillantezza 1.5s infinite alternate;
}
@keyframes brillantezza {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.5); }
}

/* 💡 Glowing: Bordo luminoso */
.glowing-overlay {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 12px;
    box-shadow: 0 0 10px 5px rgba(255, 215, 0, 0.8);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    z-index: -1;
}
.glowing-overlay.attivo {
    opacity: 1;
    animation: glowingEffect 2s infinite alternate ease-in-out;
}
@keyframes glowingEffect {
    0% { box-shadow: 0 0 10px 5px rgba(255, 215, 0, 0.8); }
    100% { box-shadow: 0 0 20px 10px rgba(255, 215, 0, 1); }
}




#overlay-animazioni {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    z-index: 9999;
}



#overlay-animazioni {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.animazione-forza {
    position: absolute;
    pointer-events: none;
    width: 100px;
    height: 100px;
    bottom: -200px;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: salitaForza 1s ease-out forwards;
    z-index: 999999;
}

.freccia {
    position: absolute;
    width: 30px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: curvaFreccia 1s ease-out forwards;
    z-index: 999999;
}

.cerchio {
    position: absolute;
    width: 200px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    z-index: 999999;
}

.cerchio1 {
    position: absolute;
    top: 30%;
    animation: cerchioBoom 1s ease-out 0.1s forwards;
}

.cerchio2 {
    position: absolute;
    top: 60%;
    animation: cerchioBoom 1s ease-out 0.2s forwards;
}

.lineette {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 50%);
    z-index: 999999;
}

.lineetta {
    width: 6px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    opacity: 0;
    z-index: 9999;
    position: absolute;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.lineetta1 {
    left: -30px;
    animation: salitaLineetta1 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.lineetta2 {
    left: -10px;
    animation: salitaLineetta2 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s forwards;
}

.lineetta3 {
    left: 10px;
    animation: salitaLineetta3 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}

.lineetta4 {
    left: 30px;
    animation: salitaLineetta4 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
}

/* Animazioni */
@keyframes salitaForza {
    0% { opacity: 0; transform: translate(-50%, 0%) scale(0.5); }
    100% { opacity: 1; transform: translate(-50%, -80%) scale(1); }
}

@keyframes curvaFreccia {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0deg); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    40% { opacity: 1; transform: translate(-50%, -70%) scale(1.5) rotate(0deg); }
    60% { opacity: 1; transform: translate(-50%, -90%) scale(2) rotate(0deg); }
    80% { opacity: 1; transform: translate(-50%, -110%) scale(2.5) rotate(0deg); }
    100% { opacity: 0; transform: translate(-50%, -130%) scale(3) rotate(0deg); }
}

@keyframes cerchioBoom {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@keyframes salitaLineetta1 {
    0% { transform: translateY(50px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

@keyframes salitaLineetta2 {
    0% { transform: translateY(50px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

@keyframes salitaLineetta3 {
    0% { transform: translateY(50px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

@keyframes salitaLineetta4 {
    0% { transform: translateY(50px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}








.animazione-cura {
    position: absolute;
    pointer-events: none;
    width: 100px;
    height: 100px;
    bottom: -200px;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: salitaCura 1s ease-out forwards;
    z-index: 999999;
}

.animazione-cura-stat {
    animation: pulseCura 1s ease-in-out;
    font-weight: bold;
    color: lightgreen;
}

@keyframes salitaCura {
    0% { opacity: 0; transform: translate(-50%, 0%) scale(0.5); }
    100% { opacity: 1; transform: translate(-50%, -80%) scale(1); }
}

@keyframes pulseCura {
    0% {
        scale: 1;
        color: white;
        text-shadow: 0 0 5px rgba(0, 255, 128, 0.5);
    }
    20% {
        scale: 1.4;
        color: lightgreen;
        text-shadow: 0 0 10px rgba(0, 255, 128, 0.8), 0 0 25px rgba(0, 255, 128, 0.6);
    }
    100% {
        scale: 1;
        color: white;
        text-shadow: 0 0 5px rgba(0, 255, 128, 0.5);
    }
}



.animazione-velocita {
    animation: velocitaSalita 1s ease-out forwards;
    position: absolute;
    pointer-events: none;
    width: 100px;
    height: 100px;
    bottom: -200px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
}

@keyframes velocitaSalita {
    0% { opacity: 0; transform: translate(-50%, 0%) scale(0.4) rotate(-15deg); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(0deg); }
    100% { opacity: 0; transform: translate(-50%, -120%) scale(0.8) rotate(15deg); }
}

.animazione-velocita-stat {
    animation: velocitaPulse 1s ease-in-out;
    font-weight: bold;
    color: cyan;
}

@keyframes velocitaPulse {
    0% { scale: 1; color: white; text-shadow: 0 0 4px cyan; }
    50% { scale: 1.4; color: cyan; text-shadow: 0 0 10px cyan; }
    100% { scale: 1; color: white; text-shadow: 0 0 4px cyan; }
}

.fulmine {
    width: 40px;
    height: 40px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    filter: drop-shadow(0 0 10px cyan);
}


.animazione-scudo {
    animation: apparizioneScudo 1s ease-out forwards;
    position: absolute;
    pointer-events: none;
}

@keyframes apparizioneScudo {
    0% { opacity: 0; transform: scale(0.2); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(0.9); }
}

.scudo-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    left: 10%;
    top: 10%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    filter: drop-shadow(0 0 10px rgba(100, 200, 255, 0.9));
}

.scudo-pulse {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(100, 200, 255, 0.3);
    left: 10%;
    top: 10%;
    transform: translate(-50%, -50%);
    animation: pulseScudo 1s ease-out forwards;
}

@keyframes pulseScudo {
    0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0.7; }
    70% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}


.animazione-cura-overflow {
    position: absolute;
    width: 100px;
    height: 100px;
    bottom: -200px;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: salitaCuraOverflow 1.2s ease-out forwards;
    z-index: 999999;
}

@keyframes salitaCuraOverflow {
    0% { opacity: 0; transform: translate(-50%, 0%) scale(0.5); }
    100% { opacity: 1; transform: translate(-50%, -80%) scale(1); }
}


.cura-onda {
    position: absolute;
    width: 50px;
    height: 50px;

    border-radius: 50%;
    background: rgba(255, 215, 0, 0.3); /* oro traslucido */
    left: 10%;
    top: 10%;
    transform: translate(-50%, -50%);
    animation: ondaCura 1.2s ease-out forwards;
}

@keyframes ondaCura {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.cura-glow {
    position: absolute;
    width: 80px;
    height: 80px;

    border-radius: 50%;
    background: radial-gradient(white, rgba(255, 215, 0, 0.6));
    left: 10%;
    top: 10%;
    transform: translate(-50%, -50%);
    animation: pulseCura 1.2s ease-out forwards;
}

@keyframes pulseCura {
    0% { opacity: 0.3; transform: scale(0.6); }
    50% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.3); }
}

.cuore-oro {
    position: absolute;
    width: 40px;
    height: 40px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 10px gold);
    z-index: 999999;
}




/* già esistente */
.animazione-colpo {
    position: absolute;
    z-index: 9999;
    pointer-events: none;
}

/* cerchio shockwave */
.cerchio-impatto {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border: 5px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
    animation: shockwave 0.4s ease-out forwards;
    filter: drop-shadow(0 0 10px white);
}

/* nuovo: flash sul colpo */
.flash-impattato {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0.7;
    animation: flashImpact 0.2s ease-out forwards;
    border-radius: 8px;
}

/* nuovo: glow pulsato tipo energia */
.pulse-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: glowPulse 0.4s ease-out forwards;
}

@keyframes shockwave {
    0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

@keyframes flashImpact {
    0% { opacity: 0.7; }
    100% { opacity: 0; }
}

@keyframes glowPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}



#box-dialogo-carta {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}


.tooltip-dialogo-carta {
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  animation: fadeInUp 0.25s ease-out forwards;
}

.tooltip-balloon {
  background: #fffbe8;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  font-family: 'Domine', serif;
  color: #2c2c2c;
  white-space: nowrap;
}

.tooltip-triangle {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #fffbe8;
  margin: 0 auto;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
  }
}

@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }
}



.dialog-log{
  position: fixed;
  bottom: 20%;             /* sposta dove ti piace */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse; /* ultimo messaggio in alto */
  gap: 6px;
  max-width: 50%;
  z-index: 10000;
  pointer-events: none;
  font-family: sans-serif;
}

.dialog-entry{
  display: flex;
  align-items: flex-start;
  background: rgba(0,0,0,.75);
  color: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  animation: fadein .25s ease-out;
}

.dialog-entry img{
  width: 60px; height: 60px;
  margin-right: 6px;
  border-radius: 4px;
  object-fit: cover;
}

@keyframes fadein {from{opacity:0; transform:translateY(8px)}}
@keyframes fadeout{to{opacity:0; transform:translateY(-8px)}}


.avviso-line, .avviso-explanation {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  max-width: 80%;
  padding: 0.5em 1em;
  background: rgba(0,0,0,0.8);
  color: white;
  border-radius: 4px;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* stili specifici */
.avviso-line {
  font-size: 5vh;
  border-bottom: 0.8vh solid black;
}
.avviso-explanation {
  font-size: 2.5vh;
  transition-delay: 0.3s;
}

/* classe “enter” = fade‐in + risale in posizione naturale */
.enter {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* classe “exit” = fade‐out + sale ancora un poco */
.exit {
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
}




#scelteLogin {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 10;
}

#scelteLogin button {
    padding: 10px 20px;
    font-size: 18px;
    background-color: radial-gradient(ellipse at center, #fdf4db 0%, #f4e2b7 100%);
    background: radial-gradient(ellipse at center, #fdf4db 0%, #f4e2b7 100%);
    /* color: #eee; */
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
    color: #7e5d39;
    border: 2px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

#scelteLogin button:hover {
  background-color: #333;
  border-color: #888;
}

#btnLoginGoogle {
  display: flex;
  align-items: center;
  gap: 8px;
}

#btnEntraSeLoggato,
#btnLogout {
  display: none; /* saranno mostrati via JS */
}


@keyframes glowingPulse {
  0% {
    box-shadow: 0 0 0px rgba(0, 255, 0, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 10px 4px rgba(0, 255, 0, 0.6);
    transform: scale(1.1);
  }
  100% {
    box-shadow: 0 0 0px rgba(0, 255, 0, 0.3);
    transform: scale(1);
  }
}

.scelta-nascosta {
  display: none !important;
}


.effetto-direzioni {
  animation: glowingPulse 1.8s infinite ease-in-out;
  border-radius: 50%;
  background-color: rgba(0, 255, 0, 0.15);
}
















/* container riutilizzato per tutte le schermate di selezione */
.selection-stage {
  position: relative;
  width: 100%;
  min-height: 60vh;
  padding: 16px;
}

/* overlay fisso per breadcrumb + anteprima + pulsante conferma */
#selectionOverlay.selection-overlay {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  max-width: 320px;
  z-index: 50;
  background: rgba(255,255,255,.9);
  border: 2px solid #c9b26a;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  padding: 12px;
}

#selectionOverlay .breadcrumbs {
  font-weight: 700;
  font-size: 14px;
  color: #3a2c00;
}

#selectionOverlay .preview {
  min-height: 80px;
  border: 1px dashed #d6c483;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  color: #423200;
  background: rgba(255, 252, 234, .7);
}

#selectionOverlay .btn-primary {
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(#ffe38a, #ffcf3e);
  color: #3a2c00;
}
#selectionOverlay .btn-primary:disabled {
  filter: grayscale(100%);
  opacity: .6;
  cursor: not-allowed;
}


.carta-negozio {
  position: relative;
  width: 120px;
  height: 160px;
  margin: 10px;
  display: inline-block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  background-color: #222;
  text-align: center;
}

.btn-acquista {
  margin-top: 6px;
  padding: 4px 8px;
  background-color: #e2b645;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.griglia-negozio {
    z-index: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;

    width: 90%;
    max-width: 600px;
    height: auto;
}

.cella-negozio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100px;
  margin: 6px;
}

.btn-acquista {
  font-size: 0.8em;
  padding: 4px 10px;
  margin-top: 4px;
  background-color: #333;
  color: white;
  border: 1px solid #999;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  top: 10vh;
}
.btn-acquista:hover {
  background-color: #555;
}

.negozio-saldo {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
  z-index:1;
      top: 10vh;
  position: relative;

}

.potenziamento-controls {
    top: 10vh;
    position: relative;
}

button#btnEsciNegozio {
    z-index: 1;
    position: relative;
	top: 10vh;
	align-items: center;
    gap: .6rem;
    padding: .6rem .9rem;
    border-radius: .8rem;
    /* border: none; */
    border: 4px solid #8b5a33;
    border-radius: 16px;
    cursor: pointer;
    background: radial-gradient(ellipse at center, #fdf4db 0%, #f4e2b7 100%);
    color: #7e5d39;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
}

button#btnPotenziamentoConferma {
    z-index: 1;
    position: relative;
	top: 10vh;
	align-items: center;
    gap: .6rem;
    padding: .6rem .9rem;
    border-radius: .8rem;
    /* border: none; */
    border: 4px solid #8b5a33;
    border-radius: 16px;
    cursor: pointer;
    background: radial-gradient(ellipse at center, #fdf4db 0%, #f4e2b7 100%);
    color: #7e5d39;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.prezzo-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 6px;
  font-size: 0.7em;
  background: rgba(0,0,0,0.7);
  color: #ffd369;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  z-index: 6;
  pointer-events: none;
}

.anim-fuga {
  animation: fuga-pop 0.32s ease-out forwards;
}
@keyframes fuga-pop {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.9);
    filter: blur(1px);
  }
}


.coin-float{
  position:absolute; top:8px; right:8px;
  padding:2px 6px; border-radius:6px;
  background:rgba(255,215,0,.15); font-weight:700;
  animation: coinUp .7s ease-out forwards;
}
@keyframes coinUp{
  0%{opacity:0; transform:translateY(6px)}
  10%{opacity:1}
  100%{opacity:0; transform:translateY(-14px)}
}









.gesture-wrapper{ position:fixed; inset:0; z-index:1001; pointer-events:none; }
.gesture-hand{ position:absolute; width:68px; height:68px; pointer-events:none; transform-origin:50% 50%; will-change:transform,opacity,left,top; filter:drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.gesture-balloon{ position:absolute; max-width:420px; padding:12px 16px; background:rgba(0,0,0,.85); color:#fff; border-radius:10px; font-size:15px; line-height:1.5; text-align:center; pointer-events:auto; }
.gesture-next{ display:inline-block; margin-top:10px; padding:6px 10px; background:#fff; color:#111; border-radius:999px; font-weight:700; font-size:13px; cursor:pointer; user-select:none; }
.gesture-ripple{ position:absolute; width:12px; height:12px; border:2px solid rgba(255,255,255,.9); border-radius:50%; transform:translate(-50%,-50%); opacity:0; pointer-events:none; }
/* NEW: scudo trasparente per catturare il tap senza scurire lo schermo */
.gesture-shield{ position:fixed; inset:0; z-index:1000; background:transparent; pointer-events:auto; }








/* wrapper del pannello HUB (il container che contiene le icone).
   Se hai già position:relative sul contenitore, puoi saltare questa regola. */
#hub, .hub-root, .game-root { position: relative; }

.hub-icon-floating-label{
  position:absolute;
  transform: translate(-50%, -100%);
  /* ---- variables con fallback ---- */
  --offset: 0px;                          /* distanza dall’icona */
  --fs: clamp(12px, 1.4vw, 16px);         /* font-size */
  --pad-y: 6px;                            /* padding verticale */
  --pad-x: 12px;                           /* padding orizzontale */
  --radius: 999px;                         /* border-radius */
  --bg: rgba(15,15,20,.7);                 /* background */
  --fg: #fff;                              /* color */
  --opacity: .95;                          /* opacità base */

  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-weight: 800;
  letter-spacing: .2px;
  font-size: var(--fs);
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(2px);
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  z-index: 3;
  transition: transform .12s ease, opacity .12s ease;
  opacity: var(--opacity);
}

.hub-icon-floating-label.is-hover{
  transform: translate(-50%, calc(-100% - var(--offset)));
}

/* se vuoi modalità “solo hover” */
.hub-icon-floating-label[data-hover-only="true"]{ opacity: 0; }
.hub-icon-floating-label[data-hover-only="true"].is-hover{ opacity: var(--opacity); }








/* badge sinistro */
.ondata-mi .info{ display:inline-flex; align-items:center; gap:.4rem; }
.ondata-mi .info .mi-badge{ font-size:1.0rem; }

/* Griglia pips: N colonne equidistanti, una sola riga */
.ondata-mi-grid{
  --cols: 1;
  --gap-x: 14px;
  --pip-w: 2.3rem;           /* LARGHEZZA pip (spazio per 2x3 slot) */
  --pip-h: 3.2rem;           /* ALTEZZA pip */
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: var(--pip-h);
  column-gap: var(--gap-x);
  align-items: start;
  width: 100%;
  max-width: 100%;
  overflow: hidden;          /* mai oltre 100% */
}

/* Cella del pip */
.ondata-mi .pip-cell{
  display: flex; justify-content: center; align-items: flex-start;
  position: relative; min-width: 0;
}

/* Pip — stessa pelle dei tuoi .mi-pips, ma più grande */
.mi-pips .pip,
.mi-btn.ondata-mi .pip{
  width: var(--pip-w);
  height: var(--pip-h);
  border-radius: .3rem;
  background: #555b;
  box-shadow: inset 0 0 0 1px #fff1;
  transform: translateZ(0);
}
.mi-pips .pip.is-filled,
.mi-btn.ondata-mi .pip.is-filled{
  background:#ffd765;
  box-shadow: 0 0 8px #ffd765aa, inset 0 0 0 1px #6b4f00;
  outline: 1px solid #0006;
}
.mi-pips .pip.pop,
.mi-btn.ondata-mi .pip.pop{ animation: pip-pop .35s ease-out; }
@keyframes pip-pop{
  0%{ transform: scale(.6); filter:brightness(1.2); }
  70%{ transform: scale(1.25); filter:brightness(1.6); }
  100%{ transform: scale(1); filter:none; }
}

/* Evidenza pip corrente + caret sopra (non sposta nulla) */
.ondata-mi .pip.is-current{ box-shadow: 0 0 10px #ffd765cc, inset 0 0 0 1px #6b4f00; outline: 2px solid #fff6; }
.ondata-mi .pip-cell.is-current::before{
  content:""; position:absolute; top:-6px; left:50%; transform: translateX(-50%);
  width:0; height:0;
  border-left:5px solid transparent; border-right:5px solid transparent;
  border-bottom:6px solid #ffd765; filter: drop-shadow(0 0 2px #000);
}

/* === Mini griglia 2x3 DENTRO il pip === */
.ondata-mi .pip .mini6{
  position: absolute;
  inset: 4px;                          /* padding interno */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  border-radius: .2rem;
  overflow: hidden;
}
.ondata-mi .pip .mini6 img{
  width: 100%; height: 100%; display: block; object-fit: cover;
  border-radius: .16rem;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25) inset;
}
/* Boss con evidenza rossa */
.ondata-mi .pip .mini6 img.boss{
  box-shadow: 0 0 0 2px rgba(255,80,80,.55) inset, 0 0 6px rgba(255,80,80,.35);
}

/* +N dentro il pip (in basso a destra) */
.ondata-mi .pip .mini-more{
  position: absolute; right: 3px; bottom: 3px;
  font: 800 .6rem/1 system-ui, sans-serif;
  color: #fff; text-shadow: 0 0 2px #000;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: .45rem; padding: 0 .25rem;
  pointer-events: none;
}

/* quando non si può avanzare: leggero hint */
.ondata-mi.is-disabled { opacity: .92; }

/* feedback rifiuto */
.ondata-mi.deny { animation: od-shake .24s linear; }
@keyframes od-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}




button#btnArrenditi {
    position: absolute;
    left: 21vw;
    top: -13vh;
}

button#btnPassaTurno {
    position: absolute;
    right: 21vw;
    top: -13vh;
}






.mi-wrap { display:inline-block; }
.mi-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .9rem;
    border-radius: .8rem;
    /* border: none; */
    border: 4px solid #8b5a33;
    border-radius: 16px;
    cursor: pointer;
    background: radial-gradient(ellipse at center, #fdf4db 0%, #f4e2b7 100%);
    color: #7e5d39;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
}
.mi-btn:active { transform: translateY(1px); }

.mi-icons { display:flex; gap:.3rem; font-size:1.1rem; }
.mi-label { font-weight:600; letter-spacing:.2px; }

.mi-badge {
  min-width: 1.8rem; 
  text-align:center; 
  font-weight:800; 
  font-size:1.0rem;
  
  padding:.1rem .35rem;
  border-radius:.4rem;
  box-shadow: inset 0 0 0 1px #fff2, 0 0 6px #000a;
}

.mi-pips {
    display: flex;
    gap: 1.3rem;
    margin-left: .25rem;
    padding: 0.5rem .5rem;
    background: #0004;
    border-radius: .6rem;
}
.mi-pips .pip {
  width:.55rem; height:.55rem; border-radius:.2rem;
  background:#555b; box-shadow: inset 0 0 0 1px #fff1;
  transform: translateZ(0);
}
.mi-pips .pip.is-filled {
  background:#ffd765; box-shadow: 0 0 8px #ffd765aa, inset 0 0 0 1px #6b4f00;
  outline: 1px solid #0006;         /* extra stacco */
}
.mi-pips .pip.pop {
  animation: pip-pop .35s ease-out;
}
@keyframes pip-pop {
  0% { transform: scale(.6); filter:brightness(1.2); }
  70% { transform: scale(1.25); filter:brightness(1.6); }
  100% { transform: scale(1); filter:none; }
}

.mi-cost {
  position:absolute; right:.6rem; top:-.6rem;
  font-size:.8rem; font-weight:800; padding:.15rem .4rem; border-radius:.5rem;
  background:#1a1f27; box-shadow: 0 2px 8px #0008, inset 0 0 0 1px #fff2;
  transform-origin: 100% 0; 
}
.mi-cost.is-warning { color:#ffd7a7; }
.mi-cost.is-free {
  background:#1e2b1e; color:#b6ffb6; box-shadow: 0 2px 10px #3cff6a55, inset 0 0 0 1px #b6ffb633;
}
.mi-cost.burst { animation: cost-burst .45s ease-out; }
@keyframes cost-burst {
  0% { transform: scale(.85); opacity:.6; }
  60% { transform: scale(1.15); opacity:1; }
  100% { transform: scale(1); opacity:1; }
}

/* Stato “pronto/gratis” (riuso della tua classe) */
.mazzo-pronto .mi-btn {
  outline: none;
  box-shadow: 0 0 0 2px #2f4030, 0 0 18px #46ff7a55;
}
.mazzo-pronto .mi-btn::after{
  content:"";
  position:absolute; inset:-2px; border-radius:.9rem;
  pointer-events:none;
/*   background: conic-gradient(from 0deg, #7cffb6 0 25%, transparent 25% 100%); */
  filter: blur(12px) opacity(.4);
  animation: spin 2.4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }





.hub-icon-badge {
  position: absolute;
  transform: translateX(-50%); /* centra rispetto a left=cx */
  pointer-events: none;        /* non intralcia l'hover dell’icona */
  z-index: 10;                 /* sopra lo sfondo ma sotto eventuali menu */
  /* stile visivo a piacere: */
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .85rem;
  line-height: 1;
  background: rgba(0,0,0,.6);
  color: #fff;
  backdrop-filter: blur(4px);
}
.hub-icon-badge .dot {
  display: inline-block;
  width: .5rem; height: .5rem;
  border-radius: 50%;
  margin-left: .4rem;
  background: #f44; /* o il tuo "novità" */
}



/* Griglia 4×4 di default (opzionale, solo utilità) */
.grid-4x4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}

/* Deckbar e bottoni (spostato dal JS allo stylesheet) */
.deckbar { display:flex; gap:.6rem; flex-wrap:wrap; align-items:center; justify-content:center; margin:.5rem 0 1rem; }
.deckbtn { position:relative; border:1px solid rgba(255,255,255,.18); border-radius:12px; padding:.35rem .5rem; background:#1a1a1a; cursor:pointer; display:flex; align-items:center; gap:.5rem }
.deckbtn img { width:28px; height:28px; object-fit:cover; border-radius:8px }
.deckbtn.active { outline:2px solid rgba(255,255,255,.25) }

/* Barra info centrata */
.compendio-bar--center {
    margin-top: 2vh;
    display: flex;
    justify-content: center;
}
.muted { opacity:.85 }

/* PLACEHOLDER LOCKED: nasconde il contenuto dello slot e mostra un “?” */
.inventario-grid .placeholder-locked { position: relative; }
.inventario-grid .placeholder-locked > *:not(.slot-placeholder) {
  opacity: 0 !important;
  pointer-events: none !important;
}
.inventario-grid .slot-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
  background: rgba(10,10,10,.55);      /* leggero velo scuro */
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 10px;
}
.inventario-grid .slot-placeholder .qmark {
  font-size: 2rem;
  line-height: 1;
  opacity: .9;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}











/* Base delle lucine timeline */
.mi-btn.ondata-mi .pip {
  width: 12px;
  height: 12px;
  background: #444;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.6);
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

/* Colore per TIPO di turno (sempre ACCESO finché non è fatto) */
.mi-btn.ondata-mi .pip.pip--empty {
  /* turni senza mob: verde */
  background: #35c46a;
}

.mi-btn.ondata-mi .pip.pip--mob {
  /* turni con minion: giallo */
  background: #f0c233;
}

.mi-btn.ondata-mi .pip.pip--boss {
  /* turno del boss: rosso */
  background: #f04747;
}

/* Turni completati: SPENTI (indifferente se erano verdi/gialli/rossi) */
.mi-btn.ondata-mi .pip.is-done {
  background: #2b2b2b;
  opacity: 0.3;
  box-shadow: none;
}

/* Turno corrente: stesso colore del tipo, ma più “in vista” */
.mi-btn.ondata-mi .pip.is-current {
  transform: scale(1.4);
  box-shadow: 0 0 6px rgba(255,255,255,0.6);
}

/* Turni ancora da fare: colore pieno */
.mi-btn.ondata-mi .pip.is-upcoming {
  opacity: 1;
}

/* Shake quando non puoi avanzare */
.ondata-mi.deny .pip.is-current {
  animation: ondata-deny 0.25s ease;
}

@keyframes ondata-deny {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-2px); }
  50%  { transform: translateX( 2px); }
  75%  { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}





/* === TIMELINE ONDATE === */

/* Bottone timeline: riusa .mi-btn, ma stringiamo un po il padding se serve */
.mi-btn.ondata-mi {
  padding: .35rem .6rem;
  border-radius: .8rem;
}

/* Contenitore delle lucine dentro il bottone */
.ondata-mi-grid {
  --cols: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: .25rem;
  align-items: center;
}

/* Cella singola della lucina */
.ondata-mi-grid .pip-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}












.ach-grid {
  display: grid;
  grid-template-columns: 1fr;  /* <<< UNA colonna */
  gap: 0.75rem;
}

.ach-card {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;

}

.ach-card.is-locked   { opacity: .85; }
.ach-card.is-unlocked { box-shadow: 0 0 0 1px rgba(80,255,120,.25) inset; }

.ach-card-header {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .25rem;
}
.ach-title { font-weight: 700; }
.ach-area  { opacity: .75; font-size: .9rem; }
.ach-badge-new {
  margin-left: auto; font-size: .75rem; padding: .1rem .5rem;
  background: #ef4444; color: #fff; border-radius: 999px;
}

.ach-desc { opacity: .9; margin:.25rem 0 .5rem 0; }

.ach-progress { display: flex; align-items: center; gap:.5rem; }
.ach-bar { flex:1; height:8px; border-radius:999px; background: rgba(255,255,255,.15); overflow:hidden; }
.ach-bar-fill { height:100%; background: #22c55e; }

.ach-progress-text { min-width: 68px; text-align:right; opacity:.9; font-variant-numeric: tabular-nums; }

.ach-status { margin-top:.35rem; opacity:.9; font-weight:600; }






.testo-back-narrativo {

        position: absolute;
        top: 55%;
        left: 51%;
        transform: translate(-50%, -50%);
height: 100%;

        width: 75%;
        max-width: 400px;
        max-height: 80%;
        box-sizing: border-box;
                /* CENTRATURA CONTENUTO */

        align-items: center;

        text-align: center;

        /* TIPOGRAFIA */
        color: white;

        font-family: 'Cinzel', serif;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);

        /* SCROLL */
        overflow-y: auto;
        z-index: 10;
    `; }