/* SocialTimers TV — visual tokens mirrored from the rooms/watch style. */
:root {
  --grad-a: #101830;
  --grad-mid: #232052;
  --grad-b: #3c2a68;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --accent: #ff4f00;
  --text: #f5f4fa;
  --text-dim: rgba(245, 244, 250, 0.65);
  --radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: linear-gradient(160deg, var(--grad-a), var(--grad-mid) 55%, var(--grad-b));
  color: var(--text);
  font-family: "Avenir Next", Avenir, Optima, "Segoe UI", sans-serif;
}

.screen {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.brand {
  font-size: clamp(24px, 4vmin, 42px);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
}

.qr-wrap {
  background: #fff;
  padding: 3vmin;
  border-radius: var(--radius);
  transition: opacity 0.4s;
}
.qr-wrap.stopped { opacity: 0.3; }
.qr-img {
  width: 42vmin;
  height: 42vmin;
  display: block;
}
.qr-img:not([src]) { visibility: hidden; }

.qr-status { margin: 0; font-size: clamp(14px, 2.2vmin, 22px); color: var(--text-dim); }
.qr-hint {
  margin: 0;
  max-width: 60ch;
  text-align: center;
  font-size: clamp(13px, 2vmin, 19px);
  color: var(--text-dim);
  padding: 0 24px;
}

.qr-refresh {
  font: inherit;
  font-size: clamp(15px, 2.4vmin, 22px);
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  padding: 10px 28px;
  cursor: pointer;
}

.pairing-version {
  position: fixed;
  bottom: 12px;
  right: 16px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ---- player ---- */
.player { background: #000; }

.stage {
  position: relative;
  background: #000;
  /* Sized by app.js to the largest 16:9 rect that fits the viewport, so the
     normalized layout coordinates of the slide map 1:1 onto pixels. */
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.slide.visible { opacity: 1; }

/* Live QR overlay: positioned/sized by app.js from the slide's layout. White
   card behind the code, like the composer preview. */
.slide-qr {
  position: absolute;
  background: #fff;
  border-radius: 6%;
  padding: 1.2%;
  z-index: 3;
}

/* Event/group info: bottom-left placard. */
.slide-info {
  position: absolute;
  left: 2.5%;
  bottom: 3.5%;
  max-width: 55%;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 14px;
  padding: 1.4vmin 2.2vmin;
  z-index: 2;
}
.info-name {
  font-size: clamp(18px, 3.4vmin, 40px);
  font-weight: 700;
  line-height: 1.15;
}
.info-sub {
  margin-top: 0.4vmin;
  font-size: clamp(13px, 2.2vmin, 26px);
  color: var(--text-dim);
}

.player-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  opacity: 0.55;
}
.player-close:hover { opacity: 1; background: rgba(200, 30, 30, 0.85); }

.brand-mark {
  position: absolute;
  bottom: 12px;
  right: 16px;
  z-index: 2;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
