@import url('/fonts/fonts.css');
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: Manrope, Arial, sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
#stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}
.player-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.scene {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center;
}
.player-block {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.25;
  font-weight: 600;
}
.player-block > span {
  padding: 0.15em;
  max-width: 100%;
}
.player-block small {
  font-size: 0.35em;
  font-weight: 400;
  margin-top: 0.6em;
}
.player-block .weather-time {
  font-size: 0.19em;
  opacity: 0.7;
}
.player-block iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}
.web-offline {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  background: #172033;
  padding: 20px;
  font-size: 24px;
}
.waiting-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: #9ca3af;
  padding: 40px;
  font-size: 22px;
}
.pairing {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #111827;
  padding: 40px;
  text-align: center;
}
.brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  position: absolute;
  top: 40px;
  left: 48px;
}
.pairing h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 24px;
}
.pairing p {
  color: #a8b1c3;
  font-size: 18px;
  max-width: 650px;
  line-height: 1.7;
}
.pair-code {
  font-size: clamp(45px, 8vw, 108px);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 24px;
  white-space: nowrap;
  border: 1px solid #374151;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  margin: 15px 0 22px;
  color: #f8fafc;
}
.pairing input {
  padding: 14px;
  background: #1f2937;
  border: 1px solid #4b5563;
  color: #fff;
  border-radius: 4px;
  width: min(500px, 85vw);
}
button {
  padding: 12px 20px;
  border: 1px solid #4b5563;
  border-radius: 4px;
  background: #3447d9;
  color: #fff;
  font-size: 15px;
}
.pairing select {
  position: absolute;
  right: 40px;
  top: 40px;
  background: #1f2937;
  color: #e5e7eb;
  border: 1px solid #374151;
  padding: 8px 12px;
  border-radius: 4px;
}
.hidden {
  display: none !important;
}
.player-capture-controls { position: fixed; bottom: 16px; left: 16px; z-index: 100; max-width: calc(100vw - 32px); }
.player-capture-controls[hidden], .player-capture-controls.capturing { visibility: hidden; }
.player-capture-controls summary { padding: 9px 13px; border: 1px solid #4b5563; border-radius: 4px; background: #111827eb; font-size: 13px; cursor: pointer; list-style: none; width: fit-content; }
.player-capture-controls section { position: absolute; bottom: 46px; left: 0; width: min(390px, calc(100vw - 32px)); padding: 20px; background: #111827; border: 1px solid #4b5563; border-radius: 6px; box-shadow: 0 8px 30px #0006; }
.player-capture-controls h2 { margin: 0 0 12px; font-size: 18px; }
.player-capture-controls p { font-size: 13px; line-height: 1.6; color: #cbd5e1; }
.player-capture-controls [role='status'] { color: #fca5a5; }
.player-capture-controls section > div { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.player-capture-controls button { padding: 9px 12px; font-size: 13px; }
.player-capture-controls button:disabled { opacity: .5; cursor: default; }
.player-capture-controls .capture-close { background: transparent; }
body:has(#pairing.hidden) .player-capture-controls:not(.visible):not(:focus-within):not(:has(details[open])) { opacity: 0; pointer-events: none; }
#status {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 11px;
  color: #cbd5e1;
  background: #0009;
  padding: 6px 9px;
  border-radius: 4px;
  pointer-events: none;
}
#status:empty {
  display: none;
}
.download-status { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 32px; background: #111827; }
.download-status[hidden], .download-status [hidden] { display: none !important; }
.download-card { width: 100%; max-width: 560px; min-width: 0; }
.download-brand { position: absolute; top: 40px; left: 48px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.download-card h1 { font-size: 28px; line-height: 1.35; margin: 0 0 22px; font-weight: 700; }
.download-file { font-size: 15px; line-height: 1.5; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #cbd5e1; margin: 0 0 18px; }
.download-card progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 6px; overflow: hidden; background: #334155; accent-color: #818cf8; }
.download-card progress::-webkit-progress-bar { background: #334155; border-radius: 6px; }
.download-card progress::-webkit-progress-value { background: #818cf8; border-radius: 6px; }
.download-card progress::-moz-progress-bar { background: #818cf8; }
.download-card progress:not([value]) { animation: download-pulse 1.4s ease-in-out infinite; }
.download-details { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; margin-top: 16px; }
.download-percent { font-variant-numeric: tabular-nums; }
.download-bytes { font-size: 13px; color: #a8b1c3; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.download-hint { font-size: 14px; line-height: 1.65; color: #a8b1c3; margin: 24px 0 0; }
.download-retry { margin-top: 20px; }
.download-status.failed h1 { color: #fca5a5; }
@keyframes download-pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .download-card progress:not([value]) { animation: none; } }
@media (max-width: 600px) {
  .download-status { padding: 24px; }
  .download-brand { top: 24px; left: 24px; }
  .download-card h1 { font-size: 23px; }
}
.pairing .error {
  color: #fca5a5;
  font-size: 14px;
}
#pair-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.zone-root {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}
.qr-code {
  width: 78%;
  height: 78%;
  object-fit: contain;
}
.scrolling-text {
  display: block;
  white-space: nowrap;
}
.scrolling-text > span {
  position: absolute;
  top: 50%;
  left: 100%;
  max-width: none;
  padding: 0;
  animation: signage-scroll 20s linear infinite;
}
@keyframes signage-scroll {
  from {
    transform: translate(0, -50%);
  }
  to {
    transform: translate(calc(-100% - var(--ticker-width)), -50%);
  }
}

.pair-address { font-size: 22px; font-weight: 600; color: #cbd5e1; }
@media (max-width: 600px) {
  .pairing { padding: 24px; }
  .brand { top: 24px; left: 24px; }
  .pairing select { top: 24px; right: 24px; }
  .pairing h1 { font-size: 24px; }
  .pair-code { font-size: clamp(32px, 9vw, 54px); padding: 20px 16px; }
}
.ad-zone { overflow: hidden; }
.ad-creative { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; z-index: 1; }
.ad-erid { position: absolute; bottom: 10px; right: 12px; z-index: 2; color: white; background: rgba(0,0,0,.8); padding: 5px 9px; border-radius: 3px; font: 20px/1.3 Arial,sans-serif; overflow-wrap: anywhere; max-width: 90%; }
.ad-preview-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #fff; background: rgba(13,19,32,.8); padding: 24px 36px; border-radius: 12px; font: 600 42px/1.3 Manrope,sans-serif; text-align: center; }

[hidden] { display: none !important; }
#pair-actions { display:flex; gap:12px; align-items:center; justify-content:center; flex-wrap:wrap; }
#open-cms { color:#dce4ff; font-size:15px; padding:12px 16px; border:1px solid #4b5563; border-radius:4px; text-decoration:none; }
.browser-player-controls { position:fixed; right:16px; bottom:16px; z-index:101; max-width:calc(100vw - 32px); text-align:right; }
.browser-player-controls button { background:#111827ed; font-size:13px; padding:9px 13px; }
.browser-player-controls p { max-width:360px; padding:14px; border:1px solid #4b5563; border-radius:4px; background:#111827; color:#e5e7eb; font-size:13px; line-height:1.6; }
.browser-player-controls p:empty { display:none; }
.web-playing:not(.player-controls-visible) .browser-player-controls:not(:focus-within) { opacity:0; pointer-events:none; }
.web-playing:not(.player-controls-visible):not(:has(:focus-visible)) { cursor:none; }
.player-capturing .browser-player-controls { visibility:hidden; }
@media(max-height:650px) { .pairing { overflow-y:auto; justify-content:flex-start; padding-top:105px; padding-bottom:90px; } .pairing h1 { margin-bottom:12px; } .pairing p { margin:8px 0 16px; } .pair-code { padding:14px 20px; margin:12px 0; } }
