/*
 * ┌──────────────────────────────────────────────┐
 * │ 菏泽明浩心理咨询服务有限公司 - 原创样式文件 │
 * │ © 2026 版权所有，未经许可禁止商业使用       │
 * │ 网站：https://www.love884.com                │
 * │ 备案号：鲁ICP备2022041703号                  │
 * └──────────────────────────────────────────────┘
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f9fafb;       /* 柔和米白 */
    --bg-card: #ffffff;
    --accent-teal: #0d9488;      /* 疗愈青绿 */
    --accent-orange: #ea580c;    /* 警示橙 (用于创伤提示) */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.page.active {
    display: block;
}

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

/* 首页 */
.hero {
    text-align: center;
    padding: 30px 20px;
}

.logo {
    font-size: 56px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.main-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.3;
}

.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-weight: 500;
}

.intro-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.intro-card h3 {
    color: var(--accent-teal);
    margin-bottom: 12px;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.intro-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    text-align: justify;
}

.factors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.factor-tag {
    background: rgba(13, 148, 136, 0.08);
    color: var(--accent-teal);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(13, 148, 136, 0.1);
}

.btn-start {
    background: linear-gradient(135deg, var(--accent-teal), #14b8a6);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.35);
}

/* 答题页 */
.quiz-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.progress-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-teal), #2dd4bf);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.question-meta {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.question-text {
    font-size: 19px;
    margin-bottom: 28px;
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 500;
}

.options {
    display: grid;
    gap: 12px;
}

.option-btn {
    padding: 14px 18px;
    text-align: left;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    color: var(--text-secondary);
    position: relative;
}

.option-btn:hover {
    background: #f1f5f9;
}

.option-btn.selected {
    background: rgba(13, 148, 136, 0.05);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
    font-weight: 600;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.btn-nav {
    flex: 1;
    padding: 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-nav:hover:not(:disabled) {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
}

/* 结果页 */
.result-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.result-title {
    text-align: center;
    font-size: 22px;
    margin-bottom: 25px;
    color: var(--text-primary);
    font-weight: 800;
}

.score-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff7ed; /* 浅橙色背景 */
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #ffedd5;
}

.score-box {
    display: flex;
    flex-direction: column;
}

.score-label {
    font-size: 13px;
    color: #9a3412;
    margin-bottom: 4px;
}

.score-value {
    font-size: 36px;
    font-weight: 800;
    color: #c2410c;
    line-height: 1;
}

.score-max {
    font-size: 14px;
    color: #9a3412;
    align-self: flex-end;
}

.level-badge {
    background: #c2410c;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.chart-wrapper {
    height: 320px;
    margin: 20px 0;
    position: relative;
}

.core-pain-point {
    background: #f0fdfa;
    border-left: 4px solid var(--accent-teal);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    font-size: 15px;
    color: #115e59;
    line-height: 1.6;
    font-weight: 500;
}

.interpretation {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px dashed var(--border-color);
}

.interpretation h4 {
    color: var(--text-primary);
    margin: 15px 0 8px;
    font-size: 16px;
}

.restart-btn {
    background: var(--text-primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 30px auto 0;
    width: fit-content;
    transition: opacity 0.2s;
}

.restart-btn:hover {
    opacity: 0.9;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}