<!DOCTYPE html>

<html lang="zh-CN">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<title>产品经理潜能与7大高阶人格测试 | @阿简Chelsey</title>

<style>

  :root {

    /* 专业智性色调 */

    --primary: #5C6BC0; 

    --primary-light: #E8EAF6;

    --primary-dark: #3949AB;

    --accent: #26A69A; 

    --bg-main: #F4F7FA;

    --card-bg: #FFFFFF;

    --text-main: #2C3E50;

    --text-sub: #7F8C8D;

  }

  

  * { box-sizing: border-box; margin: 0; padding: 0; font-family: "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }

  body { background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; }

  

  .page { display: none; min-height: 100vh; padding: 24px; flex-direction: column; animation: slideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }

  .page.active { display: flex; }

  @keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }


  /* 按钮设计:现代极简 */

  .btn { background: var(--primary); color: white; border: none; padding: 16px 28px; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; text-align: center; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(92, 107, 192, 0.2); }

  .btn:active { transform: scale(0.98); opacity: 0.9; }

  .btn-outline { background: white; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }

  

  /* 欢迎页 */

  #welcome-page { justify-content: center; align-items: center; text-align: center; background: linear-gradient(135deg, #F4F7FA 0%, #E8EAF6 100%); }

  .hero-icon { font-size: 50px; margin-bottom: 24px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1)); }

  h1 { font-size: 26px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.5px; }

  .subtitle { font-size: 15px; color: var(--text-sub); margin-bottom: 48px; padding: 0 15px; line-height: 1.8; }


  /* 答题卡 */

  .header { display: flex; align-items: center; margin-bottom: 30px; }

  .progress-bar { flex-grow: 1; height: 4px; background: #DDE3EB; border-radius: 2px; overflow: hidden; margin-right: 12px; }

  .progress-inner { height: 100%; background: var(--primary); transition: width 0.4s ease; }

  .q-counter { font-size: 13px; font-weight: 700; color: var(--primary); min-width: 45px; }

  

  .question-card { background: var(--card-bg); border-radius: 24px; padding: 32px 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); flex-grow: 1; display: flex; flex-direction: column; }

  .q-title { font-size: 19px; font-weight: 600; margin-bottom: 30px; line-height: 1.4; color: #1A1A1A; }

  .options { display: flex; flex-direction: column; gap: 14px; }

  .option { padding: 18px; border-radius: 16px; border: 1px solid #EDF2F7; background: #F8FAFC; font-size: 15px; cursor: pointer; transition: 0.2s; }

  .option.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

  

  .nav-btns { display: flex; justify-content: space-between; margin-top: auto; padding-top: 30px; }

  .btn-nav { padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; border: none; }

  .btn-prev { background: #EDF2F7; color: var(--text-sub); }

  .btn-next { background: var(--primary); color: white; opacity: 0.4; pointer-events: none; }

  .btn-next.active { opacity: 1; pointer-events: auto; }


  /* 报告页:大厂文档风 */

  .report-card { background: var(--card-bg); border-radius: 24px; padding: 24px; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border-top: 5px solid var(--primary); }

  .score-display { text-align: center; margin-bottom: 24px; }

  .score-val { font-size: 48px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }

  .tier-tag { display: inline-block; background: var(--accent); color: white; padding: 4px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; margin-top: 4px; }

  .tag-box { text-align: center; margin-bottom: 30px; }

  .trait-tag { display: inline-block; background: var(--primary-light); color: var(--primary-dark); padding: 6px 16px; border-radius: 20px; font-size: 15px; font-weight: 600; margin: 0 4px; }

  

  .module-label { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; margin-bottom: 8px; letter-spacing: 1px; display: block; margin-top: 24px; }

  .module-text { font-size: 14px; color: var(--text-main); margin-bottom: 12px; text-align: justify; border-left: 3px solid #EEF2F7; padding-left: 12px; line-height: 1.8; }


  /* 历史记录 */

  .history-item { background: white; padding: 20px; border-radius: 16px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; border: 1px solid #EDF2F7; cursor: pointer; }

  .history-date { font-size: 12px; color: var(--text-sub); }

  .history-title { font-size: 15px; font-weight: 600; margin-top: 4px;}


  /* 海报模态框 */

  .poster-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; display: none; justify-content: center; align-items: center; padding: 20px; }

  .poster-box { background: white; width: 100%; max-width: 340px; border-radius: 20px; padding: 30px; position: relative; text-align: center; }

  .qr-code { width: 100px; height: 100px; margin: 20px auto; background: #eee; }

  .poster-close { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.05); border-radius: 50%; font-size: 16px; color: #999; cursor: pointer; }


  /* 底部版权 */

  .footer { margin-top: 40px; text-align: center; border-top: 1px solid #E2E8F0; padding-top: 30px; padding-bottom: 30px; }

  .footer-author { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }

  .footer-wish { font-size: 12px; color: var(--text-sub); }

</style>

</head>

<body>


<div id="welcome-page" class="page active">

  <div class="hero-icon">🧠</div>

  <h1>产品经理 (PM) 潜能测试</h1>

  <div class="subtitle">

    这不仅仅是一份“适不适合”的测试。<br>

    通过 20 个生活与工作场景,我们将拨开那些唬人的互联网黑话,看看你真实的底层能力。<br><br>

    测一测,你究竟是精打细算的“商业增长型”、驾驭全局的“破局策略型”,还是充满人情味的体验守护者?<br>

    <span style="font-size: 12px; color: #999; display: inline-block; margin-top: 8px;">(凭第一直觉作答,带你认识自己真实的业务灵魂)</span>

  </div>

  <div style="display:flex; flex-direction:column; gap:16px; width:100%; max-width:280px;">

    <button class="btn" onclick="startTest()">开始潜能探测</button>

    <button class="btn btn-outline" id="history-entry" style="display:none;" onclick="showHistory()">查看我的测试历程</button>

  </div>

</div>


<div id="question-page" class="page">

  <div class="header">

    <div class="progress-bar"><div class="progress-inner" id="progress-inner"></div></div>

    <span class="q-counter" id="q-counter">01/20</span>

  </div>

  <div class="question-card">

    <div style="font-size: 12px; color: var(--primary); margin-bottom: 12px; font-weight: 600;">场景推演进行中... 💡</div>

    <div class="q-title" id="q-title">题目加载中...</div>

    <div class="options" id="options-container"></div>

    <div class="nav-btns">

      <button class="btn-nav btn-prev" id="btn-prev" onclick="prevQ()">上一题</button>

      <button class="btn-nav btn-next" id="btn-next" onclick="nextQ()">下一题</button>

    </div>

  </div>

</div>


<div id="result-page" class="page">

  <div class="report-card">

    <div class="score-display">

      <div style="font-size: 13px; color: var(--text-sub); margin-bottom: 4px;">综合产品天赋指数</div>

      <span class="score-val" id="r-score">0%</span><br>

      <span class="tier-tag" id="r-tier">分析中</span>

    </div>

    

    <div class="tag-box">

        <span style="font-size: 12px; color: #999; display: block; margin-bottom: 8px;">你的高阶产品人格:</span>

        <div id="r-tags"></div>

    </div>


    <span class="module-label">Personality Trait / 核心人格特质</span>

    <div class="module-text" id="r-trait">内容加载中...</div>


    <span class="module-label">Inside Thinking / 真实业务思维</span>

    <div class="module-text" id="r-inner">内容加载中...</div>


    <span class="module-label">Career Mapping / 最佳战场适配</span>

    <div class="module-text" id="r-match">内容加载中...</div>


    <span class="module-label">Professional Advice / 前辈的破局建议</span>

    <div class="module-text" id="r-advice">内容加载中...</div>

  </div>


  <div style="display:flex; flex-direction:column; gap:12px;">

    <button class="btn" onclick="openPoster()">生成我的专属报告海报</button>

    <button class="btn btn-outline" style="border-color:#DDE3EB; color:#7F8C8D" onclick="location.reload()">重新测试</button>

  </div>


  <div class="footer">

    <div style="font-size:11px; margin-bottom:12px; color:#999;">💡 报告基于 7 大产品职业基座分析生成。</div>

    <div class="footer-author">测评提供方:@阿简Chelsey</div>

    <div class="footer-wish">愿大家都能找到自己真正热爱的业务,<br>在属于你的旷野上熠熠生辉。✨</div>

  </div>

</div>


<div id="history-page" class="page">

  <div style="display:flex; align-items:center; margin-bottom:24px;">

    <span onclick="switchPage('welcome-page')" style="font-size:24px; margin-right:12px; cursor:pointer;">←</span>

    <h2 style="font-size:20px; font-weight:700;">我的测试历程</h2>

  </div>

  <div id="history-list"></div>

  <button style="margin-top:30px; background:none; border:1px dashed #DDE3EB; padding:12px; border-radius:8px; color:#E74C3C; font-size:13px; width:100%; cursor:pointer;" onclick="clearHistory()">清空本地所有记录</button>

</div>


<div id="poster-overlay" class="poster-overlay" onclick="closePoster()">

  <div class="poster-box" onclick="event.stopPropagation()">

    <div class="poster-close" onclick="closePoster()">✕</div>

    <h3 style="color:var(--text-main); margin-bottom:15px; font-size:18px;">📊 我的PM天赋报告</h3>

    <div style="background: #F8FAFC; border-radius: 12px; padding: 20px; margin-bottom: 20px;">

      <div style="font-size:12px; color:var(--text-sub);">综合潜力指数</div>

      <div style="font-size:48px; font-weight:800; color:var(--primary); margin:5px 0;" id="p-score">0%</div>

      <div id="p-tags" style="margin-bottom: 12px;"></div>

      <div style="font-size:13px; color:var(--text-main); font-style:italic; line-height:1.6;" id="p-quote"></div>

    </div>

    <div style="display:flex; justify-content:space-between; align-items:center;">

      <div style="text-align:left; font-size:12px; color:#7F8C8D; line-height:1.6;">

        测测你是哪种天赋型选手?<br>长按保存分享 👉

      </div>

      <div class="qr-code" style="margin:0; width:65px; height:65px; padding:4px; background:white; border:1px solid #eee; border-radius:6px;">

        <img id="qr-img" src="" alt="二维码" style="width:100%; height:100%;">

      </div>

    </div>

  </div>

</div>


<script>

const questions = [

  { title: "1. 发现常用 APP 把某个按钮藏得很深,你的第一反应是?", options: [

    {text:"思考这背后的商业考量,是不是平台在给利润更高的新业务让路。", score:4, trait:"商业增长型"},

    {text:"觉得这设计太不体贴了,完全是在强行改变大家的使用习惯。", score:3, trait:"体验同理型"},

    {text:"如果在内部,我会好奇他们怎么向老板证明这个改动是值得的。", score:3, trait:"逻辑推演型"},

    {text:"无所谓,只要还能找到就行,习惯几天就好了。", score:1, trait:"none"}

  ]},

  { title: "2. 如果要你在学校组织一场百人级别的跳蚤市场,你会先干什么?", options: [

    {text:"琢磨摊位费怎么收,怎么把热度炒起来,让社团赚到第一桶金。", score:4, trait:"商业增长型"},

    {text:"拉出表格:场地怎么批、物资要买啥、时间线怎么排,先把活儿理清楚。", score:4, trait:"落地执行型"},

    {text:"策划一个好玩的“盲盒交换”主题,先把全校的关注度拉满再说。", score:3, trait:"灵感创新型"},

    {text:"先找老师和各路人脉打听清楚,确保这件事顺顺当当别出岔子。", score:2, trait:"沟通统筹型"}

  ]},

  { title: "3. 看到食堂阿姨打饭窗口总是排长队,你职业病发作时的想法是:", options: [

    {text:"这不仅仅是阿姨手速慢,而是整个点餐、出餐的衔接流程出了问题。", score:4, trait:"破局策略型"},

    {text:"如果在排队区放点屏幕或者把菜单写清楚点,大家排队时就不会这么烦躁。", score:3, trait:"体验同理型"},

    {text:"排队越长说明生意越好,如果稍微涨点价或者做点套餐组合,利润绝对更高。", score:3, trait:"商业增长型"},

    {text:"赶紧换一家吃,懒得在这里浪费时间。", score:1, trait:"none"}

  ]},

  { title: "4. 短视频平台突然大规模推一种很洗脑、但你觉得很俗的广告,你会?", options: [

    {text:"虽然觉得俗,但会去分析它到底切中了什么人的心理,为什么这种套路能赚到钱。", score:4, trait:"商业增长型"},

    {text:"去研究是不是平台的推荐规则有什么漏洞,导致这种内容跑出来了。", score:4, trait:"破局策略型"},

    {text:"截个图发给朋友,一起吐槽这种糟糕的审美和满屏的牛皮癣感。", score:2, trait:"体验同理型"},

    {text:"直接长按点击“不感兴趣”,眼不见为净。", score:1, trait:"none"}

  ]},

  { title: "5. 小组作业中,负责核心任务的同学突然摆烂不干了,明早就要交,你倾向于?", options: [

    {text:"立刻接管残局,把剩下的活儿拆开,强硬地分配给其他人连夜搞定。", score:4, trait:"落地执行型"},

    {text:"先私聊这位同学弄清楚为啥有情绪,试着好好说,把他哄回来干活。", score:4, trait:"沟通统筹型"},

    {text:"马上评估最坏情况,砍掉不重要的部分,定一个能保住及格分的方案。", score:4, trait:"逻辑推演型"},

    {text:"极其绝望,心里大骂一顿,最终只能自己一边哭一边熬夜全包了。", score:1, trait:"none"}

  ]},

  { title: "6. 当你沉迷某款消除游戏或者抽卡游戏停不下来时,你脑子里会闪过:", options: [

    {text:"它的奖励机制设计得太绝了,每次都精准卡在让人多巴胺分泌的点上。", score:4, trait:"商业增长型"},

    {text:"它的动画反馈、音效震动配合得太好了,玩起来手感特别顺滑。", score:3, trait:"体验同理型"},

    {text:"明明核心玩法很老套,但它加的这点小巧思怎么就这么让人上头呢?", score:3, trait:"灵感创新型"},

    {text:"只觉得自己的自控力太差了,每次玩完都后悔浪费了时间。", score:1, trait:"none"}

  ]},

  { title: "7. 如果你是闲鱼的负责同学,面对“买家卖家经常因为商品瑕疵吵架”,你会?", options: [

    {text:"完善信用分和惩罚制度,谁骗人就限制谁,从根本上净化平台的卖家质量。", score:4, trait:"破局策略型"},

    {text:"在发布商品的界面增加强制的“瑕疵必填”选项,不填清楚就不让发。", score:3, trait:"逻辑推演型"},

    {text:"想办法引入一套自动判定纠纷的系统,省得客服每天去人工断案。", score:3, trait:"落地执行型"},

    {text:"发个官方公告劝大家和气生财(觉得平台没必要管得太宽)。", score:1, trait:"none"}

  ]},

  { title: "8. 向长辈解释什么是“大数据杀熟”,你更习惯用哪种方式?", options: [

    {text:"用菜市场老板看熟人好欺负就卖贵点的例子,一秒让他们听懂。", score:4, trait:"沟通统筹型"},

    {text:"跟他们讲平台是怎么记住你爱买什么,然后系统怎么偷偷调整价格的步骤。", score:4, trait:"逻辑推演型"},

    {text:"直接拿过手机教他们怎么关掉追踪,或者教他们怎么用不同手机比价。", score:3, trait:"落地执行型"},

    {text:"解释起来太费劲了,随便敷衍几句说就是手机偷听讲话。", score:1, trait:"none"}

  ]},

  { title: "9. 如果开发小哥告诉你“这个功能确实做不了”,你会怎么应对?", options: [

    {text:"弄清楚到底是因为时间不够、技术太难,还是他心里抵触,对症下药去聊。", score:4, trait:"沟通统筹型"},

    {text:"让他讲清楚卡在哪一步了,我去改产品的流程,绕过这个难点照样达成目的。", score:4, trait:"逻辑推演型"},

    {text:"如果这个功能很关键,那就拉上老板当面聊清楚,谁也别想随便推诿。", score:3, trait:"落地执行型"},

    {text:"做不了就算了,那这块就不做了,多一事不如少一事。", score:1, trait:"none"}

  ]},

  { title: "10. 玩小红书时,你是否好奇过它底层的运作方式?", options: [

    {text:"特别好奇别人是怎么靠发图文赚钱的,想研究怎么才能快速做个号变现。", score:4, trait:"商业增长型"},

    {text:"好奇它的社区氛围是怎么维护出来的,为什么大家在这里这么爱聊天分享。", score:3, trait:"体验同理型"},

    {text:"好奇它这种“两列排版”跟抖音的“单列上下滑”,背后到底有什么商业逻辑上的区别。", score:4, trait:"破局策略型"},

    {text:"只关心自己搜到的攻略好不好用,其他的不关我事。", score:1, trait:"none"}

  ]},

  { title: "11. 公司要你给一个没什么起色、快做不下去的 APP 做抢救,你第一刀砍向哪?", options: [

    {text:"立刻分析现在最愿意花钱的是哪波人,砍掉别的功能,专心服务他们赚钱。", score:4, trait:"商业增长型"},

    {text:"找出大家用到哪一步最容易卸载,把核心的使用流程重新梳理一遍。", score:4, trait:"逻辑推演型"},

    {text:"干脆推翻重来,找一个大家都没做过的好玩点子重新包装上线。", score:3, trait:"灵感创新型"},

    {text:"先把积压了几个月的几百个明显故障和难看的界面全修复了再说。", score:2, trait:"落地执行型"}

  ]},

  { title: "12. 你认为一个优秀的“双11”电商大促活动,最厉害的地方应该是?", options: [

    {text:"不管大家怎么逛,最后都能被各种理由说服,乖乖掏钱买单的效果。", score:4, trait:"商业增长型"},

    {text:"满减、发券的规则严丝合缝,既让大家觉得划算,又不会被钻空子薅走平台的钱。", score:4, trait:"逻辑推演型"},

    {text:"给人的感觉就是“真的便宜且不用费脑子算账”,无脑爽快下单。", score:3, trait:"体验同理型"},

    {text:"几百人的团队配合默契,在几亿人同时抢东西的时候系统不卡不崩。", score:3, trait:"落地执行型"}

  ]},

  { title: "13. 当你需要学习一个全新的工具(比如最近很火的 AI 绘画),你通常会?", options: [

    {text:"直接上手去试,看怎么用它快速帮我完成现在的作业或工作。", score:4, trait:"落地执行型"},

    {text:"去搜几篇硬核文章,搞懂它背后是怎么一步步生成画面的原理。", score:4, trait:"逻辑推演型"},

    {text:"琢磨这东西能不能帮人省钱,或者能不能拿它去接单赚点外快。", score:3, trait:"商业增长型"},

    {text:"只看不练,当成茶余饭后的谈资,感觉离自己很远。", score:1, trait:"none"}

  ]},

  { title: "14. 发现外卖小哥送餐迟到了很久,你觉得最核心的原因往往是:", options: [

    {text:"肯定是平台自动派单和规划路线的系统太死板,不够智能。", score:4, trait:"破局策略型"},

    {text:"如果等待的时候APP里有个小游戏,或者自动发个延误红包,大家气就消了。", score:3, trait:"体验同理型"},

    {text:"算了,小哥也不容易,打个电话催一下,只要饭没坏就不差评了。", score:2, trait:"沟通统筹型"},

    {text:"暴怒,直接找平台疯狂投诉要退款。", score:1, trait:"none"}

  ]},

  { title: "15. 面对各种群里每天几百条的闲聊消息,你的处理习惯是:", options: [

    {text:"大脑自动过滤废话,只瞄一眼有没有老师发的通知或有用的文件。", score:4, trait:"逻辑推演型"},

    {text:"默默潜水,观察群主是怎么发红包、怎么把冷清的群重新炒热的。", score:3, trait:"商业增长型"},

    {text:"看到有新人进来没人理,或者有人问问题冷场了,总忍不住去接个话。", score:3, trait:"沟通统筹型"},

    {text:"觉得太吵,全部一键标记为已读。", score:1, trait:"none"}

  ]},

  { title: "16. 如果让你去设计一款“校园交友软件”,你最看重哪一点?", options: [

    {text:"一套极度严格的实名认证办法,坚决不让骗子进来,保住平台的底线。", score:4, trait:"破局策略型"},

    {text:"搞个大家没见过的匹配玩法,比如只能看对方画的画来交友,好玩最重要。", score:4, trait:"灵感创新型"},

    {text:"设计好充值点,比如想看谁悄悄看过你,就得买个几块钱的会员卡。", score:4, trait:"商业增长型"},

    {text:"怎么排版能把每个人的个人主页展示得干干净净、特别有氛围感。", score:2, trait:"体验同理型"}

  ]},

  { title: "17. 当你花费大量心血写好的策划案被老师/老板全盘否定,你会?", options: [

    {text:"忍住委屈,当面多问几句,搞清楚他们真正想要的到底是什么方向。", score:4, trait:"沟通统筹型"},

    {text:"觉得可能是自己逻辑没想透,认怂并立马回去重新捋一遍大纲。", score:3, trait:"逻辑推演型"},

    {text:"表面点点头,但心里坚信自己是对的,准备偷偷找点数据或案例来反驳。", score:3, trait:"破局策略型"},

    {text:"严重怀疑人生,觉得被针对了,回宿舍大哭一场,完全不想干了。", score:1, trait:"none"}

  ]},

  { title: "18. 在朋友眼中,你平时最突出的“人设”通常是?", options: [

    {text:"军师/理性派:大家遇到选择题纠结时,总爱听你一项项分析利弊。", score:4, trait:"逻辑推演型"},

    {text:"知心人/小太阳:有你在就不会冷场,你总能敏锐照顾到每个人的感受。", score:4, trait:"沟通统筹型"},

    {text:"靠谱王/执行者:只要交给你去办的事儿,大家都不用操心,肯定办得妥妥的。", score:4, trait:"落地执行型"},

    {text:"点子王/整活大师:脑洞极大,随时能冒出一些让人笑出声的鬼点子。", score:3, trait:"灵感创新型"}

  ]},

  { title: "19. 关于产品经理这个岗位,你觉得真正在公司里立足的本事是什么?", options: [

    {text:"对“怎么吸引人来看,怎么让人心甘情愿掏钱”这套商业规律极度熟悉。", score:4, trait:"商业增长型"},

    {text:"能在非常乱的环境里,定下一套能让各方都满意、都能转得起来的规则。", score:4, trait:"破局策略型"},

    {text:"能像普通小白一样去感受产品好不好用,坚决不把复杂的东西推给别人。", score:3, trait:"体验同理型"},

    {text:"不过是画画图、催催别人干活而已,这岗位真的没啥不可替代的本事。", score:1, trait:"none"}

  ]},

  { title: "20. 如果不用考虑找工作和赚钱的压力,你真正享受的瞬间是:", options: [

    {text:"把一团乱麻的事情理出头绪,定好规矩,看着一切顺顺利利地运转。", score:4, trait:"逻辑推演型"},

    {text:"靠我的一点小聪明或好策略,真真切切地赚到了钱,拿到结果。", score:4, trait:"商业增长型"},

    {text:"我做出来的小东西,真的帮别人解决了一点点麻烦,被人夸“好贴心”。", score:3, trait:"体验同理型"},

    {text:"只要是能让我不用动脑、安安静静待着的时刻就行。", score:1, trait:"none"}

  ]}

];


// --- 7大产品人格深度报告库(导师对话口吻,去黑话,高活人感) ---

const reportData = {

  tiers: [

    { min: 85, name: "天选天赋流", quote: "你在混乱中也能一眼看透本质,天生带着解决问题的气场。互联网,简直是为你准备的游乐场。" },

    { min: 70, name: "高潜潜力股", quote: "你做事踏实,直觉敏锐。不需要太多包装,只需要一点点实战机会,你就能独当一面。" },

    { min: 50, name: "温和护航者", quote: "你可能没有极强的攻击性,但你的稳健、细心和同理心,是任何团队都抢着要的定心丸。" },

    { min: 30, name: "泛职场适配", quote: "相比起绞尽脑汁去改变世界,你也许更喜欢把当下的日子过好。产品思维只是你身上的一个闪光点,不用让它变成你的压力。" },

    { min: 0,  name: "自由向往者", quote: "你的天赋也许在更有规则感,或者更纯粹的艺术领域。别在不适合自己的赛道里勉强自己,旷野很大。" }

  ],

  slices: {

    "商业增长型": {

      trait: "你天生对“做生意”有敏锐的直觉。当大家还在纠结页面好不好看时,你已经在算这笔账了:怎么吸引人来?怎么让人掏钱?利润还有没有空间?你不是在单纯地做功能,你是在经营一盘生意。",

      inner: "说实话,你对那些“只谈情怀不谈赚钱”的想法不太感冒。你内心渴望看到实实在在的成果——看着因为自己的一个小策略,买单的人变多了,那种把事情做成的成就感,比什么空头支票都来得痛快。",

      match: "你非常适合各大公司的电商导购业务、负责广告变现或者做用户增长的团队。只要是直接扛着收入压力、需要拿结果的核心战场,都是你大展拳脚的地方。",

      advice: "你的目标感极强,但做前辈的要提醒你,做业务不能只看眼前的数据。真正的高手,懂得在“赚钱”和“用户信任”之间找平衡。别为了短期的利益,伤了大家对产品的感情。懂得克制,你的路才能走得长远。"

    },

    "破局策略型": {

      trait: "你看问题有着难得的“全局视角”。你不满足于界面上的修修补补,而是喜欢研究事物背后的规则。比如打车平台怎么派单才最高效,二手市场怎么立规矩大家才不扯皮。你最擅长解开那些纠缠不清的“死结”。",

      inner: "你享受那种“把复杂问题理顺”的智力快感。当你定下一个精妙的规则,让整个系统井然有序运转时,你会觉得特别爽。相比之下,日常那些琐碎的画图和无休止的开会,常常让你觉得有些乏味。",

      match: "你是大型平台最需要的“大脑”。比如外卖或出行的路线调度系统、大型电商的底层规则制定,或者是处理复杂买卖双方关系的业务。你是能稳住大盘的那个人。",

      advice: "你的思维站得很高,但千万别飘在空中。做策略最怕的就是你想出来的规则听起来完美,实际用起来却不接地气。建议你多去听听一线最真实的声音,让你的策略既有高度,又有实实在在的温度。"

    },

    "逻辑推演型": {

      trait: "你是团队里最让人安心的“人形计算机”。面对一团乱麻的需求,你总能迅速拆解开来:第一步做什么,第二步做什么,万一出错了怎么办。在你的世界里,凡事都要讲道理,凡事都得有条理。",

      inner: "你特别害怕事情失控,也受不了别人说话毫无逻辑。当同事用感觉、大概来描述问题时,你往往恨不得直接上去帮他画个导图。你相信,严谨的思考能抵御绝大多数的麻烦。",

      match: "各种后台管理系统、数据分析工具、或者业务流程非常繁杂的岗位,简直是你的舒适区。在那些普通人看一眼就头疼的复杂系统里,你的清晰头脑是团队的救命稻草。",

      advice: "讲逻辑是你的王牌,但你也得接受一个现实:真实的人类往往是不理性的。试着对自己和别人多一点宽容,学会去理解那些看似“不讲理”的用户情绪,拥抱一些灰度,你会变得更强大也更柔软。"

    },

    "体验同理型": {

      trait: "你有着像雷达一样敏锐的感受力。你总是能一秒代入普通人的视角,轻易察觉到软件里哪怕一丝一毫的别扭。在冰冷的代码面前,你是那个坚持要保留“人情味”的人。",

      inner: "其实你心思很细腻,平时也很怕给人添麻烦,所以你同样受不了糟糕的设计给别人添堵。你内心深处渴望做出那种流畅、自然、让人用起来心情愉悦的好东西。",

      match: "面向大众消费者的产品、社交社区、或者那些需要反复打磨细节的日常应用,最需要你。你能在大家都没注意到的地方,给用户送上一杯刚刚好的温水。",

      advice: "共情能力是你最大的天赋,但在职场上,光说“这样体验不好”是没法说服老板的。你要学会把“体验”翻译成大家都能听懂的语言,比如它怎么影响了大家留下来继续使用,用理性的方式去捍卫你心里的那份柔软。"

    },

    "落地执行型": {

      trait: "你是团队里最难得的“靠谱成年人”。大家在天上飘着聊想法的时候,你已经在默默盘算这事具体该怎么干了。你执行力极强,能扛事,能把那些听起来很悬空的概念,一点点变成真正能用上的功能。",

      inner: "比起虚无缥缈的夸奖,你更喜欢划掉待办事项时的那种踏实感。你私下其实挺烦那些只会说漂亮话却不干活的人。你坚信,好东西不是吹出来的,是一点点敲代码敲出来的。",

      match: "你在任何公司都是被抢着要的骨干。不管是负责推动大型项目按时上线,还是在创业团队里把老板的想法变成现实,你那股死磕到底的韧性就是你最大的底气。",

      advice: "能干活是好事,但也别光顾着低头拉车。在这个岗位上,不仅要会解决问题,还要多问问“我们为什么非得做这个”。试着多抬起头看看方向,把你的辛苦转化成大家都看得到的成绩,别让自己的努力被埋没。"

    },

    "沟通统筹型": {

      trait: "你是游走在各种性格和部门之间的“润滑剂”。面对急性子的开发、提要求的老板,你总能听懂他们背后的心思,用大家都舒服的方式把事情推进下去。你擅长把冲突变成共识,把对立变成合作。",

      inner: "你的高情商,其实来源于你对人际关系的敏感。表面上你在努力端水,其实你心里把每个人的小九九都看得一清二楚。不过,总是照顾别人的情绪,也会让你在下班后觉得特别耗神,只想一个人安静待着。",

      match: "那些需要跨部门大规模协作的复杂项目,或者需要经常和外部打交道的岗位,非常适合你。在别人容易吵起来的局里,你能发挥出四两拨千斤的神奇作用。",

      advice: "沟通能力强不代表你要做一个处处妥协的“老好人”。真正厉害的沟通,是温柔而坚定的。你要建立起自己的底线和专业判断,该坚持的时候寸步不让,用实力去赢得尊重,而不是只求大家表面上一团和气。"

    },

    "灵感创新型": {

      trait: "你脑子里总有无数个新奇的念头,带着点不拘一格的独特气质。面对千篇一律的无聊应用,你总想搞点不一样的新花样。你对新鲜事物充满好奇,是能给老旧产品重新注入灵魂的人。",

      inner: "你的骨子里有点小叛逆,让你天天去抄别人的作业,你会觉得极其无聊。你渴望创造出那种让身边人眼前一亮、甚至惊呼“太酷了吧”的作品。只是偶尔,你也会因为想法太多却无法落地而感到一点点失落。",

      match: "从0到1的新项目、探索前沿 AI 技术的团队,或是主打年轻潮流态度的应用,是你的游乐场。你需要一个能包容你天马行空、容许试错的环境。",

      advice: "点子虽然珍贵,但能真正做出来的才叫产品。你需要找一个执行力超强的人做搭档,或者逼自己去补足“把想法落地”的耐心。同时,要多问问自己:这个酷炫的想法,真的有人愿意买单吗?别让自己陷入只有自己觉得嗨的幻觉里。"

    }

  }

};


let currentQ = 0, answers = [];


window.onload = () => {

  if (JSON.parse(localStorage.getItem('pm_test_v2_history') || "[]").length > 0) {

    document.getElementById('history-entry').style.display = 'block';

  }

};


function switchPage(id) {

  document.querySelectorAll('.page').forEach(p => p.classList.remove('active'));

  document.getElementById(id).classList.add('active');

  window.scrollTo(0,0);

}


function startTest() {

  currentQ = 0; answers = [];

  renderQ();

  switchPage('question-page');

}


function renderQ() {

  const q = questions[currentQ];

  document.getElementById('q-counter').innerText = `${(currentQ+1).toString().padStart(2,'0')}/${questions.length}`;

  document.getElementById('progress-inner').style.width = `${((currentQ+1)/questions.length)*100}%`;

  document.getElementById('q-title').innerText = q.title;

  const container = document.getElementById('options-container');

  container.innerHTML = '';

  q.options.forEach((opt, i) => {

    const div = document.createElement('div');

    const isSelected = answers[currentQ] && answers[currentQ].text === opt.text;

    div.className = `option ${isSelected ? 'selected' : ''}`;

    div.innerText = `${String.fromCharCode(65+i)}. ${opt.text}`;

    div.onclick = () => { 

      answers[currentQ] = { score: opt.score, trait: opt.trait, text: opt.text }; 

      renderQ(); 

      setTimeout(nextQ, 300); 

    };

    container.appendChild(div);

  });

  document.getElementById('btn-prev').style.visibility = currentQ === 0 ? 'hidden' : 'visible';

  document.getElementById('btn-next').className = answers[currentQ] ? 'btn-nav btn-next active' : 'btn-nav btn-next';

  document.getElementById('btn-next').innerText = currentQ === questions.length - 1 ? '一键生成深度报告' : '下一题';

}


function prevQ() { if(currentQ > 0) { currentQ--; renderQ(); } }

function nextQ() {

  if(!answers[currentQ]) return;

  if(currentQ < questions.length - 1) { currentQ++; renderQ(); }

  else { genResult(); }

}


function genResult() {

  const totalScore = answers.reduce((sum, item) => sum + item.score, 0);

  const percent = Math.round((totalScore / 80) * 100);

  const tier = reportData.tiers.find(t => percent >= t.min);

  

  let traitCounts = {

    "商业增长型": 0, "破局策略型": 0, "逻辑推演型": 0, 

    "体验同理型": 0, "落地执行型": 0, "沟通统筹型": 0, "灵感创新型": 0

  };

  

  answers.forEach(item => {

    if(item.trait !== "none" && traitCounts[item.trait] !== undefined) {

      traitCounts[item.trait] += item.score; 

    }

  });


  let maxTraitVal = -1;

  let mainTag = "综合均衡型";

  

  for(let key in traitCounts) {

    if(traitCounts[key] > maxTraitVal) {

      maxTraitVal = traitCounts[key];

      mainTag = key;

    }

  }

  

  if(maxTraitVal === 0) mainTag = "体验同理型"; 

  

  const slice = reportData.slices[mainTag];

  const res = { score: percent, tier, mainTag, slice, date: new Date().toLocaleString('zh-CN', {month:'2-digit', day:'2-digit', hour:'2-digit', minute:'2-digit'}) };

  

  const history = JSON.parse(localStorage.getItem('pm_test_v2_history') || "[]");

  history.unshift(res);

  localStorage.setItem('pm_test_v2_history', JSON.stringify(history.slice(0, 10)));


  showReport(res);

}


function showReport(res) {

  document.getElementById('r-score').innerText = res.score + '%';

  document.getElementById('r-tier').innerText = res.tier.name;

  

  document.getElementById('r-tags').innerHTML = `<span class="trait-tag">🔥 ${res.mainTag}</span>`;


  document.getElementById('r-trait').innerText = res.slice.trait;

  document.getElementById('r-inner').innerText = res.slice.inner;

  document.getElementById('r-match').innerText = res.slice.match;

  document.getElementById('r-advice').innerText = res.slice.advice;

  

  document.getElementById('p-score').innerText = res.score + '%';

  document.getElementById('p-tags').innerHTML = `<span style="background: var(--primary-light); color: var(--primary-dark); padding: 6px 12px; border-radius: 12px; font-size: 14px; font-weight: 700;">#${res.mainTag}</span>`;

  document.getElementById('p-quote').innerText = `“${res.tier.quote}”`;

  

  switchPage('result-page');

}


function showHistory() {

  const history = JSON.parse(localStorage.getItem('pm_test_v2_history') || "[]");

  const list = document.getElementById('history-list');

  list.innerHTML = history.map((item, index) => `

    <div class="history-item" onclick="viewHistoryItem(${index})">

      <div>

        <div class="history-date">${item.date}</div>

        <div class="history-title">${item.tier.name} · ${item.mainTag}</div>

      </div>

      <div style="font-size:18px; font-weight:700; color:var(--primary)">${item.score}%</div>

    </div>

  `).join('');

  switchPage('history-page');

}


function viewHistoryItem(index) {

  const history = JSON.parse(localStorage.getItem('pm_test_v2_history') || "[]");

  showReport(history[index]);

}


function clearHistory() {

  if(confirm("确定要删除你在该设备上的所有历史测试记录吗?")) {

    localStorage.removeItem('pm_test_v2_history');

    location.reload();

  }

}


function openPoster() {

  const qrImg = document.getElementById('qr-img');

  const currentUrl = encodeURIComponent(window.location.href);

  qrImg.src = `https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${currentUrl}`;

  document.getElementById('poster-overlay').style.display = 'flex';

}


function closePoster() { document.getElementById('poster-overlay').style.display = 'none'; }

</script>

</body>

</html>