/* 虚拟列表样式 */
.word-list-wrapper {
    position: relative;
    width: 100%;
    height: 600px; /* 增加高度以显示6行 */
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 8px;
    background-color: transparent; /* 不要覆盖原始背景色 */
    margin-bottom: 10px; /* 添加底部距离 */
}

.virtual-scroller {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* 改为全宽 */
    opacity: 0;
    pointer-events: none;
    z-index: -1; /* 确保不影响交互 */
}

.visible-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
    background-color: transparent; /* 保持透明背景 */
    z-index: 1; /* 确保内容在滑动条之上 */
}

/* 加载指示器样式 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(74, 144, 226, 0.2);
    border-radius: 50%;
    border-top-color: #4a90e2;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 加载更多按钮 */
.load-more-container {
    margin: 20px 0 10px 0;
    padding: 0;
    background-color: transparent;
    position: relative;
    width: 100%;
    display: block;
    text-align: center;
    clear: both; /* 确保不受浮动元素影响 */
    grid-column: 1 / -1; /* 跨越所有列 */
}

/* 清除浮动，确保容器正确包含所有内容 */
.word-list::after {
    content: "";
    display: table;
    clear: both;
}

.load-more-btn {
    /* 渐变背景 */
    background: linear-gradient(45deg, #4361ee, #4895ef);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 3px 10px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    min-width: 180px;
    margin: 0 auto; /* 居中显示 */
    /* 添加图标 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 添加下箭头图标 */
.load-more-btn::after {
    content: '⌄';
    font-size: 2em;
    margin-left: 8px;
    font-weight: bold;
    line-height: 0;
    position: relative;
    top: -5px; /* 调整使其更靠上一点 */
    transition: transform 0.3s ease;
}

.load-more-btn:hover {
    background: linear-gradient(45deg, #3a56e4, #3a7bd5);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
    transform: translateY(-2px);
}

.load-more-btn:hover::after {
    animation: bounceDown 1s infinite;
}

.load-more-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(67, 97, 238, 0.3);
}

/* 下箭头动画 */
@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(5px);
    }
    60% {
        transform: translateY(3px);
    }
}

/* 空列表提示 */
.empty-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* 确保单词列表容器有足够高度 */
.word-list-container .tab-content {
    height: auto; /* 自适应高度 */
    overflow: visible; /* 允许内容溢出 */
    position: relative; /* 为子元素定位提供基准 */
}

.word-list {
    height: auto; /* 自适应高度 */
    min-height: 450px; /* 最小高度确保有足够空间 */
    overflow: visible; /* 允许加载更多按钮正常显示 */
    position: relative;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .word-list-container .tab-content {
        height: 400px;
    }
}
