/* 禅释 · 此刻 - 背景音乐控制按钮样式 */

/* ========================================
   深色模式适配
   ======================================== */
[data-theme="dark"] .music-control.dragging::before {
    background: rgba(139, 115, 85, 0.15);
    border-color: rgba(139, 115, 85, 0.4);
}

[data-theme="dark"] .music-btn:hover {
    filter: brightness(1.2);
}

/* ========================================
   背景音乐悬浮按钮 - 可拖动设计
   ======================================== */

.music-control {
    position: fixed;
    left: 20px;
    top: 50%;
    z-index: 1000;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: none;
}

.music-control.dragging {
    cursor: grabbing;
}

.music-control.dragging .music-btn {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* 拖动时的视觉反馈 */
.music-control.dragging::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: rgba(139, 115, 85, 0.1);
    border: 2px dashed rgba(139, 115, 85, 0.3);
    animation: pulse-drag 1s ease infinite;
    pointer-events: none;
}

@keyframes pulse-drag {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.music-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    padding: 0;
    position: relative;
    z-index: 2;
}

.music-btn:hover {
    transform: scale(1.1);
}

.music-btn.playing .music-icon-img {
    filter: brightness(1.2);
}

.music-btn.playing::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--zen-gold);
    box-shadow: 0 0 6px rgba(201, 169, 110, 0.6);
    animation: bell-pulse 2s ease-in-out infinite;
}

@keyframes bell-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.music-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* 铃声提示气泡 */
.music-tooltip {
    position: absolute;
    bottom: 60px;
    left: 0;
    background: var(--zen-dark);
    color: var(--zen-white);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.music-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    border: 6px solid transparent;
    border-top-color: var(--zen-dark);
}

.music-tooltip.show {
    opacity: 1;
}

.music-tooltip .tooltip-action {
    color: var(--zen-gold);
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 380px) {
    .music-control {
        left: 16px;
        bottom: 90px;
    }

    .music-icon-img {
        width: 32px;
        height: 32px;
    }

    .music-tooltip {
        font-size: 12px;
        padding: 8px 12px;
    }
}