* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 50%, #ffffff 100%);
  min-height: 100vh;
  padding: 12px;
  color: #111827;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-bottom: 40px;
  padding-top: 20px;
}

@media (max-width: 640px) {
  .container {
    gap: 32px;
    padding-top: 32px;
  }
}

/* 封面区域（上方居中） */
.cover-section {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

@media (max-width: 640px) {
  .cover-section {
    margin-top: 0;
  }
}

.cover-wrap {
  width: 280px;
  height: 280px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  flex-shrink: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

@media (min-width: 640px) {
  .cover-wrap {
    width: 320px;
    height: 320px;
  }
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* 播放时旋转动画 */
.cover-wrap.playing {
  animation: rotate 15s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 歌曲信息 */
.song-info-section {
  text-align: center;
  width: 100%;
  padding: 0 20px;
}

.song-info-section h2 {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
  word-break: break-word;
}

@media (min-width: 640px) {
  .song-info-section h2 {
    font-size: 26px;
  }
}

.song-info-section p {
  font-size: 14px;
  color: #6b7280;
}

/* 进度条 */
.progress-section {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .progress-section {
    margin-top: 12px;
  }
}

.time-text {
  font-size: 12px;
  color: #6b7280;
  min-width: 45px;
  text-align: center;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .time-text {
    font-size: 14px;
    min-width: 50px;
  }
}

.slider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #1d4ed8;
}

.slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: #1d4ed8;
}

/* 控制按钮区域 */
.control-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  padding: 0 20px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .control-section {
    gap: 28px;
    padding: 0 16px;
  }
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px;
  overflow: hidden;
  position: relative;
}

.icon-btn::before,
.icon-btn::after {
  display: none !important;
  content: none !important;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.icon-btn-large {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  font-size: 0 !important;
  line-height: 0 !important;
}

.icon-btn-large::before,
.icon-btn-large::after {
  display: none !important;
  content: none !important;
}

.icon-btn-large:hover {
  background: linear-gradient(135deg, #1d4ed8, #4338ca);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.icon {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.icon-btn-large .icon {
  width: 32px;
  height: 32px;
}

/* 确保按钮内只有SVG图标，隐藏所有文字内容 */
.icon-btn > *:not(.icon):not(svg) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  font-size: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* 播放按钮的图标切换 */
#play-btn {
  position: relative;
}

#play-btn .icon-play,
#play-btn .icon-pause {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

/* 默认状态：显示播放图标，隐藏暂停图标 */
#play-btn .icon-play {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#play-btn .icon-pause {
  display: block !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* 播放状态：隐藏播放图标，显示暂停图标 */
#play-btn.playing .icon-play {
  display: block !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

#play-btn.playing .icon-pause {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* 强制隐藏按钮内的所有文字节点 */
.icon-btn,
.icon-btn-large {
  text-transform: none !important;
  letter-spacing: 0 !important;
  word-spacing: 0 !important;
  text-shadow: none !important;
}

/* 确保SVG图标正常显示 */
.icon-btn svg,
.icon-btn-large svg,
.icon-btn .icon,
.icon-btn-large .icon {
  color: inherit !important;
  display: block !important;
}

/* 播放按钮的图标需要特殊处理，不在这里设置opacity和visibility */
.icon-btn:not(#play-btn) svg,
.icon-btn-large:not(#play-btn) svg,
.icon-btn:not(#play-btn) .icon,
.icon-btn-large:not(#play-btn) .icon {
  opacity: 1 !important;
  visibility: visible !important;
}

/* 对于使用fill的SVG */
.icon-btn svg[fill],
.icon-btn-large svg[fill] {
  fill: currentColor !important;
}

/* 对于使用stroke的SVG（如循环按钮） */
.icon-btn svg[stroke],
.icon-btn-large svg[stroke],
.icon-btn svg[fill="none"],
.icon-btn-large svg[fill="none"] {
  stroke: currentColor !important;
  fill: none !important;
}

/* 循环按钮特殊处理 */
#loop-btn svg {
  stroke: currentColor !important;
  fill: none !important;
}

/* 防止aria-label被显示 */
.icon-btn[aria-label]::before,
.icon-btn-large[aria-label]::before {
  content: '' !important;
  display: none !important;
}

/* 只隐藏非SVG、非图标的文字元素 */
.icon-btn > *:not(svg):not(.icon),
.icon-btn-large > *:not(svg):not(.icon) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  font-size: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  position: absolute !important;
  left: -9999px !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* 列表卡片 */
.list-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 20px 0 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.list-header {
  padding: 0 20px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.list-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.list-subtitle {
  font-size: 13px;
  color: #9ca3af;
}

.list-scroll {
  max-height: 50vh;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .list-scroll {
    max-height: 400px;
  }
}

.song-item {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f3f4f6;
}

.song-item:hover {
  background-color: #f9fafb;
}

.song-item.active {
  background-color: #eef2ff;
}

.song-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.song-index {
  width: 28px;
  font-size: 13px;
  color: #9ca3af;
  text-align: right;
  flex-shrink: 0;
}

.song-text {
  min-width: 0;
  flex: 1;
}

.song-text .name {
  font-size: 15px;
  color: #111827;
  font-weight: 500;
  word-break: break-word;
}

.song-text .meta {
  margin-top: 4px;
  font-size: 12px;
  color: #9ca3af;
}

.song-right {
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
  margin-left: 8px;
}

.playing-tag {
  font-size: 11px;
  color: #4f46e5;
  font-weight: 500;
}

/* 空状态 */
.empty {
  padding: 40px 32px 60px;
  text-align: center;
}

.empty-main {
  font-size: 16px;
  color: #111827;
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 13px;
  color: #9ca3af;
}

/* 状态提示 */
.status {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
  max-width: 90%;
  word-break: break-word;
  z-index: 1000;
}

@media (min-width: 640px) {
  .status {
    bottom: 20px;
    padding: 12px 24px;
    font-size: 14px;
    max-width: none;
  }
}

.status.show {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* 滚动条样式 */
.list-scroll::-webkit-scrollbar {
  width: 6px;
}

.list-scroll::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.list-scroll::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.list-scroll::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
