/* ========================================
   Awwwards Badge
   ======================================== */
#awwwards-badge {
  position: fixed;
  bottom: 40px;
  right: 0;
  width: 40px;
  height: 120px;
  background: rgba(255, 204, 0, 0.9);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 4px 0 0 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: -4px 0 15px rgba(255, 204, 0, 0.2);
}

#awwwards-badge:hover {
  width: 45px;
  background: rgba(255, 204, 0, 1);
  box-shadow: -6px 0 20px rgba(255, 204, 0, 0.4);
}

#awwwards-badge .badge-w {
  font-size: 20px;
  font-weight: 900;
  color: var(--black);
  line-height: 1;
  font-family: var(--font-mono);
}

#awwwards-badge .badge-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--black);
  font-weight: 700;
  margin-top: 8px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* ========================================
   Floor Label (Left Sidebar)
   ======================================== */
#floor-label {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.7);
  z-index: 5;
  display: none;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

/* ========================================
   Volume Control: Bottom Right
   ======================================== */
#volume-control {
  position: fixed;
  bottom: 130px;
  right: 70px;
  z-index: 20;
  display: none;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

#volume-control.visible {
  display: flex;
}

#volume-btn {
  width: auto;
  min-width: 140px;
  padding: 0 18px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px; /* Pill shape */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--white);
  backdrop-filter: blur(4px);
}

#volume-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Pulsing glow when audio is playing */
#volume-btn.audio-playing {
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3), 0 0 24px rgba(0, 229, 255, 0.1);
  animation: volumePulse 2s ease-in-out infinite;
}

@keyframes volumePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 229, 255, 0.2), 0 0 16px rgba(0, 229, 255, 0.05); }
  50% { box-shadow: 0 0 16px rgba(0, 229, 255, 0.5), 0 0 32px rgba(0, 229, 255, 0.15); }
}

/* Sound wave bars animation (Figma Style) */
.sound-bars {
  display: flex;
  align-items: center; /* Figma style is center-aligned vertically */
  justify-content: center;
  gap: 3px;
  height: 20px;
  width: auto; /* Prevent 100% stretch */
}

.sound-bars .bar {
  width: 4px;
  background: linear-gradient(180deg, #e0b0ff, #00e5ff);
  border-radius: 9999px; /* Pill shape */
  animation: figmaWave 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
  transform-origin: center;
}

/* Symmetric heights and delays */
.sound-bars .bar:nth-child(1) { height: 6px; animation-delay: -0.8s; }
.sound-bars .bar:nth-child(2) { height: 10px; animation-delay: -0.6s; }
.sound-bars .bar:nth-child(3) { height: 14px; animation-delay: -0.4s; }
.sound-bars .bar:nth-child(4) { height: 18px; animation-delay: -0.2s; }
.sound-bars .bar:nth-child(5) { height: 22px; animation-delay: 0s; } /* Center tallest */
.sound-bars .bar:nth-child(6) { height: 18px; animation-delay: -0.2s; }
.sound-bars .bar:nth-child(7) { height: 14px; animation-delay: -0.4s; }
.sound-bars .bar:nth-child(8) { height: 10px; animation-delay: -0.6s; }
.sound-bars .bar:nth-child(9) { height: 6px; animation-delay: -0.8s; }

@keyframes figmaWave {
  0% { transform: scaleY(0.2); opacity: 0.5; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* Muted state kills the animation */
#volume-btn.audio-muted .sound-bars .bar {
  animation: none;
  height: 4px !important;
  background: rgba(255, 255, 255, 0.3);
  transform: scaleY(1);
}

#volume-btn.audio-muted {
  animation: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.15);
}

#volume-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
}

#volume-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 6px 14px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

#volume-control:hover #volume-slider-wrap,
#volume-slider-wrap.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

#volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

#volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  border: none;
}

#volume-level {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  min-width: 24px;
  text-align: right;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .mode-buttons {
    flex-direction: column;
  }
  
  .controls-info {
    flex-direction: column;
  }
  
  .control-panel:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .start-btn {
    width: 300px;
  }
  
  #hello-screen .hello-title,
  #welcome-screen .welcome-title,
  #floor-menu .floor-title {
    font-size: 48px;
  }
  
  .floor-btn {
    width: 300px;
  }
  
  #compass {
    width: 320px;
  }
}
