/* ====== 关键词高亮 ====== */

.hnc-kw-highlight {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: #93b4f5;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: text-decoration-style 0.15s, background-color 0.15s;
    border-radius: 2px;
}

.hnc-kw-highlight:hover {
    text-decoration-style: solid;
    text-decoration-color: #2563eb;
    background-color: rgba(37, 99, 235, 0.08);
}

/* ====== 释义浮窗 ====== */

.hnc-kw-popup {
    position: absolute;
    z-index: 10000;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    padding: 16px 20px;
    max-width: 360px;
    min-width: 200px;
    line-height: 1.6;
    animation: hncKwPopupIn 0.15s ease-out;
}

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

.hnc-kw-popup-word {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.hnc-kw-popup-cn {
    font-size: 22px;
    color: #475569;
    margin-bottom: 4px;
}

.hnc-kw-popup-def {
    font-size: 22px;
    color: #334155;
    margin-bottom: 4px;
}

.hnc-kw-popup-example {
    font-size: 22px;
    color: #64748b;
    font-style: italic;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}

/* ====== 闪烁动画 ====== */

.hnc-kw-flash {
    animation: hncKwFlash 0.75s ease-in-out 2;
}

@keyframes hncKwFlash {
    0%, 100% { background-color: transparent; }
    50%      { background-color: rgba(250, 204, 21, 0.45); }
}

/* ====== 移动端适配 ====== */

@media (max-width: 600px) {
    .hnc-kw-popup {
        max-width: calc(100vw - 24px);
        min-width: 0;
        padding: 12px 14px;
        border-radius: 10px;
    }

    .hnc-kw-popup-word {
        font-size: 22px;
    }

    .hnc-kw-popup-cn,
    .hnc-kw-popup-def,
    .hnc-kw-popup-example {
        font-size: 18px;
    }
}
