/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 播放器容器：左下侧0间距（已调好） */
.ygma-player-container {
    width: 300px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    position: fixed !important;
    bottom: 0px !important;
    left: 0px !important;
    z-index: 9998 !important;
    padding: 15px 0 !important;
    height: 230px !important;
    transition: all 0.3s ease !important;
    display: block !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* 折叠按钮：右上侧1px间距+50px圆形（已调好） */
.ygma-toggle-btn {
    left: calc(0px + 300px + 1px) !important;
    bottom: calc(0px + 230px - 50px) !important;
    height: 50px !important;
    width: 50px !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
    transition: all 0.2s ease !important;
    background-color: transparent !important;
    position: fixed !important;
}

/* 按钮图片切换核心逻辑（新增修复） */
.ygma-toggle-btn .icon-collapse {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
}
.ygma-toggle-btn .icon-expand {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
}
.ygma-toggle-btn.collapsed .icon-collapse {
    display: block !important;
}
.ygma-toggle-btn.collapsed .icon-expand {
    display: none !important;
}

/* 按钮hover效果 */
.ygma-toggle-btn:hover {
    transform: scale(1.05) !important;
}

/* 播放器收起状态 */
.ygma-player-container.collapsed {
    display: none !important;
}

/* 背景图区域 */
.ygma-player-bg {
    width: 100%;
    height: 100% !important;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* 控制区基础样式 */
.ygma-player-controls {
    position: relative;
    z-index: 2;
    padding: 15px !important;
    background: transparent !important;
    width: 100% !important;
}
.ygma-player-controls.style1 {
    background: transparent !important;
    border-bottom: 1px solid #eee;
}
.ygma-player-controls.style2 {
    background: transparent !important;
    color: #fff;
}
.ygma-player-controls.style3 {
    background: transparent !important;
    color: #fff;
    border-radius: 4px;
}

/* 正在播放文本样式 */
.ygma-now-playing {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ygma-player-controls.style2 .ygma-now-playing,
.ygma-player-controls.style3 .ygma-now-playing {
    color: #fff !important;
}
.ygma-player-controls.style1 .ygma-now-playing {
    color: #333 !important;
}

/* 按钮+进度条同行容器 */
.ygma-btn-progress-row {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
}

/* 控制按钮 - 25px圆形 + 视觉区分 */
.ygma-controls-btns {
    width: 110px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
}
.ygma-btn {
    width: 25px !important;
    height: 25px !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    border: 2px solid #007bff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #007bff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    font-size: 10px !important;
}

/* 播放/暂停按钮：视觉突出 */
.ygma-btn.play-pause {
    font-size: 12px !important;
    font-weight: bold !important;
    border-width: 2.5px !important;
}

/* 上一首/下一首按钮 */
.ygma-btn.prev-song,
.ygma-btn.next-song {
    font-size: 9px !important;
}

/* 按钮hover效果 */
.ygma-btn:hover {
    background-color: transparent !important;
    border-color: #0056b3 !important;
    color: #0056b3 !important;
}

/* 适配 style2/style3 按钮颜色 */
.ygma-player-controls.style2 .ygma-btn,
.ygma-player-controls.style3 .ygma-btn {
    border-color: #fff !important;
    color: #fff !important;
}
.ygma-player-controls.style2 .ygma-btn:hover,
.ygma-player-controls.style3 .ygma-btn:hover {
    border-color: #ccc !important;
    color: #ccc !important;
}

/* 进度条区域 */
.ygma-progress-area {
    flex: 1 !important;
    width: calc(100% - 110px) !important;
    margin-bottom: 0 !important;
}
.ygma-progress-container {
    width: 100% !important;
    height: 6px !important;
    background: #eee;
    border-radius: 3px;
    margin: 0 !important;
    position: relative;
    cursor: pointer;
}
.ygma-progress-bar {
    height: 100%;
    background: #007bff;
    border-radius: 3px;
    width: 0%;
}

/* 时间显示 */
.ygma-current-time, .ygma-total-time {
    position: absolute;
    top: -18px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
}
.ygma-current-time {
    left: 0;
}
.ygma-total-time {
    right: 0;
}

/* 搜索框 - 提示文字优化 */
.ygma-search-box {
    margin-top: 10px !important;
}
#ygma-song-search {
    width: 100% !important;
    padding: 8px !important;
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.3) !important;
    font-size: 12px !important;
    color: #666 !important;
    -webkit-appearance: none;
    appearance: none;
    outline: none !important;
}

/* 提示文字样式 */
#ygma-song-search::placeholder {
    color: #333 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}
#ygma-song-search::-webkit-input-placeholder {
    color: #333 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}
#ygma-song-search::-moz-placeholder {
    color: #333 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}
#ygma-song-search:-ms-input-placeholder {
    color: #333 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}
#ygma-song-search:-moz-placeholder {
    color: #333 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

/* 列表区 */
.ygma-player-list {
    position: relative;
    z-index: 2;
    max-height: 130px !important;
    overflow-y: auto;
}
#ygma-song-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 通用滚动条美化 */
.ygma-player-list::-webkit-scrollbar {
    width: 4px;
}
.ygma-player-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}
.ygma-player-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}
.ygma-player-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* 样式1：简约风格 */
.ygma-player-list.style1 #ygma-song-list li {
    padding: 2px 12px;
    margin: 0px 0;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    list-style: none;
    font-size: 12px;
    transition: all 0.2s ease;
}
.ygma-player-list.style1 #ygma-song-list li.song-active {
    background: rgba(255, 107, 107, 0.4);
    font-weight: 600;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
}
.ygma-player-list.style1 #ygma-song-list li.song-inactive {
    background: transparent;
}
.ygma-player-list.style1 #ygma-song-list li:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(2px);
}

/* 样式2：渐变风格 */
.ygma-player-list.style2 #ygma-song-list li {
    padding: 2px 12px;
    margin: 0px 0;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    list-style: none;
    font-size: 12px;
    transition: all 0.2s ease;
}
.ygma-player-list.style2 #ygma-song-list li.song-active {
    background: linear-gradient(90deg, rgba(100, 181, 246, 0.4), rgba(66, 165, 245, 0.4));
    font-weight: 600;
    border-left: 3px solid #64B5F6;
}
.ygma-player-list.style2 #ygma-song-list li.song-inactive {
    background: transparent;
    border-left: 3px solid transparent;
}
.ygma-player-list.style2 #ygma-song-list li:hover {
    background: rgba(100, 181, 246, 0.2);
    border-left: 3px solid #90CAF9;
}

/* 样式3：暗黑质感 */
.ygma-player-list.style3 #ygma-song-list li {
    padding: 2px 12px;
    margin: 0px 0;
    border-radius: 8px;
    cursor: pointer;
    color: #e0e0e0;
    list-style: none;
    font-size: 12px;
    transition: all 0.2s ease;
    background: rgba(30,30,30,0.1);
}
.ygma-player-list.style3 #ygma-song-list li.song-active {
    background: rgba(76, 175, 80, 0.4);
    font-weight: 600;
    text-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
}
.ygma-player-list.style3 #ygma-song-list li.song-inactive {
    opacity: 0.8;
}
.ygma-player-list.style3 #ygma-song-list li:hover {
    background: rgba(76, 175, 80, 0.2);
    opacity: 1;
    color: #fff;
}