/** @format */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Courier New", monospace;
  background: #000;
  color: #00ffff;
  overflow: hidden;
  user-select: none;
}

#container {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#visualizer {
  display: block;
  width: 100%;
  height: 100%;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

#title {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  font-weight: bold;
  text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff;
  letter-spacing: 4px;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff;
  }
  to {
    text-shadow: 0 0 30px #00ffff, 0 0 60px #00ffff, 0 0 80px #00ffff;
  }
}

#controls {
  position: absolute;
  top: 100px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  pointer-events: all;
}

#play-pause {
  background: transparent;
  border: 2px solid #00ffff;
  color: #00ffff;
  padding: 10px 20px;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px #00ffff;
}

#play-pause:hover {
  background: #00ffff;
  color: #000;
  box-shadow: 0 0 20px #00ffff;
}

#audio-file {
  background: transparent;
  border: 2px solid #00ffff;
  color: #00ffff;
  padding: 10px;
  font-family: "Courier New", monospace;
  cursor: pointer;
}

#audio-file::-webkit-file-upload-button {
  background: transparent;
  border: 1px solid #00ffff;
  color: #00ffff;
  padding: 5px 10px;
  font-family: "Courier New", monospace;
  cursor: pointer;
}

#volume-control {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#volume-control label {
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 1px;
}

#volume {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 1px solid #00ffff;
  height: 4px;
  cursor: pointer;
}

#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #00ffff;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ffff;
}

#volume::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #00ffff;
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 10px #00ffff;
}

#info {
  position: absolute;
  top: 100px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 1px;
}

#frequency-display,
#amplitude-display {
  text-shadow: 0 0 10px #00ffff;
}

/* Loading animation */
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  text-shadow: 0 0 20px #00ffff;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  #title {
    font-size: 1.8rem;
    top: 10px;
  }

  #controls {
    top: 80px;
    left: 10px;
    gap: 15px;
  }

  #info {
    top: 80px;
    right: 10px;
    font-size: 0.8rem;
  }
}
