/* 新增旋转动画 */
@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 专辑封面容器 */
.album-cover {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1),
              0 0 0 4px rgba(0, 0, 0, 0.2),
              0 10px 20px rgba(0, 0, 0, 0.5);
  animation: rotate 30s linear infinite; /* 每分钟2转 = 30秒/转 */
  z-index: 1;
  
  /* 音乐图标样式 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: #5a189a;
  background: linear-gradient(135deg, #2a0a4a 0%, #3d0c6e 100%);
}

.album-image-container {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 深色主题样式 */
.dark-theme body {
    background: linear-gradient(135deg, #121212 0%, #1a1a1a 100%);
    color: #e0e0e0;
}

.dark-theme .header-content {
    background: rgba(30, 30, 30, 0.9);
}

.dark-theme .logo-icon {
    background: linear-gradient(135deg, #5a189a 0%, #7b2cbf 100%);
    color: #ffd700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.dark-theme .logo-text {
    background: linear-gradient(135deg, #9d4edd 0%, #c77dff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark-theme .search-container {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.dark-theme .search-input {
    background: #2d2d2d;
    color: #f0f0f0;
    border: 1px solid #444;
}

.dark-theme .search-input::placeholder {
    color: #aaa;
}

.dark-theme .search-btn {
    background: linear-gradient(135deg, #5a189a 0%, #7b2cbf 100%);
    color: #ffd700;
}

.dark-theme .search-btn:hover {
    background: linear-gradient(135deg, #4a147d 0%, #6a25a3 100%);
}

.dark-theme .hot-search-panel {
    background: #252525;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.dark-theme .hot-search-title {
    color: #c77dff;
}

.dark-theme .hot-tag {
    background: #3a3a3a;
    color: #d0d0d0;
}

.dark-theme .hot-tag:hover {
    background: #7b2cbf;
    color: #ffd700;
}

.dark-theme .player-section,
.dark-theme .results-section {
    background: rgba(40, 40, 40, 0.9);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
.dark-theme #loopBtn.active {
    background: #7b2cbf !important;
    color: #ffd700 !important;
}
.dark-theme .album-cover {
	 background: linear-gradient(135deg, #2a0a4a 0%, #3d0c6e 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    color: #9d4edd;
}

.dark-theme .song-title {
    color: #f0f0f0;
}

.dark-theme .song-artist {
    color: #aaa;
}

.dark-theme .lyrics-container {
    background: #2a2a2a;
}

.dark-theme .lyrics-content {
    color: #ccc;
}

.dark-theme .current-lyric {
    color: #c77dff;
}

.dark-theme .expand-lyrics {
    background: linear-gradient(to top, rgba(42, 42, 42, 0.9), transparent);
    color: #ffffff;
}

.dark-theme .progress-container {
    background: #333;
}

.dark-theme .progress-bar {
    background: linear-gradient(90deg, #7b2cbf 0%, #9d4edd 100%);
}

.dark-theme .time-info {
    color: #aaa;
}

.dark-theme .player-btn {
    background: #3a3a3a;
    color: #c77dff;
}

.dark-theme .player-btn:hover {
    background: #7b2cbf;
    color: #ffd700;
}

.dark-theme #volumeSlider {
    background: #333;
}

.dark-theme #volumeSlider::-webkit-slider-thumb {
    background: #9d4edd;
}

.dark-theme .results-header {
    color: #e0e0e0;
}

.dark-theme .result-item {
    border-bottom: 1px solid #333;
}

.dark-theme .result-item:hover {
    background: #2d2d2d;
}

.dark-theme .result-number {
    color: #9d4edd;
}

.dark-theme .result-title {
    color: #f0f0f0;
}

.dark-theme .result-artist {
    color: #aaa;
}

.dark-theme .result-songid {
    color: #888;
}

/* 深色主题当前播放歌曲高亮样式 */
.dark-theme .current-song {
    background: #3a1e5a !important;
    border-left: 4px solid #9d4edd !important;
}

/* 浅色主题当前播放歌曲高亮样式 */
.current-song {
    background: #f5edff !important;
    border-left: 4px solid #8e44ad !important;
}

.dark-theme footer p {
    color: #888;
}

/* 按钮禁用状态 */
.dark-theme .song-actions .action-btn:disabled {
    background: #2a2a2a;
    color: #555;
}

/* 操作按钮样式 */
.dark-theme .song-actions .action-btn {
    background: #3a3a3a;
    color: #c77dff;
}

.dark-theme .song-actions .action-btn:hover {
    background: #7b2cbf;
    color: #ffd700;
}

/* 循环按钮激活状态 */
.dark-theme .loop-btn.active {
    background: #7b2cbf;
    color: #ffd700;
}

/* 静音按钮状态 */
.dark-theme .mute-btn.muted {
    color: #ff6b6b;
}

/* 原有样式保持不变 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f9f8ff 0%, #eae6ff 100%);
    color: #333;
    min-height: 100vh;
    padding: 8px 0 15px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

/* 头部样式 */
header {
    padding: 10px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6a1b9a 0%, #8e44ad 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(106, 27, 154, 0.2);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #6a1b9a 0%, #8e44ad 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 搜索区域样式 */
.search-section {
    padding: 10px 0;
}

.search-box {
    width: 100%;
    position: relative;
}

.search-container {
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.15);
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    font-size: 14px;
    transition: all 0.3s ease;
    height: 40px;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: #aaa;
}

.search-btn {
    padding: 0 25px;
    background: linear-gradient(135deg, #6a1b9a 0%, #8e44ad 100%);
    color: #ffd700;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 40px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #5a1685 0%, #7d3c98 100%);
}

.hot-search-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-top: 8px;
    display: none;
    position: absolute;
    width: 100%;
    z-index: 10;
}

.hot-search-title {
    color: #6a1b9a;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: left;
}

.hot-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-tag {
    background: #f5edff;
    color: #412f1f;
    padding: 3px 5px;
    border-radius: 18px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hot-tag:hover {
    background: #8e44ad;
    color: #ffd700;
    transform: translateY(-2px);
}

/* 播放器样式 */
.player-section {
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 15px;
    margin: 10px 0;
}

.player-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    grid-template-rows: auto 1fr auto;
    grid-gap: 10px;
}

/* 歌曲信息 */
.song-info {
    grid-column: 2;
    grid-row: 1;
}

.song-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.song-title {
    font-size: 20px;
    margin-right: auto;
}

.song-actions {
    display: flex;
    gap: 6px;
}

.song-actions .action-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;   /* 图标大小 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f5edff;
    color: #8e44ad;
    border: none;
    transition: all 0.2s ease;
}


.song-actions .action-btn:hover {
    background: #8e44ad;
    color: #ffd700;
}

.song-actions .action-btn:disabled {
    background: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
}

.song-artist {
    color: #666;
    font-size: 14px;
}

/* 歌词容器 */
.lyrics-container {
    grid-column: 2;
    grid-row: 2;
    background: #f9f5ff;
    border-radius: 12px;
    padding: 15px;
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.4s ease;
    position: relative;
}

.lyrics-container.expanded {
    max-height: 350px;
}

.lyrics-content {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    white-space: pre-line;
    transition: all 0.3s ease;
    overflow: auto;
    max-height: 100%;
    padding: 5px;
    text-align: center;
}

.current-lyric {
    font-size: 20px;  /* 比普通歌词更大 */
    color: #8e44ad;   /* 高亮颜色 */
}

.expand-lyrics {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: right;
    background: linear-gradient(to top, rgba(249, 245, 255, 0.9), transparent);
    padding: 20px 0 5px 15px;
    cursor: pointer;
    color: #6a1b9a;
    font-weight: 400;
    font-size: 14px;
}

/* 播放器控件 */
.audio-player {
    grid-column: 1 / span 2;
    grid-row: 3;
    width: 100%;
    margin-top: 5px;
}

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 新增：进度条和时间信息容器 */
.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.progress-container {
    flex: 1;
    background: #eee6ff;
    height: 5px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    margin-bottom: 3px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6a1b9a 0%, #8e44ad 100%);
    width: 0%;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.time-info {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: #777;
    font-size: 16px;
    white-space: nowrap;
    gap: 5px;
    min-width: 80px;
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    margin-top: 5px;
}

.player-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f5edff;
    color: #8e44ad;
    font-size: 26px;
    border: none;
    transition: all 0.2s ease;
}

.player-btn:hover {
    background: #8e44ad;
    color: #ffd700;
    transform: scale(1.05);
}

/* 音量滑块 */
#volumeSlider {
    width: 70px;
    height: 5px;
    background: #eee6ff;
    outline: none;
    -webkit-appearance: none;
    border-radius: 3px;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8e44ad;
    cursor: pointer;
}

/* 搜索结果样式 */
.results-section {
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 15px;
    margin-bottom: 10px;
}

.results-header {
    margin-bottom: 10px;
}

.results-title {
    font-size: 18px;
    font-weight: 500;
    color: #c77dff;
}

.results-list {
    max-height: 400px;
    overflow-y: auto;
}

/* 搜索结果条目 - 紧凑布局 */
.result-item {
    display: flex;
    align-items: center;
    padding: 6px 6px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
    cursor: pointer;
    font-size: 16px;
    gap: 8px;
}

.result-item:hover {
    background: #f9f5ff;
    border-radius: 8px;
}

.result-number {
    min-width: 25px;
    text-align: center;
    font-weight: 600;
    color: #6a1b9a;
}

.result-details {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.result-title {
    font-size: 17px; 
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.result-artist {
    font-size: 15px; 
    color: #666;
    white-space: nowrap;
    min-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-songid {
    color: #888;
    font-size: 13px;
    min-width: 70px;
    text-align: right;
}

/* 页脚样式 */
footer {
    text-align: center;
    color: #888;
    font-size: 12px;
    padding: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .player-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }
    
    .album-cover {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        max-width: 160px;
        height: 160px;
        margin: 0 auto;
    }
    
    .song-info {
        grid-column: 1;
        grid-row: 2;
    }
    
    .lyrics-container {
        grid-column: 1;
        grid-row: 3;
    }
    
    .audio-player {
        grid-column: 1;
        grid-row: 4;
    }
    
    .time-info {
        font-size: 14px;
        min-width: 65px;
    }
    
    .result-item {
        flex-wrap: nowrap;
        padding: 8px;
    }
    
    .result-number {
        width: auto;
        text-align: left;
        flex-shrink: 0;
        margin-right: 8px;
    }
    
    .result-details {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        overflow: hidden;
        gap: 8px;
    }
    
    .result-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 0;
        flex: 1;
    }
    
    .result-artist {
        min-width: auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 0;
        max-width: 50%;
        color: #666;
        font-size: 13px;
    }
    
    .result-songid {
        display: none;
    }
    .hot-tag {
        font-size: 20px;  /* 增大字体 */
        padding: 3px 5px; /* 调整内边距 */
    }

    .dark-theme .hot-tag {
        font-size: 20px;  /* 深色模式同步调整 */
    }
}