/*
  DOOH Player — estilos otimizados para TV Boxes
  - Tipografia grande para leitura à distância
  - Stage de mídia fullscreen com uma video + uma img
*/

:root {
  --bg: #0b0d10;
  --bg-accent: #12161c;
  --text: #f2f4f7;
  --muted: #9aa3af;
  --accent: #3dd6c6;
  --danger: #ff6b6b;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --pin-size: clamp(4.5rem, 12vw, 9rem);
  --title-size: clamp(2rem, 5vw, 3.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

body {
  background: #000;
}

.app {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.app.is-playing {
  padding: 0;
  background: #000;
}

.view {
  width: min(920px, 100%);
  text-align: center;
}

.view.is-hidden,
.view[hidden] {
  display: none !important;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.pin {
  margin: 0;
  font-size: var(--pin-size);
  font-weight: 700;
  letter-spacing: 0.28em;
  line-height: 1.1;
  color: var(--text);
  text-indent: 0.28em;
  user-select: all;
}

.hint {
  margin: 1.25rem 0 0;
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  color: var(--muted);
  font-weight: 400;
}

.status {
  margin: 1.75rem 0 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--accent);
  font-weight: 600;
}

.status.is-error {
  color: var(--danger);
}

.success-title {
  margin: 0;
  font-size: var(--title-size);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.view--connected {
  animation: fadeIn 280ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ----- Stage de mídia (fullscreen) ----- */
.view--media {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: #000;
}

.media-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  border: 0;
  display: block;
  /* Equivalente Tailwind: transition-opacity duration-1000 ease-in-out */
  opacity: 0;
  transition: opacity 1000ms ease-in-out;
  will-change: opacity;
}

.media-el.is-opaque {
  opacity: 1;
}

.media-el.is-hidden,
.media-el[hidden] {
  display: none !important;
}

.media-status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0 1.5rem;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--muted);
  text-align: center;
  z-index: 2;
}

.media-status.is-hidden,
.media-status[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .view--connected {
    animation: none;
  }

  .media-el {
    transition: none;
  }
}
