/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

html, body {
  height: 100%;
}

body {
  background: #fefefe;
  color: #333;
  display: flex;
  flex-direction: column;
}

.center {
  text-align: center;
}

/* HEADER */
.header {
  background: linear-gradient(135deg, #ff9800, #ff5722);
  color: #fff;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 62px;
  z-index: 2000;
  white-space: nowrap;
}

@font-face {
  font-family: 'Fredoka';
  src: url('../css/Fredoka.otf') format('opentype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  text-shadow: 2px 2px 0 #000030;
}

.logoQR {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  text-shadow: 0px 0px 0 #000030;
}

.botonesJuegos {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  text-shadow: 2px 2px 0 #000030;
}

.nav {
  display: flex;
  gap: 1rem;
  z-index: 2100;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.menu-icon {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

#menu-toggle {
  display: none;
}

.top-wrapper {
  position: sticky;
  top: 0;
  z-index: 3000;
}

.barra-info {
  background: #ff9800;
  color: #fff;
  text-align: center;
}

/* PARRAFOS INFORMACIÓN INFERIOR PORTADA */
.parrafo-alterno {
  width: 100%;
  padding: 12px;
  margin: 0;
  border-radius: 0;
  box-sizing: border-box;
}

.parrafo-alterno:nth-of-type(odd) {
  background-color: #FFF4D9;
}

.parrafo-alterno:nth-of-type(even) {
  background-color: #FFECC4;
}

/* Contenedor del párrafo especial */
.parrafo-titulo {
  margin: 16px auto;
  padding: 18px;
  width: 100%;
  max-width: 300px;
  background-color: #fff3e0;
  border: 3px dashed #ff5722;
  border-radius: 30px;
  font-size: 1.5rem;
  text-align: center;
  line-height: 1.5;
  box-sizing: border-box;
}

.instrucciones {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 8px 12px;
  margin: 6px 0;
  border-radius: 12px;
  font-size: 1rem;
}


/* HERO */
.hero {
  background: #ffeb3b;
  padding: 1rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

/* SECCIONES */
.section {
  padding: 1rem 1rem;
  margin: auto;
}

.section h2 {
  margin-bottom: 0rem;
  text-align: center;
}

/* Elimina el subrayado solo en los enlaces dentro de .game-card */
a {
  text-decoration: none;
  color:#fff;
}

/* Elimina el subrayado en los enlaces dentro de .game-card */
.game-card {
  text-decoration: none;
}

/* JUEGOS */
.games-grid {
  display: grid;
  grid-template-columns: 1fr; /* móvil */
  gap: 1rem;
}

/* Desktop */
@media (min-width: 768px) {
  .games-grid {
	grid-template-columns: 1fr;  /* sigue en vertical */
	max-width: 400px;			/* ancho máximo */
	margin: 0 auto;			  /* centrado horizontal */
  }
}

.games-grid18 {
  display: none;
}

.age-box {
  text-align: center;
  margin-top: 10px;
}

.age-box button {
  padding: 12px 22px;
  font-size: 16px;
  border: none;
  border-radius: 25px;
  margin: 10px;
  color: #fff;
}

/* Botón SÍ */
.age-box button:first-of-type {
  background-color: #2ecc71;
}

/* Botón NO */
.age-box button:last-of-type {
  background-color: #e74c3c;
}


.game-card {
  background: #4caf50;
  color: #fff;
  padding: 1rem;
  text-align: center;
  border-radius: 12px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.2s;

  display: flex;
  align-items: center;
  justify-content: center;
}


.game-card:hover {
  transform: scale(1.05);
}


/* JUEGOS PICANTES */
.spicy {
  background: #fff3e0;
  border-top: 4px dashed #ff5722;
}


/* JUEGOS CON DERECHO A ROCE */
.derechoaroce {
  background: #FFB6A8;
  border-top: 4px dashed #FF2C00;
}


.coming-soon {
  text-align: center;
  font-size: 1.2rem;
  color: #ff5722;
  font-weight: bold;
}

/* FOOTER */
.footer {
  background: #333;
  color: #fff;
  padding: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;

  margin-top: auto; /* 🔑 CLAVE */
}

.footer-links {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

/* Móvil */
@media (max-width: 480px) {
  .footer {
	flex-direction: column;
	gap: 0.5rem;
  }

  .footer-links {
	justify-content: center;
	flex-wrap: wrap;
	font-size: 0.67rem; /* o el tamaño que quieras */
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}



/* RESPONSIVE */
@media (max-width: 768px) {
  .menu-icon {
	display: block;
  }

  .nav {
	position: absolute;
	top: 70px;
	right: 0;
	background: #ff5722;
	flex-direction: column;
	width: 200px;
	display: none;
  }

  .nav a {
	padding: 1rem;
	border-bottom: 1px solid rgba(255,255,255,0.3);
  }

  #menu-toggle:checked + .menu-icon + .nav {
	display: flex;
  }
}


/* ACEPTACION CONDICIONES COOKIES Y DEMAS */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 900px;
  background: #eee;
  color: #000;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 1000;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Texto */
.cookie-banner p {
  margin: 0;
}

/* Enlaces */
.cookie-banner a {
  color: #4da3ff;
  text-decoration: underline;
}

.cookie-banner a:hover {
  opacity: 0.85;
}

/* Contenedor botones */
.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Botones generales */
.cookie-buttons .btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Botón aceptar */
.btn.accept {
  background: #4caf50;
  color: #fff;
margin-right: auto;
}

.btn.accept:hover {
  background: #43a047;
}

/* Botón rechazar */
.btn.reject {
  background: #f44336;
  color: #fff;
margin-left: auto;

}

.btn.reject:hover {
  background: #e53935;
}

/* Botón configurar */
.btn.settings {
  background: #444;
  color: #fff;
}

.btn.settings:hover {
  background: #555;
}

@media (min-width: 768px) {

  .cookie-banner {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
  }

  /* El texto ocupa el espacio disponible */
  .cookie-banner p {
	flex: 1;
  }

  /* Botones no se estiran */
  .cookie-buttons {
	flex: 0;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
  }

}

/* SELECTOR DE TEMA */
.theme-dropdown {
  margin-left: 1rem;
}

.theme-dropdown select {
  background: rgba(255,255,255,0.9);
  color: #333;
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}



/**************** POPUP ****************/

@keyframes popupIn {
  0% {
	transform: scale(0.8) translateY(20px);
	opacity: 0;
  }
  100% {
	transform: scale(1) translateY(0);
	opacity: 1;
  }
}

#popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

#popup-overlay.show {
  display: flex;
}

#popup-box {
  background: linear-gradient(135deg, #ff9800, #ff5722);
  color: #fff;
  padding: 2.5rem 2rem;
  border-radius: 16px;
  text-align: center;
  animation: popupIn 0.35s ease-out;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  max-width: 360px;
  width: 90%;
}

#popup-box h2 {
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
}

#popup-box p {
  margin-bottom: 1.8rem;
  font-size: 1.05rem;
}

#popup-box button {
  background: #4caf50;
  color: #fff;
  border: none;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

#popup-box button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

#popup-cover {
  width: 100%;
}

#popup-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/**************** PELICULAS ****************/
cabecera {
  padding: 0;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  background: #000;
  border-bottom: 1px solid #333;
  color: #ffffff;
}

.app {
  width: 100%;
  max-width: 95%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.panel h3 {
  margin: 0.4rem 0;  
  font-size: 1.1rem;  
  letter-spacing: 0.2rem; 
  text-align: center;
  color: #aaa;
}

.box {
  width: 100%;
  max-width: 95%;
  min-height: 6rem;  
  padding: 0.7rem;  
  background: #FFFCC7;
  border-radius: 6px;
  font-size: 1rem;
  margin: 0 auto 0.8rem;  
}

/* Campo de pistas */
.box-clues {
  height: 250px;  /* Aumentar altura del recuadro de pistas */
  min-height: 250px;  /* Asegura que el recuadro no se haga más pequeño */
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
  margin-top: 1rem;
}

/* Texto de fondo "PISTAS" */
#cluesBox::before {
  content: "PISTAS";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 1.2rem;
  pointer-events: none;
}

/* Cuando aparezca la primera pista, ocultar el texto de fondo */
#cluesBox.has-pistas::before {
  display: none;
}

.box-movie {
  min-height: 3rem;  
  padding: 0.5rem;  
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.6rem;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.muted {
  color: #777;
}

.controls {
  margin-top: auto;
  padding: 0.8rem;  
  display: grid;
  gap: 6px;  
}

button {
  padding: 0.4rem;  
  font-size: 1.1rem;  
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: center;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

.green { background: #28a745; color: #fff; }
.red   { background: #dc3545; color: #fff; }
.blue  { background: #007bff; color: #fff; }

@keyframes movieReveal {
  0% {
	opacity: 0;
	transform: translateY(20px) scale(0.95);
  }
  100% {
	opacity: 1;
	transform: translateY(0) scale(1);
  }
}

.movie-reveal {
  animation: movieReveal 0.6s ease-out;
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
}

#movieBox a {
  color: #000;
  text-decoration: none;
}

#movieBox.muted {
  animation: movieReveal 0.6s ease-out;
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
}


/**************** CENSURADOS ****************/
.contenedor {
	/* perspective: 1000px; */
	width: 100%;
}

.carta {
	width: 280px;
	height: 420px;
	position: relative;
	transform-style: preserve-3d;
	transition: transform 0.8s;
	cursor: pointer;
}

.carta.girada {
	transform: rotateY(180deg);
}

.cara {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 15px;
	backface-visibility: hidden;
	box-shadow: 0 10px 25px rgba(0,0,0,0.4);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.reverso {
	background: #FFB324;
	color: #fff;
	font-size: 38px;
	font-weight: bold;
}

.reverso18 {
	background: #FF0000;
	color: #fff;
	font-size: 38px;
	font-weight: bold;
}

.frente {
	background: #fff;
	transform: rotateY(180deg);
	padding: 20px;
	box-sizing: border-box;
}

.frente h1 {
	margin: 0;
	color: #e74c3c;
}

.frente ul {
	list-style: none;
	padding: 0;
	margin: 15px 0;
}

.frente li {
	font-size: 18px;
	margin: 5px 0;
}

#timer {
	width: 100px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;

	margin: 0 auto;

	font-size: 32px;
	font-weight: bold;

	color: #2c3e50;
	background-color: #ffffff;
	
	border-radius: 12px;
	border: 2px solid #2c3e50;

	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#nextBtnP {
	padding: 12px 28px;
}

#nextBtn {
	padding: 12px 28px;

	background-color: #f39c12;
	background-image: linear-gradient(135deg, #f39c12, #e67e22);
	color: #ffffff;

	font-family: 'Poppins', Arial, sans-serif;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.5px;

	/* border: 2px solid #2c3e50; */
	border-radius: 12px;

	cursor: pointer;

	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transition: all 0.2s ease;
}


#finalizar {
  background-color: #e63946;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 0 #b02a37;
  transition: all 0.15s ease;
  margin-top: 12px;
}

/* Hover */
#finalizar:hover {
  background-color: #d62839;
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b02a37;
}

/* Click */
#finalizar:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #b02a37;
}

/* Accesibilidad */
#finalizar:focus {
  outline: 2px solid #ffd166;
  outline-offset: 2px;
}


/**************** ATREVIDOS ****************/
.atrevidos-carta{
	width:280px;
	height:420px;
	position:relative;
	transform-style:preserve-3d;
	transition:transform 0.8s;
	cursor:pointer;
}

.atrevidos-carta.atrevidos-girada{
	transform:rotateY(180deg);
}

.atrevidos-cara{
	position:absolute;
	width:100%;
	height:100%;
	backface-visibility:hidden;
	border-radius:20px;
	box-shadow:0 15px 30px rgba(0,0,0,0.4);
	display:flex;
	justify-content:center;
	align-items:center;
	flex-direction:column;
	padding:20px;
	box-sizing:border-box;
}

.atrevidos-frontal{
	background:linear-gradient(160deg,#FFF84A,#dd2476);
	color:white;
	font-size:32px;
	font-weight:bold;
	letter-spacing:2px;
}

.atrevidos-trasera{
	background:white;
	transform:rotateY(180deg);
	text-align:center;
}

.atrevidos-accion{
	font-size:1.4em;
	color:#dd2476;
	font-weight:bold;
	margin-bottom:10px;
}

.atrevidos-palabra{
	font-size:1.4em;
	color:#333;
	font-weight:bold;
	margin-bottom:0px;
	margin-top: 25px;
}

.atrevidos-timer{
	font-size:1.2em;
	font-weight:bold;
	color:#2a5298;
	width: 100px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;

	margin: 0 auto;
	margin-top: 25px;
	font-size: 32px;
	font-weight: bold;

	color: #2c3e50;
	background-color: #ffffff;
	
	border-radius: 12px;
	border: 2px solid #2c3e50;

	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.atrevidos-boton{
	background-color: #e63946;
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 10px 18px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 0 #b02a37;
	transition: all 0.15s ease;
	margin-top: 12px;
}

.atrevidos-boton:hover{
  background-color: #d62839;
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b02a37;
}

/* Click */
.atrevidos-boton:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #b02a37;
}

/* Accesibilidad */
.atrevidos-boton:focus {
  outline: 2px solid #ffd166;
  outline-offset: 2px;
}

@media (max-width:500px){
	.atrevidos-carta{
		width:280px;
		height:420px;
	}
}

.atrevidos-trasera{
	position: relative;
}

.atrevidos-aviso{
	position: absolute;
	left: 0;
	width: 100%;
	text-align: center;
	font-size: 12px;
	font-weight: bold;
	letter-spacing: 2px;
	color: #444;
	text-transform: uppercase;

	white-space: nowrap;

	transform: rotateY(180deg);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

/* líneas decorativas */
.atrevidos-aviso::before,
.atrevidos-aviso::after{
	content: "";
	position: absolute;
	left: 15%;
	width: 70%;
	height: 1px;
	background-color: #444;
}

/* línea superior */
.atrevidos-aviso::before{
	top: -1px;
}

/* línea inferior */
.atrevidos-aviso::after{
	bottom: -1px;
}

.atrevidos-aviso.arriba{
	top: 10px;
}

.atrevidos-aviso.abajo{
	bottom: 10px;
}

/**************** JUEGO PREGUNTAS ****************/

/* Blindaje global */
*, *::before, *::after {
  box-sizing: border-box;
}

.input-gris {
	background-color: #f0f0f0; /* Fondo gris claro */
	color: #333; /* Color de texto oscuro para contraste */
	border: 1px solid #ccc; /* Borde gris claro */
}

.question-card {
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 0;
  text-align: center;
  animation: fadeIn 1s ease-in;
  max-width: 100%;
  overflow: hidden;
}

.question-card h2 {
  font-size: clamp(1.5rem, 4.5vw, 1.5rem);
  margin-bottom: 14px;
  padding-inline: 12px;
  overflow-wrap: break-word;
}

/* MATRIZ 2x2 SIEMPRE */
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  max-width: 100%;
}

/* CONTENEDOR RESPUESTA */
.answer {
  color: #000;
  padding: 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;

  font-size: clamp(1.2rem, 3.8vw, 1.2rem);
  line-height: 1.3;

  position: relative;
  transition: background 0.3s, opacity 0.3s;

  background-clip: padding-box;
  max-width: 100%;

  /* CLAVE anti desbordes */
  overflow: hidden;
/*overflow-wrap: break-word;*/
  overflow-wrap: anywhere;
  word-break: break-word;
/*hyphens: auto;*/
  hyphens: none;

  /* Evita que el grid se estire */
  min-width: 0;
}

/* Hover solo en desktop */
@media (hover: hover) {
  .answer:hover {
	transform: scale(1.05);
  }
}

@media (hover: none) {
  .answer:hover {
	transform: none;
  }
}

/* CAPA DE VOTOS */
.answer .votes {
  color: #fff;
  opacity: 0;

  font-size: clamp(0.65rem, 3.2vw, 0.85rem);

  position: absolute;
  inset: 0;

  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;

  padding: 12px;
  border-radius: 10px;

  background: rgba(0, 0, 0, 0.55);

  /* Blindaje total */
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;

  overflow-wrap: break-word;
  word-break: break-word;
}

.answer.has-votes .votes {
  opacity: 1;
}

/* VOTANTE */
.voter {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 8px;

  font-size: inherit;
  line-height: 1.2;

  white-space: normal;
  max-width: 100%;

  overflow-wrap: break-word;
  word-break: break-word;
}

/* Ajuste visual si hay muchas filas */
.answer.has-votes.multi-row::after {
  content: "";
  display: block;
  height: 26px;
}



/* Colores base (iniciales) */
.red { background: #e74c3c; }
.blue { background: #3498db; }
.green { background: #2ecc71; }
.yellow { background: #f1c40f; }

/* Color azul para la selección previa */
.answer.selected {
  background: #B9E9FE;
  opacity: 0.8;
  cursor: not-allowed;
}

.answer.selected:hover {
  transform: none;
}

/* Permitir que JS sobrescriba el color en reveal */
.answer[style*="background"] {
  background-image: none !important;
}



#timer {
  font-size: 1.5em;
}



@keyframes fadeIn {
  0% { opacity:0; transform: translateY(-20px);}
  100% { opacity:1; transform: translateY(0);}
}
#pin {
  text-transform: uppercase;
}

/* Recuadro blanco */
.card-preguntas {
  width: 300px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  color: #000;
}

/* estilo para el lobby de listillos y sinverguenza */
.container {
	max-width: 480px;
	width: 100%;
	background: #ffffff;
	padding: 10px;
	border-radius: 12px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.15);
	text-align: center;
	margin: 0 auto;
}

/* Títulos */
.card-preguntas h2 {
  text-align: center;
  margin: 10px 0 15px;
}

/* Formularios */
.card-preguntas form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Inputs, select y botones */
.card-preguntas input,
.card-preguntas select,
.card-preguntas button {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 8px;
  box-sizing: border-box;
}

/* Inputs y select */
.card-preguntas input,
.card-preguntas select {
  border: 1px solid #ccc;
}

/* Botón */
.card-preguntas button {
  background: #FFC773;
  color: #000;
  border: none;
  cursor: pointer;
}

.card-preguntas button:hover {
  background: #FFA31A;
}

/* Separador */
.card-preguntas hr {
  margin: 20px 0;
  border: none;
  border-top: 1px solid #ddd;
}


.button-peliculas {
  background-color: #fff;
  color: #333;
  border: none;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;

  /* sombra */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);

  transition: 
	transform 0.2s ease,
	box-shadow 0.2s ease;

  width: 300px;
  margin: 0.5rem;
}

.button-peliculas:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

// BOTONES COPIAR PIN Y URL

.label {
	margin-top: 12px;
	margin-bottom: 4px;
	font-weight: 600;
}

.copy-btn {
	padding: 10px 18px;
	border-radius: 999px;
	border: none;
	background: #f2f2f2;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	color: #000;
}

.copy-btn:hover {
	background: #e6e6e6;
}

.copy-btn:active {
	transform: scale(0.97);
}

/* LOBBY  BOTÓN PRINCIPAL START */
.btn-start {
	background: linear-gradient(135deg, #ff00c8, #7a00ff);
	color: black;
	border: none;
	padding: 16px 32px;
	font-size: 20px;
	font-weight: 700;
	border-radius: 999px;
	cursor: pointer;
	letter-spacing: 0.5px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
	transition: all 0.25s ease;
	position: relative;
	overflow: hidden;
}

/* Hover */
.btn-start:hover {
	transform: translateY(-3px) scale(1.03);
	box-shadow: 0 12px 25px rgba(180, 180, 180, 0.6);
}

/* Click */
.btn-start:active {
	transform: scale(0.95);
	box-shadow: 0 4px 10px rgba(180, 180, 180, 0.4);
}

/* Efecto brillo animado */
.btn-start::after {
	content: "";
	position: absolute;
	top: 0;
	left: -75%;
	width: 50%;
	height: 100%;
	background: rgba(255,255,255,0.3);
	transform: skewX(-25deg);
	transition: 0.5s;
}

.btn-start:hover::after {
	left: 125%;
}


#players {
	list-style: none;
	padding: 0;
	text-align: center;
}

.player-box {
	display: inline-block;
	background: #ff7a00;		  /* naranja más moderno */
	color: white;
	padding: 4px 10px;			/* más compacto */
	margin: 4px;
	border-radius: 6px;		 /* forma totalmente redondeada */
	font-size: 20px;
	font-weight: 500;			 /* menos pesado que bold */
	letter-spacing: 0.3px;
	font-weight: bold;
}




/* ================== CARTAS INFAMES ================== */
/* ================== CONTENEDORES ================== */

.containerCartasInfames {
	max-width: 480px;
	width: 100%;
	background: #ffffff;
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.15);
	text-align: center;
}

@media (max-width: 500px) {
	.containerCartasInfames {
		padding: 20px;
	}
	h1 { font-size: 22px; }
	input[type="text"] { font-size: 14px; }
	button.btn { font-size: 14px; }
}

.container button {
	background: #FFC773;
}

.container button:hover {
  background: #FFA31A;
}


#toast {
	visibility: hidden;
	min-width: 320px;
	background: rgba(220, 53, 69, 0.9);
	color: #fff;
	text-align: center;
	border-radius: 8px;
	padding: 14px 20px;
	position: fixed;
	z-index: 9999;

	/* CENTRADO */
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);

	font-size: 15px;
}

#toast.show {
	visibility: visible;
	animation: fadeIn 0.25s, fadeOut 0.25s 1.2s;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes fadeOut {
	from { opacity: 1; }
	to   { opacity: 0; }
}



#appH {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	text-align: center;
}

.hand {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin-top: 20px;
}

.player-listH {
	list-style: none;
	margin-top: 10px;
}

.player-listH li {
	margin: 4px 0;
	font-size: 16px;
}

.player-listH li.connected {
	font-weight: bold;
	color: green;
}

/* ================== CARTAS ================== */
.cardH {
	width: 180px;
	height: 240px;
	border-radius: 12px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	text-align: left;
	font-size: 16px;
	line-height: 1.4;
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
	user-select: none;
	box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Hover sobresaliente */
.cardH:hover {
	transform: translateY(-6px);
	box-shadow: 0 10px 25px rgba(0,0,0,0.45);
}

/* Cartas blancas */
.cardH.white {
	background: #fff;
	color: #000;
	border: 1px solid #ccc;
}


/* Cartas negras */
.cardH.black {
	background: #000;
	color: #fff;
	border: 1px solid #444;
	margin: 12px auto;
	cursor: default;
	text-align: left;
	font-weight: bold;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

/* Mensaje de autor en carta negra */
.cardH.black .author {
	margin-top: auto;
	align-self: flex-end;
	font-size: 0.9em;
	font-weight: normal;
	color: #ccc;
}

/* ================== MENSAJES ================== */
.waitingH {
	margin-top: 20px;
	font-style: italic;
	font-size: 18px;
}

/* ================== CUENTA ATRÁS ================== */
.countdownH {
	font-size: 72px;
	margin-top: 50px;
	color: #333;
	animation: fadeIn 0.5s ease-in-out;
}

/* ================== ANIMACIONES ================== */
@keyframesH fadeIn {
	from { opacity: 0; transform: scale(0.8);}
	to { opacity: 1; transform: scale(1);}
}

/* ================== TRANSICIÓN ENTRE RONDAS ================== */
.handH .cardH {
	opacity: 0;
	transform: translateY(20px);
	animation: cardAppear 0.3s forwards;
}

@keyframesH cardAppearH {
	to { opacity: 1; transform: translateY(0);}
}

/* ================== INTERLUDIO ================== */
.interludeH {
	font-size: 18px;
	font-weight: bold;
	margin: 20px 0;
}

/* ================== PUNTUACIONES ================== */
#scoreboard {
	max-width: 300px;
	margin: 20px auto;
	text-align: center;
	background: #f5f5f5;
	padding: 16px;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#scoreboard h3 {
	margin-bottom: 12px;
	font-size: 20px;
}

#scoreboard ul {
	list-style: none;
	padding: 0;
}

#scoreboard ul li {
	font-size: 16px;
	margin: 6px 0;
	padding: 6px 10px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ================== RESPONSIVE ================== */
@mediaH (max-width: 800px) {
	.cardH {
		width: 140px;
		height: 200px;
		font-size: 14px;
		padding: 12px;
	}
	.cardH.black {
		width: 140px;
		height: 200px;
	}
	#scoreboard {
		width: 90%;
		padding: 12px;
	}
	#scoreboard h3 {
		font-size: 18px;
	}
	#scoreboard ul li {
		font-size: 14px;
	}
}

/* Carta seleccionada por el jugador */
.cardH.selected {
	background: #ccc;
	color: #000;
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.4);
	cursor: default;
}


input[type="text"] {
	width: 100%;
	padding: 12px 10px;
	margin: 8px 0;
	border-radius: 8px;
	border: 1px solid #ccc;
	font-size: 16px;
	/* text-transform: uppercase; */
}


/* Contenedor de los QR */
[id^="qr-"] {
	width: 90vw;
	max-width: 300px;
	margin: 10px auto;
	display: flex;
	justify-content: center;
}

/* El canvas o imagen generada por qrcode.js */
[id^="qr-"] canvas,
[id^="qr-"] img {
	width: 100% !important;
	height: auto !important;
	display: block;
}

.player-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.legal {
  max-width: 900px;
  margin: 0px auto;
  padding: 0 20px;
  font-family: "Inter", "Roboto", "Georgia", serif;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  background-color: #fff;
}

.legal h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
}

.legal h2 {
  text-align: left;
  font-size: 1.2rem;
  margin-top: 35px;
  margin-bottom: 15px;
  font-weight: 600;
}

.legal p {
  margin-bottom: 15px;
  text-align: justify;
}

.legal ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

.legal li {
  margin-bottom: 10px;
}

.legal strong {
  font-weight: 600;
}

/**************** CANCIONES ****************/

input.no-uppercase {
	text-transform: none;
}

/* =========================
   PANEL PRINCIPAL
   ========================= */
.game-panel {
  margin: 30px auto 0;
  padding: 24px;
  max-width: 600px;
  border-radius: 18px;
  background: linear-gradient(145deg, #d35400, #e67e22);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  text-align: center;
  animation: fadeUp 0.4s ease;
}

/* =========================
   BOTONES CARGA
   ========================= */
.load-buttons {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================
   BOTONES BASE
   ========================= */
.game-btn,
.end-round-btn {
  border: none;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.6px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

/* Variantes */
.game-btn {
  font-size: 1.1rem;
  padding: 15px 28px;
  border-radius: 16px;
  color: #000;
}

.game-btn.primary {
  background: linear-gradient(135deg, #B88F40, #ffb74d);
}

.game-btn.secondary {
  background: linear-gradient(135deg, #f57c00, #B88F40);
}

/* Finalizar */
.end-round-btn {
  padding: 14px 32px;
  font-size: 1.1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #e53935, #ff7043);
  color: #000;
  font-weight: 800;
}

/* Estados botones */
.game-btn:hover,
.end-round-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 16px 30px rgba(0,0,0,0.55);
  filter: brightness(1.08);
}

.game-btn:active,
.end-round-btn:active {
  transform: scale(0.96);
}

.game-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* =========================
   SCORING
   ========================= */
.song-title {
  font-size: 1.8rem;
  margin-bottom: 22px;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 3px 10px rgba(0,0,0,0.6);
}

/* =========================
   SCOREBOARD
   ========================= */
#scoreboard.scoreboardCanciones {
  max-width: 320px;
  margin: 24px auto;
  padding: 18px 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, #d35400, #e67e22);
  box-shadow: 0 14px 32px rgba(0,0,0,0.45);
  color: #fff;
  font-weight: 700;
}

/* Fila jugador */
.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

.score-row:last-child {
  margin-bottom: 0;
}

/* Texto */
.player-name {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-score {
  font-size: 1.2rem;
  font-weight: 800;
  min-width: 32px;
  text-align: right;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform 0.2s, color 0.2s;
}

.player-score.updated {
  transform: scale(1.2);
  color: #fff3e0;
}

/* =========================
   SCOREBOARD INTERACTIVO
   ========================= */
.score-row.clickable {
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, filter 0.15s, background 0.15s;
}

.score-row.clickable:hover {
  background: rgba(255,255,255,0.28);
  transform: scale(1.03);
  filter: brightness(1.1);
}

.score-row.clickable:active {
  transform: scale(0.96);
}

.score-row.disabled {
  opacity: 0.75;
  pointer-events: none;
}

/* =========================
   UX / ACCESIBILIDAD
   ========================= */
button {
  min-height: 30px;
  touch-action: manipulation;
}

button:focus {
  outline: none;
}

button:focus-visible {
  outline: 3px solid rgba(255,255,255,0.6);
  outline-offset: 3px;
}

/* =========================
   ANIMACIÓN
   ========================= */
@keyframes fadeUp {
  from {
	opacity: 0;
	transform: translateY(10px);
  }
  to {
	opacity: 1;
	transform: translateY(0);
  }
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 600px) {
  .game-panel {
	padding: 18px 14px;
	border-radius: 14px;
  }

  .song-title {
	font-size: 1.4rem;
  }

  .load-buttons {
	flex-direction: column;
	gap: 14px;
  }

  .game-btn,
  .end-round-btn {
	width: 100%;
	font-size: 1rem;
	padding: 14px 16px;
  }

  #scoreboard.scoreboardCanciones {
	max-width: 100%;
	margin: 2px 12px;
  }

  .player-name {
	font-size: 0.95rem;
  }

  .player-score {
	font-size: 1.1rem;
  }
}
/**************** CANCIONES ****************/






/* ============================
   CARTA MENTIROSO
============================ */

.mentiroso-card {
	width: 250px;
	height: 150px;
	margin: 20px auto;
	background: white;
	color: black;
	border-radius: 15px;
	box-shadow: 0 10px 20px rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: bold;
}

/* ============================
   BOTONES MENTIROSO
============================ */

.mentiroso-btn {
	padding: 10px 20px;
	border-radius: 10px;
	border: none;
	background: #ff7675;
	color: white;
	font-weight: bold;
	cursor: pointer;
}

.mentiroso-btn:hover {
	background: #d63031;
}

#btnIniciar{
	font-size: 22px;		/* tamaño más grande */
	padding: 12px 24px;	 /* botón más ancho */
	border-radius: 8px;	 /* bordes redondeados */
	font-weight: bold;	  /* texto más fuerte */
}

/* ============================
   CONTENEDOR CARTA 3D
============================ */

.mentiroso-contenedor-carta {
	width: 280px;
	height: 420px;
	margin: 10px auto;
	perspective: 1000px;
	cursor: pointer;
}

.mentiroso-carta {
	width: 100%;
	height: 100%;
	position: relative;
	transform-style: preserve-3d;
	transition: transform 0.8s;
}

.mentiroso-carta.mentiroso-girada {
	transform: rotateY(180deg);
}

.mentiroso-cara {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: bold;
	backface-visibility: hidden;
	box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.mentiroso-frontal {
	background: linear-gradient(135deg, #FFF9F5, #F5A927);
	color: white;
	font-size: 120px;
}

.mentiroso-trasera {
	background: white;
	color: black;
	transform: rotateY(180deg);
	font-size: 34px;
}

.mentiroso-pin {
	text-transform: uppercase;
}

@media (max-width:500px){
	.mentiroso-carta{
		width:280px;
		height:420px;
	}
}

/******* DESCONOCIDOS ********/
.card-desconocidos{
  width: 300px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  color: #000;
}

.card-desconocidos h2 {
  text-align: center; /* el título sí centrado */
  margin-bottom: 20px;
}

.respuesta-btn {
  padding: clamp(6px, 2vw, 12px);
  margin: clamp(4px, 1.5vw, 10px);
  font-size: clamp(16px, 3vw, 16px);
  border: none;
  cursor: pointer;
  border-radius: 8px;
  font-weight: bold;
  -webkit-text-fill-color: #000;
}

.gris { background-color: #FFD799; }
.azul { background-color: #3498db; color: white; }
.verde { background-color: #2ecc71; color: white; }
.rojo { background-color: #e74c3c; color: white; }

#listaJugadores {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	margin: 0;
	justify-content: center;
	margin-bottom: 20px;
}

.jugador-item {
	background: #FFC773;
	color: black;
	padding: 8px 16px;
	border-radius: 12px;
	font-weight: bold;
	display: inline-block;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


/******* SABOTAJE ********/
.sabotaje-container {
	display: flex;
	gap: 20px;
	justify-content: center;
}

.sabotaje-deck {
	position: relative;
	width: 160px;
	height: 230px;
	cursor: pointer;
	transition: transform 0.3s ease;
	text-decoration: none;
}

.sabotaje-deck:hover {
	transform: translateY(-10px) scale(1.05);
}

.sabotaje-card {
	position: absolute;
	width: 160px;
	height: 230px;
	border-radius: 12px;
	background: linear-gradient(135deg, #ffffff, #dddddd);
	box-shadow: 0 8px 20px rgba(0,0,0,0.5);
	border: 2px solid #aaa;
}

/* Cartas apiladas detrás */
.sabotaje-card:nth-child(1) { top: 0px; left: 0px; }
.sabotaje-card:nth-child(2) { top: 4px; left: 4px; }
.sabotaje-card:nth-child(3) { top: 8px; left: 8px; }
.sabotaje-card:nth-child(4) { top: 12px; left: 12px; }

.sabotaje-deck-text {
	position: absolute;
	inset: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 22px;
	font-weight: bold;
	color: #ffffff;
	text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
	pointer-events: none;
	z-index: 10;
	transform: translateX(6px);
}

