/* ===== 重置所有播放器自定义样式，保证基础布局 ===== */
#aplayer {
    width: 100%;
    height: 100%;
    min-height: 560px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部信息区 */
.aplayer-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}
.aplayer-pic {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}
.aplayer-body {
    flex: 1;
}
.aplayer-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.aplayer-artist {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* ===== 主内容区：左右分栏 ===== */
.aplayer-main-content {
    display: flex;
    flex: 1;
    min-height: 0; /* 关键：允许flex子项收缩 */
    overflow: hidden;
}

/* 左侧歌词面板 */
.aplayer-lrc-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
}

/* 控制条（进度、时间、自定义按钮） */
.aplayer-controller {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.aplayer-bar-wrap {
    flex: 1;
}
.aplayer-bar {
    background: #e5e5e5;
    height: 4px;
    border-radius: 2px;
    cursor: pointer;
}
.aplayer-bar .aplayer-played {
    background: #e91e63;
    border-radius: 2px;
    height: 100%;
}
.aplayer-time {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}
.custom-controls {
    display: flex;
    gap: 8px;
}
.custom-controls button {
    background: #f5f5f5;
    border: none;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.custom-controls button.active {
    background: #e91e63;
    color: #fff;
}
.custom-controls button:hover:not(.active) {
    background: #e0e0e0;
}

/* 歌词容器 - 关键修复：确保高度且内容可见 */
.aplayer-lrc-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
}
/* 必须覆盖默认样式，保证歌词p正常显示 */
.aplayer-lrc {
    display: block !important;
    text-align: center;
    padding: 0 !important;
    margin: 0 !important;
}
.aplayer-lrc p {
    font-size: 24px;
    line-height: 2.2;
    color: #666;
    transition: all 0.3s;
    margin: 0;
    padding: 6px 0;
}
.aplayer-lrc p.aplayer-lrc-current {
    color: #e91e63;
    font-size: 30px;
    font-weight: 600;
    transform: scale(1.02);
}

/* 右侧歌曲列表 - 网易云风格 */
.aplayer-list {
    width: 260px;
    background: #fafafa;
    border-left: 1px solid #f0f0f0;
    overflow-y: auto;
    flex-shrink: 0;
    padding: 15px 0;
}
.aplayer-list ol {
    list-style: none;
    margin: 0;
    padding: 0 12px;
}
.aplayer-list li {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aplayer-list li:hover {
    background: rgba(233, 30, 99, 0.05);
}
.aplayer-list li.aplayer-list-light {
    background: rgba(233, 30, 99, 0.1);
    color: #e91e63;
    font-weight: 500;
}

/* 底部滚动歌词条 */
#lyric-ticker {
    height: 48px;
    line-height: 48px;
    background: #fef6f8;
    border-top: 1px solid #ffe2ea;
    color: #e91e63;
    font-size: 15px;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}
#lyric-ticker .ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-scroll 20s linear infinite;
}
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
#lyric-ticker:hover .ticker-content {
    animation-play-state: paused;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .aplayer-main-content {
        flex-direction: column;
    }
    .aplayer-list {
        width: 100%;
        border-left: none;
        border-top: 1px solid #eee;
        max-height: 160px;
        order: 2;
    }
    .aplayer-lrc-panel {
        order: 1;
    }
    .aplayer-lrc-container {
        padding: 15px;
    }
    .aplayer-lrc p {
        font-size: 18px;
        line-height: 1.8;
    }
    .aplayer-lrc p.aplayer-lrc-current {
        font-size: 22px;
    }
    .aplayer-info {
        padding: 12px 15px;
    }
    .aplayer-pic {
        width: 50px;
        height: 50px;
    }
    .custom-controls button {
        padding: 4px 12px;
        font-size: 12px;
    }
    #lyric-ticker {
        height: 42px;
        line-height: 42px;
        font-size: 13px;
    }
}