/* SAO Cast — receptor de la tele.
   Sin variables CSS ni flex-gap: muchos navegadores de TV son antiguos.
   Márgenes de 6 % para el sobrebarrido (overscan) de los televisores. */

@font-face {
  font-family: 'Archivo';
  src: url('/static/fonts/archivo.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/fonts/plex-mono-500.woff2') format('woff2');
  font-weight: 500;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000000;
  color: #E7EAF6;
  font-family: 'Archivo', 'Segoe UI', Roboto, Arial, sans-serif;
  cursor: none;
}
.oculto { display: none !important; }
.pantalla { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }

/* ---------- contenido ---------- */

#medio { background: #000000; }
#medio video, #medio img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
#medio img { object-fit: contain; visibility: hidden; }
/* Sobre el contenido, solo mientras llega sonido que la tele todavía no puede tocar. */
.aviso-sonido {
  position: absolute; z-index: 2; bottom: 6vh; right: 6vw; max-width: 40vw; margin: 0; padding: 1vw 1.4vw;
  font-size: 1.7vw; color: #E7EAF6; background: rgba(16, 21, 47, 0.9); border-radius: 8px; text-align: right;
}
.modo-rtc img, .modo-img video { display: none; }
.sin-objectfit #medio img {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  right: 0; bottom: 0; margin: auto;
}

/* Ajuste elegido en el panel para cada tele (atributo en <body>). */
[data-ajuste="cover"] #medio video, [data-ajuste="cover"] #medio img { object-fit: cover; }
[data-ajuste="fill"] #medio video, [data-ajuste="fill"] #medio img { object-fit: fill; }
[data-ajuste="contain"] #medio video, [data-ajuste="contain"] #medio img { object-fit: contain; }
.sin-objectfit [data-ajuste="fill"] #medio img { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; }

/* ---------- pantallas propias ---------- */

#espera, #codigo, #sinconexion { background: #10152F; }

.marca {
  position: absolute;
  top: 6vh;
  left: 6vw;
  margin: 0;
  font-size: 2vw;
  font-weight: 400;
  font-stretch: 112%;
  color: #C9CEE3;
}
/* Mismo lockup que el panel: «SAO» regular, «Cast» en negrita. */
.marca b { font-weight: 700; }
.marca img { width: 1.8vw; height: auto; margin-right: 0.5vw; vertical-align: -0.25em; }

.nombre {
  position: absolute;
  top: 28vh;
  left: 6vw;
  right: 6vw;
  margin: 0;
  font-size: 8vw;
  line-height: 1.02;
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}
.hora {
  position: absolute;
  top: 50vh;
  left: 6vw;
  margin: 0;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-weight: 500;
  font-size: 4.4vw;
  color: #E7EAF6;
}
/* Hora y fecha forman un grupo: juntas entre sí, separadas del nombre. */
.fecha { position: absolute; top: 62vh; left: 6vw; margin: 0; font-size: 2.2vw; color: #A3ABC6; }
.estado { position: absolute; bottom: 6vh; left: 6vw; margin: 0; font-size: 1.9vw; color: #A3ABC6; }
.pista { position: absolute; bottom: 6vh; right: 6vw; margin: 0; max-width: 40vw; font-size: 1.7vw; color: #A3ABC6; text-align: right; }

/* La única señal de esta pantalla: el código que hay que escribir. */
.titulo { position: absolute; top: 22vh; left: 6vw; margin: 0; font-size: 4vw; font-weight: 600; font-stretch: 112%; color: #FFFFFF; }
.codigo-num {
  position: absolute;
  top: 33vh;
  left: 6vw;
  margin: 0;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-weight: 500;
  font-size: 14vw;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #F4B63F;
}
.instrucciones { position: absolute; top: 64vh; left: 6vw; right: 30vw; margin: 0; font-size: 2.4vw; line-height: 1.35; color: #E7EAF6; }
.vence { position: absolute; bottom: 6vh; left: 6vw; margin: 0; font-size: 1.8vw; color: #A3ABC6; }

.titulo-centro { position: absolute; top: 36vh; left: 6vw; right: 6vw; margin: 0; font-size: 4.4vw; font-weight: 600; font-stretch: 112%; color: #FFFFFF; }
.texto-centro { position: absolute; top: 50vh; left: 6vw; right: 25vw; margin: 0; font-size: 2.2vw; line-height: 1.4; color: #A3ABC6; }

/* ---------- avisos ---------- */

.nota {
  position: absolute;
  left: 3vw;
  bottom: 3vh;
  padding: 0.6vw 1.2vw;
  border-radius: 0.4vw;
  background: #10152F;
  background: rgba(16, 21, 47, 0.88);
  color: #E7EAF6;
  font-size: 1.6vw;
}
.identificar {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: table;
  width: 100%;
  height: 100%;
  background: #6A4EF3;
  color: #FFFFFF;
}
.identificar span {
  display: table-cell;
  vertical-align: middle;
  padding: 0 6vw;
  text-align: center;
  font-size: 10vw;
  font-weight: 700;
  font-stretch: 118%;
}
.sin-js { position: absolute; top: 40vh; left: 6vw; right: 6vw; font-size: 3vw; color: #FFFFFF; }
