/* styles.css - 10-Foot UI for TV Displays */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000000;
  font-family: 'Roboto', 'Arial', sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

/* Full-screen media container with safe area */
#media-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000000;

  /* Safe area for overscan (5% margin) */
  padding: 5vh 5vw;
}

/* Current image display */
#current-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
}

/* Fade transitions */
#current-image.fade-out {
  opacity: 0;
}

#current-image.fade-in {
  opacity: 1;
}

/* Audio player (hidden) */
#audio-player {
  display: none;
}

/* Loading spinner */
#loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

#loading-spinner.spinner-hidden {
  display: none;
}

.spinner {
  border: 8px solid rgba(255, 255, 255, 0.3);
  border-top: 8px solid #ffffff;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Debug overlay (development only) */
#debug-overlay {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.9);
  color: #00ff00;
  padding: 16px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  max-width: 400px;
  z-index: 9999;
  border: 2px solid #00ff00;
}

#debug-overlay.debug-hidden {
  display: none;
}

#debug-info {
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
  line-height: 1.4;
}

/* Scrollbar for debug overlay */
#debug-info::-webkit-scrollbar {
  width: 8px;
}

#debug-info::-webkit-scrollbar-track {
  background: rgba(0, 255, 0, 0.1);
}

#debug-info::-webkit-scrollbar-thumb {
  background: #00ff00;
  border-radius: 4px;
}

/* Accessibility: Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #debug-overlay {
    border-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #current-image {
    transition: none;
  }

  .spinner {
    animation: none;
  }
}
