:root { --bg-color: #fff; --text-color: #000; --secondary-text-color: #666; --bg-secondary: #f9f9f9; --bg-hover: #f0f2f5; --bg-active: #e6f7ff; --shadow-color: rgba(0, 0, 0, 0.1); --playlist-bg: rgba(0, 0, 0, 0.05); }
@media (prefers-color-scheme:dark) {
:root { --bg-color: #1f1f1f; --text-color: #fff; --secondary-text-color: #999; --bg-secondary: #2f2f2f; --bg-hover: #3f3f3f; --bg-active: #1f4d79; --shadow-color: rgba(0, 0, 0, 0.3); --playlist-bg: rgba(255, 255, 255, 0.05); }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { padding-top: 285px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 14px; background-color: var(--bg-color); color: var(--text-color); -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none;     /* iOS Safari */ }
img, svg { max-width: 100%; max-height: 100%; pointer-events: none; -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-drag: none; }
img { object-fit: cover; vertical-align: top; }
h3 { font-size: 15px; }
.fixed-player-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: var(--bg-color); box-shadow: 0 2px 10px var(--shadow-color); }
.fixed-player-header-inner { max-width: 800px; margin: 0 auto; padding: 20px; }
.player-container { max-width: 800px; margin: 0 auto; padding: 20px; background: var(--bg-color); border-radius: 10px; }
.player-header-container { display: flex; gap: 10px; margin-bottom: 30px; }
.player-header { position: relative; width: 160px; flex-shrink: 0; }
.cover-image { width: 160px; height: 160px; border-radius: 8px; object-fit: cover; }
.player-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 3px 10px; background: rgba(0, 0, 0, 0.6); border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.song-title { font-size: 13px; height: 20px; text-align: center; font-weight: bold; color: white; line-height: 20px; padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; display: flex; align-items: center; justify-content: center; }
.lyrics-container { height: 160px; flex-grow: 1; font-size: 13px; background: var(--bg-secondary); border-radius: 8px; overflow: hidden; position: relative; padding: 10px; }
.lyrics-container::-webkit-scrollbar { width: 6px; }
.lyrics-container::-webkit-scrollbar-track { background: var(--bg-secondary); }
.lyrics-container::-webkit-scrollbar-thumb { background-color: #1890ff; border-radius: 3px; }
.lyrics-wrapper { overflow: hidden; height: 100%; }
.lyrics-line { text-align: center; padding: 5px 0; color: var(--secondary-text-color); transition: all 0.3s; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.lyrics-line.active { color: #1890ff; font-weight: bold; font-size: 15px; }
.playlist-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; margin-bottom: 10px; cursor: pointer; border-radius: 5px; background-color: var(--playlist-bg); transition: background-color 0.3s; min-height: 48px; }
.playlist-item:hover { background-color: var(--bg-hover); }
.playlist-item.active { background-color: var(--bg-active); }
.playlist-item img { width: 36px; height: 36px; border-radius: 50%; }
.playlist-item .item-left { display: flex; align-items: center; flex: 1; min-width: 0; gap: 10px; }
.playlist-item .song-name { font-size: 15px; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; display: flex; align-items: center; min-height: 36px; }
.playlist-item .duration { font-size: 12px; color: var(--secondary-text-color); }
.control-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 6px; border: none; font-size: 20px; margin: 0 10px; cursor: pointer; border-radius: 50%; transition: all 0.3s; background: #1890ff; color: white; box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3); }
.control-btn svg { fill: white; }
.control-btn:hover { transform: scale(1.1); background: #40a9ff; }
.control-btn#playBtn { width: 40px; height: 40px; font-size: 20px; }
.progress-bar { width: 100%; height: 5px; background: rgba(255, 255, 255, 0.1); border-radius: 10px; overflow: hidden; cursor: pointer; position: relative; z-index: 2; }
.progress-buffer { position: absolute; height: 100%; background: rgba(255, 255, 255, 0.2); border-radius: 1px; pointer-events: none; }
.progress { position: absolute; width: 0%; height: 100%; background: #1890ff; border-radius: 1px; pointer-events: none; }
/* .progress::after { content: ''; position: absolute; right: -4px; top: 50%; width: 8px; height: 8px; background: #fff; border-radius: 50%; transform: translateY(-50%); box-shadow: 0 0 4px rgba(0, 0, 0, 0.3); } */
.controls { display: flex; align-items: center; justify-content: center; margin-top: 20px; }
/* 遮罩层样式 */
.welcome-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(13, 13, 23, 0.85); backdrop-filter: blur(15px) saturate(120%); -webkit-backdrop-filter: blur(15px) saturate(120%); z-index: 9999; display: flex; justify-content: center; align-items: center; }
.welcome-button { width: 120px; height: 120px; margin-bottom: 10vh; border-radius: 50%; background: linear-gradient(135deg, #2a2a4e, #263b73); border: 2px solid rgba(255, 255, 255, 0.15); color: #ffffff; font-size: 24px; pointer-events: none; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 2px 10px rgba(255, 255, 255, 0.2); transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); animation: welcomeButtonIn 0.8s ease-out forwards, mysteryPulse 2s infinite 0.8s; text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); font-weight: 500; letter-spacing: 1px; opacity: 0; transform: scale(0.5); }
/* 添加欢迎按钮的放大淡入动画 */
@keyframes welcomeButtonIn {
0% { opacity: 0; transform: scale(0.5); }
100% { opacity: 1; transform: scale(1); }
}
.welcome-button:hover { background: linear-gradient(135deg, #2a2a4e, #263b73); transform: scale(1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 2px 10px rgba(255, 255, 255, 0.2); border: 2px solid rgba(255, 255, 255, 0.15); }
@keyframes mysteryPulse {
0% { box-shadow: 0 4px 15px rgba(38, 59, 115, 0.3), inset 0 2px 10px rgba(255, 255, 255, 0.2), 0 0 0 0 rgba(38, 59, 115, 0.7); }
70% { box-shadow: 0 4px 15px rgba(38, 59, 115, 0.3), inset 0 2px 10px rgba(255, 255, 255, 0.2), 0 0 0 25px rgba(38, 59, 115, 0); }
100% { box-shadow: 0 4px 15px rgba(38, 59, 115, 0.3), inset 0 2px 10px rgba(255, 255, 255, 0.2), 0 0 0 0 rgba(38, 59, 115, 0); }
}
/* 深色模式适配 */
@media (prefers-color-scheme:dark) {
.welcome-overlay { background: rgba(10, 10, 18, 0.9); }
.welcome-button { background: linear-gradient(135deg, #1e2d54, #2a2a4e); color: #ffffff; }
.welcome-button:hover { background: linear-gradient(135deg, #2a2a4e, #1e2d54); }
}
/* 定时器弹窗样式 */
.timer-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 9999; display: none; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.timer-content { background: var(--bg-color); padding: 20px; border-radius: 12px; width: 300px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); }
.timer-content h3 { margin: 0 0 20px; text-align: center; color: var(--text-color); }
/* 定时器滑块容器样式 */
.timer-slider-container { margin: 30px 0; text-align: center; padding: 0 20px; position: relative; }
/* 滑块刻度标记容器 */
.timer-marks { display: flex; justify-content: space-between; margin: 0 -2px; color: var(--secondary-text-color); font-size: 12px; position: relative; }
/* 刻度标记文字 */
.timer-marks span { position: relative; width: 20px; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.timer-value { margin-top: 20px; color: var(--text-color); font-size: 16px; font-weight: 500; }
/* 滑块样式 */
input[type="range"] { width: 100%; height: 5px; -webkit-appearance: none; background: var(--bg-secondary); border-radius: 3px; outline: none; margin: 0; padding: 0; }
/* 滑块已选择部分的颜色 */
input[type="range"]::-webkit-slider-runnable-track { width: 100%; height: 5px; border-radius: 3px; cursor: pointer; background: linear-gradient(to right, #1890ff var(--range-progress, 0%), var(--bg-secondary) var(--range-progress, 0%)); }
/* 滑块按钮样式 */
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; background: #1890ff; border: 2px solid #fff; border-radius: 50%; cursor: pointer; margin-top: -5.5px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: all 0.3s ease; }
/* Firefox 支持 */
input[type="range"]::-moz-range-track { width: 100%; height: 5px; background: var(--bg-secondary); border-radius: 3px; cursor: pointer; }
input[type="range"]::-moz-range-progress { background-color: #1890ff; height: 5px; border-radius: 3px; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; background: #1890ff; border: 2px solid #fff; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); }
.timer-buttons { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.timer-btn { padding: 8px 20px; border: none; border-radius: 4px; cursor: pointer; transition: all 0.3s ease; }
.timer-btn.cancel { background: var(--bg-secondary); color: var(--text-color); }
.timer-btn.confirm { background: #1890ff; color: white; }
.timer-btn:hover { opacity: 0.9; }
/* 定时按钮倒计时样式 */
#timerBtn { position: relative; }
#timerBtn .countdown { position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--secondary-text-color); white-space: nowrap; }
#timerBtn.active { background-color: var(--bg-active); }
/* Toast 消息提示框样式 */
.toast-container { position: fixed; left: 50%; bottom: 10%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast-message { background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: white; padding: 12px 24px; border-radius: 8px; font-size: 14px; max-width: 280px; text-align: center; opacity: 0; transform: translateY(20px); transition: all 0.3s ease; pointer-events: none; user-select: none; }
.toast-message.show { opacity: 1; transform: translateY(0); }
@media (prefers-color-scheme:dark) {
.toast-message { background: rgba(255, 255, 255, 0.8); color: black; }
}
/* 添加交互锁定状态的视觉效果 */
body.interaction-locked .control-btn, body.interaction-locked .playlist-item, body.interaction-locked .progress-bar, body.interaction-locked .timer-btn { pointer-events: none; opacity: 0.7; cursor: not-allowed; }
/* 添加收藏按钮样式 */
.favorite-btn { display: flex; align-items: center; justify-content: center; font-size: 18px; width: 32px; height: 32px; border: none; background: transparent; color: var(--secondary-text-color); cursor: pointer; transition: all 0.3s ease; margin-left: 10px; opacity: 0.6; }
.favorite-btn:hover { opacity: 1; transform: scale(1.1); }
.favorite-btn.active { color: #ff4757; opacity: 1; }
/* 优化歌曲信息布局 */
.playlist-item .song-info { margin-left: 5px; flex: 1; min-width: 0; }
.playlist-item .song-name { font-size: 15px; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 添加加载图标动画 */
@keyframes rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.icon-loading { display: inline-block; animation: rotate 1s linear infinite; }
/* 缓冲状态下的按钮样式 */
.control-btn .icon-loading { opacity: 0.8; }
/* 添加禁用状态样式 */
.control-btn.disabled, .playlist-item.disabled, .progress-bar.disabled { pointer-events: none; opacity: 0.5; cursor: not-allowed; }
/* 添加过渡效果 */
.control-btn, .playlist-item, .progress-bar { transition: opacity 0.3s ease; }
/* 频谱容器样式 */
.spectrum-container { position: absolute; left: 0; top: 190px; width: 100%; padding: 0; height: 18px; overflow: hidden; opacity: .5; pointer-events: none; }
/* 频谱画布样式 */
.spectrum-canvas { position: relative; width: 100%; height: 100%; pointer-events: none; }
/* 确保进度条样式正确 */
.progress-bar { position: relative; z-index: 2; }
/* 调整进度条背景透明度 */
.progress-bg { background-color: rgba(255, 255, 255, 0.1); }