/* TeachAny Standard Audio Player · v1.0 */
[data-teachany-audio][hidden],
[data-teachany-audio][data-audio-config-only] {
  display: none !important;
}

.tap-host {
  display: block;
  margin: 24px 0;
  --tap-primary: var(--primary, #6366f1);
  --tap-bg: var(--card-bg, #ffffff);
  --tap-border: var(--border, #e2e8f0);
  --tap-text: var(--text, #1e293b);
  --tap-muted: var(--text-secondary, #64748b);
}

.tap-card {
  background: var(--tap-bg);
  border: 1px solid var(--tap-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.18);
}
.tap-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg,
    rgba(99, 102, 241, 0.08) 0%,
    rgba(236, 72, 153, 0.04) 100%);
  border-bottom: 1px solid var(--tap-border);
}
.tap-card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--tap-text);
}
.tap-card-meta {
  font-size: 12px;
  color: var(--tap-muted);
}

.tap-tracklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tap-track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--tap-border);
  cursor: pointer;
  transition: background 0.15s;
}
.tap-track-item:last-child { border-bottom: none; }
.tap-track-item:hover { background: rgba(99, 102, 241, 0.04); }
.tap-track-item.active {
  background: linear-gradient(135deg,
    rgba(99, 102, 241, 0.12) 0%,
    rgba(236, 72, 153, 0.06) 100%);
}
.tap-track-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tap-bg);
  border: 1.5px solid var(--tap-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--tap-muted);
}
.tap-track-item.active .tap-track-num {
  background: var(--tap-primary);
  border-color: var(--tap-primary);
  color: #fff;
}
.tap-track-meta { flex: 1; min-width: 0; }
.tap-track-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--tap-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tap-track-sub {
  font-size: 12px;
  color: var(--tap-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tap-track-play {
  flex-shrink: 0;
  appearance: none;
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--tap-primary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.tap-track-play:hover { background: rgba(99, 102, 241, 0.1); }

.tap-empty {
  padding: 18px;
  border: 1px dashed var(--tap-border, #e2e8f0);
  border-radius: 12px;
  color: var(--tap-muted, #64748b);
  font-size: 13px;
  text-align: center;
}

/* ─── 底部连续播放条（全局 fixed） ─── */
.tap-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 200;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 36px -8px rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(12px);
  max-width: calc(100vw - 32px);
  width: 580px;
}
.tap-bar.active { display: flex; }
body.tap-bar-on { padding-bottom: 80px; }

.tap-btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #1e293b;
  flex-shrink: 0;
  transition: background 0.15s;
}
.tap-btn:hover { background: #f1f5f9; }
.tap-btn.tap-play {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  width: 36px;
  height: 36px;
  font-size: 16px;
}
.tap-btn.tap-play:hover { filter: brightness(1.08); background: linear-gradient(135deg, #6366f1, #ec4899); }
.tap-btn.tap-speed {
  width: auto;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  background: #f1f5f9;
  color: #1e293b;
  border-radius: 999px;
  height: 28px;
}
.tap-btn.tap-speed:hover { background: #e2e8f0; }

.tap-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tap-now {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tap-progress {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.tap-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border-radius: 2px;
  transition: width 0.1s linear;
}
.tap-time {
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 70px;
  text-align: right;
}

@media (max-width: 600px) {
  .tap-bar { width: calc(100vw - 24px); padding: 8px 12px; gap: 6px; }
  .tap-time { display: none; }
}
