/* APlayer 容器通用样式 - 适配导航栏 (mini: false) */
#aplayer {
    position: relative;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: 50px !important; /* 保持高度 50px */
    flex-shrink: 0;
    max-width: 500px; /* 整体最大宽度 */
    overflow: visible; /* 允许播放列表溢出 */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    border-radius: 25px; /* 匹配 50px 高度 */
    background-color: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* APlayer 主体部分 - 包含封面、信息和控制器 */
#aplayer .aplayer-body {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background-color: transparent !important;
    padding: 0 10px; /* 内部填充，与边缘保持距离 */
    border: none !important; /* **新增：移除可能的边框** */
    box-shadow: none !important; /* **新增：移除可能的阴影** */
}

/* 专辑封面 */
#aplayer .aplayer-pic {
    width: 36px !important; /* 封面尺寸略微缩小 */
    height: 36px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
    margin-right: 8px; /* 与信息区域的间距 */
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* 播放/暂停按钮 (在封面内部) */
#aplayer .aplayer-pic .aplayer-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    border-radius: 50%;
    color: white !important;
    display: none !important;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 1;
    box-sizing: border-box;
}
#aplayer .aplayer-pic .aplayer-button:hover {
    background-color: rgba(0, 0, 0, 0.6) !important;
}
#aplayer .aplayer-pic .aplayer-button svg {
    fill: white !important;
    width: 13px !important;
    height: 13px !important;
}

/* 歌曲信息区域 (标题和作者的父容器) */
#aplayer .aplayer-info {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 1; /* 允许信息区域在必要时收缩 */
    overflow: hidden; /* 隐藏溢出内容 */
    white-space: nowrap; /* 确保不换行，由 ellipsis 处理 */
    margin-right: 5px; /* 与控制按钮的间距 */
    min-width: 0px; /* 确保可以收缩到最小 */
    max-width: 280px; /* 限制信息区域的最大宽度，防止过宽 */
    height: 100%; /* 占据父容器的全部高度 (50px) */
    position: relative;
    border: none !important; /* **新增：移除可能的边框** */
    box-shadow: none !important; /* **新增：移除可能的阴影** */
}

.aplayer .aplayer-info {
    padding: 0 !important;
}

}

/* 歌曲标题和作者的容器 */
#aplayer .aplayer-info .aplayer-music {
    display: block !important; /* 改为 block 布局，让 span 自然在一行 */
    margin: 0 !important; /* 彻底移除默认外边距 */
    padding: 0 !important; /* 彻底移除默认内边距 */
    height: 15px !important; /* 根据你的反馈调整 */
    min-height: 15px !important; /* 根据你的反馈调整 */
    max-height: 15px !important; /* 根据你的反馈调整 */
    line-height: 15px !important; /* 根据你的反馈调整 */
    overflow: hidden; /* 隐藏溢出内容 */
    white-space: nowrap; /* 确保不换行 */
    text-overflow: ellipsis; /* 文本溢出显示省略号 */
    border: none !important; /* **新增：移除可能的边框** */
    box-shadow: none !important; /* **新增：移除可能的阴影** */
}
#aplayer .aplayer-info .aplayer-music .aplayer-title,
#aplayer .aplayer-info .aplayer-music .aplayer-author {
    display: inline !important; /* 确保 span 元素内联显示 */
    white-space: nowrap;
    color: white !important; /* 强制颜色 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0 !important; /* 确保标题和作者自身没有额外边距 */
    padding: 0 !important; /* 确保标题和作者自身没有额外内边距 */
    line-height: inherit !important; /* 继承父容器的行高，确保与 15px 匹配 */
}
#aplayer .aplayer-info .aplayer-music .aplayer-title {
    font-size: 12px !important; /* 强制字体大小 */
}
#aplayer .aplayer-info .aplayer-music .aplayer-author {
    font-size: 10px !important; /* 强制字体大小 */
    opacity: 0.8;
    margin-left: 2px !important; /* 作者与歌名之间的间距 */
}

/* 歌词区域 (通常隐藏在导航栏中) */
#aplayer .aplayer-lrc {
    display: none !important;
}

/* 播放控制器容器 - 包含所有控制按钮 */
#aplayer .aplayer-controller {
    display: flex !important;
    align-items: center;
    background-color: transparent !important;
    padding: 0;
    margin-left: 5px; /* 与 info 区域的间距 */
    flex-shrink: 0;
    min-width: 0 !important; /* 关键：允许 flex item 尽可能收缩 */
    width: fit-content !important; /* 关键：使其宽度适应内容 */
    height: 30px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    border: none !important; /* **新增：移除可能的边框** */
    box-shadow: none !important; /* **新增：移除可能的阴影** */
}

/* 进度条 (aplayer-bar-wrap) - 绝对定位在播放器底部 */
#aplayer .aplayer-bar-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: transparent !important;
    /* border-radius: 0 0 25px 25px; */
    overflow: hidden;
    z-index: 1;
}
#aplayer .aplayer-bar {
    background-color: rgba(255, 255, 255, 0.2) !important;
    height: 100%;
}
#aplayer .aplayer-loaded {
    background-color: rgba(255, 255, 255, 0.3) !important;
    height: 100%;
}
#aplayer .aplayer-played {
    height: 100%;
    position: relative; /* 为进度条圆点定位提供上下文 */
}
#aplayer .aplayer-thumb { /* **主进度条的圆点** */
    width: 8px !important;
    height: 8px !important;
    top: 170% !important; /* **沿用你确认的有效值** */
    transform: translateY(-50%) !important;
    margin-left: -4px !important;
    background-color: #FDC3BB !important;
    border: none !important;
}

/* 包含所有控制图标和时间显示的容器 */
#aplayer .aplayer-time {
    display: flex !important;
    align-items: center;
    margin: 0;
    padding: 0;
    height: 100%; /* 占据父容器 (aplayer-controller) 的全部高度 */
    flex-wrap: nowrap;
    flex-shrink: 0;
    min-width: 0 !important; /* 关键：允许 flex item 尽可能收缩 */
    width: fit-content !important; /* 关键：确保它只占据图标所需的空间 */
    background-color: transparent !important;
    gap: 2px; /* 使用 gap 属性来设置图标之间的间距，更简洁 */
}

/* 隐藏实际的时间显示 (00:00 / 03:37) */
#aplayer .aplayer-time .aplayer-time-inner {
    display: none !important;
}

/* 单个控制图标的通用样式 */
#aplayer .aplayer-time .aplayer-icon {
    width: 18px !important; /* 图标尺寸进一步缩小 */
    height: 18px !important;
    color: white !important;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s ease;
    fill: white !important;
    stroke: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#aplayer .aplayer-time .aplayer-icon:hover {
    opacity: 1;
}

/* 音量控制容器 (aplayer-volume-wrap) */
#aplayer .aplayer-time .aplayer-volume-wrap {
    position: relative; /* 确保弹出条可以相对其定位 */
    width: 18px !important; /* **调整：与图标同宽** */
    height: 18px !important; /* **调整：与图标同高，提供更精确的定位上下文** */
    display: flex; /* 保持图标居中 */
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 音量条的容器 (aplayer-volume-bar-wrap) - 这是会弹出的垂直条 */
#aplayer .aplayer-time .aplayer-volume-bar-wrap {
    position: absolute;
    top: -20px !important; /* **调整：将顶部定位到其父元素 (aplayer-volume-wrap) 顶部上方 10px** */
    left: 100%;
    transform: translateX(-50%);
    width: 10px !important; /* **调整：减少宽度** */
    height: 40px; /* 垂直音量条的高度 */
    padding: 3px 0; /* 上下内边距，增加可拖动区域 */
    /* margin-bottom: 5px; /* 移除，由 top 属性控制间距 */ */
    background-color: rgba(0, 0, 0, 0.7) !important; /* 背景色 */
    backdrop-filter: blur(5px);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 100; /* 确保在其他元素之上 */
    opacity: 0; /* 默认隐藏 */
    visibility: hidden; /* 默认隐藏 */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: block; /* 确保它能作为块级元素弹出 */
    box-sizing: content-box; /* 确保 padding 不影响 width/height */
    pointer-events: none; /* 默认不响应鼠标事件，直到可见 */
}

/* 鼠标悬停在 .aplayer-volume-wrap 上时显示音量条 */
#aplayer .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* 悬停时响应鼠标事件 */
}

/* 实际的音量条轨道 (背景) */
#aplayer .aplayer-time .aplayer-volume-bar-wrap .aplayer-volume-bar {
    position: relative;
    width: 4px; /* 细条宽度 */
    height: 100%; /* 占据父容器高度 */
    margin: 0 auto; /* 水平居中 */
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.2) !important; /* 轨道背景色 */
    overflow: hidden;
    right: 0 !important;
}
}

/* 音量填充条 (aplayer-volume) */
#aplayer .aplayer-time .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume {
    position: absolute;
    bottom: 0; /* 从底部开始填充 */
    width: 100%;
    /* height will be set by APlayer JS, based on volume */
    background-color: #FDC3BB !important; /* 填充色 */
}

/* 音量条的圆点 (aplayer-thumb) */
#aplayer .aplayer-time .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-thumb {
    position: absolute;
    left: 50%;
    /* bottom will be set by APlayer JS, based on volume */
    transform: translateX(-50%); /* 水平居中 */
    width: 8px !important;
    height: 8px !important;
    border-radius: 50%;
    background-color: #FDC3BB !important;
    border: none !important;
    margin: 0; /* 重置任何默认外边距 */
}


/* 隐藏多余的 aplayer-miniswitcher (如果 aplayer-icon-menu 已经存在) */
#aplayer .aplayer-miniswitcher {
    display: none !important;
}

/* 播放列表 (保持不变) */
#aplayer .aplayer-list {
    position: absolute;
    top: 100%;
    left: 25px;
    right: auto;
    width: 200px;
    max-height: 200px;
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 1001;
    overflow-y: auto;
    /* padding: 5px 0;
    border: 1px solid rgba(255, 255, 255, 0.1); */
}

#aplayer .aplayer-list.aplayer-list-hide {
    display: none;
}

#aplayer .aplayer-list ol {
    background-color: transparent !important;
    padding: 0;
    margin: 0;
}

#aplayer .aplayer-list li {
    background-color: transparent !important;
    color: white !important;
    /* padding: 8px 10px; */
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#aplayer .aplayer-list li:last-child {
    border-bottom: none;
}
#aplayer .aplayer-list li:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}
#aplayer .aplayer-list li.aplayer-list-light {
    background-color: rgba(253, 195, 187, 0.3) !important;
}

/* 播放列表项的文字颜色 */
#aplayer .aplayer-list-title,
#aplayer .aplayer-list-author {
    color: white !important;
    text-shadow: none;
}

/* 透明图标填充色 */
#aplayer .transparent-icon {
    fill: rgba(255, 255, 255, 0.8) !important;
    opacity: 1;
}
#aplayer .transparent-icon:hover {
    fill: rgba(255, 255, 255, 1) !important;
}

/* 主题色图标填充色 (如果使用) */
#aplayer .theme-icon {
    fill: rgba(var(--theme-color-rgb, 253, 195, 187), 0.8) !important;
    opacity: 0.8;
}
#aplayer .theme-icon:hover {
    fill: rgba(var(--theme-color-rgb, 253, 195, 187), 1) !important;
}
