/* Экран для зрителей: сцена 1920×1080, вписанная в окно. */

html,
body.screen {
  height: 100%;
  overflow: hidden;
}

body.screen.idle {
  cursor: none;
}

#viewport {
  position: fixed;
  inset: 0;
  background: var(--bg);
  overflow: hidden;
}

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  margin: -540px 0 0 -960px;
  transform-origin: 50% 50%;
  background: var(--bg);
  overflow: hidden;
}

#slides {
  position: absolute;
  inset: 0;
}

.logo {
  position: absolute;
  top: 40px;
  right: 56px;
  width: 124px;
  color: var(--logo);
  z-index: 5;
  transition: opacity 0.3s ease;
}

.logo.big {
  width: 190px;
}

.pager {
  position: absolute;
  right: 56px;
  bottom: 30px;
  font-size: 18px;
  color: var(--muted);
  z-index: 5;
}

#laser {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff3b30 0 38%, rgba(255, 59, 48, 0.45) 40%, rgba(255, 59, 48, 0) 70%);
  box-shadow: 0 0 24px 6px rgba(255, 59, 48, 0.45);
  z-index: 20;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

#laser.on {
  opacity: 1;
}

#black {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#black.on {
  opacity: 1;
}

/* ------------------------------------------------------------ QR-оверлей */

.qr {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(8px);
}

.qr[hidden] {
  display: none;
}

.qr-card {
  display: flex;
  gap: 40px;
  align-items: center;
  max-width: min(900px, 92vw);
  padding: 36px;
  border-radius: 24px;
  background: var(--bg);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}

.qr-code {
  flex: none;
  width: 260px;
  height: 260px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
}

.qr-code svg {
  width: 100%;
  height: 100%;
}

.qr-text h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.qr-text p {
  margin: 8px 0;
  color: var(--ink-2);
  font-size: 16px;
}

.qr-url {
  font-family: ui-monospace, monospace;
  word-break: break-all;
  color: var(--ink) !important;
}

.qr-pin {
  font-size: 22px !important;
  color: var(--ink) !important;
}

.qr-keys {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
}

.qr-keys li {
  white-space: nowrap;
}

.qr-keys b {
  color: var(--ink);
}

@media (max-width: 760px) {
  .qr-card {
    flex-direction: column;
    gap: 20px;
  }
  .qr-keys li {
    white-space: normal;
  }
}

.status {
  position: fixed;
  left: 12px;
  bottom: 10px;
  z-index: 60;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
}

/* Встроенный предпросмотр в пульте: без курсора и служебных элементов */
body.embed .status,
body.embed .qr {
  display: none !important;
}
