/* Caraloggi Signage — player.
   Compatibility floor: Chromium ~56 (Samsung TV browser).
   No CSS grid, no container queries, no flex `gap`, no backdrop-filter. */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #070b12;
  color: #e8f0fa;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  cursor: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

#stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #070b12;
  z-index: 1;
}

/* Full-screen prompt. Bottom-centre so it never covers a board's header, and
   above every layer so it is legible over live content. Sized in vh because a
   wall screen is read from across the room. */
#fsHint {
  position: absolute;
  left: 50%;
  bottom: 4vh;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  z-index: 40;
  padding: 1.2vh 2.4vh;
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.82);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #cfe9f5;
  font-size: 2vh;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#fsHint b { color: #22d3ee; }

.layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  will-change: opacity;
  transition: opacity 0.6s ease;
}

.cg-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.asset {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
  border: 0;
}

/* ---------------------------------------------------------- full screens */

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  padding: 4vh 4vw;
  background: #070b12;
  background-image: radial-gradient(circle at 50% 42%, rgba(34, 211, 238, 0.10) 0%, rgba(7, 11, 18, 0) 62%);
}

.screen.on {
  display: flex;
}

.wordmark {
  font-size: 2.6vh;
  letter-spacing: 0.62em;
  font-weight: 600;
  color: #e8f0fa;
  text-indent: 0.62em;
}

.submark {
  margin-top: 0.9vh;
  font-family: Consolas, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-size: 1.5vh;
  letter-spacing: 0.52em;
  color: #22d3ee;
  text-indent: 0.52em;
}

.rule {
  margin-top: 3.2vh;
  width: 12vw;
  height: 1px;
  background: rgba(34, 211, 238, 0.35);
}

.pair-lead {
  margin-top: 5vh;
  font-family: Consolas, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-size: 2vh;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #7f93ad;
  text-indent: 0.34em;
}

.code {
  margin-top: 2.6vh;
  font-family: Consolas, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
}

.code .ch {
  display: inline-block;
  font-size: 17vh;
  line-height: 1.16;
  width: 1.05em;
  color: #22d3ee;
  background: #0d1524;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 0.1em;
  margin: 0 0.035em;
  text-align: center;
  box-shadow: 0 0 6vh rgba(34, 211, 238, 0.10);
}

.code .ch.blank {
  color: rgba(127, 147, 173, 0.35);
}

.pair-help {
  margin-top: 4vh;
  font-size: 2.1vh;
  color: #93a7bf;
  max-width: 62vw;
  line-height: 1.5;
}

.pair-help b {
  color: #e8f0fa;
  font-weight: 600;
}

.pair-status {
  margin-top: 3.4vh;
  font-family: Consolas, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-size: 1.7vh;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #5f7492;
}

.livedot {
  display: inline-block;
  width: 0.85vh;
  height: 0.85vh;
  border-radius: 50%;
  background: #22d3ee;
  margin-right: 1.1vh;
  vertical-align: middle;
  animation: cg-pulse 2.2s ease-in-out infinite;
}

.idle-msg {
  margin-top: 4.5vh;
  font-family: Consolas, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-size: 2vh;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #5f7492;
  animation: cg-pulse 2.6s ease-in-out infinite;
}

#offline {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f59e0b;
  opacity: 0.4;
  display: none;
  z-index: 60;
}

#offline.on {
  display: block;
}

@keyframes cg-pulse {
  0% { opacity: 1; }
  50% { opacity: 0.35; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .livedot, .idle-msg { animation: none; }
  .layer { transition: none; }
}
