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

:root {
    --bg-primary: #f8fafc;       /* 米白背景 */
    --bg-card: #ffffff;
    --accent-blue: #2563eb;      /* 专业蓝 */
    --accent-teal: #10b981;      /* 疗愈绿 */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 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.4s ease-out;
}

.page.active {
    display: block;
}

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

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

.logo {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--accent-blue);
}

.main-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

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

.intro-card h3 {
    color: var(--accent-blue);
    margin-bottom: 12px;
    font-size: 16px;
}

.intro-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

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

.factor-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.btn-start {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s;
}

.btn-start:hover {
    transform: translateY(-2px);
}

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

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.question-text {
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--text-primary);
    line-height: 1.6;
}

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

.option-btn {
    padding: 12px 16px;
    text-align: left;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    color: var(--text-secondary);
}

.option-btn:hover {
    background: #e2e8f0;
    border-color: var(--accent-blue);
}

.option-btn.selected {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    font-weight: 500;
}

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

.btn-nav {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 15px;
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.result-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--accent-blue);
}

.chart-wrapper {
    height: 300px;
    margin: 24px 0;
}

.interpretation {
    background: #f0fdf4;
    border-left: 4px solid var(--accent-teal);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    font-size: 15px;
    color: #065f46;
    line-height: 1.6;
}

.restart-btn {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
    width: fit-content;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}