/* Turntable frame-scrubbing viewer — standalone component styles.
   Owns only .turntable and its internal elements (all prefixed .tt-). */

.turntable {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #23232b 0%, #17171c 70%, #101014 100%);
  border-radius: 12px;
  touch-action: none; /* we handle pan/zoom gestures ourselves */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  color: #e8e8ee;
  font-family: Arial, Helvetica, sans-serif;
}

.turntable.tt-dragging {
  cursor: grabbing;
}

.turntable:focus-visible {
  box-shadow: 0 0 0 3px rgba(120, 170, 255, 0.7);
}

/* Poster shown until frames are ready. */
.turntable .tt-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.35s ease;
}

.turntable.tt-ready .tt-poster {
  opacity: 0;
}

/* Shoe frame canvas. */
.turntable .tt-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block;
}

/* Live grain overlay, composited over the shoe. */
.turntable .tt-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.38;
  mix-blend-mode: overlay;
}

/* Loading state. */
.turntable .tt-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-direction: column;
  pointer-events: none;
  background: rgba(16, 16, 20, 0.55);
  transition: opacity 0.3s ease;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8b8c4;
}

.turntable.tt-ready .tt-loading {
  opacity: 0;
  visibility: hidden;
}

.turntable .tt-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(180, 200, 255, 0.9);
  border-radius: 50%;
  animation: tt-spin 0.9s linear infinite;
}

.turntable .tt-progress {
  font-variant-numeric: tabular-nums;
}

/* Subtle affordance hint. */
.turntable .tt-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 4;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #d5d5df;
  font-size: 11px;
  letter-spacing: 0.06em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.turntable.tt-ready .tt-hint {
  opacity: 0.85;
}

.turntable.tt-touched .tt-hint {
  opacity: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  .turntable .tt-spinner {
    animation-duration: 2s;
  }
}
