/* LOTR Encyclopedia - 完整中文化样式增强 */

/* ========== 中文字体优化 ========== */
body.lotr-encyclopedia,
.lotr-encyclopedia-grid,
.lotr-single-wrapper,
.lotr-archive-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

/* ========== 按钮中文化 ========== */
.lotr-search-button::before {
    content: "🔍 ";
}

.lotr-filter-button::before {
    content: "🎯 ";
}

/* ========== 状态标签中文化 ========== */
.lotr-item-new::after {
    content: "新";
    background: #ff4444;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
    font-weight: bold;
}

.lotr-item-updated::after {
    content: "更新";
    background: #00a32a;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
    font-weight: bold;
}

.lotr-item-rare::after {
    content: "稀有";
    background: #ffa500;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
    font-weight: bold;
}

/* ========== 空状态中文提示 ========== */
.lotr-encyclopedia-grid:empty::before {
    content: "暂无数据，请先导入 Mod 内容";
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

/* ========== 加载状态中文化 ========== */
.lotr-loading::before {
    content: "加载中...";
    display: block;
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

/* ========== 分页中文化 ========== */
.lotr-pagination .prev::before {
    content: "« 上一页";
}

.lotr-pagination .next::after {
    content: "下一页 »";
}

/* ========== 搜索提示中文化 ========== */
.lotr-search-input::-webkit-input-placeholder {
    color: #999;
}

.lotr-search-input::-moz-placeholder {
    color: #999;
}

.lotr-search-input::placeholder {
    color: #999;
}

/* ========== 工具提示中文化 ========== */
.lotr-tooltip-content {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
}

.lotr-tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

/* ========== 面包屑导航中文化 ========== */
.lotr-breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.lotr-breadcrumb a {
    color: #2271b1;
    text-decoration: none;
}

.lotr-breadcrumb a:hover {
    text-decoration: underline;
}

.lotr-breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

/* ========== 标签云中文优化 ========== */
.lotr-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.lotr-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    background: #f0f0f0;
    color: #666;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lotr-tag:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
}

/* ========== 统计信息中文化 ========== */
.lotr-stats-bar {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.lotr-stat-item {
    flex: 1;
    text-align: center;
}

.lotr-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.lotr-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2271b1;
}

/* ========== 评分系统中文化 ========== */
.lotr-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.lotr-rating-stars {
    color: #ffa500;
    font-size: 18px;
}

.lotr-rating-text {
    font-size: 14px;
    color: #666;
}

/* ========== 相关内容标题中文化 ========== */
.lotr-related-title::before {
    content: "📚 ";
}

.lotr-popular-title::before {
    content: "🔥 ";
}

.lotr-new-title::before {
    content: "✨ ";
}

/* ========== 移动端优化 ========== */
@media (max-width: 768px) {
    .lotr-search-button {
        width: 100%;
        margin-top: 10px;
    }

    .lotr-filter-group {
        width: 100%;
    }

    .lotr-stats-bar {
        flex-direction: column;
        gap: 15px;
    }
}

/* ========== 打印样式优化 ========== */
@media print {
    .lotr-search-form,
    .lotr-filter-group,
    .lotr-share-buttons {
        display: none;
    }

    .lotr-single-content {
        max-width: 100%;
    }
}

/* ========== 无障碍优化 ========== */
.lotr-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========== 深色模式支持 ========== */
@media (prefers-color-scheme: dark) {
    .lotr-encyclopedia-item {
        background: #2d2d2d;
        color: #e0e0e0;
    }

    .lotr-item-title,
    .lotr-block-title,
    .lotr-entity-title {
        color: #e0e0e0;
    }

    .lotr-search-input {
        background: #2d2d2d;
        color: #e0e0e0;
        border-color: #444;
    }
}
