/* 默认样式 (桌面端) */
.music-toggle {
    position: fixed;
    top: 22px;
    right: 22px; /* 默认在右上角 */
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border: 1px solid rgba(221, 192, 199, 0.75);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #8e6f78;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 26px rgba(216, 196, 201, 0.18);
    cursor: pointer;
    transition: all 0.35s ease;
}

.music-toggle:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.88);
}

.music-toggle.is-playing {
    color: #ffffff;
    background: linear-gradient(135deg, #e7b6c5 0%, #cfa6c9 100%);
    border-color: rgba(214, 160, 182, 0.9);
}

.music-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

/* --- 响应式核心修改 --- */

@media (max-width: 860px) {
    .music-toggle {
        /* 关键：手机端避开右侧的汉堡菜单 */
        top: 18px; 
        right: 75px; /* 向左偏移，给菜单按钮腾出空间 */
        padding: 10px;
        gap: 0; /* 隐藏文字后不需要间距 */
    }

    .music-text {
        display: none; /* 手机端隐藏 "Music" 文字，只留图标 */
    }

    .music-icon {
        width: 30px; /* 图标稍微大一点，方便手指点击 */
        height: 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .music-toggle {
        top: 14px;
        right: 64px; /* 针对超窄屏微调位置 */
    }
}

/* 动画保持不变 */
.music-toggle.is-playing .music-icon {
    animation: musicPulse 1.6s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(12deg); }
}

.music-toggle {
    position: fixed;
    /* 默认位置 */
    top: 20px;
    right: 20px;
    z-index: 10000; /* 确保它在最前面 */
}

/* 专门针对手机的微调 */
@media (max-width: 860px) {
    .music-toggle {
        top: 15px;
        right: 15px; /* 如果还是太靠右，可以试着改写成 left: 15px 放到左边去 */
    }
    .music-text {
        display: none; /* 手机版只留图标，省空间 */
    }
}