/* ==================== 单词卡片组件样式 ==================== */

/* 可点击单词样式 */
.word-tooltip-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.word-tooltip-clickable:hover {
    color: #1976d2;
    background-color: rgba(25, 118, 210, 0.1);
    border-radius: 2px;
    padding: 0 2px;
}

.word-tooltip-clickable::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #1976d2;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.word-tooltip-clickable:hover::after {
    transform: scaleX(1);
}

/* 单词提示卡片 */
.word-tooltip {
    position: absolute;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    max-width: 350px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.word-tooltip.show {
    opacity: 1;
    visibility: visible;
}

.word-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.word-tooltip-word {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.word-tooltip-speaker {
    cursor: pointer;
    color: #007bff;
    font-size: 18px;
    transition: all 0.2s;
}

.word-tooltip-speaker:hover {
    color: #0056b3;
    transform: scale(1.1);
}

.word-tooltip-close {
    cursor: pointer;
    color: #999;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s;
    line-height: 1;
}

.word-tooltip-close:hover {
    color: #333;
    transform: rotate(90deg);
}

.word-tooltip-phonetic {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
}

.word-tooltip-pos {
    display: inline-block;
    background: #f0f7ff;
    color: #007bff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 6px;
    font-weight: 500;
}

.word-tooltip-meaning {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.word-tooltip-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.word-tooltip-section-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
    font-weight: 500;
}

.word-tooltip-derivatives {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.word-tooltip-derivative {
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.word-tooltip-derivative:hover {
    background: #e9ecef;
    color: #007bff;
}

.word-tooltip-example {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    font-style: italic;
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
}

.word-tooltip-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.word-tooltip-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.word-tooltip-lemma-info {
    border-radius: 4px;
    padding: 8px 12px;
    margin: 8px 0;
}

.word-tooltip-favorite-btn {
    transition: all 0.2s;
}

.word-tooltip-favorite-btn:hover {
    transform: scale(1.15);
}

