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

body {
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* Main image display */
.image-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-container.with-thumbnails {
  height: calc(100vh - 120px);
}

.main-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.main-image.loading {
  opacity: 0.5;
}

/* Viewer count badge */
.viewer-count {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 100;
}

.viewer-count.with-thumbnails {
  bottom: 140px;
}

.viewer-count::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
}

/* Waiting message */
.waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-size: 24px;
  color: #666;
}

/* Setup form (admin only) */
.setup-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 20px;
}

.setup-form {
  width: 100%;
  max-width: 600px;
}

.setup-form h1 {
  margin-bottom: 20px;
  font-weight: 500;
}

.setup-form textarea {
  width: 100%;
  height: 300px;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  padding: 16px;
  font-family: monospace;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 16px;
}

.setup-form textarea:focus {
  outline: none;
  border-color: #666;
}

.setup-form textarea::placeholder {
  color: #555;
}

.setup-form button {
  width: 100%;
  padding: 14px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.setup-form button:hover {
  background: #ddd;
}

/* Thumbnail strip (admin only) */
.thumbnail-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  overflow-x: auto;
  z-index: 50;
}

.thumbnail-strip::-webkit-scrollbar {
  height: 6px;
}

.thumbnail-strip::-webkit-scrollbar-track {
  background: #111;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.2s;
}

.thumbnail:hover {
  opacity: 0.9;
}

.thumbnail.active {
  border-color: #fff;
  opacity: 1;
}

/* Position indicator */
.position-indicator {
  position: fixed;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 14px;
  color: #aaa;
  z-index: 100;
}

/* Change images button */
.change-images-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  z-index: 100;
}

.change-images-btn:hover {
  opacity: 1;
}

/* Loading indicator */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  gap: 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #333;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  color: #888;
  font-size: 14px;
}

.loading-progress {
  color: #fff;
  font-size: 16px;
}

/* Fullscreen button */
.fullscreen-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s;
  z-index: 100;
  -webkit-tap-highlight-color: transparent;
}

.fullscreen-btn:hover,
.fullscreen-btn:active {
  opacity: 1;
}

.fullscreen-btn svg {
  width: 22px;
  height: 22px;
}

/* Hidden elements */
.hidden {
  display: none !important;
}
