@import url('fuentes/fuentes.css');

:root {
  --fondo-1: #070b2a;
  --fondo-2: #13206b;
  --azul: #2147d9;
  --cian: #4cc9f0;
  --oro: #ffc93c;
  --oro-2: #ff9f1c;
  --rosa: #ff4d6d;
  --verde: #3ddc97;
  --texto: #f3f6ff;
  --tenue: #9fb0e8;
  --ficha: linear-gradient(180deg, #2f5bff 0%, #1532b8 100%);
  --ficha-borde: #7fa2ff;
  --radio: 18px;
  --sombra: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  font-family: 'Rubik', system-ui, sans-serif;
  color: var(--texto);
  background: radial-gradient(ellipse at 50% -10%, #2a3cb8 0%, var(--fondo-2) 35%, var(--fondo-1) 75%) fixed;
  overflow-x: hidden;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.oculto { display: none !important; }

/* Botón principal tipo concurso */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.6em;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, var(--oro) 0%, var(--oro-2) 100%);
  color: #2a1600;
  box-shadow: 0 6px 0 #b86a00, var(--sombra);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.2s;
}
.boton:active { transform: translateY(4px); box-shadow: 0 2px 0 #b86a00, var(--sombra); }
.boton:disabled { filter: grayscale(1) brightness(0.6); cursor: default; }
.boton.secundario { background: rgba(255, 255, 255, 0.12); color: var(--texto); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); }
.boton.peligro { background: linear-gradient(180deg, #ff6b81, #e5383b); color: #fff; box-shadow: 0 6px 0 #8f1d22, var(--sombra); }

/* Fichas de números (las de la tele) */
.ficha {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  height: 2.2em;
  padding: 0 0.3em;
  border-radius: 0.28em;
  background: var(--ficha);
  border: 2px solid var(--ficha-borde);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 6px 14px rgba(0, 0, 0, 0.45);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  font-variant-numeric: tabular-nums;
}
.ficha.grande { background: linear-gradient(180deg, #ffd166, #f4a100); border-color: #ffe7a3; color: #3a2300; text-shadow: none; }
.ficha.vacia { background: rgba(255, 255, 255, 0.06); border: 2px dashed rgba(255, 255, 255, 0.25); box-shadow: none; color: transparent; }

.objetivo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1em 0.45em;
  border-radius: 0.2em;
  background: #050818;
  border: 3px solid var(--oro);
  color: var(--oro);
  font-weight: 900;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 30px rgba(255, 201, 60, 0.35), inset 0 0 18px rgba(255, 201, 60, 0.18);
}

.chapa {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.25em 0.8em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.punto { width: 0.6em; height: 0.6em; border-radius: 50%; background: #666; display: inline-block; }
.punto.on { background: var(--verde); box-shadow: 0 0 8px var(--verde); }

/* Animaciones */
@keyframes voltear { from { transform: rotateX(90deg) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aparecer { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes brillo { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
@keyframes golpe { 0% { transform: scale(2.2); opacity: 0; } 60% { transform: scale(0.92); opacity: 1; } 100% { transform: scale(1); } }
.voltear { animation: voltear 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.aparecer { animation: aparecer 0.45s ease-out both; }
.latido { animation: latido 1s ease-in-out infinite; }
.golpe { animation: golpe 0.6s cubic-bezier(0.2, 1.2, 0.4, 1) both; }

/* Ventana modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 20, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}
.modal > .caja {
  background: linear-gradient(180deg, #18257a, #0d1450);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radio);
  padding: 1.5rem 1.8rem;
  max-width: min(760px, 96vw);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--sombra);
}

.aviso-red {
  position: fixed;
  top: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  background: #e5383b;
  color: #fff;
  padding: 0.4em 1em;
  border-radius: 999px;
  font-weight: 700;
  z-index: 99;
  box-shadow: var(--sombra);
}

/* Fichas de letras (crema, como las de la tele) */
.letra {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9em;
  height: 2.1em;
  border-radius: 0.24em;
  background: linear-gradient(180deg, #fffaf0 0%, #f1e3bf 100%);
  border: 2px solid #ffe7a3;
  color: #13206b;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 6px 14px rgba(0, 0, 0, 0.45);
}
.letra.vocal { color: #c2185b; }
.letra.vacia { background: rgba(255, 255, 255, 0.06); border: 2px dashed rgba(255, 255, 255, 0.25); box-shadow: none; color: transparent; }
