body {
		font-family: Arial, sans-serif;
		font-size: 18px;
		display: flex;
		flex-direction: column;
		align-items: center;
		background-color: #121213;
		color: white;
		margin: 0;
		padding: 10px;
}

p {
		user-select: none;
		-webkit-touch-callout: none;   /* Desactiva el menú de previsualització a iOS */
		-webkit-user-select: none;   /* Evita la selecció de text */
}

.panell {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background-color: rgba(0,0,0,0.6);
		z-index: 999;
		display: flex;
		justify-content: center;
		align-items: center;
}

.panell2 {
		width: 80vw;
		height: 70vh;
		max-width: 500px;
		max-height: 500px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		background-color: #332233;
		border-radius: 15px;
		box-shadow: 0px 4px 15px rgba(0,0,0,0.3);
		padding: 10px;
		box-sizing: border-box;
		overflow-y: auto;
}

.boto1 {
		background-color: #0066ff;
		background: linear-gradient(180deg, #1e90ff 0%, #0044cc 100%);
		color: white;
		border: none;
		font-size: 23px;
		font-weight: bold;
		padding: 12px 18px;
		border-radius: 25px;
		cursor: pointer;
		transition: background-color 0.3s ease;
		box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
		user-select: none;
		-webkit-touch-callout: none; /* Desactiva el menú de previsualització a iOS */
		-webkit-user-select: none;   /* Evita la selecció de text */
		touch-action: manipulation;   /* evita que un doble click faci zoom de pantalla a l'iPhone */
}
.boto1:active {
		background-color: #0044cc;
		background: linear-gradient(180deg, #1070dd 0%, #0033aa 100%);
		box-shadow: 0 1px 7px rgba(0, 0, 0, 0.4);
		transform: scale(0.96);
}

.boto2 {
		background-color: #fff07b;
		background: linear-gradient(180deg, #fff07b 0%, #ccc044 100%);
		color: black;
		border: none;
		font-size: 23px;
		font-weight: bold;
		padding: 12px 18px;
		border-radius: 25px;
		cursor: pointer;
		transition: background-color 0.3s ease;
		box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
		user-select: none;
		-webkit-touch-callout: none; /* Desactiva el menú de previsualització a iOS */
		-webkit-user-select: none;   /* Evita la selecció de text */
		touch-action: manipulation;   /* evita que un doble click faci zoom de pantalla a l'iPhone */
}
.boto2:active {
		background-color: #ccc044;
		background: linear-gradient(180deg, #eee066 0%, #bbb033 100%);
		box-shadow: 0 1px 7px rgba(0, 0, 0, 0.4);
		transform: scale(0.96);
}


.boto3 {
		background-color: #fff07b;
		background: linear-gradient(180deg, #fff07b 0%, #ccc044 100%);
		color: black;
		border: none;
		font-size: 16px;
		padding: 5px 10px;
		border-radius: 10px;
		cursor: pointer;
		user-select: none;
		-webkit-touch-callout: none; /* Desactiva el menú de previsualització a iOS */
		-webkit-user-select: none;   /* Evita la selecció de text */
		touch-action: manipulation;   /* evita que un doble click faci zoom de pantalla a l'iPhone */
}

.divh {
		display: flex;
		justify-content: space-evenly; /* Reparteix els botons equitativament (dreta, esquerra i entremig) */
		align-items: center;
		width: 100%;		
}

.joc {
		width: 100%;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
}

h1 { margin-bottom: 20px; }

.tauler {
		display: grid;
		grid-template-rows: repeat(var(--intents, 6), 1fr);
		gap: 5px;
		margin-bottom: 15px;
		width: 100%;
		height: calc(var(--intents, 6) * 55px);
		opacity: 0;
		transition: opacity 1s;
}

.fila {
		display: grid;
		grid-template-columns: repeat(var(--lletres, 5), minmax(0, 50px));
		justify-content: center;
		gap: 5px;
		width: 100%;

}

.casella {
		aspect-ratio: 1 / 1; 
		min-width: 0;
		min-height: 0;
		border: 2px solid #777777;
		display: flex;
		align-items: center;
		justify-content: center;
		font-weight: bold;
		text-transform: uppercase;
		font-size: clamp(14px, 10vmin, 28px);   /* clamp(mínim, valor_dinàmic, màxim) */
		line-height: 1;
		user-select: none;
		-webkit-touch-callout: none; /* Desactiva el menú de previsualització a iOS */
		-webkit-user-select: none;   /* Evita la selecció de text */
}

/* Estils de les lletres comprovades */
/* .correcta { background-color: #538d4e !important; border-color: #538d4e !important; } /* Verda */
/* .present { background-color: #b59f3b !important; border-color: #b59f3b !important; }  /* Groga */
.correcta { background-color: #10650d !important; border-color: #10650d !important; } /* Verda */
.present { background-color: #807020 !important; border-color: #807020 !important; }  /* Groga */
.incorrecta { background-color: #3a3a3c !important; border-color: #3a3a3c !important; } /* Grisa */


/* Teclat Virtual en pantalla*/
.teclat {
		display: flex;
		flex-direction: column;
		gap: 8px;
		width: 100%;
		max-width: 500px;
		user-select: none;
		margin-top: 20px;	
		opacity: 0;
		transition: opacity 1s;
}

/* Cada fila horitzontal */
.fila-teclat {
		display: flex;
		justify-content: center;
		gap: 5px;
		width: 100%;
}

.tecla {
		flex: 1;  /* Mida uniforme i proporcional per a totes les tecles lletra */
		display: flex;
		height: 58px;
		font-size: 18px;
		font-weight: bold;
		background-color: #818384;
		color: white;
		border: 0;
		border-radius: 4px;												 
		align-items: center;
		justify-content: center;
		cursor: pointer;
		text-transform: uppercase;
		transition: background-color 0.1s ease;
		user-select: none;
		-webkit-user-select: none;   /* Evita la selecció de text */
		-webkit-touch-callout: none; /* Desactiva el menú de previsualització a iOS */
		touch-action: manipulation;   /* evita que un doble click faci zoom de pantalla a l'iPhone */
    padding: 0;        /* Elimina qualsevol desviazione per padding buit */
    line-height: 1;    /* Evita que l'alçada del text heretada de fóra el desplaci */
    box-sizing: border-box; /* Garanteix que els 58px d'height siguin exactes */
}
.tecla:active {
		background-color: #565758;
}

 .tecla-backspace {
		flex: 1.5;				 
		font-size: 20px;
		background-color: #565758;
}

.tecla-enter {
		flex: 1.5;
		font-size: 36px;
		line-height: 0;
		padding-bottom: 8px;
		background-color: #4444dd;
}
.tecla-enter:active {
		background-color: #111188;
}


.resultat {
		width: 90%;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		overflow-y: auto;
		padding: 10px;
		margin-top: 5px;	
		opacity: 0;
		transition: opacity 1s;
}


.efecte {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		z-index: 9999;
		pointer-events: none;   /* Permet fer clic als elements de sota */
		background: transparent;
}

.cvefecte {
		display: block;
		width: 100%;
		height: 100%;
}


/* PUBLI */

#contenedor-anuncio {
		display: none;   /* Amagat per defecte */
		background: black;
		position: absolute;
		top: 0;   left: 0;   width: 100%;   height: 100%;
		z-index: 9997;
}
video, #capa-google-ima {
		width: 100%; height: 100%; position: absolute; top: 0; left: 0;
		z-index: 9998;   /* a sobre, impedint fer clic al video per pausar-lo, i mostrant els segons que queden */
}
#comptador-temps {
		position: absolute;
		top: 20px;
		right: 20px;
		background: rgba(0, 0, 0, 0.6); /* Fons negre semi-transparent molt fi */
		color: white;
		font-family: sans-serif;
		font-size: 14px;
		padding: 8px 12px;
		border-radius: 20px; /* Cantons arrodonits estil app mòbil */
		z-index: 9999; /* Per sobre de la capa de Google perquè es pugui llegir */
		pointer-events: none; /* Evita que l'usuari el pugui clicar */
}        

/*
#content {
  position: absolute;
  top: 0;
  left: 0;
  width: 640px;
  height: 360px;
}

#contentElement {
  width: 640px;
  height: 360px;
  overflow: hidden;
}

#adContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 640px;
  height: 360px;
}
*/