* {
    box-sizing: border-box;
}

:root {
    /* 颜色RGB值（用于rgba） */
    --color-primary-rgb: 78, 146, 248;
}

/* 深色主题 */
:root[data-theme="dark"] {

    /* 深色主题RGB值 */
    --color-primary-rgb: 77, 122, 175;
}

/* 深色主题下的未完成任务样式 */
:root[data-theme="dark"] .word-item-pending {
    background-color: rgba(77, 122, 175, 0.15);
    /* 深色主题下的淡蓝色背景 */
}

:root[data-theme="dark"] .word-item-pending:hover {
    background-color: rgba(77, 122, 175, 0.25);
    /* 深色主题下悬停时蓝色稍深 */
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background: var(--color-surface) !important;
}

.content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90vw;
    min-width: 300px;
    max-width: 500px;
    height: 100%;
}

.logo {
    width: 100%;
    max-width: 450px;
    margin: 40px 0 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.logo:hover {
    /* transform: translateY(-2px); */
}

.logo-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    /* 倾斜 */
    transform: rotate(-5deg);
}

.logo:hover .logo-icon {
    transform: rotate(-5deg) scale(1.1);
}

.flashcard-icon {
    width: 90px;
    height: 50px;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px var(--shadow-color));
}

.logo:hover .flashcard-icon {
    filter: drop-shadow(3px 3px 6px var(--shadow-color));
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.logo-title {
    margin: 0;
    padding: 0;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.5px;
    /* 移除hover效果 */
}

.logo-subtitle {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    font-weight: 400;
    opacity: 0.9;
    /* 移除hover效果 */
}

.task-summary {
    text-align: center;
    margin-bottom: 16px;
    font-size: 1rem;
    margin-top: 20px;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0px;

}

.actions button {
    padding: 8px 16px;
    font-size: 1.25rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.start {
    background-color: var(--color-primary);
    color: var(--color-bg);
}

.start:hover {
    background-color: var(--color-primary-hover);
}

.refresh {
    color: var(--color-text);
    background-color: var(--color-secondary-gray);
}

.refresh:hover {
    background-color: var(--color-secondary-gray-hover);
}

button:disabled {
    background-color: #e0e0e0;
    /* 灰色背景 */
    color: #9e9e9e;
    /* 浅灰文字 */
    border: 1px solid #ccc;
    /* 边框 */
    cursor: not-allowed;
    /* 禁止鼠标样式 */
    opacity: 0.7;
    /* 半透明感 */
    box-shadow: none;
    /* 去掉阴影 */
}

.tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 12px;
    margin-top: 20px;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
}

.tabs span {
    margin: 0 4px;
    cursor: pointer;
    padding-bottom: 2px;
    white-space: nowrap;
}

.tabs .active {
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: bold;
}

.tabs .blank {
    flex-grow: 1;
}

/* 去掉按钮样式*/
#showExplainBtn {
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 5px;
}

#showExplainBtn img {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.word-list {
    width: 100%;
    background: var(--color-bg);
    border-radius: 6px;
    padding: 0 8px 16px 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    margin-bottom: 20px;
    min-height: 200px;
}

/* 表头样式 */
.word-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-bg);
    /* border-radius: 4px; */
    /* margin: 16px 0 8px 0; */
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-progress {
    flex-shrink: 0;
    width: 44px;
    text-align: center;
    /* margin-left: 4px; */
}

.header-word {
    flex-shrink: 0;
    min-width: 100px;
    margin-left: 10px;
}

.header-explain {
    flex-grow: 1;
    min-width: 0;
    margin-left: 14px;
}

.header-action {
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    margin: 0 5px;
}

.word-explain {
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
    margin-left: 20px;
    max-height: 100px;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;

    /* 渐变遮罩：内容从正常 → 底部透明 */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: bottom;
    -webkit-mask-size: 100% 100%;

    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
    mask-repeat: no-repeat;
    mask-position: bottom;
    mask-size: 100% 100%;
}

.word-explain-hide {
    text-shadow: 0 0 80px var(--shadow-color);
    color: transparent;
}

.word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
    cursor: pointer;
    /* 显示点击手势 */
    transition: background-color 0.3s;
    /* 平滑过渡效果 */
    /* border-radius: 6px; */
    flex-wrap: nowrap;
    /* gap: 8px; */
    min-height: 58px;
}

/* 未完成任务样式 - 淡蓝色背景 */
.word-item-pending {
    background-color: rgba(204, 222, 250, 0.1);
    /* 淡蓝色背景 */
    border-left: 3px solid var(--color-primary);
    /* 左侧蓝色边框强调 */
}

/* 已完成任务样式 */
.word-item-completed {
    opacity: 0.7;
    /* 降低透明度区分已完成任务 */
}

/* 悬停时变化 */
.word-item:hover {
    background-color: var(--color-surface-hover);
    /* 悬停时背景色变化 */
}

/* 未完成任务悬停效果 */
.word-item-pending:hover {
    background-color: rgba(78, 146, 248, 0.2);
    /* 悬停时蓝色稍深 */
}

.word-item:last-child {
    border-bottom: none;
}

.word-item a {
    margin-left: 5px;
    margin-right: 5px;
    flex-shrink: 0;
}

.word-info {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 100px;
    /* height: 40px; */
    margin-left: 10px;
}

.word-title {
    font-weight: bold;
}

.word-phonetic {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 1px;
}

.word-phonetic img {
    width: 15px;
    height: 15px;
    cursor: pointer;

}

.progress-circle {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: conic-gradient(var(--draw-color) calc(var(--percent) * 1%), var(--draw-bg-color) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-right: 2px;
    margin-left: 4px;
}

#loading {
    text-align: center;
    padding-bottom: 10px;
    color: var(--color-text-muted);
}

.text {
    word-wrap: break-word;
    /* 允许长单词换行 */
    word-break: break-all;
    /* 强制断行（处理颜文字很长的情况） */
    white-space: normal;
    /* 正常换行 */
    margin: 10px;

    background: var(--color-surface);
    color: var(--color-text);
    padding: 1rem 1.5rem;
    border-left: 5px solid var(--color-primary);
    border-radius: 6px;
    margin-bottom: 2rem;
    transition: background .3s;
}

.invisible-content {
    visibility: hidden;
    /* 或者使用 color: transparent; */
    white-space: normal;
    /* 默认允许折行 */
    width: 100%;
    /* 可选，看你是否需要强制宽度 */
}


/*弹出释义*/
.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    max-width: min(500px, 90%);
    width: 400px;
    max-height: 80vh;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 18px var(--shadow-color);
    padding: 20px;
}

.popup::-webkit-scrollbar {
    width: 6px;
}

.popup::-webkit-scrollbar-track {
    background: var(--color-surface);
    border-radius: 3px;
}

.popup::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

.popup::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

.popup-head {
    display: flex;
    justify-content: right;
    align-items: center;
    width: 100%;
    height: 35px;
}

.popover-content {
    padding: 3px;
    font-size: 1rem;
}

.popup-ipa {
    flex-grow: 1;
    text-align: left;
    padding-left: 10px;
    font-size: 1rem;
}

.popup-bts {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: 35px;
}

.popup-copy:active {
    transform: scale(0.95);
}

.popup-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    overflow-y: auto;
    flex: 1;
}

.popup-title {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.popup-title-text {
    font-size: 1.375rem;
    font-weight: bold;
    color: var(--color-primary);
    line-height: 1.2;
    flex-shrink: 0;
    flex-grow: 1;
}

.popup-title-ipa {
    font-size: 18px;
    color: var(--color-text-muted);
    line-height: 1.2;
    flex-shrink: 0;
    padding: 2px 6px;
    background: var(--color-surface);
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

/* .popup-hr {
    margin: -3px 0 13px 0;
    border: none;
    height: 1px;
    background-color: #ccccfb;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
} */

.popup-explain {
    margin: 6px 0;
    padding: 8px 12px;
    border-left: 3px solid var(--color-border);
    background: var(--color-bg);
    border-radius: 6px;
    font-size: 1rem;
}

.popup-explain span {
    font-weight: 600;
    color: var(--color-primary);
    margin-right: 6px;
    font-size: 1rem;
    font-weight: bold;
}

.popup-explain code {
    /* text-decoration: underline;           
    text-decoration-thickness: 1.1px;       
    text-underline-offset: 4px;           
    text-decoration-color: var(--color-text-muted); */
    /* margin-right: 6px; */
}

.popup-explain code::after {
    content: "|";
    color: var(--color-primary);
    margin: 0 3px;
}

.popup-explain code:last-of-type::after {
    content: "";
    /* 最后一个去掉竖线 */
}

.custom-definition {
    margin-top: 6px;
    position: relative;
}

.custom-definition textarea {
    width: 100%;
    height: 60px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px;
    font-size: 0.875rem;
    resize: none;
    outline: none;
    transition: border 0.2s;
    color: var(--color-text);
    background-color: var(--color-surface);
}

.custom-definition textarea:focus {
    border: 1px solid var(--color-border);
    background: var(--color-bg);
}

.helper-text {
    position: absolute;
    bottom: 10px;
    /* 距离文本框底部 */
    right: 10px;
    /* 距离文本框右边 */
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    pointer-events: none;
    /* 不影响点击 */
}

.popup-bottom {
    display: flex;
    justify-content: right;
    align-items: center;
    width: 100%;
    height: 40px;
    font-size: 0.875rem;
    margin-top: 10px;
}


/* 闪卡 */
/* 卡片容器：定位上下文和动画舞台 */
.card-wrapper {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: fixed;
    overflow: hidden;
    /* border-radius: 12px; */
    /* box-shadow: 0 8px 25px var(--shadow-color); */
    /* max-width: min(600px, 95%); */
    /* width: 600px; */
    /* max-height: min(600px, 95%) */


    /* top: 0;
    left: 0; */
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    /* 默认隐藏 */
    z-index: 1000;
}

/* .flashcard {
    width: 100%;
    background: var(--card-color);
    padding: 30px;
    box-sizing: border-box;
    color: var(--text-color);
} */

/* 悬浮导航按钮 */
.nav-button {
    position: absolute;
    /* 关键：相对于 .card-wrapper 定位 */
    top: 50%;
    transform: translateY(-50%);
    /* 垂直居中 */
    z-index: 1001;
    /* 确保在卡片内容之上 */

    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: rgba(223, 230, 248, 0.7);
    /* 半透明背景 */
    backdrop-filter: blur(5px);
    /* 毛玻璃效果，提升质感 */
    -webkit-backdrop-filter: blur(5px);
    font-size: 1.375rem;
    font-weight: bold;
    color: var(--color-primary);
    cursor: pointer;

    /* 初始隐藏 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    /* 平滑过渡效果 */
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, visibility 0.3s ease;
}

.nav-button:hover {
    opacity: 1;
    /* 悬停时不透明 */
    /* transform: translateY(-50%) scale(1.1);  */
    background: rgba(205, 219, 249, 0.9);
}

.nav-button.visible {
    opacity: 0.6;
    visibility: visible;
    pointer-events: auto;
}

.nav-button.visible:hover {
    opacity: 1;
}

.nav-button.left {
    /* left: 15px; */
    left: calc(100vw /2 - 300px);
    ;
}

.nav-button.right {
    /* right: 15px; */
    right: calc(100vw /2 - 300px);
    ;
}

/* 桌面端关闭按钮样式 */
.nav-button.close {
    /* 放在右侧按钮下面 */
    right: calc(100vw /2 - 300px);
    top: calc(50% + 50px);
    /* 与右侧按钮有一些距离 */
    transform: translateY(-50%);
    /* 红色系，与其他按钮区别 */
    background: rgba(252, 165, 165, 0.7);
    color: #dc2626;
}

.nav-button.close:hover {
    background: rgba(254, 202, 202, 0.9);
    /* 悬停时更亮的红色 */
}

.nav-button.close:active {
    transform: translateY(-50%) scale(0.95);
    /* 点击时缩放效果 */
}



@media screen and (max-width: 768px) {
    .content {
        width: 95vw;
        min-width: 280px;
    }

    .popup {
        max-width: min(400px, 95%);
        width: 90vw;
        max-height: 85vh;
        padding: 15px;
    }

    .logo {
        width: 100%;
        max-width: 320px;
        margin: 30px 0 25px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .logo:hover {
        transform: translateY(-1px);
    }

    .logo-icon {
        flex-shrink: 0;
        transition: transform 0.3s ease;
    }

    .logo:hover .logo-icon {
        /* transform: rotate(-3deg) scale(1.05); */
    }

    .flashcard-icon {
        /* width: 70px;
        height: 40px; */
        transition: all 0.3s ease;
        filter: drop-shadow(1px 1px 3px var(--shadow-color));
    }

    .logo:hover .flashcard-icon {
        filter: drop-shadow(2px 2px 4px var(--shadow-color));
    }

    .logo-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .logo-title {
        font-size: 1.8rem;
        font-weight: 800;
        background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        line-height: 1.2;
        letter-spacing: -0.3px;
        /* 移除hover效果 */
    }

    .logo-subtitle {
        font-size: 0.9rem;
        color: var(--color-text-muted);
        line-height: 1.3;
        font-weight: 400;
        opacity: 0.9;
        /* 移除hover效果 */
    }

    .actions {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin: 10px 0px;
        flex-wrap: wrap;
    }

    .actions button {
        padding: 8px 16px;
        font-size: 1.125rem;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        min-width: 100px;
    }

    .tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .tabs span {
        margin: 0;
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .word-item {
        padding: 8px 4px;
        font-size: 0.8rem;
    }

    .word-info {
        margin-left: 8px;
        min-width: 80px;
    }

    .word-title {
        font-size: 0.875rem;
    }

    .word-phonetic {
        font-size: 0.75rem;
    }

    .nav-button.left {
        /* left: 15px; */
        left: 5px;
    }

    .nav-button.right {
        /* right: 15px; */
        left: calc(5px + 90px);
    }

    .nav-button.close {
        /* 移动端放在右侧按钮的右边，保持水平对齐 */
        left: calc(5px + 180px);
        right: auto;
        top: calc(100vh - 100px);
        /* 确保与其他按钮在同一水平线 */
        transform: translateY(-50%);
        /* 保持红色系 */
        background: rgba(252, 165, 165, 0.8);
        color: #dc2626;
        display: block;
    }

    .nav-button.close:hover {
        background: rgba(254, 202, 202, 0.9);
    }

    .nav-button {
        top: calc(100vh - 100px);
        width: 60px;
        height: 60px;
    }

    /* .popup-btn img {
        width: 30px !important;
        height: 30px !important;
    } */

    .popup {
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
        background: var(--color-surface);
        border: none;
        z-index: 1000;
        display: block;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        overflow-y: auto;
        border-radius: 0px;
        box-shadow: none;
        padding: 60px 15px 100px 15px;
        width: 100vw;
        height: 100vh;
        max-width: 100%;
        max-height: 100%;
    }

    .word-list {
        padding: 0 4px 12px 4px;
        min-height: 180px;
    }

    .word-list-header {
        padding: 8px 4px;
        margin: 12px 0 6px 0;
        font-size: 0.8rem;
    }

    .header-progress {
        width: 50px;
        /* margin-left: 12px; */
    }

    .header-word {
        min-width: 80px;
        margin-left: 8px;
    }

    .header-explain {
        margin-left: 12px;
    }

    .header-action {
        width: 40px;
        margin: 0 5px;
    }

    .popup-title-pronounce-btn {
        position: relative;
        display: block;
        bottom: -1px;
    }
}

/* 加载状态样式 */
.popup-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 120px;
    background-color: var(--color-surface);
    border-radius: 8px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-align: center;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 渐进显示动画 */
.popup-loading.show {
    animation: fadeIn 0.3s ease-in-out;
}

.popup-main-content.show {
    animation: fadeIn 0.4s ease-in-out;
}

.popup-main-content {
    margin: 5px 0 8px 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 发音按钮的加载动画 */
.popup-title-pronounce-btn {
    position: relative;
    overflow: hidden;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    flex-shrink: 0;
}

.popup-title-pronounce-btn.loading {
    pointer-events: none;
}

.popup-title-pronounce-btn.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border: 2px solid rgba(var(--color-primary-rgb), 0.2);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: pronounceButtonSpin 0.8s linear infinite;
}

.popup-title-pronounce-btn.loading img {
    opacity: 0.3;
}

@keyframes pronounceButtonSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 按钮点击波纹效果 */
.popup-title-pronounce-btn {
    position: relative;
    overflow: hidden;
}

.popup-title-pronounce-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    z-index: 0;
    pointer-events: none;
}

.popup-title-pronounce-btn.clicked::after {
    width: 40px;
    height: 40px;
    opacity: 0;
    transition: width 0.3s, height 0.3s, opacity 0.3s;
}


.retry-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    border: none;
    border-radius: 4px;
    background-color: var(--color-primary);
    color: var(--color-bg);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.retry-btn:hover {
    background-color: var(--color-primary-hover);
}

.retry-btn:active {
    transform: translateY(1px);
}

/* 在text容器中的重试按钮样式 */
.text .retry-btn {
    margin-top: 10px;
    display: inline-block;
}

/* 在word-list容器中的加载动画使用相同背景色 */
.word-list .popup-loading {
    background-color: var(--color-bg);
    border-radius: 0;
    border: none;
}

.popup-title-pronounce-btn img {
    position: relative;
    z-index: 1;
    width: 16px !important;
    height: 16px !important;
}

/* 收藏来源区域样式 */
.popup-source-section {
    margin-top: 12px;
    padding-top: 12px;
    /* border-top: 1px solid var(--color-border); */
    width: 100%;
}

.source-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    text-align: left;
    margin-left: 1px;
}

.popup-source-content {
    background-color: var(--color-surface);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--color-border);
    position: relative; /* 为定位链接提供参考 */
}

.source-sentence {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: 8px;
}

.source-translation {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--color-text-secondary);
    font-style: italic;
}

.view-original-link {
    position: absolute;
    bottom: 8px;
    right: 10px;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-family: inherit; /* 使用与父元素相同的字体 */
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(var(--color-primary-rgb), 0.1);
    transition: all 0.2s ease;
    z-index: 10; /* 确保在最前面 */
}

.view-original-link:hover {
    background-color: rgba(var(--color-primary-rgb), 0.2);
    color: var(--color-primary-hover);
}

.view-original-link:active {
    transform: translateY(1px);
}

/* 高亮当前单词的样式 */
.highlighted-word {
    color: var(--color-primary);
    background-color: rgba(var(--color-primary-rgb), 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* 星星收藏按钮样式 */
.star-icon {
    transition: all 0.2s ease;
    color: var(--color-text-secondary);
}

.star-icon.collected {
    color: #ffd700; /* 黄色填充 */
    fill: #ffd700; /* 选中时填充黄色 */
}

.star-icon:hover {
    transform: scale(1.1);
}

.star-icon.collected:hover {
    color: #ffed4e; /* 悬停时的亮黄色 */
    fill: #ffed4e; /* 选中悬停时填充亮黄色 */
    transform: scale(1.1);
}