/* 页面背景样式 */
body {
    margin: 0;
    padding: 0;
    background-image: url('/static/bg.png?v=1.0'); /* 使用绝对路径确保正确加载 */
    background-color: #f0f0f0; /* 添加备用背景色 */
    font-family: "PingFang SC", sans-serif;
    min-height: 100vh; /* 确保背景覆盖整个视口高度 */
    position: relative;
    overflow-x: hidden;
}

/* 弹幕容器样式 */
.danmu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

/* 弹幕样式 */
.danmu-item {
    position: absolute;
    white-space: nowrap;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    animation: danmuMove linear;
    pointer-events: auto;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.3);
}

/* 弹幕动画 */
@keyframes danmuMove {
    from { right: -300px; }
    to { right: 100%; }
}

/* 弹幕发送按钮样式 */
.danmu-send-container {
    position: absolute; /* 改为绝对定位 */
    top: 50%; /* 垂直居中 */
    left: -40px; /* 向左偏移，使按钮完全在播放器外部 */
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 修改：从右向左展开 */
}

/* 弹幕输入框容器 */
.danmu-input-wrapper {
    display: none;
    align-items: center;
    justify-content: space-between; /* 新增：让输入框和发送按钮分别位于左右两端 */
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 154px;
    padding: 8px 16px;
    width: 310px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-right: 10px; /* 添加：让输入框从按钮左侧展开 */
}

/* 弹幕输入框 */
.danmu-input {
    flex: 1; /* 占据剩余空间 */
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #333;
    padding: 8px 12px;
    /* 移除max-width限制，让输入框可以填满空间 */
}

/* 发送按钮 */
.send-danmu-btn {
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 154px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px; /* 新增：给输入框和发送按钮之间添加间距 */
}

.send-danmu-btn:hover {
    background-color: #0056b3;
}

/* 搜索框样式 */
.search-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 4px;
    padding: 0 4px;
}

.search-box-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

#searchInput {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

#searchInput:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

#searchBtn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #007AFF;
    padding: 4px;
    line-height: 1;
}

#searchBtn:hover {
    color: #0056b3;
}

.music-source {
    flex: 0 0 auto;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    outline: none;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 45px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.music-source:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* 歌词显示区域样式 */
.lyrics-container {
    height: 60px; /* 增加容器高度，确保能显示两行带放大效果的歌词 */
    overflow: hidden;
    margin: 20px 0;
    padding: 0;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    position: relative;
    text-align: center;
}

.lyric-line {
    font-size: 16px;
    color: #333;
    padding: 2px 0; /* 减少上下内边距，避免垂直空间过大 */
    transition: all 0.3s ease;
    min-height: 28px; /* 增加最小高度，确保行与行之间有足够间距 */
    line-height: 28px; /* 调整行高匹配最小高度 */
}

.lyric-line.active {
    color: #007AFF;
    font-weight: bold;
    transform: scale(1.05);
}

/* 其他现有样式保持不变 */
.player-container {
    width: 300px;
    margin: 50px auto;
    text-align: center;
    font-family: "PingFang SC", sans-serif;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative; /* 确保子元素可以相对于它定位 */
    overflow: visible; /* 允许子元素超出容器范围 */
    display: block; /* 改回block，保持居中效果 */
}

/* 弹幕发送按钮样式 - 按钮位置绝对固定 */
.danmu-send-container {
    position: absolute; /* 相对于播放器容器定位 */
    top: 50%; /* 垂直居中 */
    left: -40px; /* 按钮完全在播放器外部左侧 */
    transform: translateY(-50%);
    z-index: 1000;
    display: block; /* 明确设置为block布局 */
}

/* 弹幕输入框容器 - 完全独立定位，不影响按钮 */
.danmu-input-wrapper {
    display: none;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 154px;
    padding: 8px 16px;
    width: 310px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: absolute; /* 关键：绝对定位，完全脱离文档流 */
    top: 50%; /* 垂直居中 */
    right: 100%; /* 关键：定位到按钮的左侧 */
    transform: translateY(-50%);
    margin-right: 10px; /* 与按钮保持间距 */
}

/* 显示弹幕按钮 - 位置绝对固定，不受任何影响 */
.show-danmu-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 154px;
    padding: 8px 0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* 移除writing-mode和text-orientation属性，使用更兼容的方式 */
    width: 38px;
    height: 70px;
    line-height: 20px;
    text-align: center;
    /* 关键：相对定位，保持在正常文档流中 */
    position: relative;
    /* 确保按钮内的内容居中 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    white-space: normal;
    /* 移除可能的额外间距 */
    margin: 0;
    overflow: visible;
    /* 确保文字不被截断或偏移 */
    letter-spacing: 0;
    word-spacing: 0;
}

/* 其他弹幕相关样式保持不变 */

.album-cover {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 20px;
}

.song-info-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    position: relative;
}

.song-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
    flex: 1;
    text-align: center;
}

/* 单曲循环按钮样式 */
.repeat-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 10px;
    top: 40px;
    z-index: 10;
}

.repeat-icon {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

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

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 10px;
    top: 40px;
    z-index: 10;
}

/* 音量按钮样式 */
.volume-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 10px;
    top: 148px;
    z-index: 10;
}

.volume-icon {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

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

/* 音量控制滑块容器 */
.volume-control {
    display: none;
    position: absolute;
    right: -59px;
    top: 32px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    width: 10px;
    height: 116px;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

/* 音量控制气泡尖角 */
/* .volume-control::after {
    content: '';
    position: absolute;
    right: 12px;
    bottom: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
} */

/* 音量滑块样式 - 竖向 */
.volume-slider {
    width: 95px;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    /* 使用transform实现竖向滑块 */
    transform: rotate(-90deg);
    transform-origin: 40px 40px; /* 旋转中心 */
    margin: 0;
    text-align: center;
    /* display: flex;
    justify-content: center;
    align-items: center; */
}

.volume-slider::-webkit-slider-runnable-track {
    width: 80px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007AFF;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.volume-slider::-moz-range-track {
    width: 80px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    border: none;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007AFF;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 音量百分比显示 */
.volume-percentage {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    margin-bottom: 10px;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.favorite-btn-img {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.favorite-btn:hover .favorite-btn-img {
    transform: scale(1.1);
}

.song-singer {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 8px;
    white-space: nowrap;
}

/* 进度条部分样式 */
.progress-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
}

/* 时间显示部分样式 */
.time-display-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

/* 进度条包装样式 */
.time-display-section input.progress-bar {
    margin: 0;
    margin-bottom: 15px;
    flex: none;
    width: 100%;
    max-width: none;
}

/* 当前时间样式 */
.current-time {
    font-size: 12px;
    color: #666;
    min-width: 40px;
    text-align: left;
    position: absolute;
    left: 0;
    top: calc(100% + 5px);
}

/* 总时长样式 */
.duration-time {
    font-size: 12px;
    color: #666;
    min-width: 40px;
    text-align: right;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
}

/* 进度条和时间容器样式 */
.progress-section {
    width: 100%;
}

/* 调整进度条样式 */
.progress-bar {
    flex: none;
    width: 100%;
    max-width: none;
    margin: 0;
}

/* 播放控制按钮部分样式 */
.play-controls-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* 添加旋转动画关键帧 */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 修改播放按钮样式，添加动画支持 */
.play-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    flex-shrink: 0;
    position: relative;
}

/* 上一曲按钮样式 */
.prev-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

/* 下一曲按钮样式 */
.next-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

/* 播放按钮背景样式 */
.play-btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: url('/static/f.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 上一曲按钮背景 */
.prev-btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: url('/static/L.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 下一曲按钮背景 */
.next-btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: url('/static/R.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 播放符号样式 */
.play-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 确保播放符号不继承旋转动画 */
    animation: none !important;
    pointer-events: none;
}

/* 播放状态的旋转动画类 */
.play-btn.rotating .play-btn-bg {
    animation: rotate 2s linear infinite;
}

.progress-bar {
    flex: 1;
    margin: 0 10px;
    cursor: pointer;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 2px;
    outline: none;
    max-width: 180px;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: url('/static/basketball.png?v=1.0') no-repeat center center;
    background-size: contain;
    cursor: pointer;
}

.progress-bar::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: url('/static/basketball.png?v=1.0') no-repeat center center;
    background-size: contain;
    cursor: pointer;
    border: none;
}

#timeDisplay {
    font-size: 12px;
    color: #666;
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
}


/* Loading覆盖层样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

/* 加载动画 */
.loading-spinner {
    border: 4px solid rgba(0, 122, 255, 0.1);
    border-left: 4px solid #007AFF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-family: "PingFang SC", sans-serif;
    color: #007AFF;
    font-size: 16px;
}

.album-cover-container {
    width: 100%; /* 改为100%以匹配播放器容器宽度 */
    /* 使用padding-bottom技巧保持正方形比例 */
    height: 0;
    padding-bottom: 100%;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.album-cover-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* 在CSS文件末尾添加缓冲提示样式 */
.buffering-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 100;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 在CSS文件末尾添加 */
/* 自定义内容容器样式 */
.custom-content-container {
    width: 300px;
    margin: 20px auto;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.custom-content {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    text-align: left;
}

.custom-content p {
    margin: 0 0 10px 0;
}

.custom-content p:last-child {
	margin-bottom: 0;
}

/* 播放列表样式 */
/* 播放列表按钮 */
.playlist-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 8px;
    color: #007AFF;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.playlist-btn-img {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

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

/* 播放列表容器 */
.playlist-container {
    /* 初始状态：完全隐藏在播放器右侧外部 */
    display: none;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0 12px 12px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 350px !important; /* 固定高度，永远保持350px */
    height: 350px !important; /* 固定高度，永远保持350px */
    position: absolute; /* 相对于播放器容器定位 */
    top: 0;
    left: 100%; /* 初始位置：完全在播放器外部右侧 */
    width: 300px; /* 固定宽度，调整为300px */
    z-index: 998; /* 确保在播放器上方 */
    transform: translateX(0); /* 初始位置：完全在播放器外部右侧 */
    transition: all 0.3s ease; /* 添加滑动过渡动画 */
    margin-left: 5px; /* 添加5px的间距 */
}

/* 播放列表展开状态 */
.playlist-container.expanded {
    display: block;
    transform: translateX(0); /* 展开状态：显示在播放器右侧 */
}

/* 播放列表头部 */
.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 10;
}

.playlist-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.song-count {
    font-size: 12px;
    color: #666;
}

.add-song-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #007AFF;
    transition: all 0.3s ease;
}

.add-song-btn:hover {
    transform: scale(1.1);
    color: #0056b3;
}

/* 随机播放按钮样式 */
.random-play-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #007AFF;
    transition: all 0.3s ease;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.random-play-img {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.random-play-btn.active .random-play-img {
    transform: scale(1.1);
}

/* 清空列表按钮样式 */
.clear-playlist-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ff6b6b;
    transition: all 0.3s ease;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.clear-playlist-img {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

/* 播放列表操作按钮容器 */
.playlist-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 退出登录按钮样式 */
.logout-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    color: #ff6b6b;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(255, 107, 107, 0.1);
}

.logout-btn:hover {
    background-color: rgba(255, 107, 107, 0.2);
    color: #ff5252;
}

/* 添加歌曲输入框容器 */
.add-song-input-wrapper {
    display: none;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px;
    background-color: #f8f8f8;
    border-radius: 6px;
    position: sticky;
    top: 56px;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 9;
}

.add-song-input-wrapper.visible {
    display: flex;
}

.add-song-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    margin-right: 8px;
}

.add-song-input:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.confirm-add-song-btn {
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-add-song-btn:hover {
    background-color: #0056b3;
}

/* 播放列表内容 */
.playlist-content {
    overflow-y: auto;
    max-height: calc(350px - 120px);
}

/* 当显示登录提示时，确保playlist-content不会显示滚动条 */
.playlist-container:has(.login-prompt) .playlist-content {
    overflow-y: hidden;
    max-height: none;
    height: auto;
}

/* 登录提示 */
.login-prompt {
    text-align: center;
    padding: 20px;
    color: #666;
    overflow: hidden;
    max-height: 300px;
}

.login-prompt h4 {
    margin-bottom: 15px;
    color: #333;
}

/* 登录和注册表单 */
.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

/* 表单组 */
.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 4px;
    text-align: center;
}

/* 当登录提示显示时，取消内部滚动但保持内容适配固定高度容器 */
.login-prompt {
    overflow: hidden;
    max-height: 320px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 当播放列表容器中显示登录提示时，隐藏滚动条但保持固定高度 */
.playlist-container:has(.login-prompt) {
    overflow-y: hidden;
    height: 362px !important;
    max-height: 400px !important;
    width: 300px !important;
}

/* 当登录提示显示时，取消播放列表的滚动条 */
.login-prompt + .song-list {
    display: none;
}

.form-group label {
    font-size: 12px;
    color: #666;
    align-self: flex-start;
    margin-left: 10px;
}

.form-group input {
    width: 100%;
    max-width: 200px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.login-btn, .register-btn {
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover, .register-btn:hover {
    background-color: #0056b3;
}

/* 切换按钮 */
.register-btn, .login-btn {
    font-size: 12px;
    padding: 5px 10px;
}

/* 空状态 */
.empty-playlist {
    text-align: center;
    padding: 20px 0;
    color: #999;
    font-style: italic;
}

/* 歌曲列表 */
.song-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.song-item:hover {
    background-color: #f8f8f8;
}

.song-number {
    font-size: 12px;
    color: #666;
    margin-right: 12px;
    min-width: 20px;
    text-align: center;
}

.song-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delete-song-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #ff6b6b;
    margin-left: 8px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.delete-song-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 分页控制 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.page-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: #e0e0e0;
}

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

.current-page {
    font-size: 12px;
    color: #666;
    margin: 0 8px;
}

/* 调整播放器容器高度，容纳播放列表 */
.player-container {
    min-height: 600px;
}