/* 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: 'Upheaval', sans-serif; /* Font per i titoli */
    --font-family-description: 'vhs-gothic', serif; /* Font per le descrizioni */
	--font-family-numeri-carte: 'CHERI___', serif;
	--font-family-testo-carte: 'MorrisRomanBlack', 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: 'vhs-gothic';
    font-style: normal;
    font-weight: normal;
    src: url('./font/vhs-gothic.ttf') format('truetype');
}
@font-face {
    font-family: 'CHERI___';
    font-style: normal;
    font-weight: normal;
    src: url('./font/CHERI___.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 */
}

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;
    text-shadow: 0 0 4px #fffad2, 0 0 1px #f8e39a;
    z-index: 11;
    pointer-events: 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 {
    margin: 10px 0;
    padding: 6px 12px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
.btn-indietro:hover {
    background-color: #666;
}


.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;
}

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;
}

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: -141%;
}

.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.5s ease-in-out, transform 5s ease-in-out; /* Transizioni per effetto */
}

#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
}





/* 
#card {
	-moz-user-select: none;
	-ms-user-select: none;
	-webkit-user-select: none;
	pointer-events: auto;
	position: absolute;
	user-select: none
}
 */


#card-text {
    flex-grow: 1;
    position: absolute;
    top: 44%;
    left: 50%;
    width: 80%;
    transform: translateX(-50%);
}

#descrizioneCarta {
    cursor: default;
    font-size: 13px;
    padding-left: 10px;
    padding-right: 10px;
    pointer-events: none;
    user-select: 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;
}

.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: 5px;
    /* left: 50%; */
    /* transform: translateX(-50%); */
    width: 91%;
    margin-left: 1%;
    margin-right: 1%;
    /* color: var(--color-overlay); */
    font-size: 3vh;
    font-family: var(--font-family-title);
    /* line-height: 1; */
    /* height: 50px; */
    padding: 20px 10px 20px 10px;
    /* word-wrap: break-word; */
    background-color: var(--color-background);
    opacity: 0;
    transition: opacity 0.2s ease-out;
    z-index: 2;
    border: 3px solid var(--color-border);
    border-radius: 1vh;
    /* justify-content: center; */
    /* align-items: center; */
}



.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: -7%;
    left: -7%;
    width: 114%;
    height: 114%;
    background: var(--cornice-back-url, none);
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 2;
    border-radius: 12px;
}




.back-image {
    pointer-events: none;
	visibility: hidden;
}


.front::before {
    content: "";
    position: absolute;
    top: -7%;
    left: -7%;
    width: 114%;
    height: 114%;
    z-index: 2;
    pointer-events: none;
    background-image: var(--cornice-front-url, none);
    background-size: cover;
    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: 67vh;
    max-width: 45vh;
    /* margin: 10px 10px 10px 10px; */
    background-color: white;
    min-width: 47vh;
    min-height: 70vh;
    pointer-events: auto;
    position: relative;
    text-align: center;
    /* top: 7vh; */
    transition: transform 4.5s ease-out;
    user-select: none;
    /* z-index: 10;
}

.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: 50px;
    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;
}










.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: 18%;
z-index: 1000;
    bottom: 7px;
    left: 112px;
     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;
}

#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;
}

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 */
.cella-con-cornice > * {
    position: relative;
    z-index: 1;
}
.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: 69px;
    left: 30px;
    /* background-color: rgba(0, 0, 0, 0.8); */
    color: #96f6cc;
    font-size: 30px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 4px;
}

span#scarti-count{
    position: absolute;
top: 69px;
    right: 30px;
    /* background-color: rgba(0, 0, 0, 0.8); */
    color: #96f6cc;
    font-size: 30px;
    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;
}

@font-face {
  font-family: 'Domine';
  src: url('./font/domine.ttf') format('truetype');
}



#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#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: 20px;
    z-index: 100;
	left: 20px;
}

.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: 5%;
    /* left: 50%; */
    width: 100%;
    display: flex
;
    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: 2vh;
    left: 2vh;
}

#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;
    /* flex-direction: column; */
    /* gap: 10px; */
    /* max-height: 64vh; */
    -moz-user-select: none;
    -ms-user-select: none;
    /* -webkit-user-select: none; */
    /* max-width: 40vh; */
    /* margin: 10px; */
    min-width: 45vh;
    min-height: 62vh;
    /* bottom: 13vh; */
    /* border-radius: 8px; */
    /* user-select: none; */
    /* box-shadow: 0 4px 8px var(--color-shadow); */
    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: -2px; */
    width: 25%;
    bottom: 10px;
    /* pointer-events: none; */
    position: absolute;
    justify-content: flex-end;
}

/* Stile base per i gruppi */
.stat-group {

    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;
}



#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;
    z-index: 15;
}
.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%;
}

#panel1 {
	height: 75%;
}
#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;
}



#panel2 {
	height: 40%;
}
#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;
}

#panel4 {
	height: 10%;
}
#panel4::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;
}

#panel5 {
	height: 30%;
}
#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%;
}
#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%;
}
#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%;

}
#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%;

}
#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%;

}
#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.png);
    background-size: contain;
    background-repeat: no-repeat;
    /* background-position: center; */
    z-index: -1;
}
#panel10 {
	height: 5%;

}
#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;
}

#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%;
}
#panel15::before {
    content: "";
    position: absolute;
    top: -17%;
    left: -16%;
    width: 132%;
    height: 144%;
    background-image: url(img/sfondo-barra7-2.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}
#panel16 {
	height: 75%;
}
#panel16::before {
    content: "";
    position: absolute;
    top: -17%;
    left: -16%;
    width: 132%;
    height: 144%;
    background-image: url(img/sfondo-barra7-2.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

#panel17 {
	height: 100%;
}
#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%;
}
#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;
}


#panel19 {
	height: 100%;
}
#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%;
}
#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%;
}
#panel21::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;

    z-index: 1;
}

#panel22 {
	height: 100%;
}
#panel22::before {
    content: "";
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-color: #fff5cc;

    z-index: 1;
}

#panel23 {
	height: 100%;
}
#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: 100%;
}
#panel24::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;
}

/* 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: -91%;
    transform: translateX(-50%);
}

div#turniProssimaOndataContainer {
    position: absolute;
    top: -74vh;
}

#ondataIndicator {

background-size: cover;
    background-position: center;
    width: 114px;
    height: 50px;
    padding-left: 20px;
    display: flex;
    justify-content: flex-start;
    border-radius: 6px;
    align-items: center;
}
.ondata-minion {
    background-image: url('img/ui/contatore-mob-minion.png');
}

.ondata-boss {
    background-image: url('img/ui/contatore-mob-minion-boss.png');
}

.ondata-nessuno {
    background-image: url('img/ui/contatore-mob-nessuno.png');
}


#mazzoIndicator {
    background-image: url('img/ui/contatore-pg.png');
background-size: cover;
    background-position: center;
    width: 114px;
    height: 50px;
    padding-left: 20px;
    display: flex;
    justify-content: flex-start;
    border-radius: 6px;
    align-items: center;
}


.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;
  animation: fadeInOut 3s ease-in-out;
}

.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 fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(0); }
  10% { opacity: 1; transform: translateX(-50%) translateY(-10px); }
  90% { opacity: 1; transform: translateX(-50%) translateY(-10px);}
  100% { 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;
}
