/* ============================================================
   人格测评系统 前端样式（深色高级风）
   男士橙色系 / 女士紫色系，通过 body.theme-male / theme-female 切换
   ============================================================ */

:root {
    --bg: #0b0a09;
    --bg-2: #12100e;
    --card: #181512;
    --card-2: #1f1b17;
    --line: rgba(255, 255, 255, .08);
    --text: #f4f1ec;
    --muted: #9c958c;
    --accent: #f08a4b;
    --accent-2: #f7a05c;
    --accent-soft: rgba(240, 138, 75, .14);
    --good: #4ade80;
    --bad: #f87171;
    --radius: 20px;
}

body.theme-female {
    --accent: #8b5cf6;
    --accent-2: #a78bfa;
    --accent-soft: rgba(139, 92, 246, .16);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

#pm-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.pm-wrap {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ---------------- 顶栏 ---------------- */
.pm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 6px;
}
.pm-topbar .brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--accent-soft);
    background: rgba(255, 255, 255, .02);
    border-radius: 999px;
    color: var(--accent-2);
    font-size: 13px;
    letter-spacing: 2px;
}
.pm-topbar .brand .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
}
.pm-topbar .mine-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
    padding: 8px 4px;
}
.pm-topbar .mine-link svg { width: 16px; height: 16px; }

/* ---------------- 首页 hero ---------------- */
.pm-hero { text-align: center; padding: 26px 0 34px; }
.pm-hero h1 {
    font-size: 34px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: 1px;
}
.pm-hero h1 .hl { color: var(--accent-2); }
.pm-hero .sub {
    margin-top: 16px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
}

/* ---------------- 测评卡片 ---------------- */
.pm-card {
    position: relative;
    background: linear-gradient(160deg, var(--card-2), var(--card));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 22px;
    margin-bottom: 26px;
    overflow: hidden;
}
.pm-card .ribbon {
    position: absolute;
    top: 18px; right: -42px;
    transform: rotate(45deg);
    background: var(--accent);
    color: #14100c;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 46px;
    letter-spacing: 2px;
}
/* 首页两张卡片各自的主题色（局部覆盖 CSS 变量） */
.pm-card.male { --accent: #f08a4b; --accent-2: #f7a05c; --accent-soft: rgba(240, 138, 75, .14); }
.pm-card.female { --accent: #8b5cf6; --accent-2: #a78bfa; --accent-soft: rgba(139, 92, 246, .16); }
.pm-card .head { display: flex; gap: 16px; align-items: center; }
.pm-card .thumb {
    width: 84px; height: 84px;
    border-radius: 50%;
    flex: 0 0 84px;
    border: 2px solid var(--accent);
    padding: 4px;
    background: var(--bg-2);
}
.pm-card .thumb img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pm-card .title { font-size: 22px; font-weight: 800; }
.pm-card .title .accent { color: var(--accent-2); }
.pm-card .desc { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.pm-card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pm-card .tag {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    font-size: 13px;
}
.pm-card .tag.primary { border-color: var(--accent-soft); color: var(--accent-2); background: var(--accent-soft); }
.pm-card .price-row {
    display: flex; align-items: baseline; gap: 6px;
    margin-top: 16px; color: var(--muted); font-size: 13px;
}
.pm-card .price-row .price { color: var(--accent-2); font-size: 24px; font-weight: 800; }

/* ---------------- 按钮 ---------------- */
.pm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 700;
    color: #17120c;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease;
}
.pm-btn:active { transform: scale(.98); }
.pm-btn[disabled] { opacity: .55; cursor: not-allowed; }
.pm-btn.ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
    font-weight: 500;
    font-size: 15px;
    padding: 12px 18px;
}
.pm-btn .arrow { width: 18px; height: 18px; }

/* ---------------- 答题页 ---------------- */
.pm-quiz-top {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 0 8px;
}
.pm-progress {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}
.pm-progress .bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    transition: width .25s ease;
}
.pm-quiz-top .count { color: var(--muted); font-size: 14px; white-space: nowrap; }

.pm-dim-pill {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 18px 0 22px;
    padding: 8px 16px;
    border: 1px solid var(--accent-soft);
    background: var(--accent-soft);
    color: var(--accent-2);
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 1px;
}
.pm-dim-pill .sq { width: 8px; height: 12px; border-radius: 2px; background: var(--accent); }

.pm-question { font-size: 24px; font-weight: 800; line-height: 1.5; margin-bottom: 24px; }

.pm-options { display: flex; flex-direction: column; gap: 14px; }
.pm-option {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 16px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.pm-option:active { transform: scale(.99); }
.pm-option .key {
    flex: 0 0 30px;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    font-size: 14px;
}
.pm-option .txt { color: var(--text); font-size: 16px; line-height: 1.6; padding-top: 3px; }
.pm-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.pm-option.selected .key { border-color: var(--accent); color: var(--accent-2); }

.pm-quiz-foot { margin-top: 26px; }

/* ---------------- loading ---------------- */
.pm-loading {
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 0 30px;
}
.pm-rings { position: relative; width: 200px; height: 200px; margin-bottom: 44px; }
.pm-rings .ring { position: absolute; inset: 0; border-radius: 50%; }
.pm-rings .r1 { border: 3px dashed transparent; border-top-color: var(--accent-2); border-right-color: #60a5fa; animation: pm-spin 2.4s linear infinite; }
.pm-rings .r2 { inset: 26px; border: 2px dashed rgba(255,255,255,.25); animation: pm-spin 3.6s linear infinite reverse; }
.pm-rings .r3 { inset: 52px; border: 2px dotted var(--accent); animation: pm-spin 5s linear infinite; }
@keyframes pm-spin { to { transform: rotate(360deg); } }
.pm-loading h2 { font-size: 24px; font-weight: 800; letter-spacing: 2px; }
.pm-loading .tip { margin-top: 14px; color: var(--muted); font-size: 15px; min-height: 24px; }

/* ---------------- 待支付 / 报告 通用块 ---------------- */
.pm-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px;
    border: 1px solid var(--accent-soft);
    background: var(--accent-soft);
    color: var(--accent-2);
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 1px;
}
.pm-center { text-align: center; }
.pm-title-lg { font-size: 28px; font-weight: 800; margin: 22px 0 14px; line-height: 1.4; }
.pm-sub { color: var(--muted); font-size: 15px; line-height: 1.9; }

.pm-orderno {
    margin: 16px 0;
    background: linear-gradient(160deg, var(--card-2), var(--card));
    border: 1px solid var(--accent-soft);
    border-radius: var(--radius);
    padding: 12px 18px;
    text-align: center;
    cursor: pointer;
}
.pm-orderno .label { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
.pm-orderno .label .idbox {
    width: 22px; height: 22px; border-radius: 6px;
    background: var(--accent);
    color: #17120c; font-size: 11px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
}
.pm-orderno .no { margin-top: 10px; font-size: 32px; font-weight: 800; color: var(--accent-2); letter-spacing: 3px; }
.pm-orderno .hint { margin-top: 6px; color: var(--muted); font-size: 12px; }
.pm-orderno .label .no { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .5px; line-height: 1; display: inline-flex; align-items: center; }

.pm-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
}
.pm-panel .panel-title {
    display: flex; align-items: center; gap: 8px;
    color: var(--accent-2);
    font-size: 16px; font-weight: 700;
    margin-bottom: 16px;
}
.pm-panel .panel-title svg { width: 16px; height: 16px; }
.pm-list { list-style: none; }
.pm-list li {
    display: flex; gap: 10px; align-items: flex-start;
    color: var(--muted); font-size: 15px; line-height: 1.8;
    padding: 6px 0;
}
.pm-list li svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 5px; color: var(--accent-2); }

.pm-pay-foot { margin-top: 8px; }
.pm-pay-foot .slogan { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.pm-retry { display: block; text-align: center; color: var(--muted); font-size: 15px; margin-top: 18px; }

/* ---------------- 报告页 ---------------- */
.pm-report-head { text-align: center; padding: 26px 0 8px; }
.pm-report-head .star {
    width: 64px; height: 64px; margin: 0 auto 14px;
    color: var(--accent-2);
}
.pm-report-head .ptype { font-size: 30px; font-weight: 800; letter-spacing: 2px; }
.pm-report-head .ptag { color: var(--muted); font-size: 14px; margin-top: 6px; }
.pm-total {
    text-align: center;
    margin: 20px 0 26px;
}
.pm-total .num { font-size: 56px; font-weight: 800; color: var(--accent-2); line-height: 1; }
.pm-total .unit { color: var(--muted); font-size: 15px; margin-left: 4px; }
.pm-total .cap { color: var(--muted); font-size: 13px; margin-top: 8px; letter-spacing: 2px; }

.pm-dimrow { margin-bottom: 18px; }
.pm-dimrow .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.pm-dimrow .name { font-size: 15px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.pm-dimrow .name svg { width: 15px; height: 15px; color: var(--accent-2); }
.pm-dimrow .score { color: var(--accent-2); font-weight: 700; }
.pm-dimrow .score small { color: var(--muted); font-weight: 400; }
.pm-dimrow .track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.pm-dimrow .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.pm-dimrow .band { margin-top: 8px; font-size: 14px; color: var(--accent-2); }
.pm-dimrow .banddesc { color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 4px; }

.pm-textblock p { color: var(--muted); font-size: 15px; line-height: 1.9; }
.pm-textblock .portrait { color: var(--text); }

.pm-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 26px; line-height: 1.8; }

/* ---------------- 我的 ---------------- */
.pm-mine-item {
    display: flex; gap: 14px; align-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
}
.pm-mine-item .thumb { width: 56px; height: 56px; border-radius: 50%; flex: 0 0 56px; border: 1px solid var(--accent); padding: 3px; background: var(--bg-2); }
.pm-mine-item .thumb img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pm-mine-item .info { flex: 1; min-width: 0; }
.pm-mine-item .t1 { font-size: 16px; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.pm-mine-item .t1 .score { color: var(--accent-2); }
.pm-mine-item .t2 { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; }
.pm-empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px; }

/* ---------------- toast ---------------- */
#pm-toast {
    position: fixed;
    left: 50%; bottom: 40px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 17, 14, .95);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: all .25s ease;
    z-index: 99;
    max-width: 80vw;
}
#pm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 首页紧凑化（两卡片同屏） ---------------- */
.pm-topbar { padding: 14px 0 4px; }
.pm-hero { padding: 18px 0 22px; }
.pm-hero h1 { font-size: 28px; }
.pm-hero .sub { margin-top: 10px; font-size: 14px; line-height: 1.7; }

.pm-card { padding: 18px; margin-bottom: 16px; }
.pm-card .head { gap: 14px; }
.pm-card .thumb { width: 64px; height: 64px; flex: 0 0 64px; padding: 3px; }
.pm-card .title { font-size: 19px; }
.pm-card .desc { margin-top: 4px; font-size: 13px; line-height: 1.6; }
.pm-card .tags { margin-top: 12px; gap: 6px; }
.pm-card .tag { padding: 4px 12px; font-size: 12px; }
.pm-card .card-cta { margin-top: 14px; }
.pm-card .pm-btn { padding: 13px 18px; font-size: 16px; }

/* ---------------- 首页底部说明与落款 ---------------- */
.pm-why {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin: 4px 0 24px;
}
.pm-why h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.pm-why p { color: var(--muted); font-size: 14px; line-height: 1.9; }
.pm-footer {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    line-height: 2.2;
    padding-bottom: 8px;
}
.pm-disclaim {
    margin: 10px 0 4px;
    font-size: 11px;
    line-height: 1.7;
    color: var(--muted);
    opacity: .75;
    text-align: center;
}

/* ---------------- 待支付页紧凑化 ---------------- */
.pm-orderno.compact { margin: 18px 0 16px; padding: 14px 18px; }
.pm-orderno.compact .label { font-size: 13px; }
.pm-orderno.compact .no { margin-top: 6px; font-size: 20px; letter-spacing: 2px; }
.pm-orderno.compact .hint { margin-top: 4px; font-size: 12px; }

.pm-panel.tight .panel-title { margin-bottom: 10px; }
.pm-panel.tight .pm-list li { padding: 2px 0; line-height: 1.55; font-size: 14px; }

.pm-pay-foot { margin-top: 4px; }
.pm-pay-foot .slogan { margin-bottom: 10px; }
.pm-retry { margin-top: 12px; }

/* 报告页编号移到分数上方时收紧上边距 */
.pm-report-head + .pm-orderno { margin-top: 12px; }
