/* ==================== 基础样式 - 移动优先设计 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  border: none;
  outline: none;
  display: block;
}

:root {
  /* 主题色 */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-rgb: 99, 102, 241;

  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  --gradient-dark: linear-gradient(180deg, #0f0f23 0%, #1a1a2e 100%);

  /* 背景色 */
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-elevated: rgba(255, 255, 255, 0.1);

  /* 文字色 */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --text-muted: rgba(255, 255, 255, 0.3);

  /* 边框 */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* 安全区域 */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* 播放器高度 */
  --player-bar-height: 72px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
}

/* ==================== App 容器 ==================== */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--safe-area-top);
  overflow: hidden;
  max-width: 430px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 0;
  transition: padding-bottom 0.3s ease;
}

/* 当播放栏显示时，给主内容区域添加底部padding */
.app.player-visible .main-content {
  padding-bottom: calc(var(--player-bar-height) + var(--safe-area-bottom));
}

/* ==================== 搜索头部 ==================== */
.search-header {
  position: relative;
  z-index: 100;
  background: var(--bg-primary);
  padding: 12px 16px 8px;
  flex-shrink: 0;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
  transition: var(--transition-normal);
  flex: 1;
  min-width: 0;
}

.search-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* 搜索框返回按钮 */
.search-back-btn {
  width: 20px;
  height: 28px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  margin-left: -8px;
  margin-right: -4px;
  padding: 0;
}

.search-back-btn:hover {
  background: var(--bg-elevated);
}

.search-back-btn:active {
  transform: scale(0.9);
}

/* 下拉选择器通用样式 */
.source-dropdown,
.type-dropdown {
  position: relative;
  flex-shrink: 0;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 8px 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.dropdown-trigger:hover {
  background: var(--bg-elevated);
}

.dropdown-trigger .iconfont {
  font-size: 20px;
}

/* SVG Symbol 图标样式 - 支持多色图标 */
.svg-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}

.svg-icon.source-icon {
  width: 20px;
  height: 20px;
}

.dropdown-item .svg-icon.source-icon {
  width: 18px;
  height: 18px;
}

/* 音源图标颜色 - 来自 CeruMusic iconfont.js SVG 定义 */
.iconfont.icon-wy, .iconfont.icon-wangyiyun { color: #EA3E3C !important; }
.iconfont.icon-tx, .iconfont.icon-QQmusic { color: #02B053 !important; }
.iconfont.icon-kg, .iconfont.icon-kugouyinle { color: #2F94FD !important; }
.iconfont.icon-kw { color: #F4D329 !important; }
.iconfont.icon-mg { color: #CE046D !important; }

.dropdown-arrow {
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
}

.source-dropdown.open .dropdown-arrow,
.type-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 140px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.source-dropdown.open .dropdown-menu,
.type-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-secondary);
}

.dropdown-item:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dropdown-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.dropdown-item.active {
  background: rgba(var(--primary-rgb), 0.15);
}

.dropdown-item .iconfont {
  font-size: 18px;
}

.dropdown-item span {
  font-size: 14px;
}

/* 搜索类型切换按钮 */
.type-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.type-toggle-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.type-toggle-btn.active {
  color: var(--primary-light);
  background: rgba(var(--primary-rgb), 0.15);
}

.type-toggle-btn .iconfont {
  font-size: 20px;
}

/* 清除搜索按钮 */
.clear-search-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.clear-search-btn:hover {
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.search-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

#searchInput {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  padding: 12px;
  outline: none;
  min-width: 0;
}

#searchInput::placeholder {
  color: var(--text-tertiary);
}

.search-submit-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
}

.search-submit-btn:active {
  transform: scale(0.95);
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
}

.filter-tabs {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
}

.filter-tab {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.filter-tab.active {
  background: var(--gradient-primary);
  color: white;
}

.source-select-wrapper {
  position: relative;
}

.source-select {
  appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 14px;
  padding: 8px 32px 8px 16px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='rgba(255,255,255,0.7)'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.source-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* 搜索下拉框 */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 1000;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== 结果区域 ==================== */
.results-section {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 16px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  position: relative;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: var(--text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.app-logo {
  font-size: 72px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  letter-spacing: 8px;
}

.empty-hint {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* 结果列表 */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.song-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
}

.song-item:active {
  background: var(--bg-card-hover);
  transform: scale(0.98);
}

.song-item-cover {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: none;
}

.song-item-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  border: none;
  outline: none;
  border-radius: inherit;
}

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

.song-item-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  display: inline;
}

.song-item-artist {
  font-size: 13px;
  color: var(--text-secondary);
  display: inline;
}

.song-item-artist::before {
  content: " - ";
  color: var(--text-tertiary);
}

.song-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.action-btn:active {
  transform: scale(0.9);
}

.action-btn.primary {
  background: var(--gradient-primary);
  color: white;
}

/* ==================== 分页 ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-btn:not(:disabled):active {
  background: var(--primary);
  transform: scale(0.95);
}

.page-numbers {
  display: flex;
  gap: 4px;
}

.page-number {
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.page-number.active {
  background: var(--gradient-primary);
  color: white;
}

/* ==================== 底部播放器控制栏 ==================== */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  z-index: 1000;
  padding-bottom: var(--safe-area-bottom);
  display: none;
}

.player-bar-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.progress-track {
  position: relative;
  height: 100%;
  background: var(--bg-elevated);
  overflow: visible;
}

.progress-track input[type="range"] {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 20px;
  transform: translateY(-50%);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.progress-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.progress-track input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
}

.player-bar-content {
  display: flex;
  align-items: center;
  padding: 8px 16px 12px;
  gap: 12px;
}

.player-song-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.song-cover {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.song-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  border: none;
  outline: none;
  border-radius: inherit;
}

.cover-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

.song-meta {
  flex: 1;
  min-width: 0;
}

.song-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.song-artist {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.control-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.control-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.control-btn:not(:disabled):active {
  transform: scale(0.9);
}

.control-btn.play-btn {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.control-btn.play-btn svg {
  width: 26px;
  height: 26px;
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-display {
  font-size: 12px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  display: none;
}

.time-sep {
  margin: 0 2px;
}

/* ==================== 播放主面板 (全屏) ==================== */
.playback-panel {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  height: 100%;
  background: var(--gradient-dark);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: var(--safe-area-top) 0 var(--safe-area-bottom) 0;
}

.playback-panel.show {
  transform: translateX(-50%) translateY(0);
}

.playback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  flex-shrink: 0;
}

.header-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.header-btn:active {
  transform: scale(0.9);
}

.playback-header-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

.playback-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 24px 24px;
  overflow-y: auto;
}

.playback-cover-section {
  display: flex;
  justify-content: center;
  padding: 16px 0 24px;
}

.playback-cover-wrapper {
  width: 260px;
  height: 260px;
  border-radius: var(--radius-xl);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.playback-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playback-cover-placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.playback-info-section {
  text-align: center;
  margin-bottom: 16px;
}

.playback-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playback-artist {
  font-size: 15px;
  color: var(--text-secondary);
}

.playback-lyric-section {
  flex: 1;
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 24px;
  padding: 24px 16px 16px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
  /* 歌词顶部和底部渐变消失效果 - 模仿 CeruMusic */
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 5%,
    rgb(255, 255, 255) 15%,
    rgb(255, 255, 255) 75%,
    rgba(255, 255, 255, 0.6) 85%,
    rgba(255, 255, 255, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 5%,
    rgb(255, 255, 255) 15%,
    rgb(255, 255, 255) 75%,
    rgba(255, 255, 255, 0.6) 85%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* 当 playback-lyric-section 同时有 playback-lyric-full 类时 */
.playback-lyric-section.playback-lyric-full {
  max-height: none;
  margin-bottom: 0;
}

.lyric-placeholder {
  text-align: center;
  color: var(--text-tertiary);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
}

.lyric-line {
  padding: 8px 0;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 15px;
  transition: var(--transition-normal);
  cursor: pointer;
}

.lyric-line.active {
  color: var(--primary-light);
  font-size: 17px;
  font-weight: 500;
}

.playback-controls-section {
  flex-shrink: 0;
}

.playback-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.time-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}

.playback-progress .progress-track {
  flex: 1;
  height: 6px;
}

.playback-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.play-btn-large {
  width: 72px;
  height: 72px;
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.playback-volume {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
}

.playback-volume svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.playback-volume input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-elevated);
  border-radius: 2px;
  outline: none;
}

.playback-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.playback-volume input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* ==================== 播放列表侧边栏 ==================== */
.playlist-panel {
  position: absolute;
  top: 70px;
  right: 0;
  bottom: calc(var(--player-bar-height) + var(--safe-area-bottom) + 20px);
  width: 80%;
  max-width: 360px;
  background: var(--bg-secondary);
  z-index: 2600;
  display: none;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.playlist-panel.show {
  display: flex;
  animation: playlistSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.playlist-panel.hiding {
  display: flex;
  animation: playlistSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes playlistSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes playlistSlideOut {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.playlist-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.playlist-title span {
  color: var(--text-tertiary);
  font-weight: 400;
}

.playlist-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.text-btn:active {
  color: var(--primary);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:active {
  transform: scale(0.9);
}

.playlist-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.empty-playlist {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  color: var(--text-tertiary);
  text-align: center;
}

.empty-playlist svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  border-bottom: 1px solid var(--border-light);
}

.playlist-item:active {
  background: var(--bg-card);
}

.playlist-item.active {
  background: var(--bg-card);
}

.playlist-item.active .playlist-item-title {
  color: var(--primary-light);
}

/* 拖动图标 - 已隐藏 */
.playlist-item-drag {
  display: none;
}

.playlist-item-index {
  width: 24px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  flex-shrink: 0;
}

.playlist-item.active .playlist-item-index {
  color: var(--primary-light);
}

/* 正在播放样式 */
.playlist-item.playing {
  background: rgba(var(--primary-rgb), 0.1);
}

.playlist-item.playing .playlist-item-title {
  color: var(--primary-light);
}

.playlist-item.playing .playlist-item-artist {
  color: var(--primary);
}

/* 播放动画图标 */
.playlist-item-playing-icon {
  width: 24px;
  height: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
}

.playlist-item-playing-icon .playing-bar {
  width: 3px;
  background: var(--primary-light);
  border-radius: 2px;
  animation: playing-bar-animation 1s ease-in-out infinite;
}

.playlist-item-playing-icon .playing-bar:nth-child(1) {
  height: 60%;
  animation-delay: 0s;
}

.playlist-item-playing-icon .playing-bar:nth-child(2) {
  height: 100%;
  animation-delay: 0.2s;
}

.playlist-item-playing-icon .playing-bar:nth-child(3) {
  height: 40%;
  animation-delay: 0.4s;
}

@keyframes playing-bar-animation {
  0%, 100% {
    height: 40%;
  }
  50% {
    height: 100%;
  }
}

/* 暂停时停止动画 */
.playlist-item.paused .playing-bar {
  animation-play-state: paused;
}

/* 拖动排序样式 */
.playlist-item.dragging {
  opacity: 0.5;
  background: var(--bg-card);
}

.playlist-item.drag-over-top {
  border-top: 2px solid var(--primary);
}

.playlist-item.drag-over-bottom {
  border-bottom: 2px solid var(--primary);
}

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

.playlist-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.playlist-item-artist {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.playlist-item-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: var(--transition-fast);
}

.playlist-item:hover .playlist-item-btn,
.playlist-item:active .playlist-item-btn {
  opacity: 1;
}

.playlist-item-btn.download-btn:hover {
  color: var(--primary-light);
}

.playlist-item-btn.download-btn:active {
  transform: scale(0.9);
}

.playlist-item-btn.download-btn.loading {
  opacity: 0.5;
  pointer-events: none;
}

.playlist-item-btn.remove-btn:hover {
  color: #ef4444;
}

.playlist-item-btn.remove-btn:active {
  color: #ef4444;
  transform: scale(0.9);
}

.playlist-item-remove {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.playlist-item:hover .playlist-item-remove,
.playlist-item:active .playlist-item-remove {
  opacity: 1;
}

.playlist-item-remove:active {
  color: #ef4444;
  transform: scale(0.9);
}

/* 播放列表回到顶部按钮 - 已隐藏 */
.playlist-back-to-top {
  display: none;
}

/* 播放列表项高亮动画 */
.playlist-item.highlight {
  animation: highlight-pulse 1s ease;
}

@keyframes highlight-pulse {
  0%, 100% {
    background: transparent;
  }
  50% {
    background: rgba(var(--primary-rgb), 0.3);
  }
}

/* ==================== 模态框 ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px;
  padding-bottom: calc(24px + var(--safe-area-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  border: none;
}

.modal-btn.primary {
  background: var(--gradient-primary);
  color: white;
}

.modal-btn.secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.modal-btn.ghost {
  background: transparent;
  color: var(--text-secondary);
}

.modal-btn:active {
  transform: scale(0.98);
}

/* ==================== Toast 消息 ==================== */
#toast-container {
  position: fixed;
  top: calc(16px + var(--safe-area-top));
  left: 16px;
  right: 16px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== 搜索建议/历史样式 ==================== */
.search-suggest-list,
.search-history-list {
  padding: 8px;
}

.suggest-item,
.search-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.suggest-item:active,
.suggest-item.selected,
.search-history-item:active {
  background: var(--bg-card);
}

.suggest-icon,
.history-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.suggest-content,
.history-content {
  flex: 1;
  min-width: 0;
}

.suggest-name,
.history-text {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-artist {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.history-delete {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.search-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.search-history-title {
  font-size: 13px;
  color: var(--text-tertiary);
}

.search-history-clear {
  font-size: 13px;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
}

/* ==================== 歌单项样式 ==================== */
.playlist-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
}

.playlist-result-item:active {
  background: var(--bg-card-hover);
  transform: scale(0.98);
}

.playlist-result-cover {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: none;
}

.playlist-result-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  border: none;
  outline: none;
  border-radius: inherit;
}

.playlist-cover-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

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

.playlist-result-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  margin-bottom: 4px;
}

.playlist-result-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==================== 桌面端响应式 - 已禁用，始终使用手机版样式 ==================== */
/*
@media (min-width: 768px) {
  :root {
    --player-bar-height: 80px;
  }

  .main-content {
    padding: 24px;
    padding-bottom: calc(var(--player-bar-height) + 24px);
    max-width: 1200px;
    margin: 0 auto;
  }

  .search-header {
    margin: -24px -24px 24px -24px;
    padding: 24px;
  }

  .search-input-group {
    max-width: 600px;
  }

  .filter-bar {
    max-width: 600px;
  }

  .song-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }

  .player-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px 16px;
  }

  .player-song-info {
    max-width: 300px;
  }

  .time-display {
    display: flex;
  }

  .playback-body {
    flex-direction: row;
    align-items: flex-start;
    padding: 24px 48px;
    gap: 48px;
  }

  .playback-cover-section {
    flex-shrink: 0;
  }

  .playback-cover-wrapper {
    width: 320px;
    height: 320px;
  }

  .playback-info-section {
    text-align: left;
  }

  .playback-lyric-section {
    max-height: 300px;
  }

  .playback-controls-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .playlist-panel {
    width: 400px;
  }

  .playlist-item-remove {
    opacity: 0.5;
  }

  .playlist-item:hover .playlist-item-remove {
    opacity: 1;
  }

  .modal {
    align-items: center;
  }

  .modal-content {
    border-radius: var(--radius-xl);
    max-width: 420px;
  }
}
*/

/* ==================== 大屏幕多列布局 - 已禁用 ==================== */
/*
@media (min-width: 1024px) {
  .results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
  }

  .playback-cover-wrapper {
    width: 360px;
    height: 360px;
  }

  .playback-title {
    font-size: 24px;
  }

  .playback-artist {
    font-size: 16px;
  }
}
*/

/* ==================== 小屏幕优化 ==================== */
@media (max-width: 374px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-tabs {
    width: 100%;
  }

  .filter-tab {
    flex: 1;
    text-align: center;
  }

  .source-select-wrapper {
    width: 100%;
  }

  .source-select {
    width: 100%;
  }

  .player-bar-content {
    gap: 8px;
  }

  .song-cover {
    width: 40px;
    height: 40px;
  }

  .control-btn {
    width: 40px;
    height: 40px;
  }

  .control-btn.play-btn {
    width: 48px;
    height: 48px;
  }

  .playback-cover-wrapper {
    width: 200px;
    height: 200px;
  }
}

/* ==================== 横屏模式 ==================== */
@media (max-width: 768px) and (orientation: landscape) {
  .playback-body {
    flex-direction: row;
    padding: 16px 24px;
    gap: 24px;
  }

  .playback-cover-section {
    padding: 0;
  }

  .playback-cover-wrapper {
    width: 140px;
    height: 140px;
  }

  .playback-lyric-section {
    max-height: 100px;
  }

  .playback-buttons {
    gap: 16px;
    margin-bottom: 16px;
  }

  .play-btn-large {
    width: 56px;
    height: 56px;
  }
}

/* ==================== 深色模式滚动条 ==================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ==================== 选择文本样式 ==================== */
::selection {
  background: var(--primary);
  color: white;
}

/* ==================== 焦点样式 ==================== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==================== 禁用状态 ==================== */
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ==================== 动画 ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==================== 工具类 ==================== */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== 加载更多 ==================== */
.loading-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ==================== 歌曲项可点击区域 ==================== */
.song-item-cover.clickable,
.song-item-info.clickable {
  cursor: pointer;
}

.song-item-cover {
  position: relative;
}

.cover-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
}

.song-item-cover.clickable:hover .cover-play-overlay {
  opacity: 1;
}

/* ==================== 歌曲操作按钮美化 ==================== */
.song-action-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  color: var(--text-secondary);
}

.song-action-btn.add-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.song-action-btn.add-btn:hover {
  color: var(--primary-light);
  transform: scale(1.2);
}

.song-action-btn.add-btn:active {
  transform: scale(0.95);
}

.song-action-btn.download-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.song-action-btn.download-btn:hover {
  color: var(--primary-light);
  transform: scale(1.2);
}

.song-action-btn.download-btn:active {
  transform: scale(0.95);
}

/* ==================== 歌单操作按钮 ==================== */
.playlist-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
}

.playlist-result-item:hover {
  background: var(--bg-card-hover);
}

.playlist-result-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.playlist-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.playlist-action-btn.view-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(96, 165, 250, 0.15) 100%);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.playlist-action-btn.view-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.3) 100%);
  border-color: #3b82f6;
  transform: scale(1.1);
}

.playlist-action-btn.play-all-btn {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(129, 140, 248, 0.15) 100%);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.playlist-action-btn.play-all-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(129, 140, 248, 0.3) 100%);
  border-color: var(--primary);
  transform: scale(1.1);
}

/* ==================== 歌单详情页 ==================== */
.playlist-detail-header {
  padding: 12px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.playlist-detail-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.playlist-detail-cover {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.playlist-detail-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  border: none;
  outline: none;
  border-radius: inherit;
}

.playlist-detail-meta {
  flex: 1;
  min-width: 0;
}

.playlist-detail-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.playlist-detail-meta h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-detail-meta p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.playlist-detail-count-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 播放全部小图标按钮 */
.playlist-play-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.playlist-play-icon-btn:hover {
  transform: scale(1.1);
}

.playlist-play-icon-btn:active {
  transform: scale(0.95);
}

/* ==================== Toast 消息增强 ==================== */
.toast-message {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-message::before {
  content: '';
  width: 4px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.toast-message.success::before {
  background: #10b981;
}

.toast-message.error::before {
  background: #ef4444;
}

.toast-message.info::before {
  background: #3b82f6;
}

.toast-message.warning::before {
  background: #f59e0b;
}

/* ==================== 简化播放面板 ==================== */
.playback-body-simple {
  display: flex;
  flex-direction: column;
  padding: 0 24px 24px;
  overflow-y: auto;
}

.playback-body-simple .playback-info-section {
  text-align: center;
  padding: 24px 0;
  flex-shrink: 0;
}

.playback-body-simple .playback-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

.playback-body-simple .playback-artist {
  font-size: 16px;
}

.playback-lyric-full {
  flex: 1;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
}

.playback-lyric-full .playback-lyric-item {
  padding: 12px 0;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 16px;
  line-height: 1.6;
  transition: var(--transition-normal);
  cursor: pointer;
}

.playback-lyric-full .playback-lyric-item:hover {
  color: var(--text-secondary);
}

.playback-lyric-full .playback-lyric-item.active {
  color: var(--primary-light);
  font-size: 18px;
  font-weight: 500;
}

.playback-lyric-full .playback-lyric-item.empty {
  color: var(--text-tertiary);
  padding: 48px 0;
}

/* ==================== 歌单可点击样式 ==================== */
.playlist-result-item.clickable {
  cursor: pointer;
}

.playlist-result-item.clickable:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

/* ==================== 文字滚动效果 ==================== */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-text {
  display: inline-block;
}

.marquee-container.overflow .marquee-text {
  animation: marquee 10s linear infinite;
}

.marquee-container.overflow:hover .marquee-text {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  45% {
    transform: translateX(-100%);
  }
  45.01% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0%);
  }
}

/* ==================== 歌曲选择效果 ==================== */
.song-item {
  transition: var(--transition-normal);
  border: 2px solid transparent;
}

.song-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
}

.song-item.selected,
.song-item:active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
}

/* ==================== 按钮点击效果 ==================== */
.song-action-btn {
  position: relative;
  overflow: hidden;
}

.song-action-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.song-action-btn:active::after {
  width: 100px;
  height: 100px;
}

/* 按钮加载状态 */
.song-action-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* 下载按钮加载时不旋转 */
.song-action-btn.download-btn.loading svg {
  animation: none;
}

/* 添加按钮成功动画 */
.song-action-btn.add-btn.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(52, 211, 153, 0.3) 100%);
  border-color: #10b981;
}

.song-action-btn.add-btn.success svg {
  animation: bounceIn 0.3s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0.5); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ==================== 播放控制按钮修复 ==================== */
.control-btn {
  color: var(--text-primary);
  opacity: 1;
  transition: var(--transition-fast);
}

.control-btn:hover {
  color: var(--primary-light);
  transform: scale(1.1);
}

.control-btn:active {
  transform: scale(0.95);
}

/* 播放/暂停按钮 - 确保图标是白色 */
.control-btn.play-btn {
  color: white !important;
}

.control-btn.play-btn:hover {
  color: white !important;
  transform: scale(1.1);
}

.control-btn.play-btn svg {
  fill: white;
}

/* 上一曲/下一曲按钮 - 确保图标是白色 */
#prevBtn,
#nextBtn {
  color: white;
}

#prevBtn svg,
#nextBtn svg {
  fill: white;
}

#prevBtn:not(:disabled):hover,
#nextBtn:not(:disabled):hover {
  color: white;
  transform: scale(1.1);
}

#prevBtn:not(:disabled):active,
#nextBtn:not(:disabled):active {
  color: white;
  transform: scale(0.95);
}

/* 播放/暂停按钮 */
.play-btn-large {
  background: var(--gradient-primary);
  color: white;
}

/* ==================== 歌词界面美化 ==================== */
.playback-panel {
  background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(15, 15, 35, 0.98) 100%);
}

.playback-body-simple {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 24px 24px;
  overflow: hidden;
  position: relative;
}

/* 歌词页右下角播放列表按钮 - 与播放区域按钮样式一致 */
.playback-playlist-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.playback-playlist-btn:active {
  transform: scale(0.9);
}

/* header 占位符 */
.header-btn-placeholder {
  width: 40px;
  height: 40px;
}

.playback-body-simple .playback-info-section {
  text-align: center;
  padding: 32px 24px 24px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  margin-top: 12px;
  position: relative;
  min-height: 90px;
}

/* 关闭按钮放在左上角，无背景圆圈 */
.close-btn-corner {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  z-index: 10;
}

.close-btn-corner:hover {
  color: var(--text-primary);
}

.close-btn-corner:active {
  transform: scale(0.9);
}

.playback-body-simple .playback-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.playback-body-simple .playback-artist {
  font-size: 16px;
  color: var(--text-secondary);
}

.playback-body-simple .playback-lyric-section.playback-lyric-full {
  flex: 1;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto;
  padding: 50vh 24px;
  background: transparent;
  border-radius: 0;
  border: none;
  margin-bottom: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
}

/* 歌词顶部渐变遮罩 */
.playback-body-simple::before {
  content: '';
  position: absolute;
  top: 130px;
  left: 0;
  right: 0;
  height: 130px;
  background: linear-gradient(
    to bottom,
    rgba(15, 15, 35, 1) 0%,
    rgba(15, 15, 35, 0.8) 50%,
    rgba(15, 15, 35, 0) 100%
  );
  pointer-events: none;
  z-index: 10;
}

/* 歌词底部渐变遮罩 */
.playback-body-simple::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(
    to top,
    rgba(15, 15, 35, 1) 0%,
    rgba(15, 15, 35, 0.8) 50%,
    rgba(15, 15, 35, 0) 100%
  );
  pointer-events: none;
  z-index: 10;
}

.playback-lyric-full::-webkit-scrollbar {
  display: none;
}

.playback-lyric-full .playback-lyric-item {
  padding: 8px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  line-height: 1.5;
  transition: all 0.3s ease;
  cursor: pointer;
}

.playback-lyric-full .playback-lyric-item:hover {
  color: rgba(255, 255, 255, 0.7);
}

.playback-lyric-full .playback-lyric-item.active {
  color: white;
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
  transform: scale(1.02);
}

.playback-lyric-full .playback-lyric-item.empty {
  color: var(--text-tertiary);
  padding: 60px 0;
  font-size: 18px;
}

/* 歌词占位符 */
.lyric-placeholder {
  text-align: center;
  color: var(--text-tertiary);
  padding: 60px 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
}

/* 播放面板中的歌词占位符 - 基于整个播放面板垂直居中 */
.playback-lyric-full .lyric-placeholder {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0;
  min-height: auto;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
}

/* 暂无歌词 - 基于页面垂直居中 */
.playback-lyric-full .playback-lyric-item.empty {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
}

/* ==================== 回到顶部按钮 ==================== */
.back-to-top {
  position: fixed;
  bottom: calc(var(--player-bar-height) + 24px + var(--safe-area-bottom));
  right: calc(50% - 215px + 16px);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 900;
}

/* 小屏幕时使用普通定位 */
@media (max-width: 430px) {
  .back-to-top {
    right: 16px;
  }
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.back-to-top:active {
  transform: scale(0.95);
}

/* ==================== 图片懒加载样式 ==================== */
.lazy-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  border-radius: inherit;
  border: none;
  outline: none;
  background: transparent;
}

.lazy-image.lazy-loaded {
  opacity: 1;
}

.lazy-image.lazy-loading {
  opacity: 1;
}

.lazy-image.lazy-error {
  opacity: 0;
  display: none;
}
