.voice-message {
  max-width: 300px;
  border: 1px solid #d9d9d9;
  border-radius: 20px;
  padding: 12px 16px;
  background: #fafafa;
  margin: 8px 0;
  transition: all 0.3s ease;
}

.voice-message:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 消息气泡内的语音消息样式 */
.message-bubble .voice-message {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  margin: 4px 0;
}

.own-bubble .voice-message {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.other-bubble .voice-message {
  background: rgba(24, 144, 255, 0.05);
  border-color: rgba(24, 144, 255, 0.1);
}

.voice-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-button {
  color: #1890ff !important;
  font-size: 24px;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  height: auto !important;
  width: auto !important;
  min-width: auto !important;
  flex-shrink: 0;
}

.play-button:hover {
  color: #40a9ff !important;
}

.own-bubble .play-button {
  color: rgba(255, 255, 255, 0.9) !important;
}

.own-bubble .play-button:hover {
  color: rgba(255, 255, 255, 1) !important;
}

.voice-info {
  flex: 1;
  min-width: 0;
}

.voice-waveform {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.voice-waveform .ant-progress {
  flex: 1;
  margin-left: 8px;
}

.voice-time {
  font-size: 12px;
  color: #8c8c8c;
  margin-bottom: 2px;
}

.own-bubble .voice-time {
  color: rgba(255, 255, 255, 0.8);
}

.voice-filename {
  font-size: 11px;
  color: #595959;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.own-bubble .voice-filename {
  color: rgba(255, 255, 255, 0.7);
}

.voice-size {
  font-size: 10px;
  color: #bfbfbf;
}

.own-bubble .voice-size {
  color: rgba(255, 255, 255, 0.6);
}

.download-button {
  color: #8c8c8c !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  height: auto !important;
  width: auto !important;
  min-width: auto !important;
  flex-shrink: 0;
}

.download-button:hover {
  color: #1890ff !important;
}

.own-bubble .download-button {
  color: rgba(255, 255, 255, 0.7) !important;
}

.own-bubble .download-button:hover {
  color: rgba(255, 255, 255, 1) !important;
}

/* 播放状态动画 */
.voice-message.playing .voice-waveform {
  animation: voiceWave 1.5s ease-in-out infinite;
}

@keyframes voiceWave {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .voice-message {
    max-width: 280px;
    padding: 10px 14px;
  }
  
  .voice-content {
    gap: 10px;
  }
  
  .play-button {
    font-size: 20px;
  }
  
  .voice-time {
    font-size: 11px;
  }
  
  .voice-filename {
    font-size: 10px;
  }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
  .voice-message {
    max-width: 220px;
    padding: 8px 12px;
  }
  
  .voice-content {
    gap: 8px;
  }
  
  .play-button {
    font-size: 18px;
  }
}