/* Meditation Audio Narrator - Frontend Styles */

.man-audio-player {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.man-player-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.man-play-pause {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.man-play-pause:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.man-progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.man-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.man-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s ease;
}

.man-time-display {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.man-volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.man-volume-button {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.man-volume-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.man-volume-slider {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.man-volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
}

.man-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.man-download-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.man-download-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Advanced Player Styles */
.man-audio-player-advanced {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.man-player-header {
  margin-bottom: 20px;
  text-align: center;
}

.man-player-title {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 18px;
  font-weight: 600;
}

.man-player-description {
  margin: 0;
  color: #7f8c8d;
  font-size: 14px;
}

.man-play-pause-large {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.man-play-pause-large:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.man-progress-section {
  flex: 1;
  margin: 0 20px;
}

.man-progress-handle {
  position: absolute;
  top: -4px;
  width: 14px;
  height: 14px;
  background: #3498db;
  border-radius: 50%;
  left: 0%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.man-progress-bar:hover .man-progress-handle {
  opacity: 1;
}

.man-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .man-audio-player,
  .man-audio-player-advanced {
    padding: 16px;
    margin: 16px 0;
  }

  .man-player-controls {
    flex-wrap: wrap;
    gap: 10px;
  }

  .man-progress-container {
    order: 3;
    width: 100%;
  }

  .man-volume-slider {
    width: 60px;
  }

  .man-controls-right {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .man-play-pause {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .man-play-pause-large {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .man-time-display {
    font-size: 11px;
  }
}

/* Loading States */
.man-loading {
  opacity: 0.6;
  pointer-events: none;
}

.man-loading .man-play-pause,
.man-loading .man-play-pause-large {
  animation: pulse 1.5s infinite;
}

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

/* Accessibility */
.man-audio-player button:focus,
.man-audio-player-advanced button:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

.man-progress-bar:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .man-audio-player-advanced {
    background: #2c3e50;
    border-color: rgba(255, 255, 255, 0.1);
  }

  .man-player-title {
    color: #ecf0f1;
  }

  .man-player-description {
    color: #bdc3c7;
  }

  .man-time-display {
    color: #bdc3c7;
  }
}
