
a {
  font-size: 2rem;
}


/* ====== FUENTES ====== */
@font-face {
  font-family: 'Teko';
  src: url('../assets/fonts/Teko-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Cutive Mono';
  src: url('../assets/fonts/CutiveMono-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Rajdhani Medium';
  src: url('../assets/fonts/Rajdhani-Medium.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

h1{
    font-size:clamp(3rem, 5vw, 3rem);
}

/* ====== ESTILO BASE ====== */
body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Teko', sans-serif;
  background-color: white;
  color: black;
  margin: .5rem;
  padding: 2.5rem;
  box-sizing: border-box;
  
}

/* ====== CAJAS NEGRAS ====== */
.box {
  background: black;
  color: white;
  border: 2px solid white;
  padding: 4rem;
  margin: 3rem auto;
  max-width: 600px;
  min-width: 500px;
  text-align: center;
}

/* ====== VARIANTES DE FUENTE ====== */
.cutive {
  font-family: 'Cutive Mono', 'Rajdhani Medium';
  color: #ccc;
}


/* ====== CAJAS NEGRAS ====== */
.menu-box {
  display: block;              /* Hace que cada enlace sea un bloque para poder dar tamaño */
  background-color: black;
  color: #eee;                 /* Gris casi blanco */
  border: 2px solid white;
  padding: 2.5rem 0;
  margin: 2rem auto;
  max-width: 500px;
  min-width: 300px;
  text-align: center;
  text-decoration: none;       /* Quita subrayado */
  font-size: 2.5rem;
  font-weight: 600;
  font-family: 'Teko', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.menu-box:hover {
  background-color: #222;      /* Un poco más claro al pasar mouse */
}

/* ====== FONDOS ====== */
body.bg-1 {
  background-image: url('../assets/images/bg-1.webp');
  background-size: cover;
  background-position: center;
  background-repeat: repeat-y;
}

body.bg-2 {
  background-image: url('../assets/images/bg-2.webp');
  background-size: cover;
  background-position: center;
  background-repeat: repeat-y;
}

body.bg-3 {
  background-image: url('../assets/images/bg-3.webp');
  background-size: cover;
  background-position: center;
  background-repeat: repeat-y;
}

body.bg-4 {
  background-image: url('../assets/images/bg-4.webp');
  background-size: cover;
  background-position: center;
  background-repeat: repeat-y;
}

body.bg-5 {
  background-image: url('../assets/images/bg-5.webp');
  background-size: cover;
  background-position: center;
  background-repeat: repeat-y;
}

body.bg-6 {
  background-image: url('../assets/images/bg-6.webp');
  background-size: cover;
  background-position: center;
  background-repeat: repeat-y;
}

/* ====== BOTON DE REGRESO ====== */
.regresar {
  position: fixed;         /* Fija en pantalla sin importar scroll */
  top: 1rem;               /* Distancia desde arriba */
  left: 1rem;              /* Distancia desde la izquierda */
  background-color: black;
  color: #eee;
  border: 2px solid white;
  padding: 0.5rem 1rem;
  font-family: 'Teko', sans-serif;
  font-size: 1.2rem;
  text-decoration: none;
  z-index: 1000;           /* Asegura que esté por encima de otros elementos */
}

/* ====== quiz box caja central ====== */
.quiz-box {
  max-width: 600px;
  margin: 3rem auto;
  padding: 3rem;
  background-color: black;
  border: 2px solid white;
  color: #eee;
  font-family: 'Teko', sans-serif;
  text-align: center;
}

/* ====== quiz box caja opciones ====== */
.opciones {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.opcion {
  background-color: black;
  color: white;
  border: 2px solid white;
  padding: 1rem;
  font-family: 'Teko', sans-serif;
  font-size: 2rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.opcion:hover {
  background-color: white;
  color: black;
}

/* ====== resultado quiz r5 ====== */
.resultado-descripcion {
  margin-top: 0.5rem;
  font-size: 2rem;
  color: #ccc;
  font-style: italic;
  text-align: center;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* ====== destructor ====== */
textarea {
  width: 90%;
  padding: 2rem;
  font-family: 'Cutive Mono', 'Rajdhani Medium';
  font-size: 2rem;
  margin-top: 1rem;
  resize: none;
  background-color: #111;
  color: white;
  border: 1px solid white;
}

button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  font-family: 'Teko', sans-serif;
  font-size: 2rem;
  background-color: black;
  color: white;
  border: 1px solid white;
  cursor: pointer;
}
#destructor-box {
  max-width: 1000px;
  max-height: 500px;
  overflow: hidden;
  padding: 1rem;
  position: relative;
}

#destructor-box p {
  word-break: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  max-height: 100%;
}

/* ====== puzzle r5 ====== */
.puzzle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.puzzle-container528 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.box p, .box span {
  font-size: 2rem;
}

.pista-box {
  background-color: black;
  color: white;
  padding: 10px;
  text-align: center;
}

.perillas {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.perilla {
  width: 100px;
  height: 100px;
  cursor: pointer;
  transition: transform 0.1s linear;
}

.resultado {
  margin-top: 20px;
  padding: 10px;
  background-color: black;
  color: white;
  text-align: center;
}

/* ====== puzzle R528 ====== */
.puzzle-header {
  width: 320px;
  min-height: 420px;
  border: 2px solid white;
  padding: 3rem;
  box-sizing: border-box;
  background-color: black;
  color: white;

  display: flex;
  flex-direction: column;
}

.puzzle-header h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.memories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#puzzle-header {
  background-color: black;
  color: white;
  padding: 10px;
  margin: 10px;
  border: 2px solid white;
  font-size: 2rem;
}

.hidden {
  display: none !important;
}

#boxes {
  display: flex;
  justify-content: center;   /* centra horizontalmente */
  align-items: flex-start;   /* alinea arriba */
  gap: 40px;                 /* espacio entre cajas */
  margin-top: 30px;
}

 .memory img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  padding: 10px;
}

.memory {
  width: 100px;
  height: 100px;
  overflow: hidden;
  cursor: grab;
  padding: 10px;
}

#keepBox.black {
  background-color: #000000 !important;
}

#keepBox.orange {
  background-color: #331414 !important;
}

#keepBox.dark-orange {
  background-color: #5e0505 !important;
}

#keepBox.green {
  background-color: #05a500 !important;
}

/* ====== links resultado ====== */
a {
  color: #dddddd;  /* Gris claro */
  text-decoration: none; /* Opcional: quita el subrayado */
}

a:hover {
  color: #ffffff;  /* Blanco al pasar el mouse */
}

/* ====== links sociales ====== */
.box.enlaces-redes {
  text-align: center;
  font-family: 'Rajdhani Medium';
  font-size: 2rem;
  color: #eee; /* casi blanco */
  background-color: #111; /* negro oscuro */
  padding: 2.5rem;
  margin-top: 2rem;
  user-select: text;
}

.box.enlaces-redes a {
  color: #eee;
  text-decoration: none;
  margin: 0 1rem;
}

.box.enlaces-redes a:hover {
  text-decoration: underline;
}

.box.mensaje-final {
  font-family: 'Rajdhani Medium';
  font-size: 1rem;
  color: #ccc;
  background-color: #111;
  padding: 2.5rem;
  margin-top: 1rem;
  text-align: center;
  user-select: text;
}

.box.mensaje-final a {
  color: #eee;
  text-decoration: none;
}

.box.mensaje-final a:hover {
  text-decoration: underline;
}

/*----- Boton Idioma -----*/
#btnIdioma {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 14px;
  background-color: #222;
  color: white;
  font-size: 16px;
  cursor: pointer;
  z-index: 9999;
  user-select: none;
  font-family: 'Rajdhani Medium';
  border: 2px solid white;
}
#btnIdioma:hover {
  background-color: #444;
}

/*----- Carga Falsa Mensaje Fallido -----*/
.loader {
  border: 4px solid rgba(255,255,255,0.1);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin: 40px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/*----- Memoria Flotante -----*/
.memoria-flotante {
  position: fixed;
  width: 80px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 5;
}