body {
  font-family: monospace, Courier,Consolas, monaco;
  font-size: 16px;
  color: #00ff00;
  background-color: #000000;
}
:root {
  /* Grosor de líneas (scanlines) */
  --scanline-size: 4px;

  /* Opacidad de cada línea (0–1). Subir = líneas más visibles */
  --scanline-opacity: 0.31;

  /* Intensidad global del overlay (0–1). Bajar = efecto más sutil */
  --crt-intensity: 0.6;

  /* Viñeta: 0 = sin viñeta, 1 = viñeta muy fuerte */
  --vignette-strength: 0.60;

  /* Parpadeo: velocidad (tiempo CSS), y rango de brillo */
  --flicker-speed: 3.8s;
  --flicker-min: 0.90;
  --flicker-max: 1.00;
}

input:focus {
  outline:none !important;
  outline-width: 0 !important;
  box-shadow: none !important;
  -moz-box-shadow: none !important;
  -webkit-box-shadow: none !important;
}

input {
  /* Mostramos el cursor estándar en blanco */
  caret-color: white !important;
}

/* (Opcional) Ya no se usa un cursor falso, 
   pero dejamos el estilo por si existe en el HTML. 
   No tendrá efecto porque el JS que lo creaba ha sido eliminado. */
.input-caret {
  width: 8px;
  height: 18px;
  background: #f8f9fa;
  position: absolute;
}

.text-ms {
  color: #00ff00;
}

.border-ms {
  border-color: #00ff00 !important;
}
.bg-ms {
  background-color: #00ff00;
}

.bg-negre {
  background-color: #000000;
}
.text-negre {
  color: #000000;
}

.btn-ms {
  color: #000000;
  background-color: #00ff00;
  border-color: #00ff00;
}

.btn-ms:hover {
  color: #000000;
  background-color: #00ff00;
  border-color: #00ff00;
}

.btn-ms:focus, .btn-ms.focus {
  color: #000000;
  background-color: #00ff00;
  border-color: #00ff00;
  /*box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);*/
}

.btn-ms.disabled, .btn-ms:disabled {
  color: #000000;
  background-color: #00ff00;
  border-color: #00ff00;
}

.btn-ms:not(:disabled):not(.disabled):active, .btn-ms:not(:disabled):not(.disabled).active,
.show > .btn-ms.dropdown-toggle {
  color: #000000;
  background-color: #00ff00;
  border-color: #00ff00;
}

/* Evitar zoom al enfocar en móviles (iOS y WebViews) */
html {
  -webkit-text-size-adjust: 100%;
}

input, textarea, select {
  font-size: 16px !important; /* clave en iOS para que no haga zoom al foco */
}

/* Opcional: suaviza toques rápidos para evitar zoom por doble-tap en algunos navegadores */
button, a, input, textarea, select {
  touch-action: manipulation;
}
/* ==== Final video full-viewport, siempre visible (portrait/landscape) ==== */
.final-wrapper {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.final-video {
  width: 100vw;
  height: 100vh;
  object-fit: contain; /* Muestra el vídeo completo con bandas si hace falta */
}

/* Botón para arrancar con sonido cuando el autoplay con audio esté bloqueado */
.final-btn {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  font-size: 16px;
  border-radius: 9999px;
  border: 0;
  color: #000000;
  background: #00ff00;
  cursor: pointer;
}
.final-btn:focus { outline: none; }

/* Capa CRT global inyectada por JS como último hijo del body */
#crt-overlay-global,
#crt-overlay-global::before,
#crt-overlay-global::after {
  pointer-events: none;
}

#crt-overlay-global {
  position: fixed;
  inset: 0;
  z-index: 2147483647; /* máximo práctico */
}

#crt-overlay-global::before,
#crt-overlay-global::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Reutilizamos los mismos parámetros que .crt para coherencia */
#crt-overlay-global::before {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255, var(--scanline-opacity, 0.21)) 0px,
      rgba(255,255,255, var(--scanline-opacity, 0.21)) 1px,
      transparent 3px,
      transparent var(--scanline-size, 4px)
    );
  mix-blend-mode: overlay;
  opacity: 0.6;
  animation: crt-overlay-scan 6s linear infinite, crt-overlay-flicker var(--flicker-speed, 2.8s) steps(2, end) infinite;
}

#crt-overlay-global::after {
  background:
    radial-gradient(ellipse at center,
      rgba(0,0,0,0) 60%,
      rgba(0,0,0,var(--vignette-strength, 0.50)) 100%);
}

@keyframes crt-overlay-flicker {
  0%   { filter: brightness(var(--flicker-max, 1.10)); }
  45%  { filter: brightness(1); }
  50%  { filter: brightness(var(--flicker-min, 0.90)); }
  55%  { filter: brightness(1); }
  100% { filter: brightness(var(--flicker-max, 1.10)); }
}
@keyframes crt-overlay-scan {
  0%   { background-position-y: 0; }
  100% { background-position-y: var(--scanline-size, 4px); }
}

@media (prefers-reduced-motion: reduce) {
  #crt-overlay-global::before { animation: none; }
}
#msegon {
  display: none !important;
}

