/* ────────────────────────────────────── */
/*           恋爱脑测评 - 粉色主题样式       */
/* ────────────────────────────────────── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #fff9fb;       /* 柔雾粉白 */
    --bg-card: #ffffff;
    --accent-pink: #ec4899;      /* 主题粉 */
    --accent-light: #fbcfe8;     /* 浅粉背景 */
    --text-primary: #881337;
    --text-secondary: #a12c5d;
    --text-muted: #d946ef;
    --border-color: #fda4af;
    --shadow: 0 4px 12px rgba(236, 72, 153, 0.1);
}

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(236, 72, 153, 0.2));
}

.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-pink);
    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(236, 72, 153, 0.1);
    color: var(--accent-pink);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.btn-start {
    background: linear-gradient(135deg, var(--accent-pink), #f472b6);
    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(236, 72, 153, 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(236, 72, 153, 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: #fce7f3;
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-pink), #f9a8d4);
    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: #fdf2f8;
    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: #fce7f3;
}

.option-btn.selected {
    background: rgba(236, 72, 153, 0.08);
    border-color: var(--accent-pink);
    color: var(--accent-pink);
    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-pink);
    color: var(--accent-pink);
}

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

/* 结果页 */
.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: var(--accent-light);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #fda4af;
}

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

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

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

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

.level-badge {
    background: #ec4899;
    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: #fdf2f8;
    border-left: 4px solid var(--accent-pink);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    font-size: 15px;
    color: #881337;
    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: #881337;
    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;
}

/* 公众号二维码引导区 */
.qrcode-section {
    text-align: center;
    padding: 20px 16px 24px;
}

.qrcode-img {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    margin: 0 auto 10px;
    display: block;
    object-fit: cover;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.qrcode-text {
    font-size: 14px;
    color: #a12c5d;
    margin: 0;
    text-align: center;
}