/* Poster Viewer Styles */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #000;
}

#poster-viewer {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: #000;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure posters are centered and fit the screen */
#poster-viewer .liveposter-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#poster-viewer .liveposter-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Navigation hint */
.nav-hint {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 20px 40px;
  border-radius: 16px;
  text-align: center;
  z-index: 1000;
  animation: fadeInUp 0.5s ease-out;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  pointer-events: none;
}

.nav-hint.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
}

.hint-content p {
  margin: 5px 0;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.9;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Progress indicator - Simple counter (legacy) */
.progress-indicator {
  position: fixed;
  top: 30px;
  right: 30px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 18px;
  font-weight: 600;
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.progress-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

.progress-indicator .current {
  font-size: 24px;
  color: #667eea;
}

/* Instagram-style progress bars */
.stories-progress {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 0;
}

.stories-progress.hidden {
  opacity: 0;
  pointer-events: none;
}

.stories-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stories-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: white;
  width: 0%;
  transition: width 0.05s linear;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

.stories-progress-bar.completed .stories-progress-fill {
  width: 100%;
}

.stories-progress-bar.active .stories-progress-fill {
  /* Width controlled by JavaScript */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-hint {
    bottom: 60px;
    padding: 15px 30px;
  }

  .hint-content p {
    font-size: 14px;
  }

  .progress-indicator {
    top: 20px;
    right: 20px;
    padding: 10px 16px;
    font-size: 16px;
  }

  .progress-indicator .current {
    font-size: 20px;
  }

  .stories-progress {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 3px;
  }

  .stories-progress-bar {
    height: 3px;
  }
}

/* Touch feedback */
@media (hover: none) {
  body {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
}

/* Prevent accidental zoom on mobile */
body {
  touch-action: pan-y;
}

#poster-viewer {
  touch-action: none;
}

/* Debug: Dot progress indicator */
.dot-progress {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.5);
  padding: 12px 20px;
  border-radius: 20px;
}

.dot-progress .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.dot-progress .dot.active {
  background: white;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}
