* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: #0f0f1a;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
}

/* 页面容器 */
.page {
  padding-bottom: 70px; /* 留出底部播放栏高度 */
}

/* 顶部标题 */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0f0f1a;
  padding: 14px 16px;
  border-bottom: 1px solid #1e1e30;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: #e0aaff;
}

/* 音乐列表 */
.music-list {
  padding: 8px 0;
}

.music-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  border-bottom: 1px solid #1a1a2e;
  transition: background 0.15s;
}

.music-item:active {
  background: #1a1a2e;
}

.music-cover {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1e1e30;
}

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

.music-name {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-desc {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.add-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #e0aaff;
  padding: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-btn:active {
  background: #2a1a3e;
}

.add-btn.added {
  color: #aaa;
}

/* 加载更多 */
.load-more {
  text-align: center;
  padding: 16px;
  color: #666;
  font-size: 13px;
}

/* 底部播放栏 */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #1a1a2e;
  border-top: 1px solid #2a2a40;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 100;
}

.player-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.player-text {
  min-width: 0;
}

.player-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.player-desc {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-btn {
  background: none;
  border: none;
  color: #e0aaff;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.queue-btn:active {
  background: #2a1a3e;
}

/* 遮罩 */
.drawer-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}

.drawer-mask.show {
  display: block;
}

/* 抽屉 */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80vw;
  max-width: 320px;
  background: #1a1a2e;
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.drawer.show {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #2a2a40;
  font-size: 16px;
  font-weight: 600;
  color: #e0aaff;
  flex-shrink: 0;
}

.drawer-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.queue-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.queue-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 10px;
  border-bottom: 1px solid #1e1e30;
}

.queue-item.playing {
  background: #1e1040;
}

.queue-cover {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #0f0f1a;
}

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

.queue-name {
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-desc {
  font-size: 12px;
  color: #888;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-playing-tag {
  font-size: 11px;
  color: #e0aaff;
  flex-shrink: 0;
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 300;
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #1e1e30 25%, #2a2a40 50%, #1e1e30 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  border-bottom: 1px solid #1a1a2e;
}

.skeleton-cover {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  flex-shrink: 0;
}

.skeleton-info {
  flex: 1;
}

.skeleton-name {
  height: 15px;
  width: 60%;
  margin-bottom: 8px;
}

.skeleton-desc {
  height: 12px;
  width: 40%;
}

.in-queue-tag {
  font-size: 12px;
  color: #888;
  flex-shrink: 0;
  padding: 4px 8px;
}
