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

:root {
  --bg-primary: #0f0f1e;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(255,255,255,0.05);
  --bg-card-hover: rgba(255,255,255,0.08);
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);
  --text-primary: #f1f1f3;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c80;
  --border: rgba(255,255,255,0.08);
  --danger: #e74c3c;
  --success: #2ecc71;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

#app { display: flex; flex-direction: column; min-height: 100vh; }

/* Layout */
.layout { display: flex; flex: 1; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 220px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 16px 8px;
  flex-shrink: 0;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 90;
}

/* Sidebar nav menu */
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 8px;
  cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s; user-select: none;
}
.nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-gradient); color: #fff;
  box-shadow: 0 4px 12px rgba(108,92,231,0.3);
}
.nav-icon { font-size: 18px; flex-shrink: 0; }

.sidebar-divider {
  height: 1px; background: var(--border);
  margin: 10px 12px;
}

.sidebar-section { margin-bottom: 4px; }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding: 0 8px;
}
.sidebar-header h3 { font-size: 13px; font-weight: 700; color: var(--text-muted); }

/* 网盘折叠 */
.netdisk-toggle { cursor: pointer; transition: background 0.2s; border-radius: 8px; padding: 6px 8px; }
.netdisk-toggle:hover { background: var(--bg-card); }
.netdisk-toggle h3 { display: flex; align-items: center; gap: 4px; }
.netdisk-count { font-size: 11px; font-weight: 400; opacity: 0.6; }
.netdisk-header-actions { display: flex; align-items: center; gap: 6px; }
.netdisk-arrow { font-size: 10px; color: var(--text-muted); transition: transform 0.2s; }

.folder-list { display: flex; flex-direction: column; gap: 4px; }
.netdisk-list { overflow: hidden; }

.folder-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
  user-select: none;
}
.folder-item:hover { background: var(--bg-card); color: var(--text-primary); }
.folder-item.active { background: rgba(108,92,231,0.15); color: var(--accent-light); }
.folder-item .folder-actions { margin-left: auto; display: flex; gap: 2px; opacity: 0; transition: opacity 0.2s; }
.folder-item:hover .folder-actions { opacity: 1; }
.folder-item .folder-actions button {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 2px 6px; border-radius: 4px; font-size: 13px;
}
.folder-item .folder-actions button:hover { color: var(--text-primary); background: var(--bg-card-hover); }

/* Genre filter */
.genre-list { display: flex; flex-direction: column; gap: 2px; }
.genre-item {
  display: flex; align-items: center;
  padding: 8px 14px; border-radius: 8px;
  cursor: pointer; font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s; user-select: none;
}
.genre-item:hover { background: var(--bg-card); color: var(--text-primary); }
.genre-item.active { background: rgba(108,92,231,0.15); color: var(--accent-light); font-weight: 600; }

/* Main area */
.main { flex: 1; margin-left: 220px; margin-right: 280px; max-width: none; padding: 0 20px 140px; }

/* Header */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 0; position: sticky; top: 0; z-index: 80;
  background: linear-gradient(to bottom, var(--bg-primary) 80%, transparent);
  gap: 16px;
}
.header-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.drawer-toggle {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 18px; width: 36px; height: 36px;
  border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.drawer-toggle:hover { background: var(--bg-card-hover); color: var(--accent-light); }
.header-center { flex: 1; max-width: 400px; min-width: 0; }
.logo { font-size: 32px; filter: drop-shadow(0 0 8px rgba(108,92,231,0.5)); }
.header h1 {
  font-size: 20px; font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-right { display: flex; gap: 8px; flex-shrink: 0; }

/* Search box */
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 0 14px;
  transition: all 0.2s;
}
.search-box:focus-within { border-color: var(--accent); background: var(--bg-card-hover); }
.search-icon { color: var(--text-muted); flex-shrink: 0; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 14px; padding: 9px 0;
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 4px;
}
.search-clear:hover { color: var(--text-primary); background: var(--bg-card-hover); }

/* Search hint */
.search-hint {
  display: flex; align-items: center;
  padding: 10px 16px; margin-bottom: 12px;
  background: rgba(108,92,231,0.08); border: 1px solid rgba(108,92,231,0.2);
  border-radius: 8px; font-size: 13px; color: var(--accent-light);
}

/* Buttons */
.btn-icon, .btn-sm {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; font-size: 14px;
}
.btn-icon { width: 42px; height: 42px; border-radius: 50%; }
.btn-sm { padding: 8px 12px; }
.btn-icon:hover, .btn-sm:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-sm.danger:hover { color: var(--danger); }

/* Upload */
.upload-section { margin-bottom: 24px; }
.upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 36px 24px; text-align: center; cursor: pointer;
  transition: all 0.3s; background: var(--bg-card);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--accent); background: rgba(108,92,231,0.08);
}
.upload-area.dragover { transform: scale(1.01); }
.upload-icon { color: var(--accent-light); margin-bottom: 12px; }
.upload-text { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.upload-hint { font-size: 12px; color: var(--text-muted); }

.upload-progress {
  margin-top: 12px; padding: 14px;
  background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border);
}
.progress-bar { height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: var(--accent-gradient); border-radius: 3px; width: 0%; transition: width 0.3s; }
.progress-text { font-size: 12px; color: var(--text-secondary); }

/* Upload Queue */
.upload-queue {
  margin-top: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.upload-queue-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: rgba(108,92,231,0.06);
}
.upload-queue-title { font-size: 14px; font-weight: 600; color: var(--accent-light); }
.upload-queue-actions { display: flex; gap: 8px; }
.btn-upload-start {
  background: var(--accent-gradient); color: white; border: none;
  font-weight: 700; padding: 8px 16px;
}
.btn-upload-start:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-upload-start:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.upload-queue-list {
  max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px;
}
.queue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 8px;
  background: rgba(255,255,255,0.03);
  transition: all 0.2s;
  position: relative;
}
.queue-item:hover { background: var(--bg-card-hover); }
.queue-item.uploading { background: rgba(108,92,231,0.08); border: 1px solid rgba(108,92,231,0.3); }
.queue-item.done { opacity: 0.5; }
.queue-item.error { background: rgba(231,76,60,0.08); border: 1px solid rgba(231,76,60,0.2); }

.queue-item-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: var(--bg-secondary); display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.queue-item-icon.video { background: rgba(108,92,231,0.15); }

.queue-item-info { flex: 1; min-width: 0; }
.queue-item-name {
  font-size: 13px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
}
.queue-item-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.queue-item-folder-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(108,92,231,0.15); color: #a29bfe;
  padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 500;
}

.queue-item-status {
  flex-shrink: 0; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; min-width: 70px; justify-content: flex-end;
}
.queue-item-status .spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent-light);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.queue-item-status.done { color: var(--success); }
.queue-item-status.error { color: var(--danger); }
.queue-item-status.pending { color: var(--text-muted); }

.queue-item-remove {
  width: 28px; height: 28px; border-radius: 50%;
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s; font-size: 16px;
}
.queue-item-remove:hover { background: rgba(231,76,60,0.15); color: var(--danger); }
.queue-item.uploading .queue-item-remove,
.queue-item.done .queue-item-remove { display: none; }

.queue-item-progress {
  position: absolute; bottom: 0; left: 0; height: 4px;
  background: var(--accent-gradient); width: 0%; border-radius: 2px;
  transition: width 0.15s linear;
}

.uploading-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 80px;
}
.uploading-pct {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
}
.uploading-speed {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Select bar */
.select-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--bg-card);
  border-radius: var(--radius); border: 1px solid var(--border);
  margin-bottom: 16px; font-size: 14px;
}
.select-bar span { margin-right: auto; color: var(--accent-light); font-weight: 600; }

/* Music list */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-header h2 { font-size: 18px; font-weight: 700; }
.music-count { font-size: 13px; color: var(--text-muted); background: var(--bg-card); padding: 4px 12px; border-radius: 20px; }
.music-list { display: flex; flex-direction: column; gap: 8px; }
.empty-state { text-align: center; padding: 48px; color: var(--text-muted); font-size: 15px; }

/* Music card */
.music-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all 0.2s;
}
.music-card:hover { background: var(--bg-card-hover); border-color: rgba(108,92,231,0.3); }
.music-card.playing { background: rgba(108,92,231,0.12); border-color: var(--accent); }
.music-card.selected { border-color: var(--accent); background: rgba(108,92,231,0.08); }

.music-card-checkbox {
  width: 20px; height: 20px; border: 2px solid var(--border);
  border-radius: 4px; flex-shrink: 0; cursor: pointer;
  display: none; align-items: center; justify-content: center;
}
.select-mode .music-card-checkbox { display: flex; }
.music-card-checkbox.checked { background: var(--accent); border-color: var(--accent); }
.music-card-checkbox.checked::after { content: '✓'; color: white; font-size: 14px; }

.music-card-cover {
  width: 48px; height: 48px; border-radius: 8px; overflow: hidden;
  flex-shrink: 0; background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.music-card-cover img { width: 100%; height: 100%; object-fit: cover; }

.music-card-info { flex: 1; min-width: 0; }
.music-card-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.music-card-meta { display: flex; gap: 10px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.music-card-meta span { display: flex; align-items: center; gap: 3px; }
.meta-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
}
.meta-tag.bpm { background: rgba(231,76,60,0.15); color: #e74c3c; }
.meta-tag.key { background: rgba(108,92,231,0.15); color: #a29bfe; }
.meta-tag.genre { background: rgba(46,204,113,0.15); color: #2ecc71; }

.music-card-actions { display: flex; gap: 2px; flex-shrink: 0; }
.btn-action {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 8px; border-radius: 8px; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.btn-action:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-action.danger:hover { color: var(--danger); }
.btn-action.fav-btn { color: var(--text-muted); font-size: 20px; }
.btn-action.fav-btn:hover { color: #e74c3c; }
.btn-action.fav-btn.favorited { color: #e74c3c; }

/* Grid view */
.music-list.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.music-list.grid-view .music-card {
  flex-direction: column; align-items: center;
  padding: 16px 12px; gap: 10px;
}
.music-list.grid-view .music-card-info { text-align: center; width: 100%; }
.music-list.grid-view .music-card-cover {
  width: 100px; height: 100px; border-radius: 12px; font-size: 36px;
}
.music-list.grid-view .music-card-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.music-list.grid-view .music-card-meta { justify-content: center; font-size: 11px; gap: 4px; }
.music-list.grid-view .music-card-actions { margin-top: 4px; }
.music-list.grid-view .music-card-checkbox { position: absolute; top: 8px; left: 8px; }

/* Video Panel */
.video-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 250;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  animation: slideUp 0.3s ease;
}
.video-panel video {
  display: block;
  max-width: 480px;
  max-height: 320px;
  border-radius: 8px;
  background: #000;
}
.video-panel-close {
  position: absolute;
  top: -12px; right: -12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white; border: none;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1;
}
.video-panel-close:hover { background: var(--accent-light); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== 高级视频播放器 (影院模式) ===== */
.video-theater {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex; flex-direction: column;
  animation: theaterFadeIn 0.25s ease;
}
@keyframes theaterFadeIn { from { opacity: 0; } to { opacity: 1; } }

.video-theater-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 10;
  transition: opacity 0.3s;
}
.video-theater-topbar.hidden { opacity: 0; pointer-events: none; }
.video-theater-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.video-theater-title { font-size: 16px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
.video-theater-artist { font-size: 13px; color: rgba(255,255,255,0.6); }
.video-theater-actions { display: flex; gap: 8px; flex-shrink: 0; }

.video-theater-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  cursor: pointer;
}
.video-theater-stage video {
  max-width: 95%; max-height: 100%;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

/* Loading spinner */
.video-loading {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}
.video-loading-spinner {
  width: 56px; height: 56px;
  border: 4px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Center play button */
.video-center-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 88px; height: 88px;
  background: rgba(108,92,231,0.85);
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 6;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}
.video-center-play:hover { background: var(--accent); transform: translate(-50%,-50%) scale(1.1); }
.video-center-play.hidden { display: none; }

/* Double-click hint animation */
.video-double-hint {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100px; height: 100px;
  border: 3px solid rgba(255,255,255,0.5);
  border-radius: 12px;
  z-index: 4; opacity: 0; pointer-events: none;
}
.video-double-hint.flash { animation: doubleHintFlash 0.5s ease; }
@keyframes doubleHintFlash { 0% { opacity: 0; transform: translate(-50%,-50%) scale(0.8); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.3); } }

/* Bottom controls */
.video-theater-controls {
  padding: 12px 24px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 10;
  transition: opacity 0.3s;
}
.video-theater-controls.hidden { opacity: 0; pointer-events: none; }

.video-progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.video-time { font-size: 12px; color: rgba(255,255,255,0.7); min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.video-progress-track {
  flex: 1; height: 5px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px; cursor: pointer; position: relative;
  transition: height 0.15s;
}
.video-progress-track:hover { height: 7px; }
.video-progress-buffered {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 3px; width: 0%;
}
.video-progress-played {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: var(--accent-gradient);
  border-radius: 3px; width: 0%;
}
.video-progress-thumb {
  position: absolute; top: 50%;
  width: 14px; height: 14px;
  background: #fff; border-radius: 50%;
  transform: translate(-50%, -50%);
  left: 0%; opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.video-progress-track:hover .video-progress-thumb { opacity: 1; }

.video-controls-row { display: flex; align-items: center; justify-content: space-between; }
.video-controls-left, .video-controls-right { display: flex; align-items: center; gap: 4px; }

.vctrl-btn {
  background: none; border: none; color: rgba(255,255,255,0.8);
  cursor: pointer; padding: 8px; border-radius: 8px;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.vctrl-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.vctrl-play { background: rgba(255,255,255,0.1); }
.vctrl-play:hover { background: rgba(255,255,255,0.2); }

.video-volume-group { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.video-volume-slider {
  width: 0; height: 4px; -webkit-appearance: none;
  background: rgba(255,255,255,0.2); border-radius: 2px; outline: none;
  transition: width 0.2s; overflow: hidden;
}
.video-volume-group:hover .video-volume-slider { width: 80px; }
.video-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  background: #fff; border-radius: 50%; cursor: pointer;
  box-shadow: -80px 0 0 78px rgba(108,92,231,0.5);
}

.video-speed-group { position: relative; }
.video-speed-btn { font-size: 13px; font-weight: 600; min-width: 48px; }
.video-speed-menu {
  position: absolute; bottom: 100%; right: 0;
  margin-bottom: 8px;
  background: rgba(26,26,46,0.95); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.video-speed-menu button {
  background: none; border: none; color: rgba(255,255,255,0.7);
  padding: 8px 16px; border-radius: 6px; cursor: pointer;
  font-size: 13px; text-align: center; transition: all 0.15s;
}
.video-speed-menu button:hover { background: rgba(255,255,255,0.1); color: #fff; }
.video-speed-menu button.active { background: var(--accent); color: #fff; }

.video-quality-sel {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; cursor: pointer; outline: none;
  margin-left: 8px;
}
.video-quality-sel:hover { border-color: var(--accent); color: #fff; }
.video-quality-sel option { background: var(--bg-secondary); color: var(--text-primary); }

/* Mini player mode */
.video-theater.mini {
  top: auto; bottom: 90px; left: auto; right: 24px;
  width: 400px; height: 260px;
  background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
}
.video-theater.mini .video-theater-topbar { padding: 8px 12px; }
.video-theater.mini .video-theater-title { font-size: 13px; }
.video-theater.mini .video-theater-artist { font-size: 11px; }
.video-theater.mini .video-theater-actions .vctrl-btn { padding: 4px; }
.video-theater.mini .video-theater-actions .vctrl-btn svg { width: 16px; height: 16px; }
.video-theater.mini .video-theater-stage video { max-width: 100%; max-height: 100%; border-radius: 4px; }
.video-theater.mini .video-theater-controls { padding: 6px 12px 10px; }
.video-theater.mini .video-controls-row { gap: 4px; }
.video-theater.mini .vctrl-btn { padding: 4px; }
.video-theater.mini .vctrl-btn svg { width: 18px; height: 18px; }
.video-theater.mini .video-center-play { width: 56px; height: 56px; }
.video-theater.mini .video-center-play svg { width: 40px; height: 40px; }
.video-theater.mini .video-volume-group,
.video-theater.mini .video-speed-group,
.video-theater.mini .video-quality-sel { display: none; }
.video-theater.mini .video-progress-row { margin-bottom: 4px; }
.video-theater.mini .video-time { font-size: 10px; }
.video-theater.mini .video-progress-track { height: 4px; }
.video-theater.mini .video-progress-track:hover { height: 5px; }

/* Fullscreen */
.video-theater:fullscreen { background: #000; }
.video-theater:fullscreen .video-theater-stage video { max-width: 100%; max-height: 100%; border-radius: 0; }

/* Player */
.player {
  position: fixed; bottom: 0; left: 220px; right: 0;
  background: rgba(15,15,30,0.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border); padding: 12px 24px;
  display: flex; align-items: center; gap: 16px; z-index: 200;
}

.player-cover {
  width: 52px; height: 52px; border-radius: 8px; overflow: hidden;
  flex-shrink: 0; background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.player-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-cover-placeholder { font-size: 26px; position: absolute; }

.player-info { flex: 1; min-width: 0; }
.player-meta { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.player-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Waveform (可点击跳转) */
.waveform-container {
  position: relative;
  margin-bottom: 4px;
  max-height: 50px;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}
.waveform-container img { width: 100%; height: 50px; object-fit: cover; opacity: 0.8; display: block; }
.waveform-overlay {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 0%;
  background: rgba(108,92,231,0.35);
  border-right: 2px solid var(--accent-light);
  pointer-events: none;
  transition: width 0.1s linear;
}
.waveform-cursor {
  position: absolute; top: 0; bottom: 0;
  width: 2px; background: var(--accent-light);
  left: 0%; opacity: 0; pointer-events: none;
  transition: left 0.1s linear, opacity 0.2s;
}
.waveform-container:hover .waveform-cursor { opacity: 0.8; }

.player-progress { display: flex; align-items: center; gap: 10px; }
.time { font-size: 11px; color: var(--text-muted); min-width: 36px; text-align: center; font-variant-numeric: tabular-nums; }

.progress-track {
  flex: 1; height: 4px; background: rgba(255,255,255,0.1);
  border-radius: 2px; cursor: pointer; position: relative;
}
.progress-played { height: 100%; background: var(--accent-gradient); border-radius: 2px; width: 0%; transition: width 0.1s linear; }
.progress-thumb {
  position: absolute; top: 50%; width: 12px; height: 12px;
  background: var(--accent-light); border-radius: 50%;
  transform: translate(-50%,-50%); left: 0%; transition: left 0.1s linear; opacity: 0;
}
.progress-track:hover .progress-thumb { opacity: 1; }

.player-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-control {
  background: none; border: none; color: var(--text-secondary); cursor: pointer;
  padding: 8px; border-radius: 50%; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.btn-control:hover { color: var(--text-primary); background: var(--bg-card); }
.btn-control.loading { pointer-events: none; opacity: 0.4; }
.btn-control.loading svg { animation: spin 0.8s linear infinite; }
.btn-play { background: var(--accent-gradient); color: white; width: 42px; height: 42px; }
.btn-play:hover { background: var(--accent-gradient); color: white; transform: scale(1.05); }

.quality-selector {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); border-radius: 8px;
  padding: 6px 8px; font-size: 12px; cursor: pointer; outline: none;
}
.quality-selector:hover { border-color: var(--accent); }
.quality-selector option { background: var(--bg-secondary); color: var(--text-primary); }

.volume-control { display: flex; align-items: center; gap: 6px; color: var(--text-muted); margin-left: 4px; }
.volume-slider {
  width: 70px; height: 4px; -webkit-appearance: none;
  background: rgba(255,255,255,0.1); border-radius: 2px; outline: none;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  background: var(--accent-light); border-radius: 50%; cursor: pointer;
}

/* Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 520px; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow);
}
.modal-sm { max-width: 380px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.btn-close {
  background: none; border: none; color: var(--text-muted); font-size: 28px;
  cursor: pointer; line-height: 1; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.btn-close:hover { background: var(--bg-card); color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-group input, .form-group textarea {
  width: 100%; background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; color: var(--text-primary);
  font-size: 14px; font-family: inherit; resize: vertical; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.input-full {
  width: 100%; background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; color: var(--text-primary); font-size: 14px;
}
.input-full:focus { outline: none; border-color: var(--accent); }

.status-info {
  font-size: 13px; padding: 10px 14px; border-radius: 8px;
  background: rgba(231,76,60,0.1); color: var(--danger); border: 1px solid rgba(231,76,60,0.2);
}
.status-info.configured { background: rgba(46,204,113,0.1); color: var(--success); border-color: rgba(46,204,113,0.2); }

.folder-select-list { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.folder-select-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text-secondary);
  transition: all 0.2s;
}
.folder-select-item:hover { background: var(--bg-card); color: var(--text-primary); }

.btn { padding: 10px 24px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-secondary { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-primary { background: var(--accent-gradient); color: white; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: 8px; font-size: 14px; color: white; box-shadow: var(--shadow); animation: slideIn 0.3s ease; max-width: 380px; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== Membership Page ===== */
.membership-page { padding-top: 8px; }
.membership-hero {
  text-align: center; padding: 36px 24px;
  background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(162,155,254,0.08));
  border: 1px solid var(--border); border-radius: 16px;
  margin-bottom: 20px;
}
.membership-avatar { font-size: 64px; margin-bottom: 12px; }
.membership-hero h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.membership-level-badge {
  display: inline-block; padding: 6px 20px;
  border-radius: 20px; font-size: 14px; font-weight: 700;
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.membership-level-badge.bronze { background: rgba(205,127,50,0.15); color: #cd7f32; border-color: rgba(205,127,50,0.3); }
.membership-level-badge.silver { background: rgba(192,192,192,0.15); color: #c0c0c0; border-color: rgba(192,192,192,0.3); }
.membership-level-badge.gold { background: rgba(255,215,0,0.15); color: #ffd700; border-color: rgba(255,215,0,0.3); }
.membership-level-badge.diamond { background: rgba(108,92,231,0.15); color: #a29bfe; border-color: rgba(108,92,231,0.3); }
.membership-expiry { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

.membership-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 16px; text-align: center;
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--accent-light); margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); }

.membership-benefits {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px; margin-bottom: 20px;
}
.membership-benefits h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.benefits-list { display: flex; flex-direction: column; gap: 8px; }
.benefit-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: rgba(255,255,255,0.03);
  border-radius: 8px; font-size: 14px; color: var(--text-secondary);
}
.benefit-item .benefit-icon { font-size: 18px; }

.membership-upgrade {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.membership-upgrade h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.upgrade-form {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}

/* ===== 侧边栏 Logo ===== */
.sidebar-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 12px 20px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-logo img { width: 32px; height: 32px; border-radius: 8px; }
.sidebar-logo span { font-size: 14px; font-weight: 700; color: var(--text-primary); }

/* ===== 导航栏目标题 ===== */
.nav-section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 4px;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
}
.nav-section-title:hover { color: var(--accent-light); }

/* ===== 头部用户区域 ===== */
.wallet-badge {
  font-size: 12px; color: var(--text-secondary);
  padding: 4px 10px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer; white-space: nowrap;
  display: none; /* 默认隐藏，登录后显示 */
}
.wallet-badge:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.btn-login {
  display: none; /* 默认隐藏，未登录时显示 */
  white-space: nowrap;
}

.user-dropdown-btn {
  position: relative; display: none; /* 默认隐藏，登录后显示 */
  align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border-radius: 24px; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border);
}
.user-dropdown-btn:hover { background: var(--bg-card-hover); }
.user-avatar-sm {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.user-name-sm { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); z-index: 100; overflow: hidden;
}
.user-dropdown-header {
  padding: 14px 16px; background: var(--accent);
  display: flex; align-items: center; justify-content: space-between;
}
.user-dropdown-header strong { color: #fff; font-size: 14px; }
.vip-badge-sm {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: rgba(255,255,255,0.2); color: #fff;
}
.user-dropdown-body { padding: 12px 16px; font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.user-dropdown-body strong { color: var(--text-primary); }
.user-dropdown-actions { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.user-dropdown-actions button {
  padding: 10px 16px; border: none; background: none; color: var(--text-secondary);
  font-size: 13px; cursor: pointer; text-align: left; width: 100%;
  transition: background 0.15s, color 0.15s;
}
.user-dropdown-actions button:hover { background: var(--bg-card); color: var(--text-primary); }
.user-dropdown-actions button.dropdown-divider { border-top: 1px solid var(--border); margin-top: 2px; padding-top: 12px; }

/* ===== 用户中心视图 ===== */
.uc-header {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
  flex-wrap: wrap;
}
.uc-header h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); flex: 1; }
.uc-panel { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.uc-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.uc-card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.uc-card-header h3 { font-size: 16px; font-weight: 700; }
.uc-card-body { padding: 20px; }
.uc-header-extra { font-size: 13px; color: var(--text-secondary); }
.uc-header-extra strong { color: var(--accent-light); }

/* 用户中心侧边导航（独立页面） */
.uc-side-nav {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 200px;
  background: var(--bg-secondary, #1a1a2e);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column;
  padding: 16px 12px;
  gap: 4px;
  overflow-y: auto;
  z-index: 50;
}
.uc-side-nav .uc-nav-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border: none; background: transparent;
  color: var(--text-secondary, #a0a0b8);
  font-size: 14px; border-radius: 8px;
  cursor: pointer; transition: all .15s;
  text-align: left;
}
.uc-side-nav .uc-nav-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary, #f1f1f3); }
.uc-side-nav .uc-nav-btn.active { background: var(--accent, #6c5ce7); color: #fff; }
.uc-side-nav .nav-badge {
  margin-left: auto; background: #e74c3c; color: #fff;
  font-size: 10px; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}
/* 用户中心页面布局偏移 */
#userCenterView .uc-page-wrap { margin-left: 200px; }
@media(max-width: 768px) {
  .uc-side-nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: auto;
    flex-direction: row; overflow-x: auto;
    padding: 8px; gap: 6px;
    border-right: none; border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 200;
  }
  .uc-side-nav .uc-nav-btn {
    white-space: nowrap; padding: 8px 12px; font-size: 12px;
  }
  #userCenterView .uc-page-wrap { margin-left: 0; padding-bottom: 120px; }
}

.d-flex-between { display: flex; align-items: center; justify-content: space-between; }

.uc-alert {
  padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px;
}
.uc-alert-info { background: rgba(108,92,231,0.12); color: var(--accent-light); border: 1px solid rgba(108,92,231,0.2); }
.uc-alert-warning { background: rgba(243,156,18,0.12); color: #f39c12; border: 1px solid rgba(243,156,18,0.2); }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-primary); font-size: 14px; outline: none;
}
.form-control:focus { border-color: var(--accent); }
.form-control[readonly] { opacity: 0.6; cursor: not-allowed; }
select.form-control { appearance: none; cursor: pointer; }
.input-group { display: flex; gap: 8px; align-items: center; }
.form-row { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0 -8px; }
.form-row .form-group { padding: 0 8px; }
.col-4 { width: 33.33%; }
.col-6 { width: 50%; }

/* 表格 */
.uc-table-wrap { overflow-x: auto; }
.uc-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.uc-table th {
  padding: 10px 12px; text-align: left; color: var(--text-muted);
  font-weight: 600; font-size: 12px; text-transform: uppercase;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.uc-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  color: var(--text-secondary); white-space: nowrap;
}
.uc-table tbody tr:hover td { background: var(--bg-card); }
.uc-empty { text-align: center; color: var(--text-muted); padding: 40px !important; }
.uc-table .table-type { color: var(--accent-light); }
.uc-table .table-amount { color: var(--danger); font-weight: 600; }
.uc-table .table-status { font-size: 12px; }
.uc-table .table-status .badge-success { color: var(--success); }
.uc-table .table-status .badge-warning { color: #f39c12; }

.uc-search-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 16px;
}

.uc-tab-group { display: flex; gap: 0; }
.uc-tab {
  padding: 6px 16px; border: 1px solid var(--border); background: none;
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
}
.uc-tab:first-child { border-radius: 6px 0 0 6px; }
.uc-tab:last-child { border-radius: 0 6px 6px 0; }
.uc-tab.active { background: var(--success); border-color: var(--success); color: #fff; }

/* 充值网格 */
.recharge-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.recharge-item {
  padding: 16px 12px; text-align: center; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all .15s;
  background: var(--bg-card);
}
.recharge-item:hover { border-color: var(--accent); background: rgba(108,92,231,0.1); }
.recharge-item.active { border-color: var(--accent); background: rgba(108,92,231,0.2); }
.recharge-item .rc-price { font-size: 20px; color: var(--danger); font-weight: 700; }
.recharge-item .rc-points { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* 支付方式 */
.paytype-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.paytype-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: 14px; color: var(--text-secondary); background: var(--bg-card);
}
.paytype-item:hover { border-color: var(--accent); }
.paytype-item.active { border-color: var(--accent); background: rgba(108,92,231,0.15); color: var(--text-primary); }

/* VIP 价格网格 */
.vip-price-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; margin-top: 16px;
}
.vip-price-item {
  padding: 20px 16px; text-align: center; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all .15s;
  background: var(--bg-card);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.vip-price-item:hover { border-color: var(--accent); background: rgba(108,92,231,0.1); }
.vip-price-item.active { border-color: var(--accent); background: rgba(108,92,231,0.2); }
.vip-price-item .vp-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.vip-price-item .vp-desc { font-size: 12px; color: var(--text-muted); }
.vip-price-item .vp-price { font-size: 22px; color: var(--danger); font-weight: 700; }
.vip-price-item .vp-price em { font-size: 12px; font-style: normal; }

.btn-lg { padding: 12px 24px; font-size: 16px; }

/* 分页 */
.uc-pagination {
  display: flex; gap: 6px; justify-content: center; margin-top: 16px;
}
.uc-pagination button {
  padding: 6px 12px; border: 1px solid var(--border); background: none;
  color: var(--text-secondary); font-size: 13px; border-radius: 6px; cursor: pointer;
}
.uc-pagination button:hover { background: var(--bg-card); }
.uc-pagination button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.uc-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== 导航徽章 ===== */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 10px; margin-left: auto;
}

/* ===== 认证中心 ===== */
.cert-type-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; margin: 20px 0;
}
.cert-type-card {
  padding: 24px 20px; text-align: center; border: 2px solid var(--border);
  border-radius: 12px; cursor: pointer; transition: all .2s;
  background: var(--bg-card);
}
.cert-type-card:hover { border-color: var(--accent); background: rgba(108,92,231,0.08); }
.cert-type-card.active { border-color: var(--accent); background: rgba(108,92,231,0.15); box-shadow: 0 0 16px rgba(108,92,231,0.15); }
.cert-type-icon { font-size: 40px; margin-bottom: 8px; }
.cert-type-name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.cert-type-desc { font-size: 13px; color: var(--text-muted); }
.cert-status-pending { color: #f39c12; }
.cert-status-approved { color: var(--success); }
.cert-status-rejected { color: var(--danger); }

/* ===== 私信表格额外样式 ===== */
.msg-unread td:first-child { font-weight: 700; color: var(--text-primary); }
.msg-unread td:first-child::before { content: '● '; color: var(--accent); font-size: 8px; vertical-align: middle; }
.uc-table .btn-sm { font-size: 11px; padding: 3px 10px; }

/* ===== 文件上传小组件 ===== */
.file-upload-sm { display: flex; align-items: center; }

/* ===== 表单标题 ===== */
.form-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--text-primary); }

/* ==============================
     Responsive — 三档断点
     ============================== */

/* ───── 1100px ─ 平板横屏/小桌面 ───── */
@media (max-width: 1100px) {
  .right-panel { display: none; }
  .main { margin-right: 0; }
}

/* ───── 768px ─ 平板竖屏/大手机 ───── */
@media (max-width: 768px) {
  /* 侧边栏 → 完全隐藏，改用抽屉菜单 */
  .sidebar {
    display: none;
  }
  .main {
    margin-left: 0;
    padding: 0 14px 160px;
  }

  /* 头部 */
  .header {
    padding: 14px 0 10px;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .header-left { gap: 8px; }
  .header h1 { font-size: 15px; white-space: nowrap; }
  .header .logo { font-size: 24px; }
  .drawer-toggle {
    display: flex;
    width: 38px; height: 38px;
    border-radius: 10px;
  }
  .header-center { flex: 1; min-width: 0; max-width: none; }
  .header-right {
    gap: 4px;
    flex-wrap: nowrap;
  }
  .header-right .btn-sm {
    padding: 6px 10px;
    font-size: 13px;
  }

  /* 搜索始终可见但紧凑 */
  .search-box { padding: 0 10px; }
  .search-input { font-size: 13px; padding: 8px 0; }

  /* 用户下拉按钮 */
  .user-dropdown-btn { padding: 2px 8px 2px 2px; }
  .user-avatar-sm { width: 26px; height: 26px; font-size: 12px; }
  .user-name-sm { font-size: 12px; }

  /* 钱包标识隐藏 */
  .wallet-badge { display: none !important; }

  /* 轮播图 */
  .swiper-banner { margin-bottom: 14px; border-radius: 10px; }
  .swiper-slide-banner img { max-height: 200px; border-radius: 10px; }
  .swiper-slide-banner .slide-overlay { padding: 24px 16px 14px; }
  .swiper-slide-banner .slide-title { font-size: 14px; }
  .swiper-pagination-banner { bottom: 8px; gap: 6px; }
  .swiper-pagination-banner .bullet { width: 6px; height: 6px; }

  /* 音乐区标题 */
  .section-header h2 { font-size: 16px; }
  .music-count { font-size: 12px; padding: 3px 10px; }

  /* 音乐卡片 — 列表视图 */
  .music-card {
    padding: 10px 12px;
    gap: 10px;
  }
  .music-card-cover { width: 40px; height: 40px; border-radius: 6px; font-size: 18px; }
  .music-card-title { font-size: 13px; }
  .music-card-meta { font-size: 11px; gap: 6px; }
  .music-card-actions { gap: 0; }
  .btn-action { padding: 6px; }
  .btn-action svg { width: 16px; height: 16px; }

  /* 网格视图 — 手机端 2 列 */
  .music-list.grid-view {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .music-list.grid-view .music-card {
    padding: 12px 8px;
    gap: 8px;
  }
  .music-list.grid-view .music-card-cover {
    width: 60px; height: 60px;
    border-radius: 10px;
    font-size: 28px;
  }
  .music-list.grid-view .music-card-title { font-size: 12px; }

  /* 多选栏 */
  .select-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    font-size: 12px;
  }

  /* 播放器 — 手机优化 */
  .player {
    left: 0;
    padding: 8px 12px 10px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .player-cover { width: 42px; height: 42px; border-radius: 6px; }
  .player-cover-placeholder { font-size: 20px; }
  .player-info { flex: 1; min-width: 0; }
  .player-title { font-size: 12px; }
  .player-artist { font-size: 11px; }
  .player-meta { gap: 1px; margin-bottom: 2px; }
  .player-progress { gap: 6px; }
  .time { font-size: 10px; min-width: 28px; }
  .waveform-container { display: block !important; max-height: 36px; margin-bottom: 3px; }
  .waveform-container img { height: 36px; }

  .player-controls { gap: 2px; flex-shrink: 0; }
  .btn-control { padding: 6px; }
  .btn-control svg { width: 18px; height: 18px; }
  .btn-play { width: 36px; height: 36px; }
  .btn-play svg { width: 20px; height: 20px; }
  .quality-selector {
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 5px;
    max-width: 48px;
    appearance: auto;
    -webkit-appearance: auto;
  }
  .volume-control { display: none; }

  /* 会员页 */
  .membership-hero { padding: 24px 16px; }
  .membership-hero h2 { font-size: 18px; }
  .membership-avatar { font-size: 48px; }
  .membership-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat-card { padding: 14px 10px; }
  .stat-value { font-size: 22px; }
  .stat-label { font-size: 11px; }
  .benefit-item { padding: 8px 12px; font-size: 13px; }
  .upgrade-form { flex-direction: column; }
  .upgrade-form .input-full { max-width: 100%; }

  /* 用户中心 */
  .uc-header {
    padding: 10px 0 14px;
    gap: 8px;
  }
  .uc-header h2 { font-size: 16px; }
  .uc-card-header { padding: 12px 14px; }
  .uc-card-header h3 { font-size: 14px; }
  .uc-card-body { padding: 14px; }

  /* 表单 — 移动端全部堆叠 */
  .form-row { flex-direction: column; gap: 0; margin: 0; }
  .form-row .form-group { padding: 0; }
  .col-4, .col-6 { width: 100%; }
  .form-group { margin-bottom: 12px; }
  .form-group label { font-size: 12px; }
  .form-control { font-size: 13px; padding: 9px 12px; }

  /* 充值网格 — 2列 */
  .recharge-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .recharge-item { padding: 14px 10px; }

  /* VIP价格网格 — 2列 */
  .vip-price-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .vip-price-item { padding: 16px 12px; }

  /* 支付方式 */
  .paytype-grid { gap: 8px; }
  .paytype-item { padding: 8px 14px; font-size: 13px; }

  /* 认证中心 */
  .cert-type-grid { grid-template-columns: 1fr; gap: 10px; }
  .cert-type-card { padding: 20px 16px; }
  .cert-type-icon { font-size: 32px; }
  .cert-type-name { font-size: 14px; }

  /* 表格 — 横向滚动 */
  .uc-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 0 14px;
  }
  .uc-table { font-size: 12px; }
  .uc-table th, .uc-table td { padding: 8px 8px; white-space: nowrap; }

  /* 私信选项卡 */
  .uc-tab-group { flex-wrap: wrap; }

  /* 按钮组 */
  .btn-lg { padding: 10px 20px; font-size: 14px; }

  /* 弹窗 */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    margin: 0;
  }
  .modal-sm { max-width: 100%; }
  .modal-header { padding: 16px 20px; }
  .modal-header h3 { font-size: 16px; }
  .modal-body { padding: 18px; }
  .modal-footer { padding: 14px 18px; flex-wrap: wrap; }

  /* 登录弹窗 — 全宽底部弹出 */
  #loginOverlay {
    align-items: flex-end !important;
  }
  #loginOverlay > div:first-of-type,
  #registerForm {
    max-width: 100% !important;
    width: 100%;
    border-radius: 16px 16px 0 0 !important;
    padding: 28px 24px !important;
    position: static;
  }

  /* 用户下拉菜单防溢出 */
  .user-dropdown-menu {
    right: -8px;
    min-width: 180px;
  }

  /* Toast — 居中顶部 */
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  .toast {
    max-width: 100%;
    font-size: 13px;
    padding: 10px 16px;
  }

  /* 视频影院 — 全屏模式 */
  .video-theater:not(.mini) {
    /* 顶部工具栏 */
  }
  .video-theater-topbar { padding: 10px 16px; }
  .video-theater-title { font-size: 14px; max-width: 40vw; }
  .video-theater-stage video { max-width: 100%; max-height: 100%; }
  .video-theater-controls { padding: 8px 16px 16px; }
  .vctrl-btn { padding: 6px; }
  .vctrl-btn svg { width: 20px; height: 20px; }
  .vctrl-play svg { width: 24px; height: 24px; }
  .video-volume-group { display: none; }
  .video-speed-group, .video-quality-sel { margin-left: 0; }

  /* 迷你播放器 — 手机全宽 */
  .video-theater.mini {
    left: 0;
    right: 0;
    bottom: 80px;
    width: auto;
    height: 220px;
    border-radius: 12px 12px 0 0;
  }

  /* 视频面板 */
  .video-panel {
    left: 10px;
    right: 10px;
    bottom: 80px;
  }
  .video-panel video {
    max-width: 100%;
    max-height: 200px;
  }

  /* 分页 */
  .uc-pagination { flex-wrap: wrap; justify-content: center; }

  /* 抽屉菜单全宽 */
  .drawer { width: 85%; max-width: 320px; }

  /* 搜索提示 */
  .search-hint { font-size: 12px; padding: 8px 12px; }

  /* 加载更多 */
  .load-more .btn { min-width: 120px; font-size: 13px; }
}

/* ───── 480px ─ 小手机 ───── */
@media (max-width: 480px) {
  .main { padding: 0 10px 150px; }

  /* 头部更紧凑 */
  .header {
    padding: 10px 0 8px;
    gap: 6px;
  }
  .header-left { gap: 6px; }
  .header h1 { font-size: 13px; }
  .header .logo { font-size: 20px; }
  .drawer-toggle { width: 34px; height: 34px; font-size: 16px; }
  .header-right .btn-sm { padding: 4px 8px; font-size: 12px; }

  /* 搜索框 */
  .search-input { font-size: 12px; padding: 7px 0; }

  /* 轮播图更小 */
  .swiper-banner { border-radius: 8px; margin-bottom: 10px; }
  .swiper-slide-banner img { max-height: 140px; border-radius: 8px; }
  .swiper-slide-banner .slide-overlay { padding: 18px 12px 10px; }
  .swiper-slide-banner .slide-title { font-size: 12px; }

  /* 音乐卡片 */
  .music-card {
    padding: 8px 10px;
    gap: 8px;
  }
  .music-card-cover { width: 36px; height: 36px; font-size: 16px; }
  .music-card-title { font-size: 12px; }
  .music-card-meta { font-size: 10px; gap: 4px; }

  /* 网格 — 仍保持2列但更紧凑 */
  .music-list.grid-view {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .music-list.grid-view .music-card { padding: 10px 6px; gap: 6px; }
  .music-list.grid-view .music-card-cover { width: 50px; height: 50px; font-size: 24px; }
  .music-list.grid-view .music-card-title { font-size: 11px; }

  /* 播放器 — 极限紧凑 */
  .player {
    padding: 6px 10px 8px;
    gap: 6px;
  }
  .player-cover { width: 36px; height: 36px; }
  .player-title { font-size: 11px; }
  .player-artist { font-size: 10px; }
  .time { font-size: 9px; min-width: 24px; }
  .waveform-container { max-height: 28px; margin-bottom: 2px; }
  .waveform-container img { height: 28px; }
  .btn-control { padding: 4px; }
  .btn-control svg { width: 16px; height: 16px; }
  .btn-play { width: 32px; height: 32px; }
  .btn-play svg { width: 18px; height: 18px; }
  .quality-selector { font-size: 8px; padding: 2px 3px; max-width: 42px; }

  /* 会员页 */
  .membership-hero { padding: 20px 12px; }
  .membership-hero h2 { font-size: 16px; }
  .membership-stats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .stat-card { padding: 10px 8px; }
  .stat-value { font-size: 18px; }

  /* 弹窗 */
  .modal { max-height: 80vh; }
  .modal-header { padding: 14px 16px; }
  .modal-header h3 { font-size: 15px; }
  .modal-body { padding: 14px; }
  .modal-footer { padding: 12px 14px; }
  .modal-footer .btn { flex: 1; text-align: center; }

  /* 表单 */
  .input-group { flex-direction: column; }

  /* 抽屉 */
  .drawer { width: 90%; }

  /* Toast */
  .toast { font-size: 12px; padding: 8px 14px; }

  /* 视频影院迷你 */
  .video-theater.mini { height: 180px; }
  .video-theater-topbar { padding: 6px 10px; }
  .video-theater-controls { padding: 4px 10px 10px; }
  .video-theater-title { font-size: 12px; }
  .vctrl-btn svg { width: 18px; height: 18px; }
  .vctrl-play svg { width: 22px; height: 22px; }
  .video-center-play { width: 60px; height: 60px; }
  .video-center-play svg { width: 44px; height: 44px; }
  .video-progress-row { gap: 6px; }
  .video-time { font-size: 10px; min-width: 32px; }

  /* 隐藏部分头部按钮 */
  .header-right .btn-sm:nth-child(n+3) { display: none; }

  .section-header h2 { font-size: 14px; }
}

/* ===== 轮播图 (Swiper 风格) ===== */
.swiper-banner { position: relative; overflow: hidden; border-radius: 12px; margin-bottom: 24px; background: #0a0a0a; }
.swiper-wrapper-banner { position: relative; width: 100%; }
.swiper-slide-banner { position: relative; width: 100%; display: none; }
.swiper-slide-banner.active { display: block; }
.swiper-slide-banner img { width: 100%; height: auto; max-height: 420px; object-fit: cover; display: block; border-radius: 12px; cursor: pointer; }
.swiper-slide-banner .slide-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 24px 20px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); border-radius: 0 0 12px 12px; pointer-events: none; }
.swiper-slide-banner .slide-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.swiper-slide-banner .slide-link-icon { opacity: 0.65; font-size: 14px; }
.swiper-pagination-banner { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.swiper-pagination-banner .bullet { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.3s; }
.swiper-pagination-banner .bullet.active { background: var(--accent-light); width: 24px; border-radius: 4px; }
.swiper-bgs { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: 12px; }
.swiper-bgs .bg-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(40px) brightness(0.3); opacity: 0; transition: opacity 0.6s; }
.swiper-bgs .bg-img.active { opacity: 1; }
.swiper-banner-prev, .swiper-banner-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); border: none; color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; z-index: 3; display: flex; align-items: center; justify-content: center; transition: background 0.2s; opacity: 0; }
.swiper-banner:hover .swiper-banner-prev, .swiper-banner:hover .swiper-banner-next { opacity: 1; }
.swiper-banner-prev:hover, .swiper-banner-next:hover { background: rgba(255,255,255,0.3); }
.swiper-banner-prev { left: 16px; }
.swiper-banner-next { right: 16px; }

/* ===== 加载更多 ===== */
.load-more {
  text-align: center;
  padding: 20px 0;
}
.load-more .btn { min-width: 160px; }

/* Infinite scroll spinner */
.infinite-spinner {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== 抽屉菜单 ===== */
.drawer-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 999;
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 280px; background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform 0.3s ease;
  overflow-y: auto; display: flex; flex-direction: column;
  z-index: 1000;
}
.drawer-overlay.open .drawer { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-close {
  color: var(--text-muted); font-size: 20px;
  text-decoration: none; cursor: pointer; line-height: 1;
  transition: color 0.2s;
}
.drawer-close:hover { color: var(--text-primary); }
.drawer-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-primary);
  font-size: 18px; font-weight: 700;
}
.drawer-logo img { border-radius: 8px; }
.drawer-sidebb { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.drawer-ui { list-style: none; padding: 0; margin: 0; }

.drawer-item { border-bottom: 1px solid rgba(255,255,255,0.03); }
.drawer-item-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; color: var(--text-secondary);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: all 0.2s; cursor: pointer;
}
.drawer-item-link:hover { background: var(--bg-card); color: var(--text-primary); }
.drawer-item-link .drawer-icon { font-size: 18px; flex-shrink: 0; }
.drawer-item-link .drawer-arrow {
  margin-left: auto; font-size: 12px; transition: transform 0.3s;
  color: var(--text-muted);
}
.drawer-item-link.open .drawer-arrow { transform: rotate(180deg); }

/* 抽屉子菜单 */
.drawer-submenu { list-style: none; padding: 0; margin: 0; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.drawer-submenu.open { max-height: 800px; }
.drawer-submenu .child-item { border-top: 1px solid rgba(255,255,255,0.02); }
.drawer-submenu .child-item a {
  display: block; padding: 10px 20px 10px 52px;
  color: var(--text-muted); text-decoration: none;
  font-size: 13px; transition: all 0.2s;
}
.drawer-submenu .child-item a:hover { color: var(--text-primary); background: var(--bg-card); }

/* 抽屉底部菜单 */
.drawer-bottom-menu { margin-top: 8px; }
.drawer-actions {
  padding: 16px 20px; display: flex; gap: 10px;
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.drawer-actions .btn { flex: 1; text-align: center; padding: 10px; text-decoration: none; }

/* ===== 右侧面板 ===== */
.right-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px; background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  overflow-y: auto; padding: 16px 12px 150px;
  z-index: 50;
}
.panel-section { margin-bottom: 20px; }
.panel-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.panel-loading { color: var(--text-muted); font-size: 13px; text-align: center; padding: 20px 0; }

/* 面板歌曲列表 */
.song-list, .ranked-list { display: flex; flex-direction: column; gap: 2px; }
.panel-song-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 8px; cursor: pointer;
  transition: all 0.2s; text-decoration: none; color: inherit;
}
.panel-song-item:hover { background: var(--bg-card); }
.panel-song-cover {
  width: 44px; height: 44px; border-radius: 6px;
  object-fit: cover; flex-shrink: 0;
  background: rgba(108,92,231,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text-muted);
}
.panel-song-info { flex: 1; min-width: 0; }
.panel-song-title {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel-song-artist {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel-song-meta {
  font-size: 10px; color: var(--text-muted); margin-top: 2px;
}

/* 排行列表 */
.ranked-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 8px; cursor: pointer;
  transition: all 0.2s;
}
.ranked-item:hover { background: var(--bg-card); }
.rank-badge {
  width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  color: #fff;
}
.rank-badge.r1 { background: linear-gradient(135deg, #f39c12, #e74c3c); }
.rank-badge.r2 { background: linear-gradient(135deg, #bdc3c7, #95a5a6); }
.rank-badge.r3 { background: linear-gradient(135deg, #cd6133, #e67e22); }
.rank-badge.rn { background: rgba(255,255,255,0.08); color: var(--text-muted); }


/* ===== VIP 锁样式 ===== */
.btn-action.download-btn.locked {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-action.download-btn.locked:hover {
  opacity: 0.7;
  background: rgba(255, 193, 7, 0.15);
}
.btn-action.download-btn.locked svg {
  stroke: #ffc107;
}

.quality-selector option[style] {
  font-weight: 500;
}

/* Toast warn 类型 */
.toast.warn {
  background: linear-gradient(135deg, #e17055, #f39c12);
  color: #fff;
}

/* ===== 全局触摸优化 ===== */
@media (pointer: coarse) {
  .btn, .btn-sm, .btn-icon, .btn-control, .btn-action, .btn-primary, .btn-secondary,
  .nav-item, .folder-item, .genre-item, .music-card, .panel-song-item, .ranked-item,
  .vctrl-btn, .drawer-item-link, .recharge-item, .vip-price-item, .paytype-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}

/* ===== iPhone 底部安全区适配 ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .player {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
  @media (max-width: 768px) {
    .main {
      padding-bottom: calc(196px + env(safe-area-inset-bottom));
    }
    .mobile-bottom-nav {
      padding-bottom: env(safe-area-inset-bottom);
    }
  }
}

/* ==============================
   移动端底部导航栏
   ============================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 200;
  justify-content: space-around;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 768px) {
  .mobile-bottom-nav { display: flex; }
}

.mbn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  min-width: 60px;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
}
.mbn-item.active {
  color: var(--accent-light);
}
.mbn-item.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-light);
}
.mbn-icon {
  font-size: 20px;
  line-height: 1;
}
.mbn-label {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

/* ===== 下拉刷新指示器 ===== */
.pull-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 500;
  overflow: hidden;
  background: var(--bg-primary);
  transition: height 0.15s ease;
}
.pull-indicator.pulling { height: 50px; }
.pull-indicator.releasing { height: 50px; }
.pull-indicator.refreshing { height: 50px; }
.pull-icon {
  font-size: 20px;
  transition: transform 0.2s;
  color: var(--text-muted);
}
.pull-indicator.releasing .pull-icon { transform: rotate(180deg); }
.pull-indicator.refreshing .pull-icon {
  animation: spin 0.8s linear infinite;
  content: '⟳';
}
.pull-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== 触摸波纹效果 ===== */
.ripple-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
}
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(108, 92, 231, 0.25);
  transform: scale(0);
  animation: ripple 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ===== 骨架屏 ===== */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 6px;
}
.skeleton-avatar {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
}
.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-line {
  height: 12px;
  border-radius: 4px;
}
.skeleton-line.short { width: 50%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 90%; }
.skeleton-actions {
  display: flex;
  gap: 8px;
}
.skeleton-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

/* ===== 音乐卡片触摸优化 ===== */
@media (max-width: 768px) {
  .music-card {
    position: relative;
    overflow: hidden;
  }
  /* 左右滑动区域指示 */
  .music-card::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    transition: width 0.15s ease;
    pointer-events: none;
  }
  .music-card.swiping-left::after {
    right: 0;
    width: 80px;
    background: linear-gradient(to left, rgba(231, 76, 60, 0.15), transparent);
  }
  .music-card.swiping-right::after {
    left: 0;
    width: 80px;
    background: linear-gradient(to right, rgba(46, 204, 113, 0.15), transparent);
  }
  /* 隐藏非核心操作按钮 */
  .music-card-actions .btn-action:nth-child(4),
  .music-card-actions .btn-action:nth-child(5) {
    display: none;
  }

  /* 搜索提示 */
  .search-hint {
    margin: 0 -14px 8px;
    padding: 8px 14px;
    border-radius: 0;
  }
}

/* ===== 播放器滑动切歌区域 ===== */
.player-swipe-area {
  display: none;
}
.player-swipe-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: var(--accent-light);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 10;
}
.player-swipe-hint.prev { left: 16px; }
.player-swipe-hint.next { right: 16px; }
.player-swipe-hint.visible { opacity: 0.7; }

/* ===== 防止移动端意外文本选中 ===== */
@media (pointer: coarse) {
  .nav-item, .folder-item, .genre-item, .music-card,
  .music-card-title, .music-card-meta, .header h1,
  .panel-song-item, .ranked-item, .drawer-item-link,
  .mbn-item, .section-header h2, .player-title, .player-artist,
  .btn, .btn-sm, .btn-action, .btn-control, .vctrl-btn {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  input, textarea, .search-input {
    -webkit-user-select: text;
    user-select: text;
  }
}

/* ===== 滚动性能优化 ===== */
.music-list, .sidebar, .right-panel, .drawer {
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
}
.music-list.grid-view .music-card {
  will-change: transform;
  transform: translateZ(0);
}
.player {
  will-change: transform;
  transform: translateZ(0);
}

/* ===== 移动端进度条增强 ===== */
@media (max-width: 768px) {
  .player-progress .progress-track {
    height: 8px;
    border-radius: 4px;
    cursor: pointer;
    touch-action: none;
  }
  .player-progress .progress-played {
    border-radius: 4px;
  }
  .player-progress .progress-thumb {
    width: 20px;
    height: 20px;
    box-shadow: 0 0 6px rgba(108,92,231,0.5);
    opacity: 1;
  }
  .video-progress-track {
    height: 8px;
  }
  .video-progress-thumb {
    width: 18px;
    height: 18px;
  }
}

/* ===== 全局触摸反馈 ===== */
@media (pointer: coarse) {
  .btn:active, .btn-sm:active, .btn-action:active,
  .btn-control:active, .btn-primary:active, .btn-secondary:active,
  .vctrl-btn:active {
    transform: scale(0.94);
  }
  .music-card:active {
    background: rgba(255,255,255,0.04);
  }
  .mbn-item:active {
    transform: scale(0.9);
  }
}

/* ===== 移动端输入框优化 ===== */
@media (max-width: 768px) {
  input, textarea, select, .form-control {
    font-size: 16px !important; /* 防止iOS自动缩放 */
  }
  .search-input {
    font-size: 16px !important;
  }
}

/* ===== 弹窗关闭手势 ===== */
@media (max-width: 768px) {
  .modal-overlay {
    touch-action: none;
  }
  .modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 8px auto 4px;
  }
}

/* ===== 移动端底部导航栏与播放器层次 ===== */
@media (max-width: 768px) {
  .player {
    bottom: 56px; /* 为底部导航留空间 */
    z-index: 100;
  }
  .main {
    padding-bottom: 196px; /* player height + bottom nav */
  }
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .player {
      bottom: calc(56px + env(safe-area-inset-bottom));
    }
  }
}

/* ===== 音乐卡片长按菜单 (移动端) ===== */
.music-card-longpress-menu {
  position: fixed;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  z-index: 1100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
}
.music-card-longpress-menu .lp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.music-card-longpress-menu .lp-item:active {
  background: rgba(255,255,255,0.08);
}
.music-card-longpress-menu .lp-item.danger {
  color: var(--danger);
}
