* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: black;
  color: white;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -ms-overflow-style: none;
}

#scroll-viewport {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#scroll-viewport::-webkit-scrollbar {
  display: none;
}

#scroll-root {
  position: relative;
}

.canvas-wrapper {
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
}

#frameCanvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#scroll-spacer {
  pointer-events: none;
  width: 1px;
  margin: 0 auto;
}

#scroll-progress {
  position: relative;
  height: 6px;
  width: 0;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
  margin: 0 auto;
  flex-shrink: 0;
}

#scroll-progress-bar {
  height: 100%;
  width: 0;
  background: #ffffff;
  border-radius: inherit;
  transition: width 100ms ease-out;
}

.overlay {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 100;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-align: center;
}
