/* APlayer 吸底模式 - 现代悬浮毛玻璃风格 */

/* --- 播放器主体 (收起/展开状态) --- */
.aplayer.aplayer-fixed {
    /* 悬浮位置调整，不再紧贴左下角 */
    bottom: 20px !important;
    left: 20px !important;
    /* 宽度限制，更像一个胶囊卡片 */
    max-width: 400px;
    width: auto !important;
    border: none !important;
    border-radius: 12px !important;
    /* 深度阴影，营造悬浮感 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    /* 移除默认背景，交给 body 处理 */
    background: transparent !important;
    z-index: 9999;
    overflow: visible !important;
}

/* 播放器内容区域 */
.aplayer.aplayer-fixed .aplayer-body {
    /* 毛玻璃背景 */
    background: rgba(231, 231, 231, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px !important;
    /* 边框高光，增强质感 */
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding-right: 15px; /* 给右侧按钮留空间 */
}

/* 封面图 - 圆形唱片风格 */
.aplayer.aplayer-fixed .aplayer-pic {
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    margin: 8px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease;
    border: 2px solid #fff;
}

/* 播放时封面旋转 */
.aplayer.aplayer-fixed .aplayer-pic:hover {
    transform: scale(1.1);
}

/* 歌曲信息区域 */
.aplayer.aplayer-fixed .aplayer-info {
    border-bottom: none !important;
    padding: 10px 10px 10px 0 !important;
    height: 66px !important; /* 匹配封面高度+margin */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 歌名 */
.aplayer .aplayer-info .aplayer-music .aplayer-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 歌手 */
.aplayer .aplayer-info .aplayer-music .aplayer-author {
    font-size: 12px;
    color: #666;
}

/* 控制按钮区域 */
.aplayer.aplayer-fixed .aplayer-info .aplayer-controller {
    margin-top: 4px;
}

/* 进度条容器 */
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {
    margin: 0 0 0 5px !important;
}

/* 进度条 */
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {
    height: 4px !important;
    border-radius: 4px !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

/* 已播放进度 */
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {
    background: #49B1F5 !important; /* 主题色 */
    height: 4px !important;
    border-radius: 4px !important;
    box-shadow: 0 0 5px rgba(73, 177, 245, 0.5); /* 发光效果 */
}

/* 进度条滑块 */
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {
    width: 10px !important;
    height: 10px !important;
    margin-top: -3px !important;
    background: #fff !important;
    border: 2px solid #49B1F5 !important;
    transform: scale(1);
    transition: transform 0.2s;
}

.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb:hover {
    transform: scale(1.3);
}

/* --- 播放列表 (展开时) --- */
.aplayer.aplayer-fixed .aplayer-list {
    position: absolute !important;
    bottom: 0 !important; /* 明确指定底部距离：播放器高度(约68px) + 间距(12px) */
    left: -15px !important;
    width: 100% !important;
    margin-bottom: 50px !important; /* 不再需要 margin */
    
    border: none !important;
    border-radius: 12px !important; /* 四周圆角，更像气泡 */
    background: rgba(231, 231, 231, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
    
    /* 限制高度，美化滚动条 */
    max-height: 240px !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
}

/* 列表内容容器 */
.aplayer.aplayer-fixed .aplayer-list ol {
    max-height: none !important; /* 移除 ol 的高度限制 */
    padding-bottom: 5px !important; /* 底部留白，防止最后一首贴底 */
}

/* 滚动条美化 */
.aplayer.aplayer-fixed .aplayer-list::-webkit-scrollbar {
    width: 5px;
}
.aplayer.aplayer-fixed .aplayer-list::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background-color: rgba(0,0,0,0.1);
}
.aplayer.aplayer-fixed .aplayer-list::-webkit-scrollbar-track {
    background-color: transparent;
}
[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-list::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.2);
}

/* 列表项 */
.aplayer-list ol li {
    border-top: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    padding: 0 15px !important; /* 移除上下内边距，完全靠 height 和 line-height 控制 */
    transition: all 0.2s;
    height: 32px !important; /* 强制固定高度 */
    line-height: 32px !important; /* 垂直居中 */
    display: flex !important; /* 使用 flex 布局保证垂直居中 */
    align-items: center !important;
}

.aplayer-list ol li:hover {
    background: rgba(73, 177, 245, 0.1) !important;
    padding-left: 20px !important; /* 悬停时轻微右移 */
}

/* 列表序号 */
.aplayer-list ol li .aplayer-list-index {
    line-height: 32px !important;
    height: 32px !important;
    display: inline-block;
}

/* 列表标题 */
.aplayer-list ol li .aplayer-list-title {
    line-height: 32px !important;
    height: 32px !important;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 列表作者 */
.aplayer-list ol li .aplayer-list-author {
    line-height: 32px !important;
    height: 32px !important;
    display: inline-block;
    margin-left: auto; /* 将作者名推到最右侧 */
}

/* 当前播放项 */
.aplayer-list ol li.aplayer-list-light {
    background: rgba(73, 177, 245, 0.15) !important;
    border-left: 4px solid #49B1F5; /* 左侧指示条 */
}

.aplayer-list ol li.aplayer-list-light .aplayer-list-cur {
    display: none !important; /* 隐藏默认的左侧色块 */
}

.aplayer-list ol li .aplayer-list-title {
    color: #333;
}

.aplayer-list ol li .aplayer-list-author {
    color: #888;
}

/* 歌词区域 */
.aplayer.aplayer-fixed .aplayer-lrc {
    text-shadow: none !important;
    margin-bottom: 8px;
}

.aplayer.aplayer-fixed .aplayer-lrc p {
    color: #666;
    font-size: 12px;
    line-height: 16px !important;
}

.aplayer.aplayer-fixed .aplayer-lrc p.aplayer-lrc-current {
    color: #f6a70b !important;
    font-weight: bold;
    font-size: 13px;
}

/* --- 暗黑模式适配 (Dark Mode) --- */
[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-body {
    background: rgba(30, 30, 30, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-pic {
    border: 2px solid #444;
}

[data-theme="dark"] .aplayer .aplayer-info .aplayer-music .aplayer-title {
    color: #eee;
}

[data-theme="dark"] .aplayer .aplayer-info .aplayer-music .aplayer-author {
    color: #aaa;
}

[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-list {
    background: rgba(30, 30, 30, 0.95) !important;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .aplayer-list ol li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .aplayer-list ol li:hover {
    background: rgba(73, 177, 245, 0.2) !important;
}

[data-theme="dark"] .aplayer-list ol li.aplayer-list-light {
    background: rgba(73, 177, 245, 0.25) !important;
}

[data-theme="dark"] .aplayer-list ol li .aplayer-list-title {
    color: #eee;
}

[data-theme="dark"] .aplayer-list ol li .aplayer-list-author {
    color: #aaa;
}

[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-lrc p {
    color: #aaa;
}

[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-lrc p.aplayer-lrc-current {
    color: hsl(70, 30%, 96%) !important;
}

/* 隐藏 APlayer 默认的收起按钮，或者美化它 */
.aplayer.aplayer-fixed .aplayer-miniswitcher {
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 0 12px 12px 0 !important;
}
[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-miniswitcher {
    background: rgba(30, 30, 30, 0.8) !important;
}
