html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff; /* Clean, premium solid white */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  /* CSS Resets to completely block double-tap to zoom and native touch delays */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.remote-app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Floating Status Indicator Overlay */
.status-overlay {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e4e4e7; /* simple clean zinc border */
  padding: 6px 14px;
  border-radius: 0px; /* zero round */
  box-shadow: none;
  pointer-events: none; /* Let clicks pass through to split buttons */
  backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 0px; /* sharp square status indicator */
  display: inline-block;
}

.dot-connecting {
  background-color: #f59e0b; /* clean amber */
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
  animation: pulse 1.5s infinite ease-in-out;
}

.dot-connected {
  background-color: #10b981; /* clean emerald green */
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.dot-error {
  background-color: #ef4444; /* clean rose red */
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.status-text {
  font-size: 11px;
  font-weight: 700;
  color: #52525b; /* zinc-600 */
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* 50/50 Horizontal Split Screen container */
.split-container {
  display: flex;
  width: 100%;
  height: 100%;
}

.control-btn {
  position: relative;
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-sizing: border-box;
}

/* Split design: Left button white, right button very soft zinc-50 */
.prev-btn {
  background: #ffffff;
  border-right: 1px solid #e4e4e7;
}

.next-btn {
  background: #fafafa; /* premium subtle offset white */
}

.control-btn:disabled {
  background: #fafafa !important;
  cursor: not-allowed;
}

.control-btn:disabled .btn-icon {
  color: #e4e4e7 !important; /* zinc-200 */
  text-shadow: none !important;
}

.control-btn:disabled .btn-label {
  color: #a1a1aa !important; /* zinc-400 */
}

/* Hover and touch active scales */
.control-btn:not(:disabled):hover {
  background-color: #f4f4f5; /* zinc-100 */
}

.control-btn:not(:disabled):active {
  transform: scale(0.97); /* subtle mechanical compress action */
}

.prev-btn:not(:disabled):active {
  background: #e4e4e7; /* zinc-200 */
}

.next-btn:not(:disabled):active {
  background: #e4e4e7; /* zinc-200 */
}

.btn-icon {
  font-size: 32px;
  color: #18181b; /* solid deep zinc-900 */
  transition: transform 0.15s ease;
  user-select: none;
  pointer-events: none;
}

.prev-btn:not(:disabled) .btn-icon {
  color: #18181b;
  text-shadow: none;
}

.next-btn:not(:disabled) .btn-icon {
  color: #18181b;
  text-shadow: none;
}

.btn-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #a1a1aa; /* zinc-400 */
  user-select: none;
  pointer-events: none;
}

.control-btn:not(:disabled) .btn-label {
  color: #71717a; /* zinc-500 */
}

/* High reactivity mechanical tap ripples: Clean dark ripple on light theme! */
.ripple {
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05); /* very soft neutral dark pulse */
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.ripple-active {
  animation: ripple-pulse 0.3s ease-out;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes ripple-pulse {
  0% {
    width: 0;
    height: 0;
    opacity: 0.6;
  }
  100% {
    width: 250px;
    height: 250px;
    opacity: 0;
  }
}

/* Room ID & Connection Debug Footer Display */
.room-footer {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.debug-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  padding: 4px 10px;
  border-radius: 0px; /* zero round */
  box-shadow: none;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.footer-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  color: #71717a;
  letter-spacing: 0.5px;
}

.footer-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 10px;
  font-weight: 850;
  color: #18181b; /* premium dark footer ID */
}

/* Heartbeat feedback scaling on dot */
.dot {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.dot.pulse-glow {
  transform: scale(1.5);
}

/* Sleek Target Presentation Metadata Card (Favicon + Title) */
.deck-metadata {
  position: absolute;
  top: 58px; /* Positioned nicely below the 16px top status overlay badge */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 85%;
  background: #ffffff;
  border: 1px solid #e4e4e7; /* zinc-200 border matching footer debug pills */
  padding: 6px 14px;
  border-radius: 0px; /* absolute flat architecture */
  box-shadow: none;
  animation: fade-in-deck 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.deck-favicon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.deck-title {
  font-size: 11px;
  font-weight: 700;
  color: #18181b; /* zinc-900 */
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

@keyframes fade-in-deck {
  0% {
    opacity: 0;
    transform: translate(-50%, -4px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Live Presentation Slide Preview Panel */
.preview-container {
  position: absolute;
  bottom: 80px; /* Positioned neatly above the footer at 16px */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  max-width: 90%;
  max-height: 40%;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none; /* Let touch pings/taps bypass to underlying clicker buttons */
  animation: fade-in-preview 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* scale proportionally, no cropping, no black bars */
  outline: none;
  border: none;
  background: transparent;
}

.preview-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.95); /* vibrant live red badge */
  padding: 2px 6px;
  border-radius: 0px; /* sharp square */
}

.preview-badge-dot {
  width: 4px;
  height: 4px;
  background-color: #ffffff;
  border-radius: 0px; /* square dot */
  display: inline-block;
  animation: preview-pulse 1s infinite ease-in-out;
}

.preview-badge-text {
  font-size: 7px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

@keyframes fade-in-preview {
  0% {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes preview-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
