/* 单词本页面样式 - 复用 prepare.css 样式 */
* {
    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);
    /* 深色主题下悬停时蓝色稍深 */
}
/* 深色主题下的表格行样式 */
:root[data-theme="dark"] .word-row-pending td {
    background-color: rgba(77, 122, 175, 0.15);
}
:root[data-theme="dark"] .word-row-pending:hover td {
    background-color: rgba(77, 122, 175, 0.25);
}
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    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: 900px;
    flex: 1;
}
.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); */
    cursor: pointer;
}
.logo:hover .logo-icon {
    /* transform: rotate(-5deg) scale(1.1); */
}
/* Mobile Sidebar Button - Removed */
@media (max-width: 768px) {
    #desktopSidebarToggle {
        display: none;
    }
}
.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 {
    display: none; /* 隐藏，因为新布局不再需要 */
    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: visible;
    margin-bottom: 20px;
}
/* 表格容器 - 用于横向滚动 */
.word-list-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* 强制显示滚动条 (macOS) */
    scrollbar-gutter: stable;
}
/* 滚动条始终显示 - WebKit浏览器 */
.word-list-wrapper::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
.word-list-wrapper::-webkit-scrollbar-track {
    background: var(--color-surface);
    border-radius: 4px;
}
.word-list-wrapper::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
    min-width: 8px;
}
.word-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}
/* 滚动条角落 */
.word-list-wrapper::-webkit-scrollbar-corner {
    background: var(--color-surface);
}
/* Firefox */
.word-list-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-surface);
}
/* 表格样式 */
.word-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}
.word-table th,
.word-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.word-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}
/* 可排序表头样式 */
.word-table th.sortable {
    user-select: none;
}
.word-table th.sortable .sort-icon {
    margin-left: 4px;
    font-size: 0.625rem;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s ease, color 0.2s ease;
}
.word-table th.sortable .sort-icon:hover {
    opacity: 0.8;
    color: var(--color-primary);
}
.word-table th.sortable .sort-icon.active {
    opacity: 1;
    color: var(--color-primary);
}
.word-table td {
    font-size: 0.8125rem;
    color: var(--color-text);
}
.word-table tr:hover td {
    background: var(--color-surface-hover);
}
.word-table tr.word-row-pending td {
    background-color: rgba(204, 222, 250, 0.1);
}
.word-table tr.word-row-pending:hover td {
    background-color: rgba(78, 146, 248, 0.2);
}
.word-table tr.word-row-completed td {
    opacity: 0.7;
}
/* 表格容器 - 支持横向滚动 */
.word-list-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
/* 表格样式 - 不使用 fixed 布局，让列宽自适应 */
.word-table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
}
/* 操作列样式 */
.col-action {
    width: 70px;
    text-align: center;
    white-space: nowrap;
}
.col-degree { min-width: 60px; text-align: center; white-space: nowrap; }
.col-word { min-width: 100px; font-weight: 600; }
.col-sentence-en { min-width: 120px; }
.col-sentence-cn { min-width: 80px; }
.col-last-review { min-width: 90px; white-space: nowrap; }
.col-next-review { min-width: 90px; white-space: nowrap; }
.col-source { min-width: 70px; white-space: nowrap; }
.col-created { min-width: 90px; white-space: nowrap; }
.col-review-count { min-width: 60px; text-align: center; white-space: nowrap; }
/* 所有单元格支持换行 */
.word-table td {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    vertical-align: middle;
}
/* 单词列换行 */
.col-word {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}
/* 单词可点击链接样式 */
.word-link {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(var(--color-primary-rgb), 0.4);
    text-underline-offset: 3px;
    cursor: pointer;
    transition: text-decoration-color 0.2s ease;
}
.word-link:hover {
    text-decoration-color: var(--color-primary);
}
/* 日期列换行 */
.date-text {
    word-wrap: break-word;
    word-break: keep-all;
    overflow-wrap: break-word;
}
/* 列宽拖拽调整手柄 */
.resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    transition: background-color 0.2s;
}
.resize-handle:hover,
.resize-handle.resizing {
    background: var(--color-primary);
}
/* 查看按钮样式 */
.view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.view-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary);
}
.view-btn:active {
    transform: scale(0.95);
}
.view-btn svg {
    width: 14px;
    height: 14px;
}
/* 表头单元格需要相对定位以支持拖拽手柄 */
.word-table th {
    position: relative;
}
/* 所有表格单元格支持换行 */
.word-table td {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    vertical-align: middle;
}
/* 来源标签样式 */
.source-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}
.source-tag.article { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.source-tag.drama { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.source-tag.novel { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.source-tag.self { background: rgba(107, 114, 128, 0.15); color: #6b7280; }
/* 旧版表头样式 - 保留兼容 */
.word-list-header {
    display: none;
}
.header-progress {
    flex-shrink: 0;
    width: 44px;
    text-align: center;
}
.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 样式 - 保留但不再使用 */
.word-item {
    display: none;
}
.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;
    width: 100px;
    overflow: hidden;
    max-height: 100px;
    margin-left: 10px;
}
.word-title {
    width: 100px;
    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: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--color-text);
}
.progress-circle-small {
    width: 28px;
    height: 28px;
    font-size: 0.625rem;
}
/* 日期格式样式 */
.date-text {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}
/* 操作按钮 */
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.action-btn:hover {
    opacity: 1;
}
.action-btn img {
    width: 18px;
    height: 18px;
}
.action-btn .material-icons {
    font-size: 20px;
    color: var(--text-secondary);
}
/* 分页控件样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    margin-top: 10px;

    /* 确保定位上下文正确 */
    position: relative;
}
.pagination-btn {
    padding: 8px 12px;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;

    /* Flex 布局使图标居中 */
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Material Icons 样式 */
.pagination-btn .material-icons {
    font-size: 20px;
    line-height: 1;
}
.pagination-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pagination-info {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    min-width: 60px;
    text-align: center;
}
#loading {
    text-align: center;
    padding: 20px 0 40px 0;
    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: 0px;
    background: transparent;
}
.popup::-webkit-scrollbar-track {
    background: transparent;
}
.popup::-webkit-scrollbar-thumb {
    background: transparent;
}
.popup::-webkit-scrollbar-thumb:hover {
    background: transparent;
}
.popup-head {
    display: flex;
    justify-content: right;
    align-items: flex-start;
    width: 100%;
    /* min-height: 35px; */
    flex-wrap: wrap;
    gap: 8px;
}
.popup-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.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;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}
.popup-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.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: 1;
    flex-grow: 1;
    min-width: 0;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.popup-title-ipa {
    font-size: 18px;
    color: var(--color-text-muted);
    line-height: 1.2;
    flex-shrink: 1;
    min-width: 0;
    padding: 2px 6px;
    background: var(--color-surface);
    border-radius: 4px;
    border: 1px solid var(--color-border);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
/* .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: -16px;
    /* 距离文本框底部 */
    right: 0px;
    /* 距离文本框右边 */
    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: 20px;
    gap: 8px;
}
/* 闪卡 */
/* 卡片容器：定位上下文和动画舞台 */
.card-wrapper {
    top: 0;
    left: 0;
    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: fixed;
    /* 关键：相对于 屏幕 定位 */
    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;

    /* Flex 布局使图标居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
/* Material Icons 样式 */
.nav-button .material-icons {
    font-size: 24px;
    line-height: 1;
}
.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;
        max-width: 100%;
    }

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

    /* 移动端表格横向滚动 */
    .word-list-wrapper {
        margin: 0 -4px;
        padding: 0 4px;
    }

    .word-table {
        min-width: 600px;
    }

    .word-table th,
    .word-table td {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .col-degree { width: 45px; }
    .col-word { min-width: 80px; }
    .col-last-review { min-width: 75px; }
    .col-next-review { min-width: 75px; }
    .col-source { min-width: 70px; }
    .col-created { min-width: 75px; }
    .col-review-count { width: 50px; }
    .col-action { width: 35px; }

    .progress-circle {
        width: 28px;
        height: 28px;
        font-size: 0.5625rem;
    }

    .source-tag {
        font-size: 0.6875rem;
        padding: 2px 6px;
    }

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

    .nav-button.left {
        left: 8px;
    }

    .nav-button.right {
        left: calc(8px + 50px);
    }

    .nav-button.close {
        /* 移动端放在右侧按钮的右边，保持水平对齐 */
        left: calc(8px + 105px);
        right: auto;
        top: calc(100vh - 90px);
        /* 确保与其他按钮在同一水平线 */
        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 - 90px);
        width: 44px;
        height: 44px;
    }

    .nav-button .material-icons {
        font-size: 20px;
    }

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

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

    /* 移动端分页优化 */
    .pagination-container {
        gap: 6px;
        padding: 12px 4px;
        justify-content: center;
    }

    .pagination-btn {
        padding: 6px 10px;
        min-width: 36px;
    }

    .pagination-btn .material-icons {
        font-size: 18px;
    }

    .pagination-info {
        font-size: 0.75rem;
        min-width: 40px;
    }

    .page-size-selector {
        gap: 4px;
        font-size: 0.75rem;
    }

    .page-size-select {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}
/* 加载状态样式 */
.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: 8px 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);
}
/* 复选框样式 */
.row-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-primary);
    vertical-align: middle;
}
.select-all-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-primary);
}
/* 批量操作栏 */
.batch-actions-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--shadow-color);
}
.batch-delete-btn {
    padding: 6px 14px;
    font-size: 0.8125rem;
    border: none;
    border-radius: 6px;
    background: #ef4444;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}
.batch-delete-btn:hover {
    background: #dc2626;
}
.batch-cancel-btn {
    padding: 6px 14px;
    font-size: 0.8125rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}
.batch-cancel-btn:hover {
    background: var(--color-surface-hover);
}
/* 操作列样式调整 */
.col-action {
    text-align: center;
    white-space: nowrap;
}
/* 操作列按钮容器 */
.action-btns {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
/* 收藏星星按钮样式（取消收藏） */
.delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #f59e0b;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.delete-btn:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    transform: scale(1.1);
}
.delete-btn:active {
    transform: scale(0.95);
}
.delete-btn svg {
    width: 18px;
    height: 18px;
    fill: #f59e0b;
    stroke: #f59e0b;
}
/* 列筛选按钮和下拉菜单 */
.column-filter-container {
    position: relative;
    display: flex;
    align-items: center;
}
.column-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}
.column-filter-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary);
}
.column-filter-btn.active {
    background: var(--color-primary);
    color: white;
}
.column-filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 160px;
    padding: 8px 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    z-index: 100;
    display: none;
}
.column-filter-dropdown.show {
    display: block;
}
.column-filter-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.column-filter-item:hover {
    background: var(--color-surface-hover);
}
.column-filter-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: var(--color-primary);
    cursor: pointer;
}
.column-filter-item label {
    font-size: 0.8125rem;
    color: var(--color-text);
    cursor: pointer;
    user-select: none;
}
.column-filter-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.column-filter-item.disabled input,
.column-filter-item.disabled label {
    cursor: not-allowed;
}
/* 隐藏表格列 */
.word-table th.hidden-column,
.word-table td.hidden-column {
    display: none;
}
/* JS tooltip 样式 */
.btn-tooltip {
    position: fixed;
    background: #222;
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 9999;
}
.btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #222;
}
/* 覆盖一些不需要的样式 */
.actions {
    display: none;
}
/* 隐藏原 tabs 行的列筛选（已移到筛选栏） */
.tabs {
    display: none;
}
/* ==================== 筛选栏 - 一行式抽屉 ==================== */
.vocab-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    width: 100%;
    gap: 8px;
}
/* 左侧筛选区域：可横向滚动 */
.vf-left {
    display: flex;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
    padding: 4px 0;
}
.vf-left::-webkit-scrollbar {
    display: none;
}
/* 右侧列筛选 */
.vf-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
/* 按钮 - 通用（主菜单） */
.vf-btn {
    border: none;
    background: transparent;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.vf-btn:hover {
    color: var(--color-text);
}
.vf-btn.active {
    background: var(--color-bg);
    color: var(--color-text);
    box-shadow: 0 1px 4px var(--color-shadow);
}
/* 分类按钮带选中态颜色 */
.vf-category-btn.active[data-filter="degree"] {
    color: var(--color-primary);
}
.vf-category-btn.active[data-filter="source"] {
    color: #10b981;
}
.vf-category-btn.active[data-filter="spell"] {
    color: #f59e0b;
}
.vf-category-btn.active[data-filter="date"] {
    color: #8b5cf6;
}
.vf-category-btn.active[data-filter="word"] {
    color: var(--color-primary);
}
:root[data-theme="dark"] .vf-btn.active {
    background: var(--color-surface);
}
:root[data-theme="dark"] .vf-category-btn.active[data-filter="source"] {
    color: #34d399;
}
:root[data-theme="dark"] .vf-category-btn.active[data-filter="spell"] {
    color: #fbbf24;
}
:root[data-theme="dark"] .vf-category-btn.active[data-filter="date"] {
    color: #a78bfa;
}
/* ==================== 抽屉（侧滑展开） ==================== */
.vf-drawer {
    display: inline-flex;
    align-items: center;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                gap 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    vertical-align: middle;
    gap: 0;
    padding: 0;
    flex-shrink: 0;
}
.vf-drawer.open {
    max-width: 500px;
    gap: 3px;
    padding: 0 2px;
}
/* 抽屉项（二级菜单，比主菜单小） */
.vf-drawer-item {
    padding: 3px 10px;
    border: none;
    background: var(--color-bg);
    color: var(--color-text);
    border-radius: 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px var(--color-shadow);
    white-space: nowrap;
    flex-shrink: 0;
}
.vf-drawer-item:hover {
    opacity: 0.85;
}
.vf-drawer-item.selected {
    font-weight: 600;
}
/* 熟练度抽屉项选中颜色 */
.vf-drawer[data-filter="degree"] .vf-drawer-item.selected[data-degree="beginner"] {
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
}
.vf-drawer[data-filter="degree"] .vf-drawer-item.selected[data-degree="learning"] {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.vf-drawer[data-filter="degree"] .vf-drawer-item.selected[data-degree="proficient"] {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
/* 来源抽屉项选中颜色 */
.vf-drawer[data-filter="source"] .vf-drawer-item.selected[data-source="drama"] {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.vf-drawer[data-filter="source"] .vf-drawer-item.selected[data-source="novel"] {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.vf-drawer[data-filter="source"] .vf-drawer-item.selected[data-source="article"] {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}
.vf-drawer[data-filter="source"] .vf-drawer-item.selected[data-source="self"] {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}
/* 拼写抽屉项选中颜色 */
.vf-drawer[data-filter="spell"] .vf-drawer-item.selected[data-spell="beginner"] {
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
}
.vf-drawer[data-filter="spell"] .vf-drawer-item.selected[data-spell="learning"] {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.vf-drawer[data-filter="spell"] .vf-drawer-item.selected[data-spell="proficient"] {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
/* 日期快捷按钮选中颜色 */
.vf-drawer[data-filter="date"] .vf-drawer-item.selected {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}
:root[data-theme="dark"] .vf-drawer[data-filter="date"] .vf-drawer-item.selected {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.15);
}
/* 深色模式 */
:root[data-theme="dark"] .vf-drawer-item {
    background: var(--color-surface);
}
:root[data-theme="dark"] .vf-drawer[data-filter="degree"] .vf-drawer-item.selected[data-degree="beginner"] {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
}
:root[data-theme="dark"] .vf-drawer[data-filter="degree"] .vf-drawer-item.selected[data-degree="learning"] {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}
:root[data-theme="dark"] .vf-drawer[data-filter="degree"] .vf-drawer-item.selected[data-degree="proficient"] {
    color: #34d399;
    background: rgba(52, 211, 153, 0.15);
}
:root[data-theme="dark"] .vf-drawer[data-filter="source"] .vf-drawer-item.selected[data-source="drama"] {
    color: #34d399;
    background: rgba(52, 211, 153, 0.15);
}
:root[data-theme="dark"] .vf-drawer[data-filter="source"] .vf-drawer-item.selected[data-source="novel"] {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}
:root[data-theme="dark"] .vf-drawer[data-filter="source"] .vf-drawer-item.selected[data-source="article"] {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
}
:root[data-theme="dark"] .vf-drawer[data-filter="source"] .vf-drawer-item.selected[data-source="self"] {
    color: #9ca3af;
    background: rgba(156, 163, 175, 0.15);
}
:root[data-theme="dark"] .vf-drawer[data-filter="spell"] .vf-drawer-item.selected[data-spell="beginner"] {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
}
:root[data-theme="dark"] .vf-drawer[data-filter="spell"] .vf-drawer-item.selected[data-spell="learning"] {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}
:root[data-theme="dark"] .vf-drawer[data-filter="spell"] .vf-drawer-item.selected[data-spell="proficient"] {
    color: #34d399;
    background: rgba(52, 211, 153, 0.15);
}
/* ==================== 日期抽屉 ==================== */
.vf-date-custom {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.vf-date-select {
    height: 28px;
    padding: 0 6px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.75rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
}
.vf-date-select:focus {
    border-color: var(--color-primary);
}
.vf-date-sep {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}
:root[data-theme="dark"] .vf-date-select {
    background: var(--color-surface);
}
/* ==================== 搜索抽屉内输入 ==================== */
.vf-search-input {
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.75rem;
    font-family: inherit;
    outline: none;
    width: 120px;
    flex-shrink: 0;
    transition: border-color 0.2s ease, width 0.2s ease;
}
.vf-search-input:focus {
    border-color: var(--color-primary);
    width: 160px;
}
.vf-search-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}
.vf-search-clear {
    padding: 3px 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.6875rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s ease;
}
.vf-search-clear:hover {
    color: var(--color-danger);
}
:root[data-theme="dark"] .vf-search-input {
    background: var(--color-surface);
}
/* ==================== 重置按钮 ==================== */
.vf-reset-btn {
    color: var(--color-danger);
    opacity: 0.7;
}
.vf-reset-btn:hover {
    opacity: 1;
}
/* ==================== 移动端 ==================== */
@media screen and (max-width: 768px) {
    /* 确保旧 tabs 行在移动端也隐藏 */
    .tabs {
        display: none !important;
    }
    .vf-btn {
        padding: 4px 10px;
        font-size: 0.8125rem;
        border-radius: 10px;
    }

    .vf-drawer-item {
        padding: 3px 8px;
        font-size: 0.6875rem;
    }

    .vf-search-input {
        width: 100px;
        font-size: 0.6875rem;
    }

    .vf-search-input:focus {
        width: 120px;
    }

    .vf-date-select {
        font-size: 0.6875rem;
    }
}
/* ==================== 分页区域样式 ==================== */
/* 移除背景，简化分页区域 */
.pagination-container {
    background: transparent;
}
/* 每页条数选择器 */
.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}
.page-size-select {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.2s ease;

    /* 修复移动端下拉菜单定位 */
    position: relative;
    z-index: 1;
}
.page-size-select:hover {
    border-color: var(--color-primary);
}
.page-size-select:focus {
    outline: none;
    border-color: var(--color-primary);
}
:root[data-theme="dark"] .page-size-select {
    background: var(--color-surface);
}
/* ==================== 按钮样式调整 ==================== */
/* 下载按钮 - 深色模式更亮 */
.vf-download-btn {
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}
.vf-download-btn:hover {
    color: var(--color-primary);
}
:root[data-theme="dark"] .vf-download-btn {
    color: var(--color-text);
}
:root[data-theme="dark"] .vf-download-btn:hover {
    color: var(--color-primary);
}
/* 列筛选按钮 - 定位上下文 */
.column-filter-btn {
    position: relative;
}
/* ==================== 表格新增列样式 ==================== */
/* 拼写熟练度列 */
.col-spell-degree {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    min-width: 40px;
}
/* 例句列 */
.col-sentence {
    max-width: 200px;
    min-width: 100px;
}
.sentence-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--color-text-muted);
    cursor: default;
}
/* 拼写复习时间列 */
.col-spell-last-review {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
/* ==================== 单词可点击链接样式 ==================== */
.word-link {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(var(--color-primary-rgb), 0.4);
    text-underline-offset: 3px;
    cursor: pointer;
    transition: text-decoration-color 0.2s ease;
}
.word-link:hover {
    text-decoration-color: var(--color-primary);
}
/* ==================== 表头列分隔竖线 ==================== */
.word-table th {
    position: relative;
}
/* 表头层级低于表格内容，避免遮挡 */
.word-table thead {
    position: relative;
    z-index: 1;
}
.word-table tbody {
    position: relative;
    z-index: 2;
}
.resize-handle {
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: var(--color-border);
    cursor: col-resize;
    transition: width 0.15s ease, background-color 0.15s ease;
}
.resize-handle:hover,
.resize-handle.resizing {
    width: 3px;
    background: var(--color-primary);
}
/* ==================== 筛选按钮 Tooltip ==================== */
.vf-category-btn,
.delete-btn,
.vf-download-btn {
    position: relative;
}
.vf-category-btn[data-vf-tip]:hover::after,
.delete-btn[data-vf-tip]:hover::after,
.vf-download-btn[data-vf-tip]:hover::after {
    content: attr(data-vf-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 400;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 900;
    animation: vfTipIn 0.15s ease;
}
.vf-category-btn[data-vf-tip]:hover::before,
.delete-btn[data-vf-tip]:hover::before,
.vf-download-btn[data-vf-tip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #222;
    pointer-events: none;
    z-index: 200;
}
/* 列筛选按钮单独处理（使用 title 属性） */
.column-filter-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 400;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 200;
    animation: vfTipIn 0.15s ease;
}
.column-filter-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #222;
    pointer-events: none;
    z-index: 200;
}
@keyframes vfTipIn {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
