/* ═══════════════════════════════════════
   Digital Signage — Full-screen display
   ═══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Slide container ── */

#screen {
  position: relative;
  width: 100vw; height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .8s ease;
}
.slide.active { opacity: 1; z-index: 2; }
.slide.prev   { opacity: 0; z-index: 1; }

.slide img {
  max-width: 100%; max-height: 100%;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

.slide iframe {
  width: 100%; height: 100%;
  border: none;
  background: #fff;
}

/* ── No-content screen ── */

#no-content {
  position: absolute; inset: 0; z-index: 10;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  background: #0a0a0a; color: rgba(255,255,255,.4);
  font-size: 18px; gap: 20px;
  text-align: center; padding: 40px;
}
#no-content.visible { display: flex; }
#no-content .nc-icon { font-size: 72px; opacity: .2; }
#no-content .nc-title { font-size: 22px; font-weight: 300; letter-spacing: 1px; }
#no-content .nc-sub   { font-size: 14px; opacity: .5; }

/* ── Info overlay (title + description) ── */

#info-overlay {
  position: absolute; bottom: 10px; left: 0; right: 0;
  z-index: 20;
  display: flex; justify-content: flex-start;
  padding: 0 24px 40px;
  pointer-events: none;
  opacity: 1;
  transition: opacity .4s;
}
#info-overlay.hidden { opacity: 0; }

.info-box {
  background: linear-gradient(135deg,
    rgba(0,0,0,.82) 0%,
    rgba(0,0,0,.65) 100%);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 14px 20px;
  max-width: 600px;
  border: 1px solid rgba(255,255,255,.08);
}
.info-title {
  font-size: 20px; font-weight: 700; color: #fff;
  line-height: 1.2; margin-bottom: 4px;
}
.info-desc  {
  font-size: 14px; color: rgba(255,255,255,.7);
  line-height: 1.5;
}

/* ── Clock ── */

#clock {
  position: absolute; top: 20px; right: 26px;
  z-index: 20;
  font-size: 26px; font-weight: 300;
  color: rgba(255,255,255,.85);
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  display: none;
}
#clock.visible { display: block; }

/* ── Progress bar ── */

#progress-track {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,.1); z-index: 30;
}
#progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  width: 0%;
  transition: none;
}

/* ── Dot indicators ── */

#dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 20;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.3); transition: all .3s;
}
.dot.active { background: #fff; transform: scale(1.3); }

/* ── Loading state ── */

#loader {
  position: absolute; inset: 0; z-index: 50;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; color: rgba(255,255,255,.4);
}
#loader.hidden { display: none; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
