/* ════════════════════════════════════════════════════════
   微信风格音频播放器样式
   兼容微信浏览器 + 普通浏览器
   ════════════════════════════════════════════════════════ */

.wx-audio-container {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  max-width: 100%;
  width: 100%;
  margin: 1.5rem auto;
  font-size: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.wx-audio-box {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #fff 0%, #faf8f5 100%);
  border: 1px solid rgba(155, 110, 78, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(80, 50, 20, 0.06);
  transition: all 0.3s ease;
}

.wx-audio-box:hover {
  box-shadow: 0 4px 16px rgba(80, 50, 20, 0.12);
  border-color: rgba(155, 110, 78, 0.35);
}

/* ── 左侧播放按钮 ── */
.wx-audio-left {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  margin-right: 12px;
}

.wx-audio-state {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9B6E4E 0%, #C4984A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(155, 110, 78, 0.3);
}

.wx-audio-state:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(155, 110, 78, 0.4);
}

.wx-audio-state:active {
  transform: scale(0.95);
}

/* 播放图标 */
.wx-audio-state .icon-play {
  width: 0;
  height: 0;
  border-left: 14px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 4px;
}

/* 暂停图标 */
.wx-audio-state .icon-pause {
  display: none;
  width: 4px;
  height: 16px;
  background: #fff;
  box-shadow: 10px 0 0 #fff;
  border-radius: 1px;
}

.wx-audio-box.playing .icon-play {
  display: none;
}

.wx-audio-box.playing .icon-pause {
  display: block;
}

/* ── 右侧信息区 ── */
.wx-audio-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 音频标题 */
.wx-audio-title {
  font-family: 'Lora', 'STSong', Georgia, serif;
  font-size: 14px;
  font-weight: 500;
  color: #3D2E22;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 进度条容器 */
.wx-audio-progress {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(155, 110, 78, 0.15);
  border-radius: 2px;
  cursor: pointer;
  overflow: visible;
}

/* 已播放进度 */
.wx-audio-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #9B6E4E, #C4984A);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

/* 进度条圆点 */
.wx-audio-progress-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #9B6E4E;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  cursor: grab;
  left: 0%;
  transition: left 0.1s linear;
}

.wx-audio-progress-dot:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.2);
}

/* 时间显示 */
.wx-audio-time {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Lora', Georgia, serif;
  font-size: 11px;
  color: #8C7B6B;
  letter-spacing: 0.02em;
}

.wx-audio-current,
.wx-audio-duration {
  font-variant-numeric: tabular-nums;
}

/* ── 加载动画 ── */
.wx-audio-loading {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9B6E4E 0%, #C4984A 100%);
  position: relative;
}

.wx-audio-loading::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #fff;
  animation: wx-audio-spin 0.8s linear infinite;
}

@keyframes wx-audio-spin {
  to { transform: rotate(360deg); }
}

.wx-audio-box.loading .wx-audio-state {
  display: none;
}

.wx-audio-box.loading .wx-audio-loading {
  display: flex;
}

/* ════════════════════════════════════════════════════════
   响应式设计
════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .wx-audio-box {
    padding: 10px 12px;
  }

  .wx-audio-left {
    width: 38px;
    height: 38px;
    margin-right: 10px;
  }

  .wx-audio-state {
    width: 38px;
    height: 38px;
  }

  .wx-audio-state .icon-play {
    border-left-width: 12px;
    border-top-width: 7px;
    border-bottom-width: 7px;
    margin-left: 3px;
  }

  .wx-audio-state .icon-pause {
    width: 3px;
    height: 14px;
    box-shadow: 8px 0 0 #fff;
  }

  .wx-audio-title {
    font-size: 13px;
  }

  .wx-audio-time {
    font-size: 10px;
  }
}

/* ════════════════════════════════════════════════════════
   深色模式支持（可选，你的博客保持单一暖白风格）
════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  /* 你的博客固定浅色模式，这里不需要 */
}
