:root {
    --bg: #0d0609;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --sin-red: #e63946;
    --virtue-gold: #f4a261;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; }

body {
    background-color: var(--bg); color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex; justify-content: center; min-height: 100vh;
    background-image: radial-gradient(circle at 50% 0%, rgba(80, 20, 30, 0.4) 0%, var(--bg) 60%);
}

.app-container { width: 100%; max-width: 480px; min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; }

/* ================= 答题页样式 ================= */
.header { padding: 20px; display: flex; align-items: center; gap: 15px; }
.progress-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--sin-red), var(--virtue-gold)); transition: width 0.4s ease; }

.quiz-header-text { padding: 10px 20px 0; text-align: left; animation: fadeIn 0.8s ease forwards; }
.quiz-title { font-family: "Times New Roman", "Songti SC", serif; font-size: 20px; font-weight: 900; line-height: 1.4; margin-bottom: 6px; }
.quiz-subtitle { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.quiz-container { flex: 1; padding: 20px; display: flex; flex-direction: column; }
.question-area { margin-top: 20px; margin-bottom: 40px; opacity: 0; transform: translateY(20px); transition: all 0.3s ease; }
.question-area.active { opacity: 1; transform: translateY(0); }
.question-title { font-size: 22px; font-weight: 700; line-height: 1.5; margin-bottom: 10px; }
.options-area { display: flex; flex-direction: column; gap: 16px; opacity: 0; transform: translateY(20px); transition: all 0.3s ease 0.1s; }
.options-area.active { opacity: 1; transform: translateY(0); }
.option-btn { background: var(--card-bg); border: 1px solid var(--card-border); padding: 20px; border-radius: 16px; font-size: 16px; color: var(--text); cursor: pointer; transition: all 0.2s; }
.option-btn:active { transform: scale(0.98); background: rgba(255,255,255,0.1); }
.scale-area { display: flex; justify-content: space-between; gap: 10px; }
.scale-btn { flex: 1; background: var(--card-bg); border: 1px solid var(--card-border); padding: 15px 5px; border-radius: 12px; font-size: 14px; color: var(--text); text-align: center; cursor: pointer; transition: all 0.2s; }
.scale-btn.selected { background: rgba(230, 57, 70, 0.2); border-color: var(--sin-red); color: var(--sin-red); font-weight: bold; transform: scale(0.95); }

/* ================= 假进度分析遮罩 ================= */
.analyzing-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 1000; display: none; flex-direction: column; align-items: center; justify-content: center; }
.analyzing-overlay.show { display: flex; }
.analyzing-icon { font-size: 50px; margin-bottom: 20px; animation: pulse 1.5s infinite; }
.analyzing-title { font-size: 20px; font-weight: bold; margin-bottom: 10px; font-family: "Times New Roman", serif; }
.analyzing-text { font-size: 14px; color: var(--text-muted); margin-bottom: 30px; }
.analyzing-bar-bg { width: 200px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; margin-bottom: 10px; }
.analyzing-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--sin-red), var(--virtue-gold)); transition: width 0.3s; }
.analyzing-percent { font-size: 12px; color: var(--sin-red); font-weight: bold; }

/* ================= 结果页样式 ================= */
.result-view { display: none; flex-direction: column; padding: 40px 20px 100px; gap: 30px; position: relative; }
.result-view.show { display: flex; }

/* 遮罩法：未解锁状态 */
.result-view.blur-all {
    position: relative;
}

/* 核心操作：用伪元素盖一层极深的半透明黑纱，透出底下的卡片轮廓 */
.result-view.blur-all::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13, 6, 9, 0.92); /* 0.92 既有轮廓又不会太亮 */
    z-index: 5;
    pointer-events: none; 
    transition: opacity 0.5s ease;
}

/* 禁用底层内容的交互 */
.result-view.blur-all > *:not(.locked-tips) {
    pointer-events: none;
}

/* 强行给卡片加亮色骨架，让它们穿透黑纱，轮廓极其明显 */
.result-view.blur-all .insight-card,
.result-view.blur-all .detail-card,
.result-view.blur-all .scenario-item {
    background: #1c0f14 !important; 
    border: 1px solid rgba(230, 57, 70, 0.4) !important;
}

.result-view.blur-all .hero-section .dual-card {
    background: #1a0d13 !important;
    border: 1px solid rgba(244, 162, 97, 0.4) !important;
}

/* 解锁后的清晰状态 */
.result-view.unlocked > * {
    filter: none;
    opacity: 1;
    pointer-events: auto;
}
.result-view.unlocked::before {
    display: none;
}

/* 悬浮在黑纱之上的防流失提示 */
.locked-tips {
    position: absolute; top: 30vh; left: 50%; transform: translateX(-50%);
    text-align: center; z-index: 10; display: none; width: 100%;
}
.result-view.blur-all .locked-tips { display: block; z-index: 10; }
.locked-tips h2 { font-size: 24px; color: var(--virtue-gold); margin-bottom: 10px; text-shadow: 0 0 10px rgba(244,162,97,0.5); }
.locked-tips p { font-size: 14px; color: #fff; opacity: 0.8; }

.hero-section { text-align: center; padding-top: 10px; display: flex; flex-direction: column; align-items: center; }
.hero-subtitle { font-family: "Times New Roman", Times, serif; font-size: 14px; letter-spacing: 5px; color: #d8b4b8; text-transform: uppercase; margin-bottom: 15px; }
.hero-title { font-family: "Times New Roman", "Songti SC", serif; font-size: clamp(24px, 6vw, 32px); font-weight: 900; color: #fff; line-height: 1.3; margin-bottom: 12px; letter-spacing: 1px; }
.hero-soul-tag { font-size: 13px; padding: 4px 16px; border-radius: 20px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--virtue-gold); margin-bottom: 20px; display: inline-block; }
.hero-quote { font-size: 15px; font-style: italic; color: #d4d4d8; line-height: 1.6; max-width: 90%; margin: 0 auto 30px; position: relative; }

.top-dual-cards { display: flex; gap: 12px; margin-bottom: 20px; width: 100%; }
.dual-card { flex: 1; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); padding: 20px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; }
.dual-card.sin-card { background: linear-gradient(180deg, rgba(80, 20, 30, 0.15) 0%, transparent 100%); }
.dual-card.virtue-card { background: linear-gradient(180deg, rgba(80, 20, 30, 0.2) 0%, transparent 100%); border-color: rgba(230, 57, 70, 0.2); }
.dual-card-label { font-size: 12px; color: #a1a1aa; margin-bottom: 15px; letter-spacing: 1px; }
.dual-card-name { font-family: "Times New Roman", "Songti SC", serif; font-size: 38px; font-weight: bold; letter-spacing: 2px; line-height: 1; margin-bottom: 15px; color: #fff; }
.dual-card-score { font-size: 14px; color: #a1a1aa; }
.diff-text { font-size: 13px; color: #d4d4d8; letter-spacing: 1px; }

.insight-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 20px; }
.insight-title { font-size: 18px; font-weight: bold; color: #fff; margin-bottom: 8px; }
.insight-desc { font-size: 14px; color: #d4d4d8; line-height: 1.6; }
.insight-gift { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,0.1); font-size: 13px; color: var(--virtue-gold); }

.formula-box { text-align: center; font-size: 14px; color: #a1a1aa; margin-bottom: 15px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.formula-highlight { color: #fff; font-weight: bold; font-size: 16px; }
.formula-plus { font-size: 18px; color: var(--sin-red); font-weight: bold; }

.tearing-section, .radar-section, .details-section, .quadrant-section, .scenarios-section { display: flex; flex-direction: column; }
.section-title { font-size: 18px; font-weight: bold; margin-bottom: 10px; color: #e4e4e7; }

.radar-title { font-size: 18px; font-weight: bold; margin-bottom: 4px; color: #e4e4e7; }
.radar-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
#radar-container { display: flex; justify-content: center; align-items: center; width: 100%; }

.details-section { gap: 12px; }
.detail-card { background: #140b10; border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 16px; }
.detail-header { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 15px; }
.detail-names { display: flex; gap: 10px; align-items: center; font-weight: bold; }
.detail-tag { font-size: 11px; border: 1px solid rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 12px; color: #a1a1aa; }
.dual-bar-container { display: flex; height: 6px; background: transparent; border-radius: 3px; overflow: hidden; margin-bottom: 8px; position: relative; }
.bar-left-track { flex: 1; display: flex; justify-content: flex-end; background: rgba(255,255,255,0.05); border-radius: 3px 0 0 3px; }
.bar-right-track { flex: 1; display: flex; justify-content: flex-start; background: rgba(255,255,255,0.05); border-radius: 0 3px 3px 0; }
.bar-sin { height: 100%; background: var(--sin-red); border-radius: 3px 0 0 3px; }
.bar-virtue { height: 100%; background: var(--virtue-gold); border-radius: 0 3px 3px 0; }
.detail-scores { display: flex; justify-content: space-between; font-size: 13px; color: #d4d4d8; margin-bottom: 12px; font-family: monospace; }
.detail-comment { font-size: 13px; color: #a1a1aa; line-height: 1.5; }

.scenarios-section { gap: 12px; }
.scenario-item { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 16px; }
.scenario-tag { display: inline-block; font-size: 14px; font-weight: bold; color: #fff; margin-bottom: 8px; }
.scenario-desc { font-size: 13px; color: #a1a1aa; line-height: 1.6; }

/* ================= 死锁悬浮支付弹窗 ================= */
.pay-overlay { 
    position: fixed; 
    inset: 0; 
    background: transparent; /* 改成了透明，不再遮挡背景！ */
    z-index: 9999; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    padding: 20px; 
}
.pay-overlay.show { display: flex; }

.pay-modal {
    background: #140b10; border: 1px solid var(--sin-red); border-radius: 24px;
    padding: 30px 20px; width: 100%; max-width: 340px; text-align: center;
    box-shadow: 0 20px 50px rgba(230, 57, 70, 0.3); position: relative;
    animation: popIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.pay-icon { font-size: 40px; margin-bottom: 15px; }
.pay-title { font-size: 20px; font-weight: bold; color: #fff; line-height: 1.4; margin-bottom: 10px; font-family: "Songti SC", serif; }
.pay-subtitle { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 25px; }
.pay-subtitle span { color: var(--virtue-gold); font-weight: bold; }

.price-box { background: rgba(230,57,70,0.1); border-radius: 12px; padding: 15px; margin-bottom: 25px; position: relative; }
.price-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--sin-red); color: #fff; font-size: 10px; padding: 2px 10px; border-radius: 10px; }
.price-box .old-price { font-size: 13px; color: var(--text-muted); text-decoration: line-through; margin-right: 10px; }
.price-box .new-price { font-size: 32px; font-weight: bold; color: var(--virtue-gold); }

.btn-pay {
    width: 100%; padding: 16px; border-radius: 30px; border: none;
    background: linear-gradient(90deg, #e63946, #ff9500); color: #fff;
    font-size: 16px; font-weight: bold; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
    cursor: pointer; transition: transform 0.2s;
}
.btn-pay:active { transform: scale(0.96); }
.pay-tips { font-size: 11px; color: #71717a; margin-top: 15px; display: flex; align-items: center; justify-content: center; gap: 4px; }

/* PC端扫码弹窗 */
.pc-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 10000; display: none; align-items: center; justify-content: center; }
.pc-modal.show { display: flex; }
.pc-box { background: #fff; padding: 20px; border-radius: 16px; text-align: center; }
.pc-box img { width: 200px; height: 200px; display: block; margin: 10px auto; }

/* 底部栏（默认不显示） */
.cta-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: rgba(9,9,11,0.9); backdrop-filter: blur(10px); border-top: 1px solid rgba(255,255,255,0.1); padding: 15px 20px; display: none; gap: 10px; z-index: 50; }
.cta-bar.show { display: flex; }
.btn-share { flex: 1; padding: 14px; background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; font-weight: bold; font-size: 15px; text-align: center; cursor: pointer; }
.btn-unlock { flex: 2; padding: 14px; background: linear-gradient(90deg, #ffcc00, #ff9500); color: #000; border: none; border-radius: 12px; font-weight: bold; font-size: 15px; text-align: center; box-shadow: 0 4px 15px rgba(255,204,0,0.3); cursor: pointer; }

