/* ============================================================
   Momentshare Cast Receiver — TV Slideshow Styles
   ============================================================ */

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

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

/* ---- Layout ---- */

#slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ---- Background layer (behind media) ---- */

#background-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
  transition: background-color 0.6s ease;
}

#background-blur {
  position: absolute;
  inset: -40px;            /* Overshoot to hide blur edges */
  z-index: 0;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  object-fit: cover;
  filter: blur(40px) brightness(0.4);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

#background-blur.visible {
  opacity: 1;
}

/* ---- Media container ---- */

#media-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#slideshow-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#slideshow-image.visible {
  opacity: 1;
}

#slideshow-video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#slideshow-video.visible {
  opacity: 1;
}

/* ---- Comment overlay ---- */

#comment-overlay {
  position: absolute;
  bottom: 60px;
  left: 40px;
  right: 40px;
  z-index: 10;
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

#comment-overlay.visible {
  opacity: 1;
}

#comment-text {
  display: inline-block;
  max-width: 80%;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: #fff;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Idle screen ---- */

#idle-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  transition: opacity 0.6s ease;
}

#idle-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

#idle-content {
  text-align: center;
}

#idle-logo {
  margin-bottom: 24px;
  opacity: 0.7;
}

#idle-text {
  font-size: 22px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}
