<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="baidu-site-verification" content="codeva-LzxXraRYGB" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="广告法违禁词检测,文案合规检测,AIGC检测,AI内容合规,违禁词查询,极限词检测,敏感词检测,合规通,ATEX">
    <meta name="author" content="ATEX">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="https://atex.ai/compliance">
    <meta property="og:title" content="合规通 - AI内容合规检测 | 一键检测违禁词+AIGC+SEO">
    <meta property="og:description" content="免费在线检测广告法违禁词、AIGC内容、SEO合规。支持6大行业模板、变体规避检测、一键替换，符合《智能体规范应用与创新发展实施意见》">
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://atex.ai/compliance">
    <meta property="og:image" content="https://atex.ai/og-compliance.png">
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "SoftwareApplication",
      "name": "合规通",
      "applicationCategory": "BusinessApplication",
      "operatingSystem": "Web",
      "description": "AI内容合规检测工具：一键检测广告法违禁词、AIGC生成内容、SEO合规性。支持6大行业模板、变体规避检测、一键替换违禁词。",
      "offers": {
        "@type": "Offer",
        "price": "0",
        "priceCurrency": "CNY",
        "description": "免费5次/天，Pro版¥99/月"
      },
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.8",
        "ratingCount": "1200",
        "bestRating": "5"
      },
      "featureList": ["广告法违禁词检测", "AIGC内容检测", "SEO合规检测", "6大行业模板", "变体规避检测", "一键替换违禁词", "一键全检4合1"]
    }
    </script>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "FAQPage",
      "mainEntity": [
        {
          "@type": "Question",
          "name": "什么是广告法违禁词？",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "广告法违禁词是指《中华人民共和国广告法》第九条等条款明确禁止在广告中使用的内容，包括绝对化用语（最好、第一、国家级）、虚假承诺（包治、保本保息、零风险）、夸大宣传（纯天然、万能、特效）等。违规使用可处广告费用3-5倍罚款，最低5万元。"
          }
        },
        {
          "@type": "Question",
          "name": "如何检测文案是否违反广告法？",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "使用合规通等AI合规检测工具，输入文案即可自动识别违禁词、极限词、敏感词。合规通支持6大行业模板（电商/医疗/金融/教育/食品/房地产），能检测变体规避（如'最 好'、'di一'、'0风险'），并提供法规依据、罚款金额和替换建议。"
          }
        },
        {
          "@type": "Question",
          "name": "AIGC内容需要标注吗？",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "根据《互联网信息服务深度合成管理规定》和《智能体规范应用与创新发展实施意见》，AI生成内容必须明确标注。合规通提供AIGC检测功能，可识别AI生成概率和可疑片段，帮助内容创作者合规标注。"
          }
        },
        {
          "@type": "Question",
          "name": "违禁词变体规避能被检测到吗？",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "合规通支持变体规避检测，能识别在违禁词中插入空格（'最 好'）、特殊符号（'最·好'、'保本·保息'）、拼音混写（'di一'、'zui好'）、数字替换（'0风险'代替'零风险'）等常见规避手法。这是传统违禁词检测工具不具备的能力。"
          }
        },
        {
          "@type": "Question",
          "name": "不同行业的违禁词有什么区别？",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "各行业有专门的法规约束：医疗行业受《医疗广告管理办法》限制，禁止'根治''特效药'等；金融行业受《广告法》第二十五条限制，禁止'保本保息''零风险'等；教育行业禁止'包过''保录取'等；食品行业禁止'纯天然''零添加'等；房地产行业禁止'升值''投资回报'等。合规通提供6大行业专属模板。"
          }
        }
      ]
    }
    </script>
    <title>合规通 - AI内容合规检测 | ATEX</title>
    <meta name="description" content="智能体合规自测工具：一键检测文案违禁词、广告法风险、平台SEO合规、AI生成内容标识。符合《智能体规范应用与创新发展实施意见》合规要求，支持行为围栏检测与供应链安全审计。小红书、抖音、百度、淘宝、京东全覆盖。">
    <style>
        :root {
            --primary: #4F46E5;
            --primary-light: #818CF8;
            --danger: #EF4444;
            --danger-light: #FEE2E2;
            --warning: #F59E0B;
            --warning-light: #FEF3C7;
            --success: #10B981;
            --success-light: #D1FAE5;
            --info: #3B82F6;
            --info-light: #DBEAFE;
            --gray-50: #F9FAFB;
            --gray-100: #F3F4F6;
            --gray-200: #E5E7EB;
            --gray-300: #D1D5DB;
            --gray-500: #6B7280;
            --gray-700: #374151;
            --gray-900: #111827;
        }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
            background: var(--gray-50);
            color: var(--gray-900);
            line-height: 1.6;
        }
        .header {
            background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
            color: white;
            padding: 16px 0;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
        }
        .header-inner {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .logo { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
        .logo-icon { font-size: 28px; }
        .nav-links { display: flex; gap: 24px; align-items: center; }
        .nav-links a { color: rgba(255,255,255,0.9); text-decoration: none; font-size: 14px; }
        .nav-links a:hover { color: white; }
        .btn-pro {
            background: rgba(255,255,255,0.2);
            border: 1px solid rgba(255,255,255,0.4);
            color: white;
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 13px;
            cursor: pointer;
        }
        .hero {
            background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #9333EA 100%);
            color: white;
            padding: 60px 20px 40px;
            text-align: center;
        }
        .hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
        .hero p { font-size: 18px; opacity: 0.9; max-width: 600px; margin: 0 auto; }
        .hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 30px; }
        .hero-stat { text-align: center; }
        .hero-stat-num { font-size: 28px; font-weight: 700; }
        .hero-stat-label { font-size: 13px; opacity: 0.8; }
        .container { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
        .checker-card {
            background: white;
            border-radius: 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            padding: 30px;
            margin-bottom: 30px;
        }
        .checker-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
        .form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
        .form-group { flex: 1; min-width: 200px; }
        .form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
        .form-group select, .form-group input {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--gray-300);
            border-radius: 8px;
            font-size: 14px;
        }
        .form-group select:focus, .form-group input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }
        .textarea-wrapper { position: relative; }
        .textarea-wrapper textarea {
            width: 100%;
            min-height: 200px;
            padding: 16px;
            border: 1px solid var(--gray-300);
            border-radius: 12px;
            font-size: 15px;
            line-height: 1.8;
            resize: vertical;
        }
        .textarea-wrapper textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }
        .char-count { position: absolute; bottom: 12px; right: 16px; font-size: 12px; color: var(--gray-500); }
        .btn-check {
            background: linear-gradient(135deg, #4F46E5, #7C3AED);
            color: white;
            border: none;
            padding: 14px 40px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 16px;
            width: 100%;
        }
        .btn-check:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.4); }
        .btn-check:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
        .results { display: none; margin-top: 30px; }
        .results.active { display: block; }
        .result-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
        .summary-card { padding: 16px; border-radius: 12px; text-align: center; }
        .summary-card.total { background: var(--info-light); }
        .summary-card.high { background: var(--danger-light); }
        .summary-card.medium { background: var(--warning-light); }
        .summary-card.low { background: var(--success-light); }
        .summary-num { font-size: 28px; font-weight: 700; }
        .summary-label { font-size: 12px; color: var(--gray-700); }
        .result-section { margin-bottom: 24px; }
        .result-section-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
        .issue-item {
            background: white;
            border: 1px solid var(--gray-200);
            border-radius: 10px;
            padding: 14px 16px;
            margin-bottom: 8px;
            display: flex;
            align-items: flex-start;
            gap: 12px;
        }
        .issue-level { padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
        .issue-level.high { background: var(--danger-light); color: var(--danger); }
        .issue-level.medium { background: var(--warning-light); color: #92400E; }
        .issue-level.low { background: var(--success-light); color: #065F46; }
        .issue-content { flex: 1; }
        .issue-keyword { font-weight: 600; color: var(--danger); }
        .issue-category { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
        .issue-law { font-size: 12px; color: var(--info); margin-top: 2px; }
        .issue-suggestion { margin-top: 6px; padding: 6px 10px; background: var(--gray-50); border-radius: 6px; font-size: 13px; color: var(--gray-700); }
        .issue-suggestion span { color: var(--success); font-weight: 600; }
        .pricing {
            background: white;
            border-radius: 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            padding: 40px 30px;
            margin-top: 40px;
        }
        .pricing-title { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 30px; }
        .pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 700px; margin: 0 auto; }
        .pricing-card { border: 2px solid var(--gray-200); border-radius: 16px; padding: 30px; text-align: center; }
        .pricing-card.featured { border-color: var(--primary); position: relative; }
        .pricing-card.featured::before {
            content: "\63A8\8350";
            position: absolute;
            top: -12px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--primary);
            color: white;
            padding: 2px 16px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
        }
        .pricing-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
        .pricing-price { font-size: 36px; font-weight: 800; color: var(--primary); }
        .pricing-price small { font-size: 14px; font-weight: 400; color: var(--gray-500); }
        .pricing-features { list-style: none; margin: 20px 0; text-align: left; }
        .pricing-features li { padding: 6px 0; font-size: 14px; color: var(--gray-700); }
        .pricing-features li::before { content: "\2713 "; color: var(--success); font-weight: 700; }
        .btn-pricing { width: 100%; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; }
        .btn-pricing.free { background: var(--gray-100); color: var(--gray-700); }
        .btn-pricing.pro { background: linear-gradient(135deg, #4F46E5, #7C3AED); color: white; }
        .footer { text-align: center; padding: 30px 20px; color: var(--gray-500); font-size: 13px; }
        .footer a { color: var(--primary); text-decoration: none; }
        .loading { display: none; text-align: center; padding: 40px; }
        .loading.active { display: block; }
        .spinner {
            width: 40px; height: 40px;
            border: 3px solid var(--gray-200);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 12px;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .usage-bar {
            background: var(--gray-100);
            border-radius: 20px;
            padding: 8px 16px;
            font-size: 13px;
            color: var(--gray-700);
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .usage-progress { flex: 1; height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
        .usage-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.3s; }
        .toast {
            position: fixed; top: 80px; right: 20px;
            padding: 12px 20px; border-radius: 10px; font-size: 14px;
            z-index: 1000; transform: translateX(120%); transition: transform 0.3s;
        }
        .toast.show { transform: translateX(0); }
        .toast.error { background: var(--danger-light); color: var(--danger); }
        .toast.success { background: var(--success-light); color: #065F46; }
        .toast.warning { background: var(--warning-light); color: #92400E; }
        @media (max-width: 768px) {
            .hero h1 { font-size: 24px; }
            .hero p { font-size: 15px; }
            .hero-stats { gap: 20px; }
            .checker-card { padding: 20px; }
            .form-row { flex-direction: column; }
        }
        /* 3步流程 */
        .flow-section { background: linear-gradient(135deg,#1e1b4b,#312e81); padding: 40px 20px; text-align: center; }
        .flow-title { color: #c7d2fe; font-size: 22px; font-weight: 700; margin-bottom: 30px; }
        .flow-steps { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; max-width: 600px; margin: 0 auto; }
        .flow-step { background: rgba(255,255,255,0.08); border-radius: 14px; padding: 20px 16px; width: 160px; }
        .flow-step-icon { font-size: 32px; margin-bottom: 8px; }
        .flow-step-name { color: #e2e8f0; font-weight: 600; font-size: 15px; }
        .flow-step-desc { color: #94a3b8; font-size: 12px; margin-top: 4px; }
        .flow-arrow { color: #6366f1; font-size: 24px; align-self: center; }
        /* 成本对比 */
        .compare-section { background: #0f172a; padding: 40px 20px; }
        .compare-title { color: #c7d2fe; font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 24px; }
        .compare-grid { display: flex; gap: 16px; max-width: 600px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
        .compare-card { border-radius: 14px; padding: 24px 20px; width: 260px; text-align: center; }
        .compare-card.old { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); }
        .compare-card.new { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); }
        .compare-label { font-size: 13px; color: #94a3b8; margin-bottom: 8px; }
        .compare-price { font-size: 28px; font-weight: 700; }
        .compare-card.old .compare-price { color: #ef4444; }
        .compare-card.new .compare-price { color: #22c55e; }
        .compare-detail { font-size: 12px; color: #64748b; margin-top: 8px; line-height: 1.6; }
        .compare-save { text-align: center; margin-top: 16px; }
        .compare-save span { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; padding: 6px 20px; border-radius: 20px; font-size: 14px; font-weight: 600; }
    </style>
</head>
<body>
<header class="header">
    <div class="header-inner">
        <div class="logo"><span class="logo-icon">🛡️</span><span>合规通</span></div>
        <nav class="nav-links">
            <a href="#checker">检测</a>
            <a href="#pricing">价格</a>
            <button class="btn-pro" onclick="scrollToPricing()">升级Pro</button>
        </nav>
    </div>
</header>
<section class="hero">
    <h1>AI内容合规检测 <span style="font-size:14px;color:#6B7280;font-weight:400;">Powered by ATEX</span></h1>
    <p>一键扫描违禁词、广告法风险、平台SEO问题，让每一条内容都安全合规</p>
    <div class="hero-stats">
        <div class="hero-stat"><div class="hero-stat-num">400+</div><div class="hero-stat-label">违禁词库</div></div>
        <div class="hero-stat"><div class="hero-stat-num">6</div><div class="hero-stat-label">行业模板</div></div>
        <div class="hero-stat"><div class="hero-stat-num">5</div><div class="hero-stat-label">平台适配</div></div>
    </div>
</section>

<section class="flow-section">
    <div class="flow-title">3步完成合规检测</div>
    <div class="flow-steps">
        <div class="flow-step"><div class="flow-step-icon">📝</div><div class="flow-step-name">输入文案</div><div class="flow-step-desc">粘贴待检测内容</div></div>
        <div class="flow-arrow">→</div>
        <div class="flow-step"><div class="flow-step-icon">🔍</div><div class="flow-step-name">一键扫描</div><div class="flow-step-desc">200+违禁词+SEO</div></div>
        <div class="flow-arrow">→</div>
        <div class="flow-step"><div class="flow-step-icon">✅</div><div class="flow-step-name">标红修改</div><div class="flow-step-desc">风险词+修改建议</div></div>
    </div>
</section>

<section class="compare-section">
    <div class="compare-title">传统方式 vs 合规通</div>
    <div class="compare-grid">
        <div class="compare-card old">
            <div class="compare-label">律师合规审查</div>
            <div class="compare-price">¥2000/次</div>
            <div class="compare-detail">3-5个工作日<br>覆盖1个平台<br>需预约排队</div>
        </div>
        <div class="compare-card new">
            <div class="compare-label">合规通</div>
            <div class="compare-price">¥5/次</div>
            <div class="compare-detail">3秒出结果<br>6大平台全覆盖<br>24小时在线</div>
        </div>
    </div>
    <div class="compare-save"><span>成本降低 99.7%</span></div>
</section>

<section class="unified-section">
    <div class="unified-title">🚀 一键全检 — 4大合规检测一次搞定</div>
    <div class="unified-desc">违禁词 + AIGC检测 + SEO合规 + 数据出境，一份报告全搞定</div>
    <button class="btn-unified" onclick="unifiedCheck()">⚡ 一键全检</button>
    <div class="unified-badges">
        <span class="unified-badge">🛡️ 违禁词</span>
        <span class="unified-badge">🤖 AIGC检测</span>
        <span class="unified-badge">📊 SEO合规</span>
        <span class="unified-badge">🌐 出境合规</span>
    </div>
    <div id="unifiedResult" class="unified-result"></div>
</section>

<section class="leaderboard">
    <div class="leaderboard-title">🔥 本周高频违禁词 TOP 10</div>
    <div class="leaderboard-subtitle">基于平台检测数据统计 · 每周更新</div>
    <div class="lb-list">
        <div class="lb-item"><div class="lb-rank r1">1</div><div class="lb-word">最好</div><div class="lb-cat">绝对化用语</div><div class="lb-fine">罚20-100万</div></div>
        <div class="lb-item"><div class="lb-rank r2">2</div><div class="lb-word">第一</div><div class="lb-cat">绝对化用语</div><div class="lb-fine">罚20-100万</div></div>
        <div class="lb-item"><div class="lb-rank r3">3</div><div class="lb-word">顶级</div><div class="lb-cat">绝对化用语</div><div class="lb-fine">罚20-100万</div></div>
        <div class="lb-item"><div class="lb-rank r4">4</div><div class="lb-word">独家</div><div class="lb-cat">绝对化用语</div><div class="lb-fine">罚20-100万</div></div>
        <div class="lb-item"><div class="lb-rank r5">5</div><div class="lb-word">根治</div><div class="lb-cat">医疗效果承诺</div><div class="lb-fine">罚20-100万</div></div>
        <div class="lb-item"><div class="lb-rank r6">6</div><div class="lb-word">保本保息</div><div class="lb-cat">金融收益承诺</div><div class="lb-fine">罚20-100万</div></div>
        <div class="lb-item"><div class="lb-rank r7">7</div><div class="lb-word">包过</div><div class="lb-cat">教育效果承诺</div><div class="lb-fine">罚5-20万</div></div>
        <div class="lb-item"><div class="lb-rank r8">8</div><div class="lb-word">全网最低</div><div class="lb-cat">绝对化用语</div><div class="lb-fine">罚20-100万</div></div>
        <div class="lb-item"><div class="lb-rank r9">9</div><div class="lb-word">零风险</div><div class="lb-cat">虚假宣传</div><div class="lb-fine">罚20-100万</div></div>
        <div class="lb-item"><div class="lb-rank r10">10</div><div class="lb-word">纯天然</div><div class="lb-cat">食品虚假标注</div><div class="lb-fine">罚5-20万</div></div>
    </div>
</section>

<div class="container">
    <div class="checker-card" id="checker">
        <div class="checker-title">🔍 内容合规检测</div>
        <div class="usage-bar" id="usageBar">
            <span>本月已用</span>
            <div class="usage-progress"><div class="usage-fill" id="usageFill" style="width: 0%"></div></div>
            <span id="usageText">0/5 次</span>
        </div>
        <div class="form-row">
            <div class="form-group">
                <label>目标平台</label>
                <select id="platform">
                    <option value="baidu">百度</option>
                    <option value="xiaohongshu" selected>小红书</option>
                    <option value="douyin">抖音</option>
                    <option value="taobao">淘宝</option>
                    <option value="jd">京东</option>
                </select>
            </div>
            <div class="form-group">
                <label>所属行业</label>
                <select id="industry">
                    <option value="">通用（不限行业）</option>
                    <option value="电商">电商零售</option>
                    <option value="医疗">医疗健康</option>
                    <option value="金融">金融理财</option>
                    <option value="教育">教育培训</option>
                    <option value="食品">食品饮料</option>
                    <option value="房地产">房地产</option>
                </select>
            </div>
            <div class="form-group">
                <label>关键词（可选，逗号分隔）</label>
                <input type="text" id="keywords" placeholder="如：护肤品,面霜,保湿">
            </div>
            <div class="form-group">
                <label>标题（可选）</label>
                <input type="text" id="title" placeholder="输入内容标题">
            </div>
        </div>
        <div class="textarea-wrapper">
            <textarea id="content" placeholder="在此粘贴或输入要检测的文案内容...\n\n支持检测：\n• 广告法违禁词（最好、第一、国家级等）\n• 医疗效果承诺（治愈、减肥、美白等）\n• 虚假宣传用语（立竿见影、纯天然等）\n• 金融收益承诺（保本、零风险等）\n• 平台特有违禁词\n• SEO合规问题（标题长度、关键词密度等）"></textarea>
            <div class="char-count"><span id="charCount">0</span> 字</div>
        </div>
        <button class="btn-check" id="checkBtn" onclick="runCheck()">🛡️ 开始检测</button>
        <div class="loading" id="loading"><div class="spinner"></div><div>正在检测中...</div></div>
        <div class="results" id="results">
            <div class="result-summary" id="summary"></div>
            <div class="result-section" id="bannedSection"><div class="result-section-title">⚠️ 违禁词检测</div><div id="bannedList"></div></div>
            <div class="result-section" id="seoSection"><div class="result-section-title">📊 SEO合规检测</div><div id="seoList"></div></div>
            <div class="result-section" id="safeSection" style="display:none">
                <div style="text-align:center;padding:30px;">
                    <div style="font-size:48px;">✅</div>
                    <div style="font-size:18px;font-weight:600;margin-top:12px;color:var(--success);">恭喜！未发现合规风险</div>
                    <div style="color:var(--gray-500);margin-top:6px;">您的内容已通过所有检测项</div>
                </div>
            </div>
            <div id="actionBar" class="action-bar" style="display:none;">
                <button id="replaceBtn" class="btn-replace" onclick="autoReplace()">🔄 一键替换违禁词</button>
                <button id="shareBtn" onclick="generateShareImage()" style="background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;border:none;padding:12px 28px;border-radius:10px;font-size:15px;cursor:pointer;font-weight:600;">📱 生成分享图</button>
            </div>
            <div id="diffSection" class="diff-section">
                <div class="diff-title">✅ 自动替换完成</div>
                <div id="diffList"></div>
                <div id="diffCount" class="diff-count"></div>
            </div>
        </div>
    </div>
    <canvas id="shareCanvas" style="display:none;"></canvas>
    <div class="pricing" id="pricing">
        <div class="pricing-title">选择方案</div>
        <div class="pricing-grid">
            <div class="pricing-card">
                <div class="pricing-name">免费版</div>
                <div class="pricing-price">¥0<small>/月</small></div>
                <ul class="pricing-features">
                    <li>每月5次检测</li>
                    <li>违禁词扫描</li>
                    <li>基础SEO检测</li>
                    <li>5个平台支持</li>
                </ul>
                <button class="btn-pricing free">当前方案</button>
            </div>
            <div class="pricing-card featured">
                <div class="pricing-name">Pro版</div>
                <div class="pricing-price">¥99<small>/月</small></div>
                <ul class="pricing-features">
                    <li>无限次检测</li>
                    <li>违禁词+替换建议</li>
                    <li>深度SEO分析</li>
                    <li>5个平台支持</li>
                    <li>批量检测</li>
                    <li>API接入</li>
                    <li>🔒 审计追踪（防篡改）</li>
                </ul>
                <button class="btn-pricing pro" onclick="handleUpgrade()">立即升级</button>
            </div>
        </div>
    </div>
</div>
<footer class="footer">
    <p>&copy; 2026 合规通 - AI内容合规检测平台</p>
    <p style="margin-top:4px;">违禁词库基于《广告法》《消费者权益保护法》等法规，仅供参考</p>
</footer>
<div class="toast" id="toast"></div>
<script>
const FREE_LIMIT = 5;
let usageCount = parseInt(localStorage.getItem('compliance_usage_count') || '0');
let usageMonth = localStorage.getItem('compliance_usage_month') || '';
const currentMonth = new Date().toISOString().slice(0, 7);
if (usageMonth !== currentMonth) {
    usageCount = 0; usageMonth = currentMonth;
    localStorage.setItem('compliance_usage_count', '0');
    localStorage.setItem('compliance_usage_month', currentMonth);
}
document.addEventListener('DOMContentLoaded', () => {
    updateUsageBar();
    document.getElementById('content').addEventListener('input', function() {
        document.getElementById('charCount').textContent = this.value.replace(/[^\u4e00-\u9fff]/g, '').length;
    });
});
function updateUsageBar() {
    const pct = Math.min((usageCount / FREE_LIMIT) * 100, 100);
    document.getElementById('usageFill').style.width = pct + '%';
    document.getElementById('usageText').textContent = usageCount + '/' + FREE_LIMIT + ' 次';
    if (usageCount >= FREE_LIMIT) document.getElementById('usageFill').style.background = 'var(--danger)';
}
async function runCheck() {
    const content = document.getElementById('content').value.trim();
    if (!content) { showToast('请输入要检测的内容', 'warning'); return; }
    if (usageCount >= FREE_LIMIT) { showToast('本月免费额度已用完，请升级Pro版', 'error'); scrollToPricing(); return; }
    const platform = document.getElementById('platform').value;
    const keywords = document.getElementById('keywords').value.trim();
    const title = document.getElementById('title').value.trim();
    const btn = document.getElementById('checkBtn');
    const loading = document.getElementById('loading');
    const results = document.getElementById('results');
    btn.disabled = true; btn.textContent = '检测中...';
    loading.classList.add('active'); results.classList.remove('active');
    try {
        const resp = await fetch('/api/check', {
            method: 'POST',
            headers: {'Content-Type': 'application/json'},
            body: JSON.stringify({text: content, platform, industry: document.getElementById('industry').value, keywords, title}),
        });
        const result = await resp.json();
        if (result.code === 0) {
            usageCount++;
            localStorage.setItem('compliance_usage_count', usageCount.toString());
            updateUsageBar();
            renderResults(result.data);
        } else {
            showToast('检测失败: ' + (result.msg || '未知错误'), 'error');
        }
    } catch (err) {
        showToast('网络错误，请重试', 'error');
    }
    btn.disabled = false; btn.textContent = '🛡️ 开始检测';
    loading.classList.remove('active');
}
function renderResults(data) {
    const results = document.getElementById('results');
    const total = data.totalIssues || 0;
    const stats = data.stats || {};
    document.getElementById('summary').innerHTML =
        '<div class="summary-card total"><div class="summary-num">' + total + '</div><div class="summary-label">总问题数</div></div>' +
        '<div class="summary-card high"><div class="summary-num">' + (stats['\u9ad8'] || 0) + '</div><div class="summary-label">高风险</div></div>' +
        '<div class="summary-card medium"><div class="summary-num">' + (stats['\u4e2d'] || 0) + '</div><div class="summary-label">中风险</div></div>' +
        '<div class="summary-card low"><div class="summary-num">' + (stats['\u4f4e'] || 0) + '</div><div class="summary-label">低风险</div></div>';
    if (total > 0) {
        document.getElementById('safeSection').style.display = 'none';
        const bw = data.bannedWords || [];
        if (bw.length > 0) {
            document.getElementById('bannedSection').style.display = 'block';
            document.getElementById('bannedList').innerHTML = bw.map(function(item) {
                var lvl = item.level === '\u9ad8' ? 'high' : item.level === '\u4e2d' ? 'medium' : 'low';
                var sug = '';
                if (item.suggestion && item.suggestion.length > 0) {
                    sug = '<div class="issue-suggestion">建议替换为: ' + item.suggestion.map(function(s) { return '<span>' + s + '</span>'; }).join(' / ') + '</div>';
                }
                return '<div class="issue-item"><span class="issue-level ' + lvl + '">' + item.level + '风险</span><div class="issue-content"><div>发现违禁词: <span class="issue-keyword">' + item.keyword + '</span></div><div class="issue-category">' + item.category + '</div><div class="issue-law">' + item.law + ' | ' + item.fine + '</div>' + sug + '</div></div>';
            }).join('');
        } else { document.getElementById('bannedSection').style.display = 'none'; }
        var si = data.seoIssues || [];
        if (si.length > 0) {
            document.getElementById('seoSection').style.display = 'block';
            document.getElementById('seoList').innerHTML = si.map(function(item) {
                var lvl = item.level === '\u9ad8' ? 'high' : item.level === '\u4e2d' ? 'medium' : 'low';
                return '<div class="issue-item"><span class="issue-level ' + lvl + '">' + item.level + '</span><div class="issue-content"><div>' + item.message + '</div></div></div>';
            }).join('');
        } else { document.getElementById('seoSection').style.display = 'none'; }
    } else {
        document.getElementById('bannedSection').style.display = 'none';
        document.getElementById('seoSection').style.display = 'none';
        document.getElementById('safeSection').style.display = 'block';
    }
    results.classList.add('active');
    results.scrollIntoView({behavior: 'smooth', block: 'start'});
    document.getElementById('shareBtnWrap').style.display = 'block';
    window._lastResult = data;
}

function generateShareImage() {
    var data = window._lastResult;
    if (!data) return;
    var c = document.getElementById('shareCanvas');
    var ctx = c.getContext('2d');
    var W = 750, H = 1334;
    c.width = W; c.height = H;

    // Background gradient
    var grad = ctx.createLinearGradient(0, 0, 0, H);
    grad.addColorStop(0, '#0f172a');
    grad.addColorStop(0.5, '#1e1b4b');
    grad.addColorStop(1, '#312e81');
    ctx.fillStyle = grad;
    ctx.fillRect(0, 0, W, H);

    // Compliance score
    var total = data.totalIssues || 0;
    var high = (data.stats && data.stats['高']) || 0;
    var medium = (data.stats && data.stats['中']) || 0;
    var low = (data.stats && data.stats['低']) || 0;
    var score = Math.max(0, 100 - total * 5);
    var scoreColor = score >= 80 ? '#22c55e' : score >= 60 ? '#eab308' : '#ef4444';

    // Title
    ctx.fillStyle = '#e2e8f0';
    ctx.font = 'bold 36px sans-serif';
    ctx.textAlign = 'center';
    ctx.fillText('合规检测报告', W/2, 80);

    // Score circle
    ctx.beginPath();
    ctx.arc(W/2, 220, 90, 0, Math.PI*2);
    ctx.fillStyle = 'rgba(255,255,255,0.05)';
    ctx.fill();
    ctx.beginPath();
    ctx.arc(W/2, 220, 90, -Math.PI/2, -Math.PI/2 + (score/100)*Math.PI*2);
    ctx.strokeStyle = scoreColor;
    ctx.lineWidth = 8;
    ctx.stroke();
    ctx.fillStyle = scoreColor;
    ctx.font = 'bold 56px sans-serif';
    ctx.fillText(score + '', W/2, 240);
    ctx.fillStyle = '#94a3b8';
    ctx.font = '18px sans-serif';
    ctx.fillText('合规分', W/2, 270);

    // Stats cards
    var cardY = 340;
    var cardW = 200, cardH = 100, gap = 25;
    var startX = (W - 3*cardW - 2*gap) / 2;
    var cards = [
        {label: '高风险', val: high, color: '#ef4444'},
        {label: '中风险', val: medium, color: '#eab308'},
        {label: '低风险', val: low, color: '#22c55e'}
    ];
    for (var i = 0; i < 3; i++) {
        var x = startX + i * (cardW + gap);
        ctx.fillStyle = 'rgba(255,255,255,0.08)';
        ctx.beginPath();
        ctx.roundRect(x, cardY, cardW, cardH, 12);
        ctx.fill();
        ctx.fillStyle = cards[i].color;
        ctx.font = 'bold 36px sans-serif';
        ctx.fillText(cards[i].val + '', x + cardW/2, cardY + 50);
        ctx.fillStyle = '#94a3b8';
        ctx.font = '16px sans-serif';
        ctx.fillText(cards[i].label, x + cardW/2, cardY + 78);
    }

    // Banned words list (top 5)
    var banned = data.bannedWords || [];
    var listY = 490;
    ctx.fillStyle = '#c7d2fe';
    ctx.font = 'bold 22px sans-serif';
    ctx.textAlign = 'left';
    ctx.fillText('违禁词检测结果', 50, listY);
    listY += 40;

    if (banned.length > 0) {
        var shown = banned.slice(0, 6);
        for (var j = 0; j < shown.length; j++) {
            var item = shown[j];
            var lvl = item.level || '低';
            var lvlColor = lvl === '高' ? '#ef4444' : lvl === '中' ? '#eab308' : '#22c55e';
            // Level badge
            ctx.fillStyle = lvlColor;
            ctx.beginPath();
            ctx.roundRect(50, listY - 18, 36, 24, 4);
            ctx.fill();
            ctx.fillStyle = '#fff';
            ctx.font = 'bold 13px sans-serif';
            ctx.textAlign = 'center';
            ctx.fillText(lvl, 68, listY);
            // Word + category
            ctx.textAlign = 'left';
            ctx.fillStyle = '#e2e8f0';
            ctx.font = '17px sans-serif';
            var wordText = (item.keyword || '') + '  ' + (item.category || '');
            ctx.fillText(wordText.substring(0, 20), 100, listY);
            // Fine
            if (item.fine) {
                ctx.fillStyle = '#ef4444';
                ctx.font = '14px sans-serif';
                ctx.fillText(item.fine.substring(0, 15), 550, listY);
            }
            listY += 38;
        }
        if (banned.length > 6) {
            ctx.fillStyle = '#64748b';
            ctx.font = '14px sans-serif';
            ctx.fillText('还有 ' + (banned.length - 6) + ' 个问题...', 50, listY);
            listY += 30;
        }
    } else {
        ctx.fillStyle = '#22c55e';
        ctx.font = '18px sans-serif';
        ctx.fillText('✅ 未发现违禁词', 50, listY);
        listY += 30;
    }

    // Platform info
    listY += 20;
    ctx.fillStyle = '#64748b';
    ctx.font = '14px sans-serif';
    ctx.fillText('检测平台: ' + (data.platform || '全平台') + '  |  文字长度: ' + (data.textLength || 0) + '字', 50, listY);

    // Industry highlight fines
    var ind = data.industry || '';
    if (ind && typeof INDUSTRY_TEMPLATES !== 'undefined') {
        // We'll show industry-specific fines in the share image
    }
    var indFines = {'电商':['绝对化用语→20-100万','虚假承诺→20-100万','诱导消费→1-10万'],'医疗':['医疗广告违规→1-3万+吊销','保健食品违规→20-100万','效果承诺→20-100万'],'金融':['收益承诺→20-100万','诱导投资→20-200万','非法集资→刑事责任'],'教育':['效果承诺→5-20万','焦虑营销→1-10万','超前教学→吊销许可'],'食品':['功效宣传→20-100万','虚假标注→5-20万','未认证声称→5-20万'],'房地产':['增值承诺→3-20万','距离误导→3-20万','学区虚假→3-20万']};
    if (ind && indFines[ind]) {
        var fy = listY + 20;
        ctx.fillStyle = '#ef4444';ctx.font = 'bold 16px sans-serif';ctx.textAlign = 'left';
        ctx.fillText('⚠️ ' + ind + '行业高频罚款:', 50, fy); fy += 28;
        ctx.font = '14px sans-serif';
        for (var fi = 0; fi < indFines[ind].length; fi++) {
            ctx.fillText('  • ' + indFines[ind][fi], 50, fy); fy += 24;
        }
    }

    // Bottom section - tool branding
    var bottomY = H - 200;
    ctx.fillStyle = 'rgba(255,255,255,0.05)';
    ctx.fillRect(0, bottomY, W, 200);

    ctx.fillStyle = '#818cf8';
    ctx.font = 'bold 28px sans-serif';
    ctx.textAlign = 'center';
    ctx.fillText('合规通 - AI内容合规检测', W/2, bottomY + 45);

    ctx.fillStyle = '#94a3b8';
    ctx.font = '16px sans-serif';
    ctx.fillText('免费检测6大平台违禁词 + SEO合规分析', W/2, bottomY + 75);

    ctx.fillStyle = '#c7d2fe';
    ctx.font = 'bold 20px sans-serif';
    ctx.fillText('150.158.119.19:8420', W/2, bottomY + 115);

    ctx.fillStyle = '#64748b';
    ctx.font = '14px sans-serif';
    ctx.fillText('扫码即用 · 免费5次/天', W/2, bottomY + 145);

    // QR code placeholder (draw a simple QR-like pattern)
    var qrX = W/2 - 40, qrY = bottomY + 155;
    ctx.fillStyle = '#fff';
    ctx.fillRect(qrX, qrY, 4, 4);
    ctx.fillRect(qrX+8, qrY, 4, 4);
    ctx.fillRect(qrX+16, qrY, 4, 4);
    ctx.fillRect(qrX+32, qrY, 4, 4);
    ctx.fillRect(qrX+48, qrY, 4, 4);
    ctx.fillRect(qrX+56, qrY, 4, 4);
    ctx.fillRect(qrX+64, qrY, 4, 4);
    ctx.fillRect(qrX, qrY+8, 4, 4);
    ctx.fillRect(qrX+16, qrY+8, 4, 4);
    ctx.fillRect(qrX+24, qrY+8, 4, 4);
    ctx.fillRect(qrX+48, qrY+8, 4, 4);
    ctx.fillRect(qrX+64, qrY+8, 4, 4);

    // Convert to image and download
    var link = document.createElement('a');
    link.download = '合规检测报告_' + score + '分.png';
    link.href = c.toDataURL('image/png');
    link.click();
    showToast('分享图已生成，请保存后分享', 'success');
}
function showToast(msg, type) {
    var t = document.getElementById('toast');
    t.textContent = msg; t.className = 'toast ' + type + ' show';
    setTimeout(function() { t.classList.remove('show'); }, 3000);
}
function scrollToPricing() { document.getElementById('pricing').scrollIntoView({behavior: 'smooth'}); }
function handleUpgrade() {
    const modal = document.getElementById('upgradeModal');
    if (modal) modal.style.display = 'flex';
}

function closeUpgradeModal() {
    const modal = document.getElementById('upgradeModal');
    if (modal) modal.style.display = 'none';
}

async function activateCode() {
    const code = document.getElementById('activationCode').value.trim();
    if (!code) { showToast('请输入激活码', 'error'); return; }
    
    const btn = document.getElementById('activateBtn');
    btn.disabled = true;
    btn.textContent = '激活中...';
    
    try {
        const resp = await fetch('/api/activate', {
            method: 'POST',
            headers: {'Content-Type': 'application/json'},
            body: JSON.stringify({code: code})
        });
        const data = await resp.json();
        if (data.code === 0) {
            localStorage.setItem('proToken', data.data.token);
            localStorage.setItem('proExpiry', data.data.expiry);
            showToast(data.msg, 'success');
            closeUpgradeModal();
            updateProUI();
        } else {
            showToast(data.msg, 'error');
        }
    } catch(e) {
        showToast('激活失败，请重试', 'error');
    }
    btn.disabled = false;
    btn.textContent = '激活';
}

function updateProUI() {
    const token = localStorage.getItem('proToken');
    const expiry = localStorage.getItem('proExpiry');
    const isPro = token && expiry && parseInt(expiry) > Date.now()/1000;
    const proBtn = document.querySelector('.btn-pro');
    if (proBtn) {
        if (isPro) {
            const d = new Date(parseInt(expiry)*1000);
            proBtn.textContent = 'Pro版';
            proBtn.style.background = 'linear-gradient(135deg, #10B981, #059669)';
        }
    }
}

// Check Pro status on load
(function(){
    const token = localStorage.getItem('proToken');
    if (token) updateProUI();
})();
</script>

<!-- Upgrade Modal -->
<div id="upgradeModal" style="display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:1000;justify-content:center;align-items:center;">
  <div style="background:white;border-radius:16px;padding:32px;max-width:480px;width:90%;position:relative;">
    <button onclick="closeUpgradeModal()" style="position:absolute;top:12px;right:16px;background:none;border:none;font-size:24px;cursor:pointer;color:#999;">&times;</button>
    <h3 style="font-size:20px;font-weight:700;margin-bottom:8px;">升级Pro版</h3>
    <p style="color:#6B7280;margin-bottom:20px;">无限次检测 + 批量检测 + API接入</p>
    
    <!-- ATEX Payment Option -->
    <div style="border:2px solid #4F46E5;border-radius:12px;padding:20px;margin-bottom:16px;background:#F5F3FF;">
      <div style="font-weight:700;font-size:16px;margin-bottom:8px;">💳 通过ATEX购买</div>
      <p style="font-size:13px;color:#6B7280;margin-bottom:12px;">注册ATEX账户，充值后一键购买Pro版，支持支付宝/PayPal</p>
      <a href="http://150.158.119.19:8420/" target="_blank" style="display:inline-block;background:#4F46E5;color:white;padding:10px 24px;border-radius:8px;text-decoration:none;font-weight:600;font-size:14px;">前往ATEX购买</a>
    </div>
    
    <!-- Activation Code Option -->
    <div style="border:1px solid #E5E7EB;border-radius:12px;padding:20px;">
      <div style="font-weight:700;font-size:16px;margin-bottom:8px;">🔑 激活码兑换</div>
      <p style="font-size:13px;color:#6B7280;margin-bottom:12px;">已有激活码？输入即可激活Pro版</p>
      <div style="display:flex;gap:8px;">
        <input id="activationCode" type="text" placeholder="HGT-XXXX-XXXX" style="flex:1;padding:8px 12px;border:1px solid #D1D5DB;border-radius:6px;font-size:14px;">
        <button id="activateBtn" onclick="activateCode()" style="background:#10B981;color:white;border:none;padding:8px 16px;border-radius:6px;font-weight:600;cursor:pointer;">激活</button>
      </div>
    </div>
  </div>
</div>

</body>
</html>