/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  padding: 0;
  margin: 0;
  background-color: #231f20;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Main Container */
.container {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: manipulation;
}

/* TV Set */
.tv-set {
  position: relative;
  z-index: 999;
  max-width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.tv-set:hover {
  transform: scale(1.02);
}

.tv-set:active {
  transform: scale(0.98);
}

/* Show Content */
.show {
  position: absolute;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}

.show.loaded {
  opacity: 1;
}

/* Loading Spinner */
.loading {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 500;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer */
.footer {
  position: fixed;
  bottom: 8px;
  right: 8px;
  z-index: 1000;
}

.footer a {
  display: block;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.footer a:hover {
  opacity: 1;
  transform: scale(1.1);
}

.footer img {
  display: block;
  width: 24px;
  height: auto;
  opacity: 0.7;
}

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

/* Responsive Breakpoints */
@media (min-width: 800px) {
  .show {
    padding-right: 200px;
    padding-bottom: 50px;
  }
}

@media (max-width: 799px) {
  .show {
    max-width: 85%;
    padding-right: 80px;
    padding-bottom: 50px;
    padding-top: 25px;
  }
}

@media (max-width: 600px) {
  .show {
    max-width: 90%;
    padding-right: 60px;
    padding-bottom: 60px;
    padding-top: 30px;
  }
}

@media (max-width: 400px) {
  .show {
    max-width: 95%;
    padding-right: 50px;
    padding-bottom: 70px;
    padding-top: 35px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Error Page Specific */
.error-message {
  color: #fff;
  text-align: center;
  padding: 20px;
}
