/* ==================== 宇橙UI 图标系统 Ucon Icons ====================
   扁平化设计 · CSS实现 · 无依赖
   ==================== */

/* 图标基础类 */
.ucon-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    position: relative;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
}

.ucon-icon::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
}

/* ========== 尺寸变体 ========== */
.ucon-icon-sm { width: 16px; height: 16px; }
.ucon-icon-md { width: 24px; height: 24px; }
.ucon-icon-lg { width: 32px; height: 32px; }
.ucon-icon-xl { width: 48px; height: 48px; }
.ucon-icon-2xl { width: 64px; height: 64px; }
.ucon-icon-3xl { width: 80px; height: 80px; }

/* ========== 功能图标组 ========== */

/* 🚀 火箭/发布 - 使用向上箭头+圆角矩形 */
.icon-rocket::before {
    content: '';
    background: linear-gradient(135deg, var(--ucon-orange-500, #f97316) 0%, var(--ucon-orange-600, #ea580c) 100%);
    clip-path: polygon(50% 0%, 65% 35%, 60% 100%, 40% 100%, 35% 35%);
}
.icon-rocket {
    background: transparent;
    position: relative;
}
.icon-rocket::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 4px;
    background: var(--ucon-orange-400, #fb923c);
    border-radius: 0 0 4px 4px;
}

/* 🏢 建筑/企业 - 使用几何图形 */
.icon-building::before {
    content: '';
    background: var(--ucon-primary, #2563eb);
    clip-path: polygon(20% 100%, 20% 30%, 35% 30%, 35% 15%, 50% 0%, 65% 15%, 65% 30%, 80% 30%, 80% 100%);
}

/* 💬 聊天/消息 - 使用对话气泡 */
.icon-chat::before {
    content: '';
    background: var(--ucon-success, #16a34a);
    border-radius: 12px 12px 12px 0;
    position: relative;
}
.icon-chat::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* 📝 文档/考试 - 使用文档形状 */
.icon-document::before {
    content: '';
    background: var(--ucon-info, #0891b2);
    clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%);
    position: relative;
}
.icon-document::after {
    content: '';
    position: absolute;
    top: 35%;
    right: 25%;
    width: 35%;
    height: 3px;
    background: white;
    box-shadow: 0 8px 0 white, 0 16px 0 white;
}

/* 🤖 AI/机器人 - 使用圆形+天线 */
.icon-ai::before {
    content: '';
    background: var(--ucon-purple, #9333ea);
    border-radius: 50%;
    position: relative;
}
.icon-ai::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: var(--ucon-purple, #9333ea);
    border-radius: 1px;
}

/* 📋 清单/OA - 使用列表图标 */
.icon-list::before {
    content: '';
    background: var(--ucon-warning, #d97706);
    position: relative;
}
.icon-list::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 15%;
    width: 70%;
    height: 3px;
    background: white;
    box-shadow: 0 8px 0 white, 0 16px 0 white;
}

/* 🛒 购物车 - 使用购物车图形 */
.icon-cart::before {
    content: '';
    background: var(--ucon-orange-500, #f97316);
    clip-path: polygon(10% 10%, 90% 10%, 85% 55%, 20% 55%, 15% 10%, 5% 30%, 75% 30%);
    position: relative;
}
.icon-cart::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 25%;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 18px 0 0 white;
}

/* 🎯 目标/核心功能 */
.icon-target::before {
    content: '';
    background: var(--ucon-danger, #dc2626);
    border-radius: 50%;
    position: relative;
}
.icon-target::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 40%;
    background: white;
    border-radius: 50%;
    border: 2px solid var(--ucon-danger, #dc2626);
}

/* 🔐 安全/锁 */
.icon-lock::before {
    content: '';
    background: var(--ucon-success, #16a34a);
    border-radius: 4px 4px 0 0;
    position: relative;
}
.icon-lock::after {
    content: '';
    position: absolute;
    top: -40%;
    left: 15%;
    width: 70%;
    height: 45%;
    border: 3px solid var(--ucon-success, #16a34a);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    background: transparent;
}

/* 📱 移动端/全端适配 */
.icon-mobile::before {
    content: '';
    background: var(--ucon-primary, #2563eb);
    border-radius: 8px;
    border: 3px solid var(--ucon-primary, #2563eb);
    position: relative;
}
.icon-mobile::after {
    content: '';
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 20%;
    height: 20%;
    background: white;
    border-radius: 50%;
    border: 2px solid var(--ucon-primary, #2563eb);
}

/* ✅ 成功/完成 */
.icon-check::before {
    content: '';
    background: var(--ucon-success, #16a34a);
    border-radius: 50%;
    position: relative;
}
.icon-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 22%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 12px;
    border-right: 3px solid white;
    border-bottom: 3px solid white;
}

/* ⭐ 星级/推荐 */
.icon-star::before {
    content: '';
    background: var(--ucon-warning, #d97706);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ❤️ 收藏/喜欢 */
.icon-heart::before {
    content: '';
    background: var(--ucon-danger, #dc2626);
    transform: rotate(-45deg);
    border-radius: 8px 8px 0 0;
    position: relative;
}
.icon-heart::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: var(--ucon-danger, #dc2626);
    border-radius: 8px 8px 0 0;
}

/* 👤 用户/头像 */
.icon-user::before {
    content: '';
    background: var(--ucon-text-muted, #94a3b8);
    border-radius: 50%;
    position: relative;
}
.icon-user::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 60%;
    background: var(--ucon-text-muted, #94a3b8);
    border-radius: 50% 50% 0 0;
}

/* 🔧 设置/工具 */
.icon-settings::before {
    content: '';
    background: var(--ucon-text-secondary, #475569);
    clip-path: polygon(30% 0%, 70% 0%, 70% 30%, 100% 30%, 100% 70%, 70% 70%, 70% 100%, 30% 100%, 30% 70%, 0 70%, 0 30%, 30% 30%);
}

/* 💡 灵感/创意 */
.icon-lightbulb::before {
    content: '';
    background: var(--ucon-warning, #d97706);
    border-radius: 50% 50% 45% 45%;
    position: relative;
}
.icon-lightbulb::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: 25%;
    width: 50%;
    height: 20%;
    background: var(--ucon-text-secondary, #475569);
    border-radius: 0 0 4px 4px;
}

/* 🌐 全球/网络 */
.icon-globe::before {
    content: '';
    background: var(--ucon-primary, #2563eb);
    border-radius: 50%;
    border: 3px solid var(--ucon-primary, #2563eb);
    position: relative;
    overflow: hidden;
}
.icon-globe::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(to right, transparent 48%, white 49%, white 51%, transparent 52%),
        linear-gradient(to bottom, transparent 48%, white 49%, white 51%, transparent 52%);
}

/* 📊 数据/统计 */
.icon-chart::before {
    content: '';
    background: var(--ucon-success, #16a34a);
    position: relative;
    clip-path: polygon(0 100%, 0 70%, 33% 70%, 33% 40%, 66% 40%, 66% 20%, 100% 20%, 100% 100%);
}

/* 🎨 设计/美化 */
.icon-palette::before {
    content: '';
    background: conic-gradient(from 0deg, var(--ucon-danger, #dc2626), var(--ucon-warning, #d97706), var(--ucon-success, #16a34a), var(--ucon-primary, #2563eb), var(--ucon-danger, #dc2626));
    border-radius: 50%;
}

/* 🔒 隐私/加密 */
.icon-shield::before {
    content: '';
    background: var(--ucon-primary, #2563eb);
    clip-path: polygon(50% 0%, 100% 25%, 100% 60%, 50% 100%, 0 60%, 0 25%);
}

/* 📞 电话/联系 */
.icon-phone::before {
    content: '';
    background: var(--ucon-success, #16a34a);
    border-radius: 8px 12px 12px 8px;
    transform: rotate(-45deg);
}

/* ✉️ 邮件 */
.icon-email::before {
    content: '';
    background: var(--ucon-primary, #2563eb);
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}
.icon-email::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(135deg, transparent 49.5%, rgba(255,255,255,0.5) 50%, transparent 50.5%);
}

/* 🔍 搜索 */
.icon-search::before {
    content: '';
    background: var(--ucon-text-secondary, #475569);
    border-radius: 50%;
    border: 3px solid var(--ucon-text-secondary, #475569);
    position: relative;
}
.icon-search::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 8px;
    height: 3px;
    background: var(--ucon-text-secondary, #475569);
    transform: rotate(45deg);
    border-radius: 2px;
}

/* ➕ 添加/新增 */
.icon-plus::before {
    content: '';
    background: var(--ucon-primary, #2563eb);
    position: relative;
}
.icon-plus::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 3px;
    background: white;
    box-shadow: 0 -10px 0 white, 0 10px 0 white;
}

/* 🗑️ 删除/移除 */
.icon-trash::before {
    content: '';
    background: var(--ucon-danger, #dc2626);
    border-radius: 0 0 4px 4px;
    position: relative;
}
.icon-trash::after {
    content: '';
    position: absolute;
    top: -25%;
    left: 10%;
    width: 80%;
    height: 20%;
    border: 3px solid var(--ucon-danger, #dc2626);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: transparent;
}

/* ✏️ 编辑 */
.icon-edit::before {
    content: '';
    background: var(--ucon-warning, #d97706);
    transform: rotate(-45deg);
    border-radius: 2px;
    position: relative;
}
.icon-edit::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 60%;
    width: 35%;
    height: 35%;
    background: var(--ucon-eraser, #fef3c7);
    border-radius: 1px;
}

/* 💰 价格/金钱 */
.icon-price::before {
    content: '¥';
    color: var(--ucon-success, #16a34a);
    font-weight: bold;
    font-size: inherit;
    background: none;
}

/* ⏰ 时间/时钟 */
.icon-clock::before {
    content: '';
    background: var(--ucon-text-secondary, #475569);
    border-radius: 50%;
    border: 3px solid var(--ucon-text-secondary, #475569);
    position: relative;
}
.icon-clock::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform-origin: bottom;
    transform: translateX(-50%);
    width: 2px;
    height: 35%;
    background: var(--ucon-text-secondary, #475569);
}

/* 📍 定位/地址 */
.icon-location::before {
    content: '';
    background: var(--ucon-danger, #dc2626);
    clip-path: polygon(50% 100%, 0% 35%, 0% 15%, 50% 0%, 100% 15%, 100% 35%);
    position: relative;
}
.icon-location::after {
    content: '';
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 30%;
    background: white;
    border-radius: 50%;
}

/* 🎪 插件/扩展 */
.icon-plugin::before {
    content: '';
    background: linear-gradient(135deg, var(--ucon-primary, #2563eb), var(--ucon-purple, #9333ea));
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0 80%, 0 20%);
}

/* 📦 包裹/产品 */
.icon-package::before {
    content: '';
    background: var(--ucon-orange-500, #f97316);
    position: relative;
    border-radius: 4px;
}
.icon-package::after {
    content: '';
    position: absolute;
    top: 40%;
    left: 0;
    right: 0;
    height: 3px;
    background: white;
    box-shadow: 0 -15px 0 white, 0 15px 0 white;
}

/* 📌 标签/分类 */
.icon-tag::before {
    content: '';
    background: var(--ucon-info, #0891b2);
    clip-path: polygon(0 0, 85% 0, 100% 50%, 85% 100%, 0 100%, 15% 50%);
}

/* 🔔 通知/提醒 */
.icon-bell::before {
    content: '';
    background: var(--ucon-warning, #d97706);
    border-radius: 50% 50% 10% 10%;
    position: relative;
}
.icon-bell::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: 50%;
    transform: translateX(-50%);
    width: 20%;
    height: 15%;
    background: var(--ucon-warning, #d97706);
    border-radius: 0 0 50% 50%;
}

/* 📅 日历/日期 */
.icon-calendar::before {
    content: '';
    background: var(--ucon-primary, #2563eb);
    border-radius: 4px;
    position: relative;
}
.icon-calendar::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 15%;
    width: 70%;
    height: 20%;
    border: 3px solid var(--ucon-primary, #2563eb);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: transparent;
}

/* 📎 附件 */
.icon-attachment::before {
    content: '';
    background: var(--ucon-text-secondary, #475569);
    border-radius: 4px;
    transform: rotate(-45deg);
    position: relative;
}
.icon-attachment::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 20%;
    width: 50%;
    height: 60%;
    background: white;
    border-radius: 2px;
    border: 2px solid var(--ucon-text-secondary, #475569);
}

/* ========== 大尺寸图标容器（用于轮播图等）========== */
.slide-icon-large,
.system-icon-large {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(249,115,22,0.1) 0%, rgba(234,88,12,0.05) 100%);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
}

.slide-icon-large .ucon-icon,
.system-icon-large .ucon-icon {
    width: 64px;
    height: 64px;
}

/* 图标背景装饰 */
.slide-icon-large::before,
.system-icon-large::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(249,115,22,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

/* ========== 徽章图标（用于标签）========== */
.slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(249,115,22,0.15) 0%, rgba(251,146,60,0.1) 100%);
    border: 1px solid rgba(249,115,22,0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ucon-orange-600, #ea580c);
    margin-bottom: 14px;
}

.slide-badge .ucon-icon {
    width: 16px;
    height: 16px;
}

/* ========== 响应式适配 ========== */
@media screen and (max-width: 768px) {
    .slide-icon-large,
    .system-icon-large {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }

    .slide-icon-large .ucon-icon,
    .system-icon-large .ucon-icon {
        width: 44px;
        height: 44px;
    }

    .ucon-icon-3xl { width: 60px; height: 60px; }
    .ucon-icon-2xl { width: 48px; height: 48px; }
}

@media screen and (max-width: 480px) {
    .slide-icon-large,
    .system-icon-large {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .slide-icon-large .ucon-icon,
    .system-icon-large .ucon-icon {
        width: 36px;
        height: 36px;
    }
}

/* 🔥 火焰/热销 - 使用火焰形状 */
.icon-fire::before {
    content: '';
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    clip-path: polygon(50% 0%, 65% 25%, 80% 15%, 70% 40%, 90% 55%, 65% 50%, 75% 80%, 50% 65%, 25% 80%, 35% 50%, 10% 55%, 30% 40%, 20% 15%, 35% 25%);
}

/* 👍 点赞/推荐 - 使用拇指形状 */
.icon-like::before {
    content: '';
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    clip-path: polygon(35% 100%, 35% 60%, 20% 60%, 20% 45%, 35% 35%, 35% 15%, 50% 0%, 70% 10%, 70% 35%, 85% 45%, 85% 60%, 70% 60%, 70% 100%);
}
