:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #000;
  color: #fff;
}

* {
  box-sizing: border-box;
}

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

.painel {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) clamp(112px, 16vh, 220px);
  background: #000;
}

.video {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(circle at center, #18243a 0%, #060a11 58%, #000 100%);
}

#youtube-player {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

#youtube-player:not([src]) {
  visibility: hidden;
}

.status {
  position: absolute;
  top: clamp(14px, 2.2vh, 32px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 48px);
  padding: 13px 20px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(4, 10, 20, .84);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  color: #eef6ff;
  font-size: clamp(15px, 1.3vw, 24px);
  line-height: 1.2;
  text-align: center;
  opacity: 1;
  transition: opacity .35s ease;
  z-index: 2;
}

.status.is-hidden {
  pointer-events: none;
  opacity: 0;
}

.status.is-error {
  border-color: rgba(251, 113, 133, .5);
  background: rgba(69, 10, 22, .9);
}

.status-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 7px rgba(56, 189, 248, .14);
  animation: pulse 1.8s ease-in-out infinite;
}

.status.is-error .status-dot {
  background: #fb7185;
  box-shadow: 0 0 0 7px rgba(251, 113, 133, .14);
}

.mensagens {
  position: relative;
  display: grid;
  grid-template-columns: minmax(26px, 1fr) minmax(0, 15fr) minmax(26px, 1fr);
  align-items: center;
  gap: clamp(18px, 2vw, 44px);
  min-width: 0;
  padding: clamp(18px, 2.4vh, 34px) clamp(28px, 4.8vw, 96px);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: #000;
  box-shadow: none;
}

.mensagens::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
}

.mensagem {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: clamp(27px, 3vw, 58px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: .01em;
  text-align: center;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .42s ease, transform .42s ease;
}

.mensagem.is-changing {
  opacity: 0;
  transform: translateY(12px);
}

.message-mark {
  position: relative;
  z-index: 1;
  width: clamp(18px, 2vw, 34px);
  height: 3px;
  justify-self: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
  box-shadow: none;
}

@media (orientation: portrait) {
  .painel {
    grid-template-rows: minmax(0, 1fr) clamp(170px, 17vh, 300px);
  }

  .mensagens {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    gap: 18px;
    padding-inline: clamp(24px, 5vw, 64px);
  }

  .mensagem {
    font-size: clamp(32px, 4.7vw, 68px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot {
    animation: none;
  }

  .status,
  .mensagem {
    transition: none;
  }
}

@keyframes pulse {
  0%, 100% { opacity: .58; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.08); }
}
