/* Gacha Page Styles */

/* Title above the circle */
.gacha-title {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(12px, 2vw, 16px);
  font-weight: normal;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 40px;
}

/* Main Container */
.knob-container {
  position: relative;
  width: 280px;
  height: 280px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.3s ease;
}

.knob-container.sold-out {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Knob Circle */
.knob {
  width: 180px;
  height: 180px;
  background: #faf8f4;
  border: none;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(300deg);
  transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.knob:hover .text-circle {
  letter-spacing: 1px;
}

.knob:active {
  transform: translate(-50%, -50%) rotate(300deg) scale(0.99);
}

/* Circular text */
.text-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: rotateText 20s linear infinite;
  transition: letter-spacing 0.3s ease;
  background: transparent;
}

.text-circle text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  letter-spacing: 3px;
  fill: #1a1a1a;
}

@keyframes rotateText {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Knob handle */
.knob-handle {
  width: 0.5px;
  height: 130px;
  background: #1a1a1a;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* Direction arrow */
.direction-arrow {
  position: absolute;
  width: 220px;
  height: 220px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.direction-arrow svg {
  width: 100%;
  height: 100%;
}

/* Knob turning animation */
.knob.turning {
  animation: turnKnob 1.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes turnKnob {
  0% { transform: translate(-50%, -50%) rotate(300deg); }
  100% { transform: translate(-50%, -50%) rotate(660deg); }
}

/* Container per tutti i player audio - ora solo un riferimento */
.audio-players-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
  z-index: 1000;
}

/* Singolo player audio - GACHA STYLE */
.audio-player {
  width: clamp(56px, 7vw, 70px);
  height: clamp(56px, 7vw, 70px);
  background: #faf8f4;
  border: none;
  border-radius: 50%;
  padding: 0;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.3s ease;
  position: absolute;
  cursor: grab;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-player:hover {
  transform: translateY(-3px);
}

.audio-player:hover .capsule-text-circle {
  letter-spacing: 0.5px;
}

.audio-player.dragging {
  cursor: grabbing;
  z-index: 1002;
  transform: scale(1.05) translateY(-5px);
}

.audio-player.show {
  opacity: 1;
  pointer-events: auto;
}

/* Rotating text circle for capsule */
.capsule-text-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: rotateText 15s linear infinite;
  transition: letter-spacing 0.3s ease;
  background: transparent;
}

.capsule-text-circle text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 7px;
  letter-spacing: 1px;
  fill: #1a1a1a;
}

/* Bottone play/pause - JUST THE ICON */
.play-pause-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: clamp(10px, 1.4vw, 13px);
  padding: 0;
  padding-left: 1px;
  line-height: 1;
  color: #1a1a1a;
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
}

.play-pause-btn:hover {
  transform: scale(1.1);
  color: #000;
}

.play-pause-btn:active {
  transform: scale(1.05);
}


/* Status Message */
.status {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;  /* Calcolato dinamicamente con JavaScript */
  text-align: center;
  font-size: clamp(10px, 2vw, 16px);
  min-height: 15px;
  opacity: 0;
  transition: all 0.6s ease;
  letter-spacing: 2px;
  color: #666;
  z-index: 998;
}

.status.show {
  opacity: 1;
}

.status.error {
  color: #ff0000;
  font-size: 14px;
  letter-spacing: 3px;
  cursor: default;
}

/* Instruction text */
.instruction {
  position: absolute;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
  top: 0;  /* Calcolato dinamicamente con JavaScript */
  font-size: clamp(10px, 1.5vw, 14px);
  opacity: 0;
  letter-spacing: 3px;
  color: #292929;
  animation: fadeInOut 3s ease-in-out infinite;
  z-index: 999;
  white-space: nowrap;
  padding: 0;
  margin: 0;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.8; }
}

/* Mobile Responsive - Gacha specific */
@media (max-width: 768px) {
  .knob-container {
    width: 200px;
    height: 200px;
  }

  .knob {
    width: 140px;
    height: 140px;
  }

  .knob-handle {
    height: 100px;
  }

  .direction-arrow {
    width: 170px;
    height: 170px;
  }

  .instruction {
    margin-top: 30px;
    font-size: 11px;
  }

  .status {
    margin-top: 40px;
    font-size: 9px;
  }

  .text-circle text {
    font-size: 12px;
  }

  .audio-players-container {
    bottom: clamp(40px, 8vh, 70px);
    gap: clamp(8px, 2vw, 15px);
  }

  .audio-player {
    width: clamp(48px, 6vw, 60px);
    height: clamp(48px, 6vw, 60px);
  }

  .capsule-text-circle text {
    font-size: 6px;
  }

  .play-pause-btn {
    font-size: clamp(8px, 1.2vw, 11px);
  }
}
