.turntable-container {
  position: relative;
  --position-button-size: 8px;
  --position-button-active-size: 12px;
  --transition-speed: 0.3s;
  --border-radius: 30px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 80px;
}

.image-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  cursor: grab;
  background: #111;
  overflow: hidden;
}

.image-wrapper:active {
  cursor: grabbing;
}

.turntable-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  background: #111;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-progress {
  color: #333;
  font-size: 1.2em;
  font-weight: 500;
}

.hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: center center;
}

.hotspots polygon,
.hotspots circle {
  pointer-events: auto;
  cursor: pointer;
  transition: opacity var(--transition-speed) ease;
}

.hotspots polygon {
  opacity: 0.5;
}

.hotspots polygon:hover {
  opacity: 1;
}

.hotspots circle {
  opacity: 0;
  transform: scale(1);
}

.hotspots g {
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  animation: fadeIn var(--transition-speed) ease forwards;
}

.hotspots g circle {
  animation: scaleIn var(--transition-speed) ease 0.2s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes scaleIn {
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

.hotspots circle:hover {
  fill: rgba(255, 255, 255, 0.5);
}

.controls {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  user-select: none;
  touch-action: none;
  white-space: nowrap;
  z-index: 10;
}

.controls:active {
  cursor: grabbing;
}

.controls::before {
  display: none;
}

.controls button.position-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0 10px;
  position: relative;
  cursor: pointer;
  color: transparent;
  font-size: 0;
  transition: all var(--transition-speed) ease;
  width: var(--position-button-size);
  height: var(--position-button-size);
}

.controls button.position-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #666;
  border-radius: 50%;
  transition: all var(--transition-speed) ease;
}

.controls button.position-button.active::before {
  background: #000;
  width: var(--position-button-active-size);
  height: var(--position-button-active-size);
  top: -2px;
  left: -2px;
}

.controls button:disabled {
  cursor: not-allowed;
}

.controls .arrow-left,
.controls .arrow-right {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0 5px;
  color: #666;
  font-size: 20px;
  font-family: system-ui;
  line-height: 1;

}

.controls .arrow-left:hover,
.controls .arrow-right:hover {
  color: #000;
}

.controls .arrow-left:disabled,
.controls .arrow-right:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.controls .arrow-left::before {
  content: '‹';
  display: block;
}

.controls .arrow-right::before {
  content: '›';
  display: block;
}

.reset-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.reset-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.reset-button:active {
  transform: scale(0.95);
}

/* Tablet and up */
@media (min-width: 481px) {
  .turntable-container {
    margin-bottom: 0;
    --position-button-size: 10px;
    --position-button-active-size: 14px;
  }

  .controls {
    bottom: -50px;
    padding: 8px 15px;
  }

  .controls::before {
    display: block;
    content: '';
    position: absolute;
    width: calc(100% - 140px);
    height: 2px;
    background: #666;
    top: 19px;
    left: 70px;
    z-index: 0;
  }

  .controls button.position-button {
    margin: 0 15px;
  }

  .controls .arrow-left,
  .controls .arrow-right {
    font-size: 24px;
  }
}

/* Desktop and up */
@media (min-width: 769px) {
  .turntable-container {
    --position-button-size: 12px;
    --position-button-active-size: 16px;
  }

  .controls {
    bottom: 30px;
    padding: 10px 20px;
  }

  .controls::before {
    width: calc(100% - 160px);
    top: 21px;
    left: 80px;
  }

  .controls button.position-button {
    margin: 0 25px;
  }

  .controls .arrow-left,
  .controls .arrow-right {
    position: relative;
    top: -2px
  }
}