/* 🔊 Waveform bars animation */
.waveform {
  display: flex;
  gap: 3px;
  height: 20px;
  justify-content: center;
  align-items: flex-end;
  margin-top: 8px;
}

.waveform .bar {
  width: 4px;
  height: 10px;
  background-color: #0ff;
  border-radius: 2px;
  animation: waveAnim 1s infinite ease-in-out;
}

.waveform .bar:nth-child(1) { animation-delay: 0s; }
.waveform .bar:nth-child(2) { animation-delay: 0.1s; }
.waveform .bar:nth-child(3) { animation-delay: 0.2s; }
.waveform .bar:nth-child(4) { animation-delay: 0.3s; }
.waveform .bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveAnim {
  0%, 100% { height: 10px; }
  50% { height: 20px; }
}

/* 🎙️ Audio Preview Styling */
#audioPreview {
  display: block;
  margin-top: 10px;
  width: 100%;
  outline: none;
}

audio::-webkit-media-controls-panel {
  background-color: #121212;
  color: white;
}

audio {
  border-radius: 8px;
  background-color: #1a1a1a;
}

/* 🔘 Common Circular Button */
.circular-button,
.toggle-button {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 14px;
  color: white;
  border: 4px solid #ccc;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}

/* 🟢 Start - Green Glow */
.green-button {
  background: radial-gradient(circle at top left, #6edb4f, #2e8b2e);
  border-color: #b0d9b0;
}

.green-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #4caf50;
}

/* 🔴 Stop - Red Glow */
.red-button {
  background: radial-gradient(circle at top left, #ff4d4d, #b22222);
  border-color: #e88d8d;
}

.red-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #f44336;
}

/* 🎵 Custom Audio Player */
.custom-audio-player {
  background: #111;
  padding: 20px;
  border-radius: 15px;
  width: 400%;
  max-width: 300px;
  margin: 0 auto;
  color: #fff;
  box-sizing: border-box;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.custom-audio-player input[type="range"] {
  width: 100%;
  margin-bottom: 12px;
  accent-color: #00bcd4;
}

.custom-audio-player img {
  width: 36px;
  height: 36px;
  transition: transform 0.2s ease;
}

.custom-audio-player img:hover {
  transform: scale(1.1);
}

/* 🎚️ Player Controls */
.player-controls {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  gap: 10px;
  margin-top: 8px;
}

/* 🔘 Control Buttons */
.icon-btn {
  background: #333;
  border: none;
  color: white;
  font-size: 20px;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.icon-btn:hover {
  background: #555;
}

.play-btn {
  background: #00bcd4;
  font-size: 22px;
}

.delete-btn {
  background: #c62828;
  color: white;
}
/* Ensure player stays inside form and adapts */
#audioPreviewContainer {
  width: 100%;
  max-width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}

/* Full-width and responsive player */
.custom-audio-player {
  background: #111;
  padding: 20px;
  border-radius: 15px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

/* Audio section responsive inside form */
.audio-controls {
  width: 100%;
}
