/* BC TV — player da TV. Fundo preto, texto branco, vermelho BC só como acento (barra de progresso).
   Tamanhos em vw/vh para leitura à distância. Textos dentro da margem segura de 5% (overscan). */

:root {
  --bc-red: #99040F;
  --safe-x: 5vw;
  --safe-y: 5vh;
  --text-dim: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.56);
  --panel-bg: rgba(0, 0, 0, 0.82);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  cursor: none;
}

body {
  color: #fff;
  font-family: "Titillium Web", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;
}

[hidden] {
  display: none !important;
}

/* Vídeo único e canvas de congelamento por cima (transição entre vídeos) */
#video,
#freeze {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  display: block;
  background: #000;
  outline: none;
}

#video {
  object-fit: contain;
  z-index: 0;
}

#freeze {
  z-index: 1;
  opacity: 0;
  transition: opacity 400ms linear;
  pointer-events: none;
}

#freeze.visible {
  opacity: 1;
  transition: none;
}

/* Telas de espera */
.idle {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 2;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--safe-y) var(--safe-x);
  text-align: center;
}

.idle-logo {
  display: block;
  width: 26vw;
  height: auto;
  margin: 0 0 2vh;
}

.idle-title {
  margin: 0;
  max-width: 90vw;
  font-size: 2.8vw;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.idle-sub {
  margin: 1.8vh 0 0;
  max-width: 90vw;
  font-size: 1.7vw;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-dim);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.bar {
  width: 40vw;
  height: 0.6vw;
  min-height: 6px;
  margin-top: 4vh;
  background: #3A3A3A;
  overflow: hidden;
}

.bar-fill {
  width: 0;
  height: 100%;
  background: var(--bc-red);
  transition: width 500ms linear;
}

/* Avisos curtos (som, título do vídeo) */
.notice {
  position: fixed;
  left: var(--safe-x);
  bottom: var(--safe-y);
  z-index: 3;
  max-width: 60vw;
  padding: 1.6vh 1.8vw;
  background: var(--panel-bg);
  color: #fff;
}

.notice-label {
  font-size: 1.3vw;
  line-height: 1.3;
  color: var(--text-faint);
  margin-bottom: 0.4vh;
}

.notice-text {
  font-size: 1.9vw;
  font-weight: 600;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Painel de status (OSD) */
.osd {
  position: fixed;
  top: var(--safe-y);
  left: var(--safe-x);
  z-index: 4;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  padding: 2.2vh 2vw;
  background: var(--panel-bg);
  color: #fff;
  font-size: 1.25vw;
  line-height: 1.45;
}

.osd-head {
  font-size: 1.55vw;
  font-weight: 600;
  margin-bottom: 1.2vh;
}

.osd-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.6vw;
  row-gap: 0.25vh;
}

.osd-label {
  color: var(--text-faint);
  white-space: nowrap;
}

.osd-value {
  max-width: 62vw;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.osd-log {
  margin-top: 1.4vh;
  max-width: 86vw;
  font-family: ui-monospace, "Roboto Mono", "Consolas", monospace;
  font-size: 0.95vw;
  line-height: 1.4;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.osd-foot {
  margin-top: 1.4vh;
  font-size: 1.05vw;
  color: var(--text-faint);
}
