/* 文章内短代码播放器 */
meting-js {
    display: block;
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.aplayer {
    margin: 0 !important;
    border-radius: 8px !important;
    font-family: inherit !important;
}
.aplayer.aplayer-withlist .aplayer-list {
    border-radius: 0 0 8px 8px;
}

/* 错误提示 */
.nmp-error {
    color: #dc3232;
    padding: 10px;
    background: #fef0f0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    margin: 12px 0;
}

/* 侧边栏小工具适配 */
.widget meting-js {
    margin: 0;
    box-shadow: none;
}
.widget .aplayer {
    border-radius: 6px !important;
}

/* ========== 可拖拽悬浮播放器核心样式 ========== */
.nmp-float-container {
    position: fixed;
    z-index: 99999;
    right: 20px;
    bottom: 20px;
    user-select: none;
    -webkit-user-select: none;
}

/* 悬浮球按钮 - 核心修复：禁用浏览器默认触摸手势 */
.nmp-float-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    transition: transform 0.15s ease, filter 0.2s ease;
    touch-action: none; /* 禁用浏览器默认滑动/缩放手势 */
    -webkit-touch-callout: none; /* 禁用iOS长按菜单 */
    -webkit-user-select: none;
    user-select: none;
}
.nmp-float-toggle:active {
    cursor: grabbing;
    transform: scale(0.92);
}
.nmp-float-toggle:hover {
    filter: brightness(0.9);
}

/* 播放器弹出面板 */
.nmp-float-panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 320px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* 展开状态 */
.nmp-float-container.is-open .nmp-float-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.nmp-float-player {
    display: block;
    margin: 0;
}
.nmp-float-player .aplayer {
    border-radius: 0 !important;
}

/* 移动端适配 */
@media screen and (max-width: 480px) {
    .nmp-float-container {
        right: 16px;
        bottom: 16px;
    }
    .nmp-float-toggle {
        width: 48px;
        height: 48px;
    }
    .nmp-float-toggle svg {
        width: 20px;
        height: 20px;
    }
    .nmp-float-panel {
        width: calc(100vw - 32px);
        bottom: 60px;
        right: 50%;
        transform: translateX(50%) translateY(16px) scale(0.95);
    }
    .nmp-float-container.is-open .nmp-float-panel {
        transform: translateX(50%) translateY(0) scale(1);
    }
}