* {
    box-sizing: border-box;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* NAVBAR */
nav {
  background-color: #333;
  color: white;
  padding: 7px;             /* antes: 10px */
  text-align: left;
  font-family: sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;              /* antes: 1rem */
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}
nav a:hover {
  text-decoration: underline;
}

nav label {
  color: white;
  font-weight: bold;
}

nav select {
  padding: 4px 8px;
  font-size: 0.85em;
  border-radius: 5px;
  border: none;
  background-color: #555;
  color: white;
  cursor: pointer;
}

.nav-left {
  
  font-size: 0.8em;
  white-space: nowrap;
  font-family: 'Strait', sans-serif !important;
  font-weight: bold; /* <-- clave */
}
.nav-right {
  margin-left: auto;
  margin-right: 2rem; /* ajusta este valor según cuánto quieras moverlo hacia la izquierda */
  display: flex;
  align-items: center;
  gap: 0.5rem;
    position: relative;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5em 1em;
}

.nav-title {
  font-weight: 700;
  font-size: 0.7em;
  text-decoration: none;
  color: inherit;
}

.nav-center {
  flex-grow: 1;
  text-align: center;
}
.day-select {
  width: auto;
  max-width: 100%;
  font-size: 0.75em;
  border-radius: 5px;
  
}


.puzzle-modal-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  /* clave: ocupa toda la pantalla */
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  font-family: 'Fira Sans Condensed', sans-serif;
}

.puzzle-modal-dialog {

  transform: translate(0%, -45%);
  /* 40% en vez de 50% para subirlo un poco */
  position: relative;
  background-color: #eeeeee;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  width: 80%;
  text-align: left;
  font-family: 'Fira Sans Condensed', sans-serif;
}

.puzzle-modal-close {
  color: #aaa;
  float: right;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 20px;
}

.puzzle-option-btn {
  text-align: left;
  font-family: 'Fira Sans Condensed', sans-serif;
  display: block;
  margin: 10px 0;
  padding: 10px 20px;
  border: 1px solid black;
  border-radius: 6px;
  background-color: white;
  color: #222;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  width: calc(80% - 20px);
  transition: all 0.2s;
}
.puzzle-modal-close {
  color: #aaa;
  float: right;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 20px;
}

.puzzle-modal-close:hover,
.puzzle-modal-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.puzzle-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #0f3b21;
  margin-bottom: 10px;
  text-align: left;
}
.puzzle-option-btn:hover {
  background-color: #e0f0e0;
  border-color: #45a049;
  color: #45a049;
}

.puzzle-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #0f3b21;
  margin-bottom: 10px;
  text-align: left;
}


.settings-button {
  font-size: 1.1em;
  cursor: pointer;
  background: none;
  border: none;
}

.settings-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 140%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  min-width: 140px;
    text-align: right;
}

.settings-option {
  display: block;
  width: 100%;
  font-size: 0.8em;
  padding: 0.4em;
  text-align: center;
  border: none;
  background: none;
  cursor: pointer;
}

.settings-divider {
  margin: 0.5em 0;
  border: none;
  border-top: 1px solid #eee;
}

/* Layout general */
body {
  margin: 0;
  padding-top: 50px;
  background-color: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1em;
}
/* NAV como grid de 3 columnas: izq | centro | dcha */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  display: grid;
  grid-template-columns: 1fr auto 1fr; /* 👈 centro siempre en el medio geométrico */
  align-items: center;
  gap: 0.5rem;

  background-color: #333;
  color: #fff;
  padding: 7px 10px;
}

/* Anclajes de cada zona dentro del grid */
.nav-left   { justify-self: start; }
.nav-center { justify-self: center; }  /* 👈 el select queda clavado al centro */
.nav-right  { justify-self: end; display: flex; align-items: center; gap: 0.5rem; }

/* Quita empujes que descentraban la derecha */
.nav-right { margin-left: 0; margin-right: 0; }

/* Estilos del select centrado */
.day-select {
  width: auto;
  max-width: 100%;
  font-size: 0.85em;
  padding: 4px 8px;
  border-radius: 5px;
  border: none;
  background-color: #555;
  color: #fff;
  cursor: pointer;
}

/* Accesibilidad para el label oculto */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,1px,1px);
  white-space: nowrap; border: 0;
}.nav-title {
  display: flex;              /* activa flexbox */
  align-items: center;        /* centra verticalmente img + texto */
  gap: 2px;                   /* separación entre logo y texto */
  font-weight: 700;
  font-size: 0.85em;
  text-decoration: none;
  color: inherit;
}
.nav-title img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  display: block;             /* evita espacios raros inline */
}
/* Opciones */
.choices-container {
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5px 1.5px; /* ← antes: 0.5em 0.5em */
  justify-items: center;
}

.choice-btn {
  width: 180px;
  margin: 4px; /* o solo margin-right: 8px; */
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
  border-radius: 8px;
  background-color: black;
  color: white;
  font-size: 14px;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0; /* NO reducir ancho */
  background: #333;
  display: inline-block;
  transition: background 0.2s ease;
}
.choices {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  margin-top: 1em;
  font-size: 0.95em;
  align-items: stretch; /* 👈 asegura mismo ancho */
}

.question {
  max-width: 360px;
  margin: 0 auto; /* centra horizontalmente */
  width: 100%;
}



/* CONTENEDOR para fondo + status bar */
.bg-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: auto;               /* 👈 agrégalo si no está */
  margin: 1.75em auto 0.3em auto;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  overflow: hidden;
    min-height: unset; /* o simplemente elimínalo */
}.bg-container .bg-img {
  width: 100%;
  height: 100%;       /* 👈 ocupa toda la altura del contenedor */
  object-fit: cover;
  display: block;
}
.scene-label {
  position: absolute;
  top: 0.5em;
  left: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.2em 0.6em;
  font-size: 12.5px;        /* 🟢 igual al de text-overlay */
  line-height: 1.4;         /* 🟢 igual al de text-overlay */
  font-family: inherit;     /* 🔁 asegúrate de que sea la misma */
  border-radius: 4px;
  z-index: 4;
  pointer-events: none;
}
.scene-label-inline {
  font-size: 16px;         /* más grande que el texto normal */
  font-weight: bold;
  padding-bottom: 12px;
  line-height: 1.2;
  color: white;
}
#text-overlay > p{
  margin:0!important;
}
.text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  height: fit-content;
  max-width: 100%;
  max-height: 30vh;
  overflow-y: auto;
  line-height: 1.4;
  font-size: 12.5px;
  padding: 12px 12px 4px 12px;
  z-index: 2;
}
.background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
  pointer-events: none;
}
.status-bar {
  position: absolute;
  top: 0;
    margin-top: 8px; /* o ajústalo según tu diseño */
  right: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.text-hearts {
  font-size: 12px; /* Tamaño fijo en píxeles */
  color: white;
  line-height: 1;
  text-shadow: 0 0 2px white, 0 0 1px white;
}
.text-hearts.lose-life {
  animation: shake-heart 0.6s ease, flash-red 0.6s ease;
}

@keyframes shake-heart {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.1) rotate(-5deg); }
  40% { transform: scale(1.1) rotate(5deg); }
  60% { transform: scale(1.1) rotate(-5deg); }
  80% { transform: scale(1.1) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes flash-red {
  0%, 100% { filter: drop-shadow(0 0 0px red); }
  50% { filter: drop-shadow(0 0 12px red); }
}


@keyframes screen-shake {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3px, 0); }
  40%  { transform: translate(3px, 0); }
  60%  { transform: translate(-3px, 0); }
  80%  { transform: translate(3px, 0); }
  100% { transform: translate(0, 0); }
}
.shake-screen {
  animation: screen-shake 0.3s ease;
}



.toggle-button {
  font-size: 1.1em;
  padding: 0.15em 0.4em;
  color: white;
  cursor: pointer;
  background: none;
    border: none;
}



/* Miniaturas */
.thumbnail-grid {
  position: absolute;
  bottom: 8px;        /* ← mueve a la parte superior */
  left: 8px;       /* esquina izquierda */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 4px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  pointer-events: auto;
  z-index: 5;
}

.thumbnail-item {
  width: 24px;  /* antes era 24px */
  height: 24px;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid #bbb;
  cursor: pointer;
  transition: transform 0.15s ease;
  opacity: 0.7;
}
.thumbnail-item:hover {
  transform: scale(1.1);
  border-color: #555;
}
.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumbnail-item.locked-thumb {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(100%);
}
.thumbnail-item.active-thumb {
  border: 1.75px solid white;
  box-shadow: 0 0 4px white;
  opacity: 1;
}





.choice-btn {
  width: 180px;
  margin: 4px; /* o solo margin-right: 8px; */
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
  border-radius: 8px;
  background-color: black;
  color: white;
  font-size: 14px;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0; /* NO reducir ancho */
  background: #333;
  display: inline-block;
  transition: background 0.2s ease;
}.choice-btn:hover {
  background: #555;
}
.choice-btn:active {
  transform: scale(0.97);
}
.choice-btn.correct {
  background-color: #add1aa; /* verde claro */
  opacity: 1 !important;
  border: 2px solid green;
  color: black
}
.choice-btn.incorrect {
  background-color: #614f4f; /* rojo suave */
    color: black;
  border: 2px solid rgb(49, 0, 0);
  opacity: 1 !important;
}



.msg {
  position: absolute;
  top: 0;
  left: 5px;     /* 1px desde el borde izquierdo */
  right: 5px;    /* 1px desde el borde derecho */
  margin-top: 18em;
  background-color: rgba(0, 0, 0, 0.9);
  height: fit-content;
  max-width: 100%;
  max-height: 30vh;
  overflow-y: auto;
  line-height: 1.4;
  font-size: 12.5px;
  padding: 0.5em;
  z-index: 2;
}

.msg.fail {
  color: #f55;
  font-weight: bold;
  font-size: 0.85em;
}
.msg.success {
  color: #5f5;
  font-weight: bold;
  font-size: 0.85em;
}



.next-button {
  position: absolute;
  bottom: 1em;
  right: 1em;
  background-color: green;
  color: white;
  padding: 0.5em 1em;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 0 5px rgba(0,0,0,0.4);
  transition: background-color 0.2s ease;
}

.next-button:hover {
  background-color: darkgreen;
}


.intro-button {
  position: absolute;
  bottom: 1em;
  right: 1em;
  background-color: rgb(0, 0, 0);
  color: white;
  padding: 0.5em 1em;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 0 5px rgba(0,0,0,0.4);
  transition: background-color 0.2s ease;
}





/* ANIMACIONES */
.fade-in {
  animation: fadeIn 0.6s ease both;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes correct-flash {
  0% {
    background-color: rgba(0, 255, 0, 0.2);
    opacity: 1;
  }
  100% {
    background-color: transparent;
    opacity: 0;
  }
}

.correct-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  animation: correct-flash 0.6s ease-out;
  z-index: 9998;
}

.ripple-success {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 255, 0, 0.3);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
  z-index: 10;
}

@keyframes ripple {
  from {
    transform: scale(0);
    opacity: 0.6;
  }
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.bg-frame-highlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 5px solid green;
  border-radius: 0;         /* sin curvas */
  z-index: 2;               /* entre bg (z=1) y overlay/textos (z=3/4) */
  pointer-events: none;
  box-sizing: border-box;
  animation: border-pop 0.3s ease;
}

@keyframes border-pop {
  from {
    transform: scale(1.05);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}




.loader {
  color: white;
  background: rgba(0,0,0,0.6);
  font-size: 2em;
  text-align: center;
  padding: 1em;
  border-radius: 1em;
  position: absolute;
  top: 40%;              /* 👈 Aquí lo bajamos */
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}
.loader span {
  animation: blink 1.5s infinite;
  margin: 0 5px;
}

@keyframes blink {
  0% { opacity: 0.2; }
  20% { opacity: 1; }
  100% { opacity: 0.2; }
}



.thumb-toggle-menu {
  position: absolute;
  background: #111;
  border: 1px solid #333;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  padding: 0.25em 0;
  font-size: 0.85em;
  text-align: left;
  color: #fff;
  transition: opacity 0.2s ease;
  width: fit-content;
}

.thumb-toggle-menu-item {
  padding: 0.5em 1.9em;
  cursor: pointer;
  user-select: none;
    text-transform: none !important;
  transition: background 0.1s;
  white-space: nowrap;
    text-align: left;
}

.thumb-toggle-menu-item:hover {
  background: #222;
}






.wordle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  padding: 0.5em;
}
.wordle-guesses {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 0;
  padding: 0.5em 0;
  max-width: 100%;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  justify-content: start;
}

.wordle-row {
  display: flex;
  flex-direction: row;
  scroll-snap-align: start;
  flex-shrink: 0;
  justify-content: center;
  width: 100%;  /* fuerza que ocupe toda la vista del scroll */
  max-width: 100%;
gap: 2px;

}

.wordle-cell {
  width: 1.8em;
  height: 1.8em;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  line-height: 1.8em;
  border: 2px solid #888;
  border-radius: 0.2em;
  text-transform: uppercase;
}

.correct-letter {
  background-color: #4CAF50; /* verde correcto */
  color: white;
  border-color: #4CAF50;
}

.misplaced-letter {
  background-color: rgb(54, 105, 244); /* azul mal colocado */
  color: white;
  border-color: rgb(73, 54, 244);
}

.wrong-letter {
  background-color: #444; /* gris oscuro */
  color: white;
  border-color: #444;
}

.wordle-input {
  font-size: 16.1px; /* evita zoom en móviles */
  text-align: left;
  padding: 0.25em 0.5em;
  width: 80%;
  max-width: 14em;
  text-transform: lowercase;
  border: 2px solid #888;
  border-radius: 0.3em;
}

.wordle-message {
  font-weight: bold;
  font-size: 0.95em;
  text-align: center;
  padding-top: 0.4em;
}

.wordle-success {
  color: #4CAF50;
}

.wordle-fail {
  color: #F44336;
}
.wordle-input-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 0.2em; /* antes estaba en 1em */
}

.wordle-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 0.5em;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.6em 1em;
  border-radius: 1em;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  align-items: center;
}

.wordle-input-centered {
  font-size: 1.4rem;
  padding: 0.4em 0.8em;
  border: 1px solid #ccc;
  border-radius: 0.5em;
  width: 8ch;
  text-transform: uppercase;
}
.wordle-floating-row {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 8px;
  z-index: 5;

  
}
.wordle-send-button {
  padding: 0.4em 0.8em;
  border: none;
  background-color: #333;
  color: white;
  border-radius: 0.5em;
  cursor: pointer;
  transition: background 0.2s ease;

  width: 36px;
  height: 36px;
  max-width: 36px;
  font-size: 1em;
}
.wordle-floating-row {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 8px;
  z-index: 5;

  background-color: rgba(231, 229, 226, 0.6);
  padding: 0.1em 0.2em;
  border-radius: 10px;
  box-shadow: 0 0 1px rgba(0,0,0,0.25);
}

.wordle-send-button:hover {
  background-color: #000;
}

.wordle-warning {
  color: rgb(255, 255, 255);
}.wordle-input,
.wordle-send-button {
  width: 180px;
  margin: 4px;
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
  border-radius: 8px;
  background-color: #333;
  color: white;
  font-size: 14px;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
  border: none;
  outline: none;
  transition: background 0.2s ease;
    text-transform: uppercase;
}

.wordle-input {
  cursor: text;
}


.wordle-input-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 0.1em; /* o incluso 0 si quieres que esté pegado */
}


.wordle-guess-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  scroll-snap-align: center;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  padding: 0 0.25em;
}
.wordle-guess-label {
  font-size: 0.7em;
  color: #ccc;
  margin-bottom: 0.25em;
}.wordle-guesses::-webkit-scrollbar {
  height: 6px; /* scroll más fino */
}

.wordle-guesses::-webkit-scrollbar-track {
  background: transparent; /* sin fondo */
}

.wordle-guesses::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2); /* scroll blanco suave */
  border-radius: 4px;
}

.wordle-guesses::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35); /* más visible al pasar */
}



.rub-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2em;
}

.rub-shape {
  position: relative;
  background: #ddd;
  overflow: hidden;
  margin-bottom: 1em;
}

.rub-barra {
  width: 80%;
  height: 24px;
  border-radius: 12px;
}

.rub-cuadrado {
  width: 120px;
  height: 120px;
  border: 2px solid #aaa;
}

.rub-círculo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid #aaa;
}

.rub-fill {
  background: linear-gradient(to right, orange, red);
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  transition: width 0.1s ease-out, height 0.1s ease-out;
}

.rub-círculo .rub-fill,
.rub-cuadrado .rub-fill {
  height: 0%;
  width: 100%;
  bottom: 0;
  top: auto;
  background: radial-gradient(circle at center, orange, red);
}

.rub-message {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  max-width: 80%;
}
.rub-fill {
  background-color: orange;
  width: 100%;
  position: absolute;
  bottom: 0;
  height: 0%;
  border-radius: inherit;
  transition: height 0.2s ease-in-out; /* Animación suave */
}

.rub-shape {
  position: relative;
  overflow: hidden;
}.sand-area {
  text-align: center;
  margin-top: 2em;
  color: white;
  user-select: none;
  touch-action: none;
}

.sand-target {
  margin: 1em auto;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, #333 0%, transparent 100%);
  border-radius: 50%;
  border: 2px solid white;
  cursor: crosshair;
  transition: background 0.2s ease;
  touch-action: none;
  position: relative;
}

.progress-text {
  font-size: 0.8em;
  color: white;
  font-weight: bold;
  margin-top: 0.5em;
}

.shine-effect {
  animation: shineFlash 1.2s ease-out;
}

@keyframes shineFlash {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.6); }
  60% { filter: brightness(1.2); }
  100% { filter: brightness(1); }
}

/* Opcional: transición de opacidad para una imagen que se revela al final */
.polished-img {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.polished-img.visible {
  opacity: 1;
}
.sand-target.shape-círculo {
  border-radius: 50%;
  width: 200px;
  height: 200px;
}

.sand-target.shape-cuadrado {
  border-radius: 0;
  width: 200px;
  height: 200px;
}

.sand-target.shape-ovalo {
  border-radius: 50% / 30%;
  width: 250px;
  height: 150px;
}

.sand-target.shape-estrella {
  /* Puedes usar una imagen SVG de fondo o clip-path para formas más complejas */
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 
                     68% 57%, 79% 91%, 50% 70%, 
                     21% 91%, 32% 57%, 2% 35%, 
                     39% 35%);
  width: 200px;
  height: 200px;
  background-color: rgba(255, 255, 255, 0.1); /* para ver la forma antes del progreso */
}




.berry-field {
  position: relative;
  width: 100%;
  height: 100px; /* o 300px o lo que desees */
  max-width: 360px;
  background: linear-gradient(#5fa35f, #3d6e3d); /* campo verde */
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
}
.berry {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 30% 30%, #ff3366, #a3003d);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
  transition: transform 0.1s;
}

.berry:hover {
  transform: scale(1.2);
}

.progress-text {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255,255,255,0.8);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
}

.completion-text {
  margin-top: 12px;
  text-align: center;
  font-size: 1.2rem;
  color: #fff;
}









.draw-area {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
  color: white;
}

.draw-instructions {
  font-size: 0.9em;
  margin-bottom: 0.5em;
}

canvas {
  border: 2px solid white;
  border-radius: 8px;
  background-color: black;
  touch-action: none;
}



.share-menu {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 20;
}

.share-btn {
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}
.share-btn:hover {
  background: rgba(0,0,0,0.8);
}




.question-skip-wrapper {
  display: flex;
  justify-content: space-between; /* pregunta a la izquierda, skip a la derecha */
  align-items: center;
  margin: 0.35em 0 0.45em !important;  /* antes 1em 0 */
}

.question-skip-wrapper #question {
  flex: 1; /* ocupa todo el espacio disponible */
}

.skip-btn {
  background: none;
  border: none;
  font-size: 1.1em;
  cursor: pointer;
  color: #e63946;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.skip-btn:hover {
  transform: scale(1.1);
}
.question-skip-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin: 0.35em 0 0.45em !important;  /* antes 1em 0 */
}

.question-skip-wrapper #question { flex: 1; }

.skip-btn {
  background-color: #444;  /* gris oscuro */
  color: white;
  padding: 0.25em 0.6em;   /* pequeño */
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 0 3px rgba(0,0,0,0.4);
  transition: background-color 0.2s ease, transform 0.15s ease;
  border: none;
  opacity: 0.9;
}

.skip-btn:hover {
  background-color: #666;  /* gris más claro al pasar */
  transform: scale(1.05);
  opacity: 1;
}




.center-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.9);
  color: #fff;
  padding: 0.75em 1em;
  border-radius: 10px;
  z-index: 9999;
  text-align: center;
  font-weight: 700;
  max-width: 80vw;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  pointer-events: none; /* no bloquea clics */
}

.wordle-info-button {
  margin-left: 0.5em;
  cursor: pointer;
  font-size: 1.2em;
  background: none;
  border: none;
}

.wordle-modal.hidden {
  display: none;
}

.wordle-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.wordle-modal-content {
  background: #fff;
  padding: 2em;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: zoomIn 0.3s ease;
  position: relative;
}

.wordle-modal-content h2 {
  margin-top: 0;
  font-size: 1.4em;
}

.wordle-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.6em;
  cursor: pointer;
}

.wordle-modal-ok {
  margin-top: 1em;
  padding: 0.5em 1.2em;
  background: #4caf50;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.wordle-example {
  display: flex;
  justify-content: center;
  margin: 1em 0;
  gap: 0.2em;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
/* ===== Modal (overlay + panel) ===== */
.wordle-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  transition: opacity .22s ease, visibility .22s ease;
  /* Tokens locales (scopeados al modal) */
  --panel: #ffffff;
  --text:  #111827;
  --muted: #6b7280;
  --border:#e5e7eb;
  --green: #22c55e;
  --blue:  #3b82f6;
}
.wordle-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .wordle-modal {
    --panel: #0f172a;
    --text:  #e5e7eb;
    --muted: #94a3b8;
    --border:#243147;
  }
}

/* Panel del modal */
.wordle-modal-content {
  width: min(92vw, 520px);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 18px 16px;
  box-shadow: 0 22px 60px rgba(0,0,0,.28);
  position: relative;
  overflow: hidden;
  animation: wordle-modal-pop .22s ease;
}

/* Cabecera con luz suave */
.wordle-modal-content::before{
  content:"";
  position:absolute; inset:0 0 auto 0; height: 88px;
  background:
    radial-gradient(120% 70% at 20% -20%, color-mix(in srgb, var(--blue) 28%, transparent) , transparent 60%),
    radial-gradient(120% 70% at 80% -20%, color-mix(in srgb, var(--green)28%, transparent), transparent 60%);
  pointer-events:none;
}

/* Título y texto */
.wordle-modal h2{
  margin: 4px 0 8px;
  font-size: clamp(18px, 2.3vw, 22px);
}
.wordle-modal p { margin: 6px 0; color: var(--text); }
.wordle-modal ul{
  margin: 10px 0 0; padding-left: 18px; line-height: 1.45;
  color: var(--text);
}
.wordle-modal .muted { color: var(--muted); }

/* Botón cerrar (X) */
.wordle-modal-close{
  position: absolute; top: 10px; right: 12px;
  width: 34px; height: 34px; line-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display:flex; align-items:center; justify-content:center;
  transition: background .2s ease, transform .08s ease;
}
.wordle-modal-close:hover{ background: rgba(0,0,0,.06); }
.wordle-modal-close:active{ transform: translateY(1px); }
.wordle-modal-close:focus-visible{
  outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent);
  outline-offset: 2px;
}

/* Botón OK */
.wordle-modal-ok{
  margin-top: 14px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(59,130,246,.35);
  transition: transform .08s ease, filter .2s ease;
}
.wordle-modal-ok:hover{ filter: brightness(1.05); }
.wordle-modal-ok:active{ transform: translateY(1px); }
.wordle-modal-ok:focus-visible{
  outline: 3px solid color-mix(in srgb, var(--green) 45%, transparent);
  outline-offset: 2px;
}

/* Ejemplo tipo Wordle */
.wordle-modal .wordle-example{
  display:flex; gap: 6px; justify-content:center; align-items:center;
  margin: 12px 0 8px;
  user-select: none;
}
.wordle-modal .wordle-cell{
  width: clamp(42px, 8vw, 56px);
  height: clamp(42px, 8vw, 56px);
  border-radius: 10px;
  border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  font-weight: 800;
  font-size: clamp(18px, 3.2vw, 24px);
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.06);
}

/* Estados de celda (scopeados al modal) */
.wordle-modal .correct-letter{
  background: linear-gradient(180deg, color-mix(in srgb, var(--green) 92%, #fff 8%), var(--green));
  color: #052e12;
  border-color: color-mix(in srgb, var(--green) 70%, #000 30%);
}
.wordle-modal .misplaced-letter{
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 92%, #fff 8%), var(--blue));
  color: #072540;
  border-color: color-mix(in srgb, var(--blue) 70%, #000 30%);
}
.wordle-modal .wrong-letter{
  background: linear-gradient(180deg, #f3f4f6, #e5e7eb);
  color: #1f2937;
  border-color: #e5e7eb;
}
@media (prefers-color-scheme: dark){
  .wordle-modal .wrong-letter{
    background: linear-gradient(180deg, #1f2937, #111827);
    color: #e5e7eb;
    border-color: #334155;
  }
}

/* Animación de entrada */
@keyframes wordle-modal-pop {
  from { transform: translateY(6px) scale(.98); opacity: 0; }
  to   { transform: translateY(0)   scale(1);   opacity: 1; }
}

/* Respeta accesibilidad de movimiento reducido */
@media (prefers-reduced-motion: reduce){
  .wordle-modal { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .wordle-modal-content { animation: none; }
}


.share-menu {
  display: flex;
  flex-direction: column;
  align-items: center; /* centra horizontalmente */
  gap: 8px;            /* espacio entre botones */
}

.share-menu .intro-button {
  position: static !important;
  display: block !important;
  width: 120px;        /* 👈 ancho fijo (ajústalo a tu gusto) */
  text-align: center;
  margin: 0;
}

/* Pantalla completa, sin modal */
.onboarding-overlay{
  position:fixed; inset:0; z-index:9999;
  background:#0b0b0c; /* fondo muy oscuro y neutro */
  color:#fff;
  display:flex; flex-direction:column;
  touch-action:pan-y; /* permite swipe horizontal suave */
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Noto Sans",Arial,sans-serif;
}

/* Barra superior con Omitir (sin color chillón) */
.onboarding-topbar{
  display:flex; justify-content:flex-end; align-items:center;
  padding:12px 14px;
}
.onboarding-skip{
  background:transparent; border:1px solid rgba(255,255,255,0.25);
  color:#fff; padding:6px 10px; border-radius:999px; font-size:13px;
  cursor:pointer;
}
.onboarding-skip:active{ transform:scale(0.98); }

/* Carrusel */
.onboarding-track{
  flex:1; display:flex; height:100%;
  will-change:transform; transform:translate3d(0,0,0);
}

/* Cada slide */
.onboarding-slide{
  min-width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:32px 20px 24px;
  gap:14px;
  text-align:center;
}

/* Tipografía/jerarquía minimalista */
.onboarding-emoji{ font-size:48px; line-height:1; }
.onboarding-title{
  font-size: clamp(22px, 4vw, 28px);
  font-weight:700; letter-spacing:0.2px; margin:0;
}
.onboarding-text{
  max-width: 28rem;
  font-size: clamp(15px, 2.5vw, 17px);
  line-height:1.45; opacity:0.9; margin:0;
}

/* CTA discreto */
.onboarding-cta{
  margin-top: 6px;
  background:#ffffff10;
  border:1px solid #ffffff2a;
  color:#fff;
  padding:10px 14px; border-radius:10px; font-size:14px;
  cursor:pointer;
}
.onboarding-cta:active{ transform:scale(0.98); }

/* Dots indicadores */
.onboarding-dots{
  display:flex; gap:8px; justify-content:center; align-items:center;
  padding:14px 0 18px;
}
.onboarding-dot{
  width:6px; height:6px; border-radius:50%;
  background:#ffffff25;
  transition:transform 160ms ease, background 160ms ease;
}
.onboarding-dot.active{
  background:#fff; transform:scale(1.25);
}
.onboarding-text {
  text-align: justify;   /* Justifica el texto */
  text-align-last: left; /* Alinea la última línea a la izquierda */
}
/* Preferencias de reduce motion */
@media (prefers-reduced-motion: reduce){
  .onboarding-track{ transition:none !important; }
}


.top-nav .nav-title {
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  color: inherit;
}
.top-nav .nav-title:active {
  transform: scale(0.98);
}

.onboarding-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 14px;
}

.onboarding-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.onboarding-close:active {
  transform: scale(0.9);
}


#selector-puzzles option {
  padding-left: 1.5em; /* hueco fijo al inicio */
}

#selector-puzzles option::before {
  display: inline-block;
  width: 1.2em;      /* reserva ancho */
  text-align: center;
  content: attr(data-emoji);
}






/* Modal */
.h5modal {
  position: fixed;
  top: 80px;
  color: black;
  /* ⬅️ Desplazar debajo de la barra .headline */
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  padding: 12px;
  z-index: 1001;
  width: 90vw;
  max-width: 350px;
  max-height: 480px;
  overflow-y: auto;
  /* ⬅️ permite hacer scroll dentro */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  font-family: 'Fira Sans Condensed', sans-serif;
  /* ← aquí */
}

.h5format,
.rating span,
.rating a {
  font-family: 'Helvetica', sans-serif;
}

.h5-card-title,
.h5-challenge-title {
  font-family: 'Fira Sans Condensed', sans-serif;
}



.h5-challenge-subtitle {
  font-family: 'Fira Sans Condensed', sans-serif;
  /* ← aquí */
}

/* Overlay */
.h5-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Botón cerrar */
.h5-close-button {
  position: sticky;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  float: right;
}

/* Título resumen */
.h5title {
  font-weight: bold;
  font-size: 20px;
}

.h5puzzlenum {
  font-weight: normal;
  font-size: 18px;
}

/* Contenedor de cartas */
.h5-card-wrapper {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  /* separa las dos cartas entre sí */
  margin-top: 16px;
}

.h5-card {
  flex: 1;
  /* que ambas crezcan igual */
  min-width: 0;
  /* importante para evitar desbordes */
  padding: 8px 6px;
  /* ajusta el interior */

  text-align: center;
  background: #fff;
  border: 1px solid #ddd;
  /* borde gris claro */
  border-radius: 10px;
  /* bordes redondeados */
  background-color: #fff;
  /* fondo blanco */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

/* Título de la carta */
.h5-card-title {
  font-weight: bold;
  margin-bottom: 12px;
  font-size: 14px;
}

.h5-card {

  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 130px;
  width: 100%;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.h5-card-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 8px;
  text-align: center;
}

.h5-card-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
  margin-bottom: 6px;
  height: 70px;
  /* misma altura para ambas */
}
.completed-success {
  background-color: #e3f9e5; /* verde claro */
}

.completed-fail {
  background-color: #ffe5e5; /* rojo claro */
}
.h5-card-info {
  font-size: 14px;
  margin-bottom: 8px;
  min-height: 20px;
  text-align: center;
}
 







/* Grid de banderas */
.h5-flag-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  width: 60px;
  /* ancho fijo igual que la imagen aprox */
  height: 60px;
  /* mismo alto que .h5-flag-img */
}

.h5-flag-grid span {
  font-size: 14px;
  margin: 2px;
  width: 16px;
  height: 16px;
  text-align: center;
}

.h5-completed-count,
.h5-flag-name {
  font-weight: normal;
  /* Quita negrita */
  font-size: 14px;
  margin-bottom: 6px;
  text-align: center;
}

/* Enlaces */
.h5-share-link,
.h5-flag-details {
  display: inline-block;
  margin-top: 10px;
  color: #0047ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

.h5-share-link i,
.h5-flag-details i {
  font-size: 16px;
}

/* Imagen de bandera */
.h5-flag-img {

  height: 50px;
  border: 1px solid black;
  border-radius: 5px;

  max-height: 60px;
  object-fit: contain;
  display: block;
  margin: 0 auto;

}

/* Nombre de país */
.h5-flag-name {
  margin-bottom: 8px;
  font-weight: normal;
  font-size: 15px;
}

.h5-challenge-box {
  background: #f3f5f9;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
  text-align: left;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

.h5-challenge-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 4px;
}

.h5-challenge-subtitle {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.h5-challenge-button {
  background-color: #0d1e30;
  color: white;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
      font-family: 'Fira Sans Condensed', sans-serif;
}

.h5-challenge-button:hover {
  background-color: #142e4a;
}
.h5-challenge-button.play {
  background-color: #0d1e30; /* mismo azul por defecto */
}

.h5-challenge-button.play:hover {
  background-color: #142e4a;
}

.h5-challenge-button.done {
  background-color: #3d2a91; /* verde completado */
}



.h5-rating {
  text-align: left;
  font-size: 14px;
  margin: 2px 0 10px 0;
  /* menos espacio arriba y abajo */
  color: #444;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  /* ← más espacio arriba */
}

.h5-stars i {
  color: #f5c518;
  font-size: 11.25px;
  margin-right: 2px;
  vertical-align: middle;
}

.h5-score {
  font-size: 13px;
  color: #444;
  margin-left: 4px;
}

.h5-global-box {
  padding: 10px;
  margin: 10px auto;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border: 1px solid #ddd;
  /* borde gris claro */
  border-radius: 10px;
  /* bordes redondeados */
  background-color: #fff;
  /* fondo blanco */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

.h5-global-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 4px;
  text-align: left;
}

.h5-global-subtitle {
  font-size: 13px;
  color: #555;
  margin-bottom: 12px;
  text-align: left;
}

.h5-global-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px;
  margin-top: -10px;
  /* súbelo hacia arriba */
}

/* Celdas internas del grid */
.h5-global-grid>div {
  width: 60px;
  height: 60px;
  font-size: 12px;
  padding: 3px;
  border-radius: 5px;
  position: relative;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-weight: 600;
  /* o 400 si 300 no está disponible */
}

/* Porcentaje sobre bandera */
.h5-global-grid .percentage-label {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  position: absolute;
  bottom: 2px;
  right: 4px;
}


.h5-global-header {
  font-weight: bold;
  font-size: 13px;
  background: #fff;
  border-radius: 6px;
  padding: 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: 1px solid #ccc;
}

.h5-global-cell {
  background: #fff;
  border: 2px solid #2ecc71;
  border-radius: 8px;
  padding: 6px 4px;
  font-size: 13px;
  font-weight: bold;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corner {
  background: transparent;
  border: none;
}

/* Bloques de RATE y STATS */
.h5-rate-box {
  background: #f9f9f9;
  padding: 16px;
  margin-top: 16px;
  font-family: sans-serif;
  font-size: 14px;
  border: 1px solid #ddd;
  /* borde gris claro */
  border-radius: 10px;
  /* bordes redondeados */
  background-color: #fff;
  /* fondo blanco */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

/* Títulos */
.h5-rate-title,
.h5-stats-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.h5-rate-box {
  margin-top: 16px;
  padding: 16px;
  background-color: #f9f9f9;
  border-radius: 10px;
  font-family: 'Fira Sans Condensed', sans-serif;
}



.h5-rate-subtitle {
  font-size: 14px;
  margin-bottom: 8px;
  color: #444;
}


.h5-rating-stars {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px; /* Bajamos el espacio hacia el comentario */
  margin-top: 4px; /* Un poco de separación desde el subtítulo */
}

.h5-rating-stars i {
  font-size: 22px;
  cursor: pointer; /* ← esto activa el puntero de mano */
  margin: 0 3px;
  transition: color 0.2s;
  color: gold;
}
.h5-rating-stars i.hovered,
.h5-rating-stars i.selected {
  color: gold;
}
.h5-rate-comment {
    font-size: 16.1px;
  margin-top: 2px;  /* Más espacio desde las estrellas */
  margin-bottom: 2px;
}


.h5-score {
  font-size: 14px;
  color: #444;
}

.h5-rate-comment {
  width: 90%;
  max-width: 300px;
  height: 60px;
  resize: vertical;
  font-family: inherit;
  font-size: 13px;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.h5-rate-submit {
  padding: 6px 12px;
  font-size: 13px;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
    margin-bottom: 2px;
      font-family: 'Reddit Sans Condensed', sans-serif;
}

.h5-rate-submit.loading {
  position: relative;
  color: transparent;
}
.h5-rate-submit.loading {
  position: relative;
  color: transparent; /* Oculta texto sin cambiar tamaño del botón */
  pointer-events: none;
}

.h5-rate-submit.loading::after {
  content: '· · ·';
  font-size: 32px;
  color: #555;
  display: inline-block;
  animation: glowDots 1.2s infinite ease-in-out;
  letter-spacing: 4px;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes glowDots {
  0%   { opacity: 0.2; color: #999; }
  50%  { opacity: 1; color: #fff; text-shadow: 0 0 8px #aaa; }
  100% { opacity: 0.2; color: #999; }
}

.h5-difficulty-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-family: inherit;
}

.h5-difficulty-label {
  font-weight: bold;
  font-size: 0.95em;
  color: #333;
}

.h5-difficulty-select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95em;
  background-color: #fff;
  color: #333;
  transition: border 0.3s ease;
}

.h5-difficulty-select:focus {
  outline: none;
  border-color: #666;
}

.h5-comments-preview {
  margin-top: 12px;
  font-family: 'Fira Sans Condensed', sans-serif;
}

.h5-comments-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.h5-comment-bubble {
  background-color: #eef3f8;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  max-width: 100%;
  position: relative;
  border-left: 4px solid #ccddee;
}
.h5-link {
  font-size: 13px;
  color: #007bff;
  text-decoration: none;
}
.h5-stats-box {
  padding: 10px;
  background: #fff;

  margin: 12px auto;
  font-family: 'Fira Sans Condensed', sans-serif;

  border: 1px solid #ddd;
  /* borde gris claro */
  border-radius: 10px;
  /* bordes redondeados */
  background-color: #fff;
  /* fondo blanco */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  /* sombra sutil */
}

.h5-stats-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 6px;
}

.h5-stats-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 6px;
  font-size: 14px;
}

.h5-stats-grid div:last-child {
  text-align: right;
  white-space: nowrap;
}

.h5-link {
  display: inline-block;
  margin-top: 10px;
  color: #0047ff;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}

.h5-stats-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 14px;
  margin-bottom: 10px;
}

.h5-stats-list>div:nth-child(odd) {
  text-align: left;
}

.h5-stats-list>div:nth-child(even) {
  text-align: right;
  min-width: 80px;
}
.h5-admin-reply {
  margin-left: 2em;
  background-color: #e0f0ff; /* azul cielo */
  border-left: 4px solid #3399ff; /* azul moderado */
  font-size: 0.95em;
  padding: 0.5em;
  border-radius: 4px;
}
.h5-loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  height: 80px;
  background: linear-gradient(90deg, #f0f0f0, #fafafa);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.h5loader {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  
  position: relative;
  display: inline-block;
  padding-left: 24px;
}

.h5loader::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 12px;
  border: 3px solid #1e88e5;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.h5-challenge-msg {
  background-color: #eef3f8;
  color: #333;
  padding: 14px 16px;
  margin-top: 12px;
  border-left: 4px solid #4a90e2;
  border-radius: 6px;
  font-size: 14px;
}

.h5-challenge-msg .h5-challenge-text {
  margin-bottom: 12px;
  white-space: pre-line;
}

.h5-challenge-go {
  padding: 6px 20px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.h5-card-links {
  display: flex;           /* los pone en la misma fila */
  justify-content: center; /* centrados en el card */
  gap: 12px;               /* espacio entre Wikipedia y Watch */
  margin-top: 8px;         /* separación con el contenido arriba */
}

.h5-card-link {
  text-decoration: none;
  font-size: 0.9em;
  display: inline-flex;
  align-items: center;
  gap: 4px; /* espacio entre icono y texto */
}


#game { position: relative; }

.msg-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;          /* deja hacer click detrás si quieres */
  z-index: 9999;
}
 
.puzzle-modal-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  /* clave: ocupa toda la pantalla */
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  font-family: 'Fira Sans Condensed', sans-serif;
}

.puzzle-modal-dialog {

  transform: translate(0%, -45%);
  /* 40% en vez de 50% para subirlo un poco */
  position: relative;
  background-color: #eeeeee;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  width: 80%;
  text-align: left;
  font-family: 'Fira Sans Condensed', sans-serif;
}

.puzzle-modal-close {
  color: #aaa;
  float: right;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 20px;
}

.puzzle-option-btn {
  text-align: left;
  font-family: 'Fira Sans Condensed', sans-serif;
  display: block;
  margin: 10px 0;
  padding: 10px 20px;
  border: 1px solid black;
  border-radius: 6px;
  background-color: white;
  color: #222;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  width: calc(80% - 20px);
  transition: all 0.2s;
}

.puzzle-option-btn:hover {
  background-color: #e0f0e0;
  border-color: #45a049;
  color: #45a049;
}

.puzzle-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #0f3b21;
  margin-bottom: 10px;
  text-align: left;
}
/* Oculto por defecto */
.settings-menu {
  display: none;
  position: absolute;              /* opcional: desplegable */
  right: 0;                        /* anclar al botón ⚙️ en la derecha */
  top: 100%;                       /* justo debajo del botón */
  margin-top: 8px;
  z-index: 1000;

  /* Estilos de layout en columna, left order */
  flex-direction: column;
  align-items: stretch;
  padding: 8px;
  min-width: 220px;
  box-sizing: border-box;
  background: #fff;                /* asegúrate de tener fondo */
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

/* Visible cuando está "abierto" */
.settings-menu.open {
  display: flex;
}

.settings-menu .settings-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  gap: 8px;
  padding: 8px 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.settings-menu .settings-option:hover {
  background: rgba(0,0,0,.06);
  border-radius: 6px;
}

.settings-menu .settings-divider {
  width: 100%;
  height: 1px;
  border: 0;
  background: rgba(0,0,0,.12);
  margin: 6px 0;
}.puzzle-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);   /* fondo oscuro semitransparente */
  display: flex;
  align-items: center;           /* centra verticalmente */
  justify-content: center;       /* centra horizontalmente */
  z-index: 10000;                /* por encima de todo */
}

.puzzle-modal-dialog {
 
  border-radius: 12px;
  padding: 20px;
  max-width: 400px;              /* opcional: limitar ancho */
  width: 90%;                    /* responsive */
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  position: relative;            /* para que el botón close se posicione bien */
}.puzzle-modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #0f3b21;
  margin-bottom: 10px;
  text-align: left;
  font-family: 'Fira Sans Condensed', sans-serif; /* 👈 aquí */
}
.top-nav .nav-title {
  font-family: "Fira Sans", sans-serif;
  font-size: 0.75em;
  gap: 1px;

}
.h5modal, .h5modal * {
  font-family: 'Fira Sans Condensed', sans-serif;
}#music-toggle i {
  color: white !important;
  font-size: 1.2rem; /* opcional para hacerlo un poco más grande */
}

.intro-controls {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.intro-music-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  border: none;
  background: rgba(0,0,0,0.50);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.intro-music-btn i { font-size: 22px; }

.intro-button {
  /* deja tus estilos actuales; aquí solo por si necesitas ejemplo */
  padding: 10px 18px;
}
/* Coloca el botón de música centrado y más abajo que Continue */
.intro-music-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 2%;              /* más bajo que el Continue (que suele estar ~8%) */
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  border: none;
  background: rgba(0,0,0,0.50);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.intro-music-btn i { font-size: 22px; }