/* 确保音素对元素有相对定位 */
.mapping-pair {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
   
    position: relative; /* 关键：添加相对定位 */
}

/* 修复视频图标的位置 */
.video-icon {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    font-size: 18px;
    color: #ff6b6b;
    cursor: pointer;
    z-index: 1; /* 确保在其他元素上方 */
    transition: all 0.2s; /* 添加平滑过渡效果 */
}

/* 视频模态框样式 */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.video-modal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    position: relative;
}

.video-modal .close-btn {
    position: absolute;
    top: 0px;
    right: 0px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.video-modal .phoneme-name {
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
}

/* 防止音素对中的文本影响布局 */
.grapheme, .phoneme {
    text-align: center;
}

.phoneme-highlight {
  color: #f72585;
}

 .floating-btn {
            position: fixed;
            right: 20px;
            bottom: 20px;
            background: linear-gradient(135deg, #8E2DE2, #4A00E0);
            color: white;
            border: none;
            border-radius: 50%;
            width: 60px;
            height: 60px;
            cursor: move;
            box-shadow: 0 4px 20px rgba(142, 45, 226, 0.3);
            font-size: 14px;
            font-weight: 500;
            text-decoration: none;
            z-index: 9999;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            user-select: none;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
        }
        
        .floating-btn:hover:not(.dragging) {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 6px 25px rgba(142, 45, 226, 0.4);
        }
        
        .floating-btn.dragging {
            cursor: grabbing;
            box-shadow: 0 6px 25px rgba(142, 45, 226, 0.4);
        }
        
        .drag-ghost {
            position: fixed;
            background: rgba(142, 45, 226, 0.15);
            border: 2px dashed rgba(255, 255, 255, 0.6);
            border-radius: 50%;
            pointer-events: none;
            z-index: 9998;
            transition: opacity 0.2s ease;
            opacity: 0;
        }
        
        .drag-ghost.visible {
            opacity: 1;
        }
        
        @media (max-width: 768px) {
            .floating-btn {
                right: 15px;
                bottom: 15px;
                width: 50px;
                height: 50px;
                font-size: 12px;
            }
        }