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

/* 修复视频图标的位置 */
.video-icon {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    font-size: 18px;
    color: #1a1a1a;
    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;
}

/* 例句容器样式 */
.sentences-container {
    margin-top: 1px;

}

/* 单个例句项 */
.sentence-item {
    display: block;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border-radius: 8px;
    transition: all 0.3s ease;

}

.sentence-item:hover {
    background: linear-gradient(135deg, #e8f5f3 0%, #d4e8e4 100%);
    border-left-color: #1a7a65;
}

/* 例句序号 */
.sentence-number {
    display: inline-block;
    background: linear-gradient(135deg, #28977e 0%, #1a7a65 100%);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 6px;
    box-shadow: 0 2px 6px rgba(40, 151, 126, 0.3);
}

/* 英文原句 */
.sentence-original {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.6;
    font-style: italic;
}

/* 例句英文句行（句文本 + 朗读按钮 横向排列） */
.sentence-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sentence-text {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.6;
}

/* ===== 通用朗读图标按钮（dict.png，无背景） ===== */
.tts-icon-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent; /* 无背景，仅图标 */
    box-shadow: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s ease;
}
.tts-icon-btn:active {
    opacity: 0.7;
}
.tts-icon {
    width: 26px;
    height: 26px;
    display: block;
    object-fit: contain;
    border-radius: 0;
}

/* 播放中动画：图标放大缩小的呼吸效果 */
.tts-icon-btn.speaking .tts-icon {
    animation: tts-breathe 0.9s ease-in-out infinite;
}
@keyframes tts-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}

/* 例句朗读按钮：与句文本首行对齐 */
.sentence-line .sentence-play-btn {
    margin-top: 2px;
}

/* 串词成句短文朗读按钮：置于英文原文块右上角 */
.passage-line {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.passage-line .passage-play-btn {
    margin-top: 14px; /* 与原文首行大致对齐 */
}
.passage-line .passage-text {
    flex: 1;
    min-width: 0;
}


/* 中文翻译 */
.sentence-translation {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    margin-top: 4px;
}

/* 翻译切换按钮 */
.sentence-trans-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: #999;
    font-size: 10px;
    padding: 0;
    border-radius: 0;
    cursor: pointer;
    margin-top: 2px;
    margin-bottom: 0;
    -webkit-tap-highlight-color: transparent;
}
.sentence-trans-toggle:hover {
    color: #666;
}
.sentence-trans-toggle i {
    font-size: 10px;
}

/* 例句中当前单词高亮 */
.sentence-word-highlight {
    color: #e74c3c;
    font-weight: bold;
    background-color: #fff3cd;

    border-radius: 3px;
}

/* 例句中可点击单词 */
.sentence-word-clickable {
    cursor: pointer;
    border-radius: 2px;
    padding: 0 1px;
    transition: background-color 0.15s ease;
}
.sentence-word-clickable:hover {
    background-color: #d4e8e4;
}

/* 单词查询弹出窗口 —— 现代卡片风（完全居中、整体不滚动） */
.word-lookup-popup {
    /* 视口完全居中 —— 永不出现"左上角"、"超出视口"、"贴边怪异"问题 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;

    /* 视觉：渐变 + 圆角 + 多层阴影（绿色调 + 玻璃感） */
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 20px;
    box-shadow:
        0 24px 64px rgba(40, 151, 126, 0.28),
        0 6px 16px rgba(0, 0, 0, 0.10),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(40, 151, 126, 0.18);

    /* 尺寸：固定宽度 + 高度自适应；不滚动 */
    width: 340px;
    max-width: calc(100vw - 32px);
    max-height: 86vh;          /* 极限高 86vh；超出后整体不滚动，由 yd-content 内部滚动 */
    overflow: hidden;          /* 弹窗本身不出现滚动条 */

    /* 弹性布局：head / accents 不收缩，content 撑开并内部滚动 */
    display: flex;
    flex-direction: column;

    /* 进入动画（保持居中 transform，加一点 scale 上扬效果） */
    animation: popupFadeIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);

    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
@keyframes popupFadeIn {
    from { opacity: 0; transform: translate(-50%, calc(-50% - 10px)) scale(0.96); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.word-lookup-popup::-webkit-scrollbar { width: 0; height: 0; }  /* 弹窗本身彻底无滚动条 */
.word-lookup-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.word-lookup-close:hover {
    color: #333;
}
.word-lookup-header {
    margin-bottom: 8px;
    padding-right: 20px;
}
.word-lookup-word {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
}
.word-lookup-phonetic {
    font-size: 15px;
    color: #7f8c8d;
    margin-left: 8px;
    font-family: 'Times New Roman', serif;
}
.word-lookup-translation {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.5;
}
.word-lookup-audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: #28977e;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.word-lookup-audio-btn:hover {
    background: #1a7a65;
}

/* ===== 点词查词弹窗（有道免费接口：英/美音标 + 喇叭 + 词性释义） ===== */
.yd-dict-popup {
    /* 继承 .word-lookup-popup 的 flex column 布局；这里只补字体 */
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
/* 单词头：单词名 + 关闭按钮 */
.yd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;             /* flex 布局下不收缩，保证头部始终完整显示 */
    padding: 14px 44px 14px 22px;     /* 右边留 44 给关闭按钮 */
    background: linear-gradient(135deg, #28977e 0%, #1a7a65 100%);
    color: #fff;
    border-radius: 20px 20px 0 0;     /* 圆角与弹窗一致 */
    position: relative;
    box-shadow: 0 2px 6px rgba(40, 151, 126, 0.15);
}
.yd-word {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1.2;
    word-break: break-word;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 英/美音标 + 喇叭：放在头下面、释义上面 */
.yd-accents {
    flex: none;             /* 头部和音标一起先占满，再让释义区内部滚动 */
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(180deg, #f8fafb 0%, #f1f5f7 100%);
    border-bottom: 1px solid rgba(40, 151, 126, 0.08);
}
.yd-acc {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 30px;
}
.yd-acc-tag {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.yd-acc-uk { background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%); }   /* 英式 - 红 */
.yd-acc-us { background: linear-gradient(135deg, #2980b9 0%, #3498db 100%); }   /* 美式 - 蓝 */
.yd-spk {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.15s ease;
}
.yd-spk:hover { background: rgba(40, 151, 126, 0.08); }
.yd-spk:active { background: rgba(40, 151, 126, 0.15); }
.yd-spk-ico {
    width: 24px;
    height: 24px;
    display: block;
    transition: transform 0.15s ease;
}
.yd-spk:active .yd-spk-ico {
    transform: scale(0.85);
}
.yd-spk.speaking .yd-spk-ico {
    animation: tts-breathe 0.9s ease-in-out infinite;
}
@keyframes tts-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}
.yd-phone {
    font-size: 17px;
    color: #2c3e50;
    font-family: 'Times New Roman', Times, serif;
    letter-spacing: 0.3px;
    flex: 1;
    font-weight: 500;
}
.yd-phone-empty {
    color: #bbb;
    font-style: italic;
    font-size: 15px;
}

/* 释义区：flex 弹性伸缩 + 内部滚动（只在内容多时才出现滚动条） */
.yd-content {
    flex: 1 1 auto;
    min-height: 0;          /* 关键：允许 flex 子项收缩到内容所需 */
    overflow-y: auto;
    padding: 12px 18px 14px;
    /* 细滚动条：仅释义区出现 */
    scrollbar-width: thin;
    scrollbar-color: rgba(40, 151, 126, 0.3) transparent;
}
.yd-content::-webkit-scrollbar { width: 4px; }
.yd-content::-webkit-scrollbar-thumb {
    background: rgba(40, 151, 126, 0.3);
    border-radius: 2px;
}
.yd-content::-webkit-scrollbar-track { background: transparent; }

.yd-tip {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
    line-height: 1.5;
}
.yd-tip.yd-empty {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.06);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(192, 57, 43, 0.15);
}
.yd-tip.yd-empty-hint {
    color: #28977e;
    background: rgba(40, 151, 126, 0.06);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px dashed rgba(40, 151, 126, 0.3);
    font-size: 12px;
    transition: background 0.15s ease;
}
.yd-tip.yd-empty-hint:hover {
    background: rgba(40, 151, 126, 0.12);
}
.yd-ex-item {
    font-size: 14px;
    color: #34495e;
    line-height: 1.7;
    margin-bottom: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 10px;
    border: 1px solid rgba(40, 151, 126, 0.08);
    word-break: break-word;
    transition: all 0.18s ease;
}
.yd-ex-item:hover {
    border-color: rgba(40, 151, 126, 0.22);
    background: linear-gradient(135deg, #f8fafb 0%, #eef7f4 100%);
    transform: translateX(2px);
}
.yd-ex-item .yd-pos {
    color: #28977e;
    font-weight: 700;
    margin-right: 6px;
    font-style: normal;
    font-size: 13px;
    background: rgba(40, 151, 126, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
}
/* 折叠时超过 COLLAPSE_LIMIT 的条目隐藏 */
.yd-ex-collapsed { display: none; }

/* 查看全部/收起 按钮 */
.yd-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 7px 14px;
    background: linear-gradient(135deg, rgba(40, 151, 126, 0.08) 0%, rgba(72, 219, 251, 0.10) 100%);
    border: 1px solid rgba(40, 151, 126, 0.22);
    border-radius: 999px;
    color: #28977e;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 3px rgba(40, 151, 126, 0.06);
}
.yd-toggle:hover {
    background: linear-gradient(135deg, rgba(40, 151, 126, 0.18) 0%, rgba(72, 219, 251, 0.20) 100%);
    border-color: #28977e;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40, 151, 126, 0.15);
}
.yd-toggle:active { transform: translateY(0); }
.yd-toggle i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

/* 关闭按钮：移到头右上角 */
.yd-close {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.20);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    backdrop-filter: blur(4px);
    transition: background 0.15s ease, transform 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}
.yd-close:hover { background: rgba(255, 255, 255, 0.35); transform: rotate(90deg); }
.yd-close:active { background: rgba(255, 255, 255, 0.45); }

/* 响应式调整 */
@media (max-width: 480px) {
    .sentences-container {
        margin-top: 12px;
        padding-top: 10px;
    }
    
    .sentence-item {
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    
    .sentence-number {
        width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 10px;
        margin-right: 5px;
    }
    
    .sentence-original {
        font-size: 13px;
    }
    
    .sentence-translation {
        font-size: 12px;
    }
}

 .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;
            }
        }

/* 测试按钮 - 与控制栏统一风格 */
.control-btn.test-btn {
    background: #1a7a65;
    color: #28977e;
    border: 1px solid rgba(40, 151, 126, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.control-btn.test-btn:hover {
    background: #1a7a65;
    border-color: #28977e;
}

.control-btn.test-btn.active {
    background: #28977e;
    color: #fff;
    border-color: #28977e;
    box-shadow: 0 2px 12px rgba(40, 151, 126, 0.35);
}

/* 测试区域 - 现代简洁卡片 */
.test-area {
    position: relative;
    margin-top: 15px;
    animation: testFadeIn 0.2s ease-out;
}

@keyframes testFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.test-card {
    position: relative;
    padding: 10px 12px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28977e, #48dbfb, #28977e);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.test-sentence-wrap {
    margin-bottom: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f8fafb 0%, #f0f4f5 100%);
    border-radius: 12px;
    position: relative;
}

.test-sentence-wrap::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, #28977e, #48dbfb);
    border-radius: 2px;
}

.test-sentence {
    font-size: 15px;
    line-height: 1.7;
    color: #2c3e50;
    font-weight: 500;
    padding-left: 10px;
}

.test-hint {
    color: #121212;
    font-size: 13px;
    font-weight: bold;
    padding: 2px 6px;
    background: rgba(136, 153, 166, 0.08);
    border-radius: 6px;
    margin-left: 4px;
}

/* 测试答题音效开关 —— 置于题卡底部的工具条，带文字标签，避免误认为句子发音 */
.test-sound-row {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.test-sound-row-label {
    font-size: 12px;
    color: #7a8a90;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.test-sound-row-label i {
    font-size: 12px;
    color: #28977e;
}

.test-sound-switch {
    flex-shrink: 0;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.test-sound-switch-track {
    display: inline-flex;
    align-items: center;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #ccd6da;
    padding: 2px;
    box-sizing: border-box;
    transition: background 0.25s ease;
}

.test-sound-switch-thumb {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.test-sound-switch.on .test-sound-switch-track {
    background: linear-gradient(135deg, #28977e, #48dbfb);
}

.test-sound-switch.on .test-sound-switch-thumb {
    transform: translateX(18px);
}

/* 反馈浮层胶囊 —— 不占排版空间，作答后悬浮在题卡正上方（盖住音素区，不挡题目/选项） */
.test-feedback {
    position: absolute;
    left: 50%;
    top: -38px;
    transform: translateX(-50%) scale(0.85);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.test-feedback.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.feedback-correct,
.feedback-wrong {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border: none;
}

.feedback-correct {
    background: black;
    box-shadow: 0 5px 14px rgba(40, 151, 126, 0.32);
}

.feedback-wrong {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    box-shadow: 0 5px 14px rgba(255, 107, 107, 0.3);
}

.feedback-icon {
    font-size: 18px;
}

.feedback-text {
    letter-spacing: 0.5px;
}

/* 选项区域 */
.test-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.test-option {
    position: relative;
    padding: 12px 14px 12px 42px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    color: #2c3e50;
    border: 1.5px solid #e8eef0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    text-align: left;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.option-letter {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, #e8f5f2, #e0f2fe);
    color: #28977e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option-text {
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: center;
}

.test-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(40, 151, 126, 0.06), rgba(72, 219, 251, 0.06));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.test-option:hover:not(:disabled)::before {
    opacity: 1;
}

.test-option:hover:not(:disabled) {
    border-color: #28977e;
    color: #28977e;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(40, 151, 126, 0.15);
}

.test-option:hover:not(:disabled) .option-letter {
    background: linear-gradient(135deg, #28977e, #48dbfb);
    color: #fff;
}

.test-option:active:not(:disabled) {
    transform: translateY(0);
}

.test-option.correct {
    background: linear-gradient(135deg, #28977e 0%, #1e876e 100%);
    color: #fff !important;
    border-color: #28977e;
    animation: correctPulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 20px rgba(40, 151, 126, 0.4);
}

.test-option.correct .option-letter {
    background: rgba(255, 255, 255, 0.25);
    color: #fff !important;
}

.test-option.correct .option-text {
    color: #fff !important;
}

.test-option.correct:hover {
    color: #fff !important;
}

.test-option.wrong {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #fff !important;
    border-color: #ff6b6b;
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.test-option.wrong .option-letter {
    background: rgba(255, 255, 255, 0.25);
    color: #fff !important;
}

.test-option.wrong .option-text {
    color: #fff !important;
}

.test-option.wrong:hover {
    color: #fff !important;
}

.test-option:disabled {
    cursor: not-allowed;
    opacity: 0.92;
}

.test-option:disabled:hover {
    transform: none;
    box-shadow: none;
}

.test-option.option-long {
    grid-column: 1 / -1;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* 彩屑动画 - 加长降落时间 */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.confetti {
    position: absolute;
    top: -20px;
    animation: confettiFall 5.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(0);
        opacity: 1;
    }
    8% {
        transform: translateY(15px) rotate(72deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(200px) rotate(360deg) scale(1);
        opacity: 1;
    }
    85% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(500px) rotate(1080deg) scale(0.3);
        opacity: 0;
    }
}

/* 响应式设计 - 多断点适配 */
@media (max-width: 768px) {
    .test-card {
        padding: 10px;
    }
    
    .test-sentence {
        font-size: 14px;
    }
    
    .test-options {
        gap: 8px;
    }
    
    .test-option {
        padding: 12px 12px 12px 38px;
        font-size: 13px;
    }
    
    .option-letter {
        left: 10px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .test-card {
        padding: 8px;
        border-radius: 12px;
    }
    
    .test-sentence-wrap {
        padding: 10px 12px;
        margin-bottom: 8px;
    }
    
    .test-sentence {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .test-hint {
        font-size: 12px;
    }
    
    .test-feedback {
        margin-bottom: 8px;
        min-height: 28px;
    }
    
    .feedback-correct,
    .feedback-wrong {
        padding: 4px 16px;
        font-size: 13px;
    }
    
    .test-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .test-option {
        padding: 10px 10px 10px 36px;
        font-size: 13px;
    }
    
    .option-letter {
        left: 8px;
        width: 20px;
        height: 20px;
        border-radius: 6px;
    }
    
    .control-btn.test-btn {
        font-size: 12px;
       
    }
}

@media (max-width: 360px) {
    .test-sentence {
        font-size: 13px;
    }
    
    .test-options {
        gap: 6px;
    }
    
    .test-option {
        padding: 10px 8px 10px 34px;
        font-size: 12px;
    }
}