/* 本地图标库 - 替代Font Awesome CDN */

/* 基础图标样式 */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
}

/* 兼容 Font Awesome 类名的本地占位（避免外链失败导致无图标） */
.fas, .fab, .far {
    display: inline-block;
    width: 1em;
    height: 1em;
    line-height: 1;
    vertical-align: middle;
    font-style: normal;
    color: inherit;
}

/* 常用FA图标映射到emoji/字符，使用currentColor着色 */
.fa-home::before { content: "🏠"; }
.fa-th-large::before { content: "⬛"; }
.fa-clipboard-check::before { content: "📋"; }
.fa-award::before { content: "🏆"; }
.fa-question-circle::before { content: "❓"; }
.fa-user-friends::before { content: "👥"; }
.fa-bullhorn::before { content: "📣"; }
.fa-tasks::before { content: "✅"; }
.fa-bullseye::before { content: "🎯"; }
.fa-briefcase::before { content: "💼"; }
.fa-chart-line::before { content: "📈"; }
.fa-weixin::before { content: "💬"; }
.fa-weibo::before { content: "🌐"; }
.fa-qq::before { content: "🐧"; }
.fa-plus::before { content: "+"; }
.fa-times::before { content: "✕"; }
.fa-gavel::before { content: "🔨"; }
.fa-image::before { content: "🖼"; }
.fa-images::before { content: "🖼"; }
.fa-video::before { content: "🎬"; }
.fa-play::before { content: "▶"; }
.fa-heart::before { content: "❤"; }

/* 兼容补充：邮件、握手、二维码 */
.fa-envelope::before { content: "✉️"; }
.fa-handshake::before { content: "🤝"; }
.fa-qrcode::before { content: "🔳"; }

/* 统一大小与对齐 */
.fas::before, .fab::before, .far::before {
    display: inline-block;
    font-size: 1em;
    line-height: 1;
}

/* 播放图标 */
.icon-play::before {
    content: "▶";
    font-size: 1.2em;
    color: white;
}

/* 图片图标 */
.icon-images::before {
    content: "🖼";
    font-size: 1.2em;
    color: white;
}

/* 心形图标 */
.icon-heart::before {
    content: "❤";
    font-size: 1em;
    color: #ff4757;
}

.icon-heart-outline::before {
    content: "🤍";
    font-size: 1em;
    color: #747d8c;
}

/* 用户图标 */
.icon-user::before {
    content: "👤";
    font-size: 1em;
}

/* 位置图标 */
.icon-location { width: 18px; height: 18px; background: url('../images/icons/icon-location-flat.svg') no-repeat center/contain; display: inline-block; }

/* 商店图标 */
.icon-store::before {
    content: "🏪";
    font-size: 1em;
}

/* 工作图标 */
.icon-briefcase::before {
    content: "💼";
    font-size: 1em;
}

/* 锤子图标 */
.icon-gavel::before {
    content: "🔨";
    font-size: 1em;
}

/* 工具图标 */
.icon-tools::before {
    content: "🔧";
    font-size: 1em;
}

/* 调色板图标 */
.icon-palette::before {
    content: "🎨";
    font-size: 1em;
}

/* 搜索图标 */
.icon-search::before {
    content: "";
    font-size: 1em;
}

/* 消息图标 */
.icon-message::before {
    content: "💬";
    font-size: 1em;
}

/* 通知图标 */
.icon-bell::before {
    content: "🔔";
    font-size: 1em;
}

/* 设置图标 */
.icon-settings::before {
    content: "⚙️";
    font-size: 1em;
}

/* 关闭图标 */
.icon-close::before {
    content: "✕";
    font-size: 1.2em;
    color: #666;
}

/* 箭头图标 */
.icon-arrow-right::before {
    content: "→";
    font-size: 1em;
}

.icon-arrow-left::before {
    content: "←";
    font-size: 1em;
}

.icon-arrow-up::before {
    content: "↑";
    font-size: 1em;
}

.icon-arrow-down { width: 14px; height: 14px; background: url('../images/icons/icon-arrow-down-flat.svg') no-repeat center/contain; display: inline-block; }

/* 社交媒体图标 */
.icon-facebook::before {
    content: "📘";
    font-size: 1em;
}

.icon-twitter::before {
    content: "🐦";
    font-size: 1em;
}

.icon-instagram::before {
    content: "📷";
    font-size: 1em;
}

.icon-wechat::before {
    content: "💬";
    font-size: 1em;
}

/* 状态图标 */
.icon-check::before {
    content: "✓";
    font-size: 1em;
    color: #2ed573;
}

.icon-warning::before {
    content: "⚠";
    font-size: 1em;
    color: #ffa502;
}

.icon-error::before {
    content: "✗";
    font-size: 1em;
    color: #ff4757;
}

.icon-info::before {
    content: "ℹ";
    font-size: 1em;
    color: #3742fa;
}

/* 加载动画 */
.icon-loading {
    animation: spin 1s linear infinite;
}

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

.icon-loading::before {
    content: "⟳";
    font-size: 1em;
}

/* 响应式图标 */
@media (max-width: 768px) {
    .icon {
        font-size: 0.9em;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .icon {
        font-size: 0.8em;
    }
}

/* 扁平白色搜索图标 */
.icon-search { width: 18px; height: 18px; background: url('../images/icons/icon-search-flat.svg') no-repeat center/contain; display: inline-block; }

