.bg-container {
    background-image: url('../pic/lofi.webp');
    background-size: cover;
    background-position: center;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    position: relative;
    transition: background-image 1s ease-in-out;
}

/* 进度条样式，由JS控制平滑动画 */
.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.2);
    width: 0%;
    z-index: 1;
}

.control-btn {
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.control-btn:hover {
    transform: scale(1.1);
}

/* 音量控制 */
#volumeSlider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(to right, #d3d3d3 0%, #d3d3d3 100%);
    outline: none;
    border-radius: 4px;
    width: 100%;
    margin: 0;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.volume-value {
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

#volumeOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.volume-control {
    text-align: center;
    color: white;
    padding: 20px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#volumeOverlay.active {
    opacity: 1;
    visibility: visible;
}

#volumeOverlay.active .volume-control {
    transform: scale(1);
}

.volume-icon {
    font-size: 3rem;
    margin-bottom: 30px;
}

/* 歌曲列表 */
#songListOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 998;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

#songListContainer {
    width: 100%;
    height: calc(100vh - 180px);
    margin-top: 50px;
    overflow-y: auto;
    padding: 0 20px;
    box-sizing: border-box;
}

#songListContainer::-webkit-scrollbar {
    display: none;
}

#songListContainer {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#songListOverlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

#songListUl {
    padding: 0;
    margin: 0 auto;
    width: 100%;
}

.song-list-item {
    color: white;
    padding: 5px 15px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 6px;
    list-style: none;
    font-family: Arial;
    font-weight: bold;
    font-size: 30px;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    text-align: center;
}

.song-list-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.song-list-item.active {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 底部控制栏 */
.bottom-control-bar {
    position: fixed;
    bottom: 3%;
    height: 70px;
    left: 0;
    right: 0;
    z-index: 997;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    /* 适配底部安全区域，兼容不同安卓设备 */
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom); /* 兼容旧版本浏览器 */
    box-sizing: border-box;
    max-width: 100%; /* 确保不超出屏幕宽度 */
}

/* 调整歌曲列表按钮位置 */
#songListBtn {
    position: absolute;
    left: 5%;
}

/* 模式切换按钮样式 */
#modeBtn {
  position: absolute;
  left: calc(5% + 80px);
}
@media (max-width: 768px) {
  #modeBtn {
    left: 5%;
    bottom: calc(70px + 3% + 10px);
  }
}

/* 调整音量按钮位置 */
#volumeBtn {
    position: absolute;
    right: 5%;
}

/* 中间控制按钮组 */
.center-controls {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* 播放/暂停按钮容器 */
.play-loading-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG按钮样式 */
.play-btn,
.pause-btn {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

/* 按钮状态控制 */
.button-hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* 加载动画样式 */
.loading-animation {
    position: absolute;
    width: 50px;
    height: 50px;
    display: none;
    transition: opacity 0.3s ease;
}

.loading-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    animation: loadingScale 1.2s infinite ease-in-out;
}

.loading-dot:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.loading-dot:nth-child(2) {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation-delay: 0.3s;
}

.loading-dot:nth-child(3) {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.6s;
}

.loading-dot:nth-child(4) {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    animation-delay: 0.9s;
}

@keyframes loadingScale {

    0%,
    100% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-visible {
    display: block !important;
}

/* 顶部标识样式 - 标题居中，不受左右时间影响 */
.top-title-container {
    font-family: Arial;
    position: absolute;
    top: 4px;
    left: 3%;
    right: 3%;
    display: flex;
    align-items: center;
    color: white;
    z-index: 2;/* 确保在进度条上方 */
}

.title-group {
    width: 100%;
    text-align: center;
}

#currentSongTitle {
    font-size: 34px;
    font-weight: 300;
    opacity: 0.9;
    display: block;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#currentSongSubtitle {
    font-size: 18px;
    opacity: 0.9;
    display: block;
}

/* 播放时间样式（默认不显示，绝对定位） */
#currentPlayTime,
#totalPlayTime {
    font-size: 22px;
    opacity: 0.6;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    display: none;
    position: absolute;
}

#currentPlayTime {
    left: 0;
}

#totalPlayTime {
    right: 0;
}

/* 实时时间样式 */
#currentTime {
    position: absolute;
    top: 1/3;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 100px;
    opacity: 0.8;
    line-height: 1;
    font-family: Arial;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}