/* =====================================================================
   player.css — Tela da TV (4K nativo, tela cheia, loop, anti burn-in)
   ===================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #000;
  cursor: none;                 /* esconde o cursor na TV */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Palco em resolução nativa; escalado por JS para preencher o viewport */
#palco {
  position: absolute; top: 50%; left: 50%;
  width: 3840px; height: 2160px;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  background: #000; overflow: hidden;
}

/* Deslocamento lento e imperceptível para mitigar burn-in */
#deriva {
  position: absolute; inset: 0;
  animation: deriva 180s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes deriva {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(6px, 6px); }
}

/* Duas camadas sobrepostas para crossfade (sem tela preta) */
.camada {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  opacity: 0; transition: opacity .7s ease;
}
.camada.ativa { opacity: 1; }
.camada > video,
.camada > img {
  width: 100%; height: 100%;
  object-fit: contain;          /* sobrescrito por item (contain|cover) */
  display: block;
}
.camada > iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
}

/* Tela ociosa (sem programação) — leve movimento p/ evitar burn-in */
#tela-ociosa {
  position: fixed; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: #000; color: #3a3f4a;
}
#tela-ociosa[hidden] { display: none; }
.ociosa-conteudo { text-align: center; animation: deriva 120s ease-in-out infinite alternate; }
.ociosa-marca { font-size: 64px; font-weight: 800; letter-spacing: -.02em; }
.ociosa-msg   { font-size: 34px; margin-top: 14px; opacity: .7; }

/* Overlay de fallback para autoplay bloqueado */
#overlay-toque {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .72); color: #fff; cursor: pointer;
}
#overlay-toque[hidden] { display: none; }
.toque-conteudo {
  font-size: 48px; font-weight: 700; padding: 28px 56px;
  border: 2px solid rgba(255, 255, 255, .5); border-radius: 18px;
}
