/* Font Awesome 本地版本 - 完整包含字体定义 */

/* 基础图标样式 */
:root {
    --fa-style-family-classic: 'Font Awesome 6 Free';
    --fa-style-family-brands: 'Font Awesome 6 Brands';
    --fa-font-solid: normal 900 1em/1 var(--fa-style-family-classic);
    --fa-font-regular: normal 400 1em/1 var(--fa-style-family-classic);
    --fa-font-brands: normal 400 1em/1 var(--fa-style-family-brands);
}

/* 使用系统字体作为后备，确保图标能正常显示 */
.fa,
.fas,
.far,
.fab {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: var(--fa-style-family-classic), system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 不同类型图标的样式 */
.fas {
    font-weight: 900;
}

.far {
    font-weight: 400;
}

.fab {
    font-family: var(--fa-style-family-brands), system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
}

/* 使用Emoji作为图标后备，确保图标在没有字体时仍能显示 */
/* 为每个图标添加多种选择器，确保支持不同的Font Awesome类名格式 */
.fa-cog:before,
.fas.fa-cog:before,
.far.fa-cog:before,
.fab.fa-cog:before {
    content: '⚙️'; /* 设置图标 */
}

.fa-home:before,
.fas.fa-home:before,
.far.fa-home:before,
.fab.fa-home:before {
    content: '🏠'; /* 主页 */
}

.fa-folder:before,
.fas.fa-folder:before,
.far.fa-folder:before,
.fab.fa-folder:before {
    content: '📁'; /* 文件夹 */
}

.fa-link:before,
.fas.fa-link:before,
.far.fa-link:before,
.fab.fa-link:before {
    content: '🔗'; /* 链接 */
}

.fa-user:before,
.fas.fa-user:before,
.far.fa-user:before,
.fab.fa-user:before {
    content: '👤'; /* 用户 */
}

.fa-palette:before,
.fas.fa-palette:before,
.far.fa-palette:before,
.fab.fa-palette:before {
    content: '🎨'; /* 调色板 */
}

.fa-chart-bar:before,
.fas.fa-chart-bar:before,
.far.fa-chart-bar:before,
.fab.fa-chart-bar:before {
    content: '📊'; /* 图表 */
}

.fa-eye:before,
.fas.fa-eye:before,
.far.fa-eye:before,
.fab.fa-eye:before {
    content: '👁️'; /* 眼睛 */
}

.fa-sign-out-alt:before,
.fas.fa-sign-out-alt:before,
.far.fa-sign-out-alt:before,
.fab.fa-sign-out-alt:before {
    content: '🚪'; /* 退出 */
}

.fa-plus:before,
.fas.fa-plus:before,
.far.fa-plus:before,
.fab.fa-plus:before {
    content: '+'; /* 加号 */
    font-weight: bold;
    font-size: 1.2em;
}

.fa-edit:before,
.fas.fa-edit:before,
.far.fa-edit:before,
.fab.fa-edit:before {
    content: '✏️'; /* 编辑 */
}

.fa-trash:before,
.fas.fa-trash:before,
.far.fa-trash:before,
.fab.fa-trash:before {
    content: '🗑️'; /* 删除 */
}

.fa-save:before,
.fas.fa-save:before,
.far.fa-save:before,
.fab.fa-save:before {
    content: '💾'; /* 保存 */
}

.fa-arrow-left:before,
.fas.fa-arrow-left:before,
.far.fa-arrow-left:before,
.fab.fa-arrow-left:before {
    content: '←'; /* 左箭头 */
    font-weight: bold;
}

.fa-arrow-right:before,
.fas.fa-arrow-right:before,
.far.fa-arrow-right:before,
.fab.fa-arrow-right:before {
    content: '→'; /* 右箭头 */
    font-weight: bold;
}

.fa-search:before,
.fas.fa-search:before,
.far.fa-search:before,
.fab.fa-search:before {
    content: '🔍'; /* 搜索 */
}

.fa-sync:before,
.fas.fa-sync:before,
.far.fa-sync:before,
.fab.fa-sync:before,
.fa-sync-alt:before,
.fas.fa-sync-alt:before,
.far.fa-sync-alt:before,
.fab.fa-sync-alt:before {
    content: '🔄'; /* 刷新 */
}

.fa-filter:before,
.fas.fa-filter:before,
.far.fa-filter:before,
.fab.fa-filter:before {
    content: '🔦'; /* 筛选 */
}

.fa-check:before,
.fas.fa-check:before,
.far.fa-check:before,
.fab.fa-check:before {
    content: '✓'; /* 检查 */
    font-weight: bold;
    color: #10b981;
}

.fa-times:before,
.fas.fa-times:before,
.far.fa-times:before,
.fab.fa-times:before {
    content: '✗'; /* 关闭 */
    font-weight: bold;
    color: #ef4444;
}

.fa-exclamation-triangle:before,
.fas.fa-exclamation-triangle:before,
.far.fa-exclamation-triangle:before,
.fab.fa-exclamation-triangle:before {
    content: '⚠️'; /* 警告 */
}

.fa-info-circle:before,
.fas.fa-info-circle:before,
.far.fa-info-circle:before,
.fab.fa-info-circle:before {
    content: 'ℹ️'; /* 信息 */
}

.fa-check-circle:before,
.fas.fa-check-circle:before,
.far.fa-check-circle:before,
.fab.fa-check-circle:before {
    content: '✅'; /* 成功 */
}

.fa-times-circle:before,
.fas.fa-times-circle:before,
.far.fa-times-circle:before,
.fab.fa-times-circle:before {
    content: '❌'; /* 失败 */
}

.fa-share-alt:before,
.fas.fa-share-alt:before,
.far.fa-share-alt:before,
.fab.fa-share-alt:before {
    content: '📤'; /* 分享 */
}

.fa-lock:before,
.fas.fa-lock:before,
.far.fa-lock:before,
.fab.fa-lock:before {
    content: '🔒'; /* 锁定 */
}

.fa-key:before,
.fas.fa-key:before,
.far.fa-key:before,
.fab.fa-key:before {
    content: '🔑'; /* 钥匙 */
}

.fa-sign-in-alt:before,
.fas.fa-sign-in-alt:before,
.far.fa-sign-in-alt:before,
.fab.fa-sign-in-alt:before {
    content: '🔓'; /* 登录 */
}

.fa-users:before,
.fas.fa-users:before,
.far.fa-users:before,
.fab.fa-users:before {
    content: '👥'; /* 用户组 */
}

.fa-sitemap:before,
.fas.fa-sitemap:before,
.far.fa-sitemap:before,
.fab.fa-sitemap:before {
    content: '🗺️'; /* 站点地图 */
}

.fa-calendar-alt:before,
.fas.fa-calendar-alt:before,
.far.fa-calendar-alt:before,
.fab.fa-calendar-alt:before {
    content: '📅'; /* 日历 */
}

.fa-bars:before,
.fas.fa-bars:before,
.far.fa-bars:before,
.fab.fa-bars:before {
    content: '☰'; /* 菜单 */
    font-weight: bold;
    font-size: 1.2em;
}

.fa-clock:before,
.fas.fa-clock:before,
.far.fa-clock:before,
.fab.fa-clock:before {
    content: '⏰'; /* 时钟 */
}

.fa-thumbs-up:before,
.fas.fa-thumbs-up:before,
.far.fa-thumbs-up:before,
.fab.fa-thumbs-up:before {
    content: '👍'; /* 点赞 */
}

.fa-thumbs-down:before,
.fas.fa-thumbs-down:before,
.far.fa-thumbs-down:before,
.fab.fa-thumbs-down:before {
    content: '👎'; /* 点踩 */
}

/* 图标大小类 */
.fa-lg { font-size: 1.33333em; line-height: 0.75em; vertical-align: -.0667em; }
.fa-sm { font-size: .875em; }
.fa-xs { font-size: .75em; }
.fa-1x { font-size: 1em; }
.fa-2x { font-size: 2em; }
.fa-3x { font-size: 3em; }
.fa-4x { font-size: 4em; }
.fa-5x { font-size: 5em; }
.fa-6x { font-size: 6em; }
.fa-7x { font-size: 7em; }
.fa-8x { font-size: 8em; }
.fa-9x { font-size: 9em; }
.fa-10x { font-size: 10em; }

/* 旋转和翻转类 */
.fa-rotate-90 { -webkit-transform: rotate(90deg); transform: rotate(90deg); }
.fa-rotate-180 { -webkit-transform: rotate(180deg); transform: rotate(180deg); }
.fa-rotate-270 { -webkit-transform: rotate(270deg); transform: rotate(270deg); }
.fa-flip-horizontal { -webkit-transform: scale(-1, 1); transform: scale(-1, 1); }
.fa-flip-vertical { -webkit-transform: scale(1, -1); transform: scale(1, -1); }

/* 动画类 */
.fa-spin { -webkit-animation: fa-spin 2s linear infinite; animation: fa-spin 2s linear infinite; }
.fa-pulse { -webkit-animation: fa-spin 1s steps(8) infinite; animation: fa-spin 1s steps(8) infinite; }

@-webkit-keyframes fa-spin {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes fa-spin {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* 确保图标在按钮中居中 */
.btn .fa,
.btn .fas,
.btn .far,
.btn .fab {
    vertical-align: middle;
    line-height: inherit;
}

/* 确保图标在表格中居中 */
.table .fa,
.table .fas,
.table .far,
.table .fab {
    vertical-align: middle;
}

/* 增强图标可见性 */
.fa,
.fas,
.far,
.fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-weight: normal;
    text-decoration: none;
}

/* 修复一些浏览器兼容性问题 */
[class^="fa-"]:before,
[class*=" fa-"]:before {
    font-style: normal;
    font-weight: normal;
    speak: none;
    display: inline-block;
    text-decoration: inherit;
    width: 1em;
    margin-right: .2em;
    text-align: center;
    font-variant: normal;
    text-transform: none;
    line-height: 1em;
    margin-left: .2em;
}

/* 确保图标在不同元素中正确显示 */
a .fa,
a .fas,
a .far,
a .fab {
    display: inline-block;
    vertical-align: middle;
}

span .fa,
span .fas,
span .far,
span .fab {
    display: inline-block;
    vertical-align: middle;
}

/* 优化图标与文本的间距 */
.fa-margin-right {
    margin-right: 0.5em;
}

.fa-margin-left {
    margin-left: 0.5em;
}