chore: 初始提交 - 移除所有硬编码凭据,统一从环境变量读取

This commit is contained in:
yangxiangyuan
2026-06-11 17:10:58 +08:00
commit c223c79b36
1699 changed files with 313940 additions and 0 deletions
+500
View File
@@ -0,0 +1,500 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>穿搭镜检</title>
<link rel="stylesheet" href="/common/common.css" />
<link rel="stylesheet" href="/tools/style_check/style_check.css" />
</head>
<body>
<div id="topbar"></div>
<main class="sc-page">
<div id="mainSections">
<section class="sc-card sc-profile-card">
<h1>穿搭镜检</h1>
<p id="profileSlogan" class="sc-subtitle"></p>
<div class="sc-profile-tabs">
<button id="tabRelaxed" class="sc-tab-btn">中老年休闲沉稳版</button>
<button id="tabFashion40" class="sc-tab-btn">中老年流行时尚版</button>
<button id="tabWave" class="sc-tab-btn">WAVE穿搭参考</button>
<button id="tabKorean" class="sc-tab-btn">韩式穿搭参考</button>
<button id="tabZhihu" class="sc-tab-btn">知乎穿搭推荐</button>
<button id="tabX" class="sc-tab-btn">欧美穿搭参考 (X)</button>
</div>
</section>
<section class="sc-card">
<h2>今日建议</h2>
<p class="sc-subtitle">独立工具 · 双版本隔离 · 温区优先</p>
<div class="sc-inline">
<label>场景</label>
<select id="scene">
<option value="commute">通勤</option>
<option value="weekend">周末轻运动</option>
<option value="business_light">轻商务会面</option>
</select>
<label>温度(℃)</label>
<input id="tempC" type="number" step="0.1" placeholder="例如 18" />
<label>温区</label>
<select id="tempZone">
<option value="">自动按温度</option>
<option value="5-12℃">5-12℃</option>
<option value="12-22℃">12-22℃</option>
<option value="22-30℃">22-30℃</option>
<option value="30℃+">30℃+</option>
</select>
<button id="btnToday">获取今日建议</button>
</div>
<div id="todayBox" class="sc-result"></div>
</section>
<section class="sc-card">
<h2>智能图像 + AI审核</h2>
<div class="sc-inline">
<label>场景</label>
<select id="aiScene">
<option value="commute">通勤</option>
<option value="weekend">周末轻运动</option>
<option value="business_light">轻商务会面</option>
</select>
<label>温区</label>
<select id="aiTempZone">
<option value="">自动按温度</option>
<option value="5-12℃">5-12℃</option>
<option value="12-22℃">12-22℃</option>
<option value="22-30℃">22-30℃</option>
<option value="30℃+">30℃+</option>
</select>
<input id="aiImage" type="file" accept="image/*" />
<button id="btnAiAudit">开始AI审核</button>
</div>
<div class="sc-ai-layout">
<div class="sc-ai-left">
<img id="aiPreview" class="sc-ai-preview" alt="待审核图片预览" />
</div>
<div class="sc-ai-right">
<div id="aiAuditResult" class="sc-result"></div>
<div id="aiAuditIssues" class="sc-result"></div>
</div>
</div>
</section>
<section class="sc-card">
<h2>搭配库</h2>
<div class="sc-inline">
<label>筛选场景</label>
<select id="filterScene">
<option value="">全部</option>
<option value="commute">通勤</option>
<option value="weekend">周末轻运动</option>
<option value="business_light">轻商务会面</option>
</select>
<label>筛选温区</label>
<select id="filterTempZone">
<option value="">全部</option>
<option value="5-12℃">5-12℃</option>
<option value="12-22℃">12-22℃</option>
<option value="22-30℃">22-30℃</option>
<option value="30℃+">30℃+</option>
</select>
<input id="filterQ" type="text" placeholder="关键词搜索" />
<button id="btnSearch">查询</button>
</div>
<div class="sc-table-wrap">
<table class="sc-table">
<thead>
<tr>
<th>名称</th>
<th>场景</th>
<th>温区标签</th>
<th>上衣</th>
<th>下装</th>
<th>鞋</th>
<th>外搭</th>
<th>配饰</th>
<th>备注</th>
<th>服饰库匹配</th>
<th>操作</th>
</tr>
</thead>
<tbody id="outfitBody"></tbody>
</table>
</div>
</section>
<section class="sc-card">
<h2>服饰库(基础数据来源)</h2>
<div class="sc-inline">
<label>槽位</label>
<select id="libSlot">
<option value="">全部</option>
<option value="top">上衣</option>
<option value="bottom">下装</option>
<option value="shoes">鞋</option>
<option value="outer">外搭</option>
<option value="accessory">配饰</option>
</select>
<label>温区</label>
<select id="libTempZone">
<option value="">全部</option>
<option value="5-12℃">5-12℃</option>
<option value="12-22℃">12-22℃</option>
<option value="22-30℃">22-30℃</option>
<option value="30℃+">30℃+</option>
</select>
<input id="libQ" type="text" placeholder="关键词/品牌搜索" />
<button id="btnLibSearch">查询服饰库</button>
<button id="btnRebuildLinks">重建匹配</button>
<button id="btnFetchLocalImages">自动找图到本地</button>
</div>
<div class="sc-table-wrap">
<table class="sc-table">
<thead>
<tr>
<th>名称</th>
<th>槽位</th>
<th>类别</th>
<th>温区</th>
<th>品牌</th>
<th>价位</th>
<th>图片</th>
<th>关键词</th>
<th>说明</th>
<th>操作</th>
</tr>
</thead>
<tbody id="libBody"></tbody>
</table>
</div>
<div id="unmatchedReport" class="sc-result"></div>
<input id="libUploadInput" type="file" accept="image/*" style="display:none" />
<h3>新增 / 编辑服饰库条目</h3>
<div class="sc-form-grid">
<input id="libItemId" type="hidden" />
<label>名称</label><input id="libItemName" type="text" placeholder="短款立领夹克" />
<label>槽位</label>
<select id="libItemSlot">
<option value="top">上衣</option>
<option value="bottom">下装</option>
<option value="shoes">鞋</option>
<option value="outer">外搭</option>
<option value="accessory">配饰</option>
</select>
<label>类别</label><input id="libItemCategory" type="text" placeholder="夹克" />
<label>温区</label>
<select id="libItemTempZone">
<option value="ALL">ALL</option>
<option value="5-12℃">5-12℃</option>
<option value="12-22℃">12-22℃</option>
<option value="22-30℃">22-30℃</option>
<option value="30℃+">30℃+</option>
</select>
<label>品牌</label><input id="libItemBrands" type="text" />
<label>最低价</label><input id="libItemPriceMin" type="number" />
<label>最高价</label><input id="libItemPriceMax" type="number" />
<label>关键词</label><input id="libItemKeywords" type="text" />
<label>说明</label><input id="libItemNotes" type="text" />
</div>
<div class="sc-inline">
<button id="btnLibSave">保存服饰条目</button>
<button id="btnLibReset" class="ghost">清空服饰表单</button>
</div>
</section>
<section class="sc-card">
<h2>新增/更新搭配</h2>
<div class="sc-form-grid">
<input id="fId" type="hidden" />
<label>名称</label><input id="fName" type="text" placeholder="通勤休闲 B" />
<label>场景</label>
<select id="fScene">
<option value="commute">通勤</option>
<option value="weekend">周末轻运动</option>
<option value="business_light">轻商务会面</option>
</select>
<label>温区标签</label>
<select id="fTempZone">
<option value="5-12℃">5-12℃</option>
<option value="12-22℃">12-22℃</option>
<option value="22-30℃">22-30℃</option>
<option value="30℃+">30℃+</option>
</select>
<label>上衣</label><input id="fTop" type="text" />
<label>下装</label><input id="fBottom" type="text" />
<label>鞋</label><input id="fShoes" type="text" />
<label>外搭</label><input id="fOuter" type="text" />
<label>配饰</label><input id="fAccessory" type="text" />
<label>备注</label><input id="fNotes" type="text" />
</div>
<div class="sc-inline">
<button id="btnSave">保存</button>
<button id="btnReset" class="ghost">清空</button>
</div>
<div id="msg" class="sc-msg"></div>
</section>
<section class="sc-card">
<h2>30秒镜检</h2>
<div id="ruleList" class="sc-rule-list"></div>
<div class="sc-inline">
<button id="btnCheck">提交镜检</button>
</div>
<div id="recentChecks" class="sc-result"></div>
</section>
</div> <!-- end mainSections -->
<section id="waveSection" class="sc-card" style="display:none">
<div class="sc-inline" style="justify-content: space-between; align-items: center; margin-bottom: 16px;">
<div>
<h2 style="margin: 0; font-size: 20px; color: #f8fafc">WAVE穿搭参考 (男装专区)</h2>
<p class="sc-subtitle" style="margin: 4px 0 0 0">数据源自 WEAR.jp,基于 Qwen Vision 强过滤筛选,呈现懂流行、不装嫩的精选穿搭。</p>
</div>
<div style="text-align:right">
<input type="file" id="waveLinkFile" accept=".json,.txt" style="display:none" />
<button id="btnWaveUploadLinks" class="action-btn" style="background: rgba(234, 179, 8, 0.8); margin-right: 8px;">📤 投喂JSON链接</button>
<button id="btnWaveToggleCrawler" class="action-btn" style="background: rgba(37, 99, 235, 0.8)">▶ 启动佛系爬虫 (每页缓爬)</button>
<button id="btnWaveShowLogs" class="action-btn" style="background: rgba(100, 116, 139, 0.8); margin-left: 8px;">📄 查看实时日志</button>
<div id="waveCrawlerStatus" style="font-size: 12px; color: #94a3b8; margin-top: 8px; text-align: right;"></div>
</div>
</div>
<div id="waveGrid" class="wave-grid"></div>
</section>
<section id="koreanSection" class="sc-card" style="display:none">
<div class="sc-inline" style="justify-content: space-between; align-items: center; margin-bottom: 16px;">
<div>
<h2 style="margin: 0; font-size: 20px; color: #f8fafc">韩式穿搭参考</h2>
<p class="sc-subtitle" style="margin: 4px 0 0 0">数据源自 onthelook,基于 AI 筛选,呈现简约、高级感、清爽的韩式男装穿搭。</p>
</div>
<div style="text-align:right">
<input type="file" id="koreanLinkFile" accept=".json,.txt" style="display:none" />
<button id="btnKoreanUploadLinks" class="action-btn" style="background: rgba(234, 179, 8, 0.8); margin-right: 8px; display:none;">📤 投喂JSON链接</button>
<button id="btnKoreanToggleCrawler" class="action-btn" style="background: rgba(37, 99, 235, 0.8)">▶ 启动佛系爬虫</button>
<button id="btnKoreanShowLogs" class="action-btn" style="background: rgba(100, 116, 139, 0.8); margin-left: 8px;">📄 查看实时日志</button>
<div id="koreanCrawlerStatus" style="font-size: 12px; color: #94a3b8; margin-top: 8px; text-align: right;"></div>
</div>
</div>
<div id="koreanGrid" class="wave-grid"></div>
</section>
<section id="zhihuSection" class="sc-card" style="display:none">
<div id="zhihuToc" class="zhihu-toc">
<div class="toc-header">☰ 目录</div>
<div class="toc-body" id="zhihuTocBody"></div>
</div>
<div class="zhihu-content-area" id="zhihuContentArea">
<div class="zhihu-placeholder">
<h3>请在左上角目录中选择文章</h3>
</div>
</div>
</section>
<section id="xSection" class="sc-card" style="display:none; background: #000; padding: 0;">
<div class="x-layout">
<!-- X Sidebar -->
<aside class="x-sidebar">
<div style="display: flex; align-items: center; justify-content: space-between; padding-right: 12px;">
<div class="x-logo">
<svg viewBox="0 0 24 24" aria-hidden="true" fill="#e7e9ea"><g><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.008 3.827H5.078z"></path></g></svg>
</div>
<button id="btnXHelp" class="action-btn" style="background: rgba(100, 116, 139, 0.8); font-size: 12px; padding: 4px 8px;">📖 操作说明</button>
</div>
<nav class="x-nav">
<button class="x-nav-item active" onclick="loadXAccount('mensgrinding')">
<span class="x-icon">👤</span> <span class="x-label">@mensgrinding</span>
</button>
<button class="x-nav-item" onclick="loadXAccount('MenStyle_61')">
<span class="x-icon">👤</span> <span class="x-label">@MenStyle_61</span>
</button>
<button class="x-nav-item" onclick="loadXAccount('dieworkwear')">
<span class="x-icon">👤</span> <span class="x-label">@dieworkwear</span>
</button>
<button class="x-nav-item" onclick="loadXAccount('mensfashion0')">
<span class="x-icon">👤</span> <span class="x-label">@mensfashion0</span>
</button>
<button class="x-nav-item" onclick="loadXAccount('_menstylish')">
<span class="x-icon">👤</span> <span class="x-label">@_menstylish</span>
</button>
<button class="x-nav-item" onclick="loadXAccount('Bestofmenstyles')">
<span class="x-icon">👤</span> <span class="x-label">@Bestofmenstyles</span>
</button>
<button class="x-nav-item" onclick="loadXAccount('MenswearStyle')">
<span class="x-icon">👤</span> <span class="x-label">@MenswearStyle</span>
</button>
<button class="x-nav-item" onclick="loadXAccount('apetogentleman')">
<span class="x-icon">👤</span> <span class="x-label">@apetogentleman</span>
</button>
<button class="x-nav-item" onclick="loadXAccount('Sartorialist')">
<span class="x-icon">👤</span> <span class="x-label">@Sartorialist</span>
</button>
</nav>
</aside>
<!-- X Timeline -->
<main class="x-timeline">
<div class="x-header">
<h2 id="xHeaderTitle">Home</h2>
</div>
<div id="xFeed" class="x-feed">
<div class="x-placeholder">
<div class="x-spinner"></div>
<p>正在加载推文...</p>
</div>
</div>
</main>
</div>
</section>
</main>
<!-- Lightbox Modal -->
<div id="waveLightbox" class="wave-lightbox" style="display:none">
<button class="wave-lb-close" id="waveLbClose">×</button>
<button class="wave-lb-nav prev" id="waveLbPrev">‹</button>
<button class="wave-lb-nav next" id="waveLbNext">›</button>
<div class="wave-lb-content">
<div class="wave-lb-img-wrap">
<img id="waveLbImg" src="" />
</div>
<div class="wave-lb-info">
<div class="wave-lb-badge">AI 穿搭解析</div>
<h4>💡 穿搭评价</h4>
<p id="waveLbEval"></p>
<div style="height:1px; background: rgba(148,163,184,0.2); margin: 24px 0;"></div>
<h4>⚠️ 借鉴与注意事项</h4>
<p id="waveLbNotes"></p>
<div style="margin-top: auto; padding-top: 24px; font-size: 12px; color: #64748b">
来源链接: <a id="waveLbSource" href="#" target="_blank" style="color: #3b82f6; text-decoration: none">打开原始网页</a>
</div>
</div>
</div>
</div>
<div id="koreanLightbox" class="wave-lightbox" style="display:none">
<button class="wave-lb-close" id="koreanLbClose">×</button>
<button class="wave-lb-nav prev" id="koreanLbPrev">‹</button>
<button class="wave-lb-nav next" id="koreanLbNext">›</button>
<div class="wave-lb-content">
<div class="wave-lb-img-wrap">
<img id="koreanLbImg" src="" />
</div>
<div class="wave-lb-info">
<div class="wave-lb-badge" style="background: rgba(236, 72, 153, 0.2); color: #f472b6;">韩式穿搭解析</div>
<h4>💡 穿搭评价</h4>
<p id="koreanLbEval"></p>
<div style="height:1px; background: rgba(148,163,184,0.2); margin: 24px 0;"></div>
<h4>⚠️ 借鉴与注意事项</h4>
<p id="koreanLbNotes"></p>
<div style="margin-top: auto; padding-top: 24px; font-size: 12px; color: #64748b">
来源链接: <a id="koreanLbSource" href="#" target="_blank" style="color: #f472b6; text-decoration: none">打开原始网页</a>
</div>
</div>
</div>
</div>
<!-- X Lightbox Modal -->
<div id="xLightbox" class="wave-lightbox" style="display:none">
<button class="wave-lb-close" id="xLbClose">×</button>
<button class="wave-lb-nav prev" id="xLbPrev">‹</button>
<button class="wave-lb-nav next" id="xLbNext">›</button>
<div class="wave-lb-content" style="flex-direction: column;">
<div class="wave-lb-img-wrap" style="flex: 1; max-height: 90vh;">
<img id="xLbImg" src="" style="object-fit: contain;" />
</div>
</div>
</div>
<div id="toast" class="sc-toast"></div>
<!-- Crawler Logs Modal -->
<div id="waveLogsModal" class="sc-modal-mask" style="display:none; align-items:center; justify-content:center">
<div class="sc-modal-panel" style="width: 800px; max-width: 90vw;">
<div class="sc-modal-header">
<h3 style="margin:0;font-size:18px">爬虫实时日志</h3>
</div>
<div class="sc-modal-body">
<pre id="waveLogsContent" style="background:#0f172a; color:#a5b4fc; padding:16px; border-radius:8px; height:400px; overflow-y:auto; font-size:13px; line-height:1.6; white-space:pre-wrap; margin:0; font-family:monospace;"></pre>
</div>
<div class="sc-modal-footer">
<button id="btnWaveLogsClose" class="sc-btn sc-btn-primary">关闭</button>
</div>
</div>
</div>
<div id="koreanLogsModal" class="sc-modal-mask" style="display:none; align-items:center; justify-content:center">
<div class="sc-modal-panel" style="width: 800px; max-width: 90vw;">
<div class="sc-modal-header">
<h3 style="margin:0;font-size:18px">爬虫实时日志 (韩式)</h3>
</div>
<div class="sc-modal-body">
<pre id="koreanLogsContent" style="background:#0f172a; color:#f472b6; padding:16px; border-radius:8px; height:400px; overflow-y:auto; font-size:13px; line-height:1.6; white-space:pre-wrap; margin:0; font-family:monospace;"></pre>
</div>
<div class="sc-modal-footer">
<button id="btnKoreanLogsClose" class="sc-btn sc-btn-primary" style="background: #ec4899; border-color: #ec4899;">关闭</button>
</div>
</div>
</div>
<!-- Debug Trace Modal: 记录爬虫切换请求的全链路响应 -->
<div id="debugTraceModal" class="sc-modal-mask" style="display:none; align-items:center; justify-content:center; z-index:10000">
<div class="sc-modal-panel" style="width: 880px; max-width: 95vw;">
<div class="sc-modal-header" style="display:flex;align-items:center;justify-content:space-between">
<h3 id="debugTraceTitle" style="margin:0;font-size:18px">调试跟踪</h3>
<span id="debugTraceStatus" style="font-size:12px;color:#64748b">运行中...</span>
</div>
<div class="sc-modal-body">
<pre id="debugTraceContent" style="background:#0f172a; color:#e2e8f0; padding:14px; border-radius:8px; height:480px; overflow-y:auto; font-size:12px; line-height:1.55; white-space:pre-wrap; word-break:break-all; margin:0; font-family:Consolas,monospace; user-select:text;"></pre>
</div>
<div class="sc-modal-footer" style="display:flex;gap:8px;justify-content:flex-end">
<button id="btnDebugTraceCopy" class="sc-btn" style="background:#0ea5e9;color:#fff;border-color:#0ea5e9">复制全部</button>
<button id="btnDebugTraceClose" class="sc-btn sc-btn-primary">关闭</button>
</div>
</div>
</div>
<div id="appModal" class="sc-modal-mask">
<div class="sc-modal-panel">
<div id="modalTitle" class="sc-modal-title"></div>
<div id="modalMessage" class="sc-modal-message"></div>
<div id="modalActions" class="sc-modal-actions"></div>
</div>
</div>
<script src="/common/common.js"></script>
<!-- X Help Modal -->
<div id="xHelpModal" class="sc-modal-mask" style="display:none; align-items:center; justify-content:center">
<div class="sc-modal-panel" style="width: 600px; max-width: 90vw;">
<div class="sc-modal-header">
<h3 style="margin:0;font-size:18px">📖 欧美穿搭爬虫操作说明</h3>
<button id="btnXHelpClose" class="sc-modal-close">✕</button>
</div>
<div class="sc-modal-body" style="padding: 20px; font-size: 14px; line-height: 1.6; color: #334155;">
<h4 style="margin-top: 0;">一、如何添加新的 X (Twitter) 账号?</h4>
<ol>
<li>打开后端脚本:<code>d:\Trae_Files\TRAE-Toolbox\scripts\crawl_x.js</code></li>
<li>找到顶部的 <code>accountsToCrawl</code> 数组,将目标账号(不带@)添加到数组中。</li>
<li>打开前端页面:<code>d:\Trae_Files\TRAE-Toolbox\public\tools\style_check\index.html</code></li>
<li>搜索 <code>class="x-nav"</code>,按照现有格式,复制并添加一行新的 <code>&lt;button&gt;</code>。</li>
<li>将 <code>onclick="loadXAccount('新账号')"</code> 以及显示文本 <code>@新账号</code> 修改为对应账号。</li>
</ol>
<h4>二、如何运行爬虫脚本抓取数据?</h4>
<ol>
<li>打开你的 <b>v2rayN</b> 代理软件,确保能够正常访问外网。</li>
<li>在 Trae IDE 的下方找到 <b>Terminal (终端)</b>,如果没打开,按 <kbd>Ctrl</kbd> + <kbd>`</kbd> (反引号)。</li>
<li>确保当前路径在项目根目录:<code>d:\Trae_Files\TRAE-Toolbox</code></li>
<li>输入以下命令并按回车运行:<br>
<code style="background: #f1f5f9; padding: 4px 8px; border-radius: 4px; display: inline-block; margin-top: 4px; color: #e11d48; font-weight: bold;">node scripts/crawl_x.js</code>
</li>
<li>脚本会弹出一个浏览器窗口并等待 30 秒,<b>请在这段时间内手动完成推特账号的登录</b>(如果尚未登录)。</li>
<li>登录完成后,回到终端按一下 <kbd>Enter (回车)</kbd>,脚本就会开始自动抓取账号最新推文和图片了。</li>
<li>抓取完毕后,刷新当前网页即可查看最新数据。</li>
</ol>
</div>
</div>
</div>
<script src="/tools/style_check/style_check.js"></script>
</body>
</html>
+843
View File
@@ -0,0 +1,843 @@
:root {
--sc-bg: #0f172a;
--sc-text: #e5e7eb;
--sc-card: #111827;
--sc-card-border: #1f2937;
--sc-field-bg: #0b1220;
--sc-field-border: #374151;
--sc-subtitle: #9ca3af;
--sc-primary: #1d4ed8;
--sc-ghost: #374151;
--sc-info: #93c5fd;
--sc-mask: rgba(2, 6, 23, 0.72);
}
body {
margin: 0;
background: var(--sc-bg);
color: var(--sc-text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body[data-profile='mature_fashion40'] {
--sc-bg: #1a1229;
--sc-text: #f7f3ff;
--sc-card: #221739;
--sc-card-border: #3a285f;
--sc-field-bg: #2b1d46;
--sc-field-border: #594080;
--sc-subtitle: #ccb8f2;
--sc-primary: #a855f7;
--sc-ghost: #4b3a71;
--sc-info: #f9a8d4;
--sc-mask: rgba(19, 8, 36, 0.76);
}
body.full-width-mode .sc-page {
max-width: 100%;
margin: 0;
padding: 0;
display: block;
}
body.full-width-mode .sc-card {
border: none;
border-radius: 0;
margin: 0;
padding: 0;
}
body.full-width-mode #waveSection,
body.full-width-mode #koreanSection {
padding: 24px 40px;
}
body.full-width-mode #zhihuSection {
min-height: 100vh;
border-radius: 0;
}
body.full-width-mode .zhihu-content-area {
height: 100vh;
}
body.full-width-mode .ztext,
body.full-width-mode .zhihu-placeholder {
max-width: 800px;
width: 100%;
margin: 0 auto;
}
body.full-width-mode .x-layout {
height: 100vh;
justify-content: center;
}
body.full-width-mode .zhihu-toc:hover {
height: calc(100vh - 40px);
}
.sc-page {
max-width: 100%;
margin: 0;
padding: 0;
display: block;
}
body.full-width-mode .sc-card {
border: none;
border-radius: 0;
margin: 0;
padding: 0;
}
body.full-width-mode #zhihuSection {
min-height: 100vh;
border-radius: 0;
}
body.full-width-mode .zhihu-content-area {
height: 100vh;
}
body.full-width-mode .x-layout {
height: 100vh;
}
.sc-page {
max-width: 1280px;
margin: 0 auto;
padding: 20px;
display: grid;
gap: 16px;
}
.sc-card {
background: var(--sc-card);
border: 1px solid var(--sc-card-border);
border-radius: 12px;
padding: 16px;
}
h1, h2 {
margin: 0 0 10px;
}
.sc-subtitle {
margin: 0 0 12px;
color: var(--sc-subtitle);
}
.sc-inline {
display: flex;
flex-wrap: wrap;
gap: 10px;
align-items: center;
margin-bottom: 10px;
}
.sc-inline label {
color: var(--sc-subtitle);
font-size: 13px;
}
input, select, button {
height: 34px;
border-radius: 8px;
border: 1px solid var(--sc-field-border);
background: var(--sc-field-bg);
color: var(--sc-text);
padding: 0 10px;
}
button {
background: var(--sc-primary);
border: none;
cursor: pointer;
}
button.ghost {
background: var(--sc-ghost);
}
.sc-result {
padding: 10px;
border-radius: 8px;
background: var(--sc-field-bg);
border: 1px solid var(--sc-card-border);
white-space: pre-wrap;
}
.sc-table-wrap {
overflow: auto;
}
.sc-table {
width: 100%;
border-collapse: collapse;
min-width: 1100px;
}
.sc-table th, .sc-table td {
border-bottom: 1px solid var(--sc-card-border);
padding: 8px;
text-align: left;
vertical-align: top;
font-size: 13px;
}
.sc-form-grid {
display: grid;
grid-template-columns: 90px 1fr 90px 1fr;
gap: 10px;
margin-bottom: 10px;
}
.sc-msg {
min-height: 20px;
color: var(--sc-info);
}
.sc-rule-list {
display: grid;
gap: 8px;
margin-bottom: 10px;
}
.sc-rule-item {
padding: 8px 10px;
border: 1px solid var(--sc-card-border);
border-radius: 8px;
background: var(--sc-field-bg);
display: flex;
align-items: center;
gap: 8px;
}
.row-actions {
display: flex;
gap: 6px;
}
.row-actions button {
height: 28px;
font-size: 12px;
padding: 0 8px;
}
.sc-ai-layout {
display: grid;
grid-template-columns: 320px 1fr;
gap: 12px;
}
.sc-ai-preview {
width: 100%;
min-height: 220px;
object-fit: cover;
border: 1px solid var(--sc-card-border);
border-radius: 10px;
background: var(--sc-field-bg);
}
.sc-ai-right {
display: grid;
gap: 10px;
}
.sc-modal-mask {
position: fixed;
inset: 0;
background: var(--sc-mask);
display: none;
align-items: center;
justify-content: center;
z-index: 2000;
padding: 16px;
}
.sc-modal-mask.show {
display: flex;
}
.sc-modal-panel {
width: min(760px, 96vw);
max-height: 88vh;
overflow: auto;
background: var(--sc-field-bg);
border: 1px solid var(--sc-card-border);
border-radius: 12px;
padding: 14px;
}
.sc-modal-title {
font-size: 18px;
font-weight: 600;
margin-bottom: 10px;
}
.sc-modal-message {
border: 1px solid var(--sc-card-border);
border-radius: 8px;
background: var(--sc-card);
padding: 10px;
min-height: 64px;
white-space: pre-wrap;
line-height: 1.5;
}
.sc-modal-actions {
margin-top: 12px;
display: flex;
gap: 8px;
justify-content: flex-end;
}
.sc-modal-actions button.secondary {
background: var(--sc-ghost);
}
.sc-modal-actions button.danger {
background: #dc2626;
}
.sc-profile-card {
display: grid;
gap: 8px;
}
.sc-profile-tabs {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.sc-tab-btn {
height: 32px;
border-radius: 999px;
padding: 0 14px;
border: 1px solid var(--sc-field-border);
background: var(--sc-field-bg);
color: var(--sc-text);
}
.sc-tab-btn.active {
background: var(--sc-primary);
color: #ffffff;
border-color: transparent;
}
/* WAVE */
.wave-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 16px;
margin-top: 16px;
}
.wave-card {
background: rgba(30, 41, 59, 0.6);
border-radius: 12px;
overflow: hidden;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
border: 1px solid rgba(148, 163, 184, 0.2);
}
.wave-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}
.wave-card img {
width: 100%;
height: 360px;
display: block;
object-fit: cover;
}
.wave-card-text {
padding: 12px;
font-size: 13px;
color: #cbd5e1;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.wave-lightbox {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(15, 23, 42, 0.95);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(10px);
}
.wave-lb-close {
position: absolute;
top: 20px; right: 24px;
background: transparent;
border: none;
color: #fff;
font-size: 36px;
cursor: pointer;
z-index: 10000;
}
.wave-lb-nav {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.1);
border: none;
color: #fff;
font-size: 48px;
padding: 10px 16px;
cursor: pointer;
border-radius: 8px;
z-index: 10000;
transition: background 0.2s;
}
.wave-lb-nav:hover { background: rgba(255, 255, 255, 0.3); }
.wave-lb-nav.prev { left: 24px; }
.wave-lb-nav.next { right: 24px; }
.wave-lb-content {
display: flex;
max-width: 1100px;
width: 90%;
height: 80vh;
background: #1e293b;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.wave-lb-img-wrap {
flex: 1;
background: #0f172a;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.wave-lb-img-wrap img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: 8px;
}
.wave-lb-info {
width: 400px;
padding: 32px 24px;
overflow-y: auto;
background: #1e293b;
border-left: 1px solid rgba(148, 163, 184, 0.2);
display: flex;
flex-direction: column;
}
.wave-lb-badge {
display: inline-block;
background: rgba(59, 130, 246, 0.2);
color: #60a5fa;
padding: 4px 10px;
border-radius: 999px;
font-size: 12px;
margin-bottom: 20px;
align-self: flex-start;
border: 1px solid rgba(59, 130, 246, 0.4);
}
.wave-lb-info h4 {
margin: 0 0 12px 0;
color: #e2e8f0;
font-size: 16px;
font-weight: 600;
}
.wave-lb-info p {
margin: 0;
color: #94a3b8;
font-size: 14px;
line-height: 1.8;
}
/* Zhihu Styles */
#zhihuSection {
position: relative;
min-height: calc(100vh - 120px);
padding: 0;
display: flex;
background: #f6f6f6;
border-radius: 8px;
overflow: hidden;
color: #121212;
}
.zhihu-toc {
position: absolute;
top: 20px;
left: 20px;
z-index: 999;
width: 48px;
height: 48px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
overflow: hidden;
transition: width 0.3s ease, height 0.3s ease;
display: flex;
flex-direction: column;
}
.zhihu-toc:hover {
width: 260px;
height: calc(100vh - 160px);
}
.toc-header {
width: 48px;
height: 48px;
line-height: 48px;
text-align: center;
font-size: 20px;
color: #0084ff;
cursor: default;
flex-shrink: 0;
white-space: nowrap;
}
.zhihu-toc:hover .toc-header {
width: 100%;
text-align: left;
padding-left: 20px;
border-bottom: 1px solid #ebebeb;
}
.toc-body {
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease;
flex: 1;
overflow-y: auto;
padding: 10px 0;
}
.zhihu-toc:hover .toc-body {
opacity: 1;
visibility: visible;
}
.toc-group {
padding: 8px 20px;
font-size: 13px;
font-weight: bold;
color: #8590a6;
margin-top: 8px;
}
.toc-item {
padding: 8px 20px 8px 32px;
font-size: 14px;
color: #444;
cursor: pointer;
transition: background 0.2s;
}
.toc-item:hover {
background: #f6f6f6;
color: #0084ff;
}
.toc-item.active {
background: #e6f3ff;
color: #0084ff;
font-weight: 500;
}
.toc-item.disabled {
color: #ccc;
cursor: not-allowed;
}
.zhihu-content-area {
flex: 1;
padding: 40px 60px 40px 100px;
overflow-y: auto;
height: calc(100vh - 120px);
background: #ffffff;
}
.zhihu-placeholder {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
color: #8590a6;
}
/* Zhihu Rich Text Styles */
.ztext {
word-break: break-word;
line-height: 1.6;
font-size: 16px;
color: #121212;
font-family: -apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;
}
.ztext p {
margin: 1.4em 0;
}
.ztext h2, .ztext h3 {
margin: 1.5em 0 0.8em;
font-weight: 600;
}
.ztext figure {
margin: 1.4em 0;
text-align: center;
}
.ztext img {
max-width: 100%;
height: auto;
border-radius: 4px;
display: block;
margin: 0 auto;
}
.ztext figcaption {
margin-top: 8px;
font-size: 14px;
color: #8590a6;
line-height: 1.5;
}
.ztext blockquote {
margin: 1.4em 0;
padding: 10px 20px;
border-left: 4px solid #ebebeb;
color: #646464;
background: #f6f6f6;
}
.ztext a {
color: #175199;
text-decoration: none;
}
.ztext a:hover {
text-decoration: underline;
}
.ztext hr {
margin: 2em 0;
border: 0;
border-top: 1px solid #ebebeb;
}
.ztext ul, .ztext ol {
margin: 1.4em 0;
padding-left: 2em;
}
.ztext li {
margin-bottom: 0.5em;
}
/* X (Twitter) Styles */
.x-layout {
display: flex;
height: calc(100vh - 120px);
background: #000;
color: #e7e9ea;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.x-sidebar {
width: 275px;
border-right: 1px solid #2f3336;
display: flex;
flex-direction: column;
padding: 0 12px;
}
.x-logo {
padding: 12px;
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
cursor: pointer;
transition: background 0.2s;
}
.x-logo:hover {
background: rgba(231, 233, 234, 0.1);
}
.x-nav {
margin-top: 16px;
}
.x-nav-item {
display: flex;
align-items: center;
padding: 12px;
border-radius: 9999px;
background: transparent;
border: none;
color: #e7e9ea;
font-size: 20px;
cursor: pointer;
transition: background 0.2s;
width: fit-content;
margin-bottom: 8px;
}
.x-nav-item:hover {
background: rgba(231, 233, 234, 0.1);
}
.x-nav-item.active {
font-weight: bold;
}
.x-nav-item .x-label {
margin-left: 20px;
}
.x-timeline {
flex: 1;
max-width: 100%;
border-right: none;
display: flex;
flex-direction: column;
overflow: hidden;
}
.x-header {
height: 53px;
padding: 0 16px;
display: flex;
align-items: center;
border-bottom: 1px solid #2f3336;
background: rgba(0, 0, 0, 0.65);
backdrop-filter: blur(12px);
position: sticky;
top: 0;
z-index: 2;
}
.x-header h2 {
font-size: 20px;
font-weight: bold;
margin: 0;
}
.x-feed {
flex: 1;
overflow-y: auto;
}
.x-tweet {
padding: 12px 16px;
border-bottom: 1px solid #2f3336;
display: flex;
transition: background 0.2s;
cursor: pointer;
}
.x-tweet:hover {
background: rgba(255, 255, 255, 0.03);
}
.x-tweet-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background: #333639;
margin-right: 12px;
flex-shrink: 0;
}
.x-tweet-body {
flex: 1;
min-width: 0;
}
.x-tweet-meta {
display: flex;
align-items: center;
margin-bottom: 4px;
font-size: 15px;
}
.x-tweet-name {
font-weight: bold;
color: #e7e9ea;
}
.x-tweet-handle, .x-tweet-dot, .x-tweet-time {
color: #71767b;
margin-left: 4px;
}
.x-tweet-text {
font-size: 15px;
line-height: 20px;
margin-bottom: 12px;
word-wrap: break-word;
}
.x-tweet-images {
border-radius: 16px;
overflow: hidden;
border: 1px solid #2f3336;
margin-top: 12px;
display: grid;
gap: 2px;
background: #16181c;
}
.x-tweet-images.count-1 {
grid-template-columns: 1fr;
}
.x-tweet-images.count-2,
.x-tweet-images.count-3,
.x-tweet-images.count-4 {
aspect-ratio: 16 / 9;
}
.x-tweet-images.count-2 { grid-template-columns: 1fr 1fr; }
.x-tweet-images.count-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.x-tweet-images.count-3 img:first-child { grid-row: 1 / 3; }
.x-tweet-images.count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.x-tweet-images img {
width: 100%;
height: 100%;
object-fit: contain;
}
.x-tweet-images.count-1 img {
height: auto;
max-height: 80vh;
}
.x-tweet-actions {
display: flex;
justify-content: space-between;
max-width: 425px;
margin-top: 12px;
color: #71767b;
font-size: 13px;
}
.x-placeholder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px;
color: #71767b;
}
File diff suppressed because it is too large Load Diff