* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  padding-bottom: 120px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

.header {
  background: linear-gradient(135deg, #2f6fed 0%, #4A90D9 100%);
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
}

.title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.search-box { display: flex; gap: 8px; }

.search-box input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  -webkit-appearance: none;
}

.search-box button {
  padding: 10px 20px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  color: white;
  font-size: 14px;
  white-space: nowrap;
}

/* 筛选栏 */
.filter-bar {
  background: white;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
}
.filter-btn {
  flex: 1;
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  border-right: 1px solid #eee;
  cursor: pointer;
}
.filter-btn:active { background: #f5f5f5; }
.filter-label { font-size: 14px; color: #666; flex-shrink: 0; }
.filter-text {
  flex: 1;
  font-size: 14px;
  color: #2f6fed;
  margin: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filter-arrow { font-size: 12px; color: #999; flex-shrink: 0; }
.filter-all {
  padding: 0 20px;
  height: 48px;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #666;
  border-left: 1px solid #eee;
  cursor: pointer;
  flex-shrink: 0;
}
.filter-all:active { background: #f5f5f5; }
.filter-all.active { color: #2f6fed; }

/* 音频列表 */
.audio-list { padding: 8px 16px; }
.audio-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: white;
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.15s;
}
.audio-item:active { transform: scale(0.98); }
.audio-item.playing {
  background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fa 100%);
  border: 1px solid #2f6fed;
}
.play-icon {
  width: 48px; height: 48px;
  background: #2f6fed;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
  margin-right: 12px; flex-shrink: 0;
}
.audio-item.playing .play-icon { background: #1a4fc4; }
.audio-info { flex: 1; min-width: 0; }
.audio-title {
  font-size: 15px; color: #333; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.audio-sub {
  font-size: 12px; color: #999;
  display: flex; justify-content: space-between;
}
.loading, .empty, .error { text-align: center; padding: 40px; color: #999; font-size: 14px; }
.error { color: #e74c3c; }

/* 底部播放条 */
.player-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 1000;
}
.player-top { display: flex; align-items: center; margin-bottom: 8px; }
.player-info { flex: 1; min-width: 0; }
.player-title {
  font-size: 14px; color: #333; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-sub { font-size: 12px; color: #999; }
.player-close {
  width: 32px; height: 32px;
  background: none; border: none;
  font-size: 16px; color: #999;
  cursor: pointer; -webkit-appearance: none;
  padding: 4px; margin-left: 8px;
  flex-shrink: 0; border-radius: 50%;
}
.player-close:active { background: #f0f0f0; color: #666; }
.player-controls {
  display: flex; justify-content: center; align-items: center;
  gap: 32px; margin-bottom: 8px;
}
.player-controls button {
  background: none; border: none;
  font-size: 28px; cursor: pointer;
  padding: 8px; color: #333; -webkit-appearance: none;
}
.player-controls button:nth-child(2) { font-size: 36px; }
.player-progress {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: #999;
}
.player-progress input[type="range"] {
  flex: 1; height: 4px;
  -webkit-appearance: none;
  background: #eee; border-radius: 2px; outline: none;
}
.player-progress input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: #2f6fed; border-radius: 50%; cursor: pointer;
}
.load-more { text-align: center; padding: 16px; color: #999; font-size: 12px; }

/* ========== 底部弹出分类选择器（点击式级联） ========== */
.picker-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex; align-items: flex-end;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.picker-container {
  width: 100%;
  background: white;
  border-radius: 16px 16px 0 0;
  animation: slideUp 0.25s ease-out;
  padding-bottom: env(safe-area-inset-bottom);
  overflow: hidden;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.picker-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.picker-cancel, .picker-confirm {
  background: none; border: none;
  font-size: 16px; padding: 8px; cursor: pointer; -webkit-appearance: none;
}
.picker-cancel { color: #999; }
.picker-confirm { color: #2f6fed; font-weight: 500; }
.picker-title { font-size: 16px; font-weight: 500; color: #333; }

/* 当前已选路径提示 */
.picker-path {
  padding: 8px 16px;
  font-size: 12px;
  color: #999;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 三列并排，各自独立滚动 */
.picker-body {
  display: flex;
  height: 320px;
  min-height: 0;
}

.picker-col {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-right: 1px solid #f0f0f0;
}
.picker-col:last-child { border-right: none; }
.picker-col::-webkit-scrollbar { display: none; }

.picker-col-title {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8fa;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: #888;
  border-bottom: 1px solid #eee;
}

.picker-item {
  padding: 14px 8px;
  text-align: center;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  border-bottom: 1px solid #fafafa;
  word-break: break-all;
}
.picker-item:active { background: #f5f5f5; }
.picker-item.selected {
  background: #e8f0fe;
  color: #2f6fed;
  font-weight: 600;
}
.picker-item.dim { color: #bbb; }
