* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #000000;
  color: #ffffff;
  cursor: none; 
}

#player-container {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #000000;
  transition: background-color 0.5s ease;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-stage {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.message-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-wrap: break-word;
  padding: 24px;
}

#display-message {
  font-size: clamp(3rem, 8vw, 9rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.1;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.media-layer {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  padding: 0;
  background: #000000;
  overflow: hidden;
  z-index: 10;
}

#display-image, #display-image-b, .seamless-img {
  width: 100%;
  height: 100%;
  object-fit: contain; 
  display: block;
}

#display-video, #display-video-b, .seamless-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; 
  background: #000000;
  display: block;
}

#display-youtube {
  width: 100vw;
  height: 100vh;
  border: none;
  display: block;
}

/* ==========================================================================
   MULTI-ZONE SPLIT SCREEN STYLES (50/50 Vertical & 50/50 Horizontal)
   ========================================================================== */
.split-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  overflow: hidden;
  background: #000000;
  z-index: 20;
}

.split-stage.split-vertical {
  flex-direction: row;
}

.split-stage.split-vertical .split-zone {
  width: 50vw;
  height: 100vh;
  flex: 1 1 50%;
}

.split-stage.split-horizontal {
  flex-direction: column;
}

.split-stage.split-horizontal .split-zone {
  width: 100vw;
  height: 50vh;
  flex: 1 1 50%;
}

.split-stage.split-3 {
  flex-direction: row;
}

.split-stage.split-3 .split-zone {
  width: 33.333vw;
  height: 100vh;
  flex: 1 1 33.333%;
}

body.portrait-mode .split-stage.split-3 {
  flex-direction: column;
}

body.portrait-mode .split-stage.split-3 .split-zone {
  width: 100vw;
  height: 33.333vh;
  flex: 1 1 33.333%;
}

.split-stage.split-4 {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100vw;
  height: 100vh;
}

.split-stage.split-4 .split-zone {
  width: 100%;
  height: 100%;
  flex: none;
}

body.portrait-mode .split-stage.split-vertical {
  flex-direction: column;
}

body.portrait-mode .split-stage.split-vertical .split-zone {
  width: 100vw;
  height: 50vh;
}

.split-zone {
  position: relative;
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-media-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.split-media-vid {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  display: block;
}

.split-media-yt {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.split-txt-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  background-color: #18181b;
}

.split-txt-box h2 {
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   KIOSK & DESKTOP CONTROLLER HUD
   Auto-hides on TV and after 3 seconds of inactivity
   ========================================================================== */
.kiosk-hud {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 6px 14px 6px 16px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
  font-family: 'Inter', sans-serif;
}

.kiosk-hud.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
  pointer-events: none;
}

.kiosk-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.5px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse-dot-anim 2s infinite;
}

@keyframes pulse-dot-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.kiosk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kiosk-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s, border-color 0.2s;
}

.kiosk-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.kiosk-btn-cms {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

.kiosk-btn-cms:hover {
  background: #1d4ed8;
}


/* =========================================================================
   LIVE HARDWARE ORIENTATION FLIP ENGINE (Landscape <-> Portrait)
   ========================================================================= */
body.is-portrait-rotated #player-container {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  width: 100vh !important;
  height: 100vw !important;
  transform: translate(-50%, -50%) rotate(90deg) !important;
  transform-origin: center center !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s ease, height 0.4s ease;
}

#player-container {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s ease, height 0.4s ease;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* Intense Pure Red Light Strobe for Remote Identify Locator */
@keyframes redIdentifyStrobe {
  0%, 100% {
    background-color: rgba(239, 68, 68, 0.96) !important;
    box-shadow: inset 0 0 160px #7f1d1d, 0 0 100px rgba(239, 68, 68, 0.9) !important;
  }
  50% {
    background-color: rgba(220, 38, 38, 0.15) !important;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6) !important;
  }
}

.identify-red-strobe {
  animation: redIdentifyStrobe 0.45s infinite ease-in-out !important;
}

@keyframes pulseIdentify {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.7);
  }
  100% {
    transform: scale(1.03);
    box-shadow: 0 0 120px rgba(239, 68, 68, 1);
  }
}

