:root {
    /* --- 调色盘：小红书/INS 奶油治愈风 --- */
    /* 背景色：暖调奶油白 */
    --bg-color: #FAFAF6;
    /* 卡片白：纯白带一点点暖 */
    --card-bg: #FFFFFF;

    /* 主色调：低饱和度的鼠尾草绿/抹茶绿 (Healing/Nature) */
    --primary-color: #8BA88E;
    --primary-dark: #6A8D73;
    --primary-light: #E8F3EB;

    /* 强调色：温柔的陶土红/蜜桃粉 (Warmth/Energy) */
    --accent-color: #E29C88;
    --accent-hover: #D6866E;

    /* 文字颜色：柔和的深灰，不使用纯黑 */
    --text-main: #4A4B4D;
    --text-secondary: #8C8C8C;
    --text-light: #B0B0B0;

    /* 边框与分割线 */
    --border-color: #F0F0EE;

    /* 阴影：Diffuse Shadows (弥散光感) */
    --shadow-sm: 0 4px 12px rgba(139, 168, 142, 0.08);
    --shadow-md: 0 8px 24px rgba(139, 168, 142, 0.12);
    --shadow-lg: 0 16px 40px rgba(139, 168, 142, 0.15);

    /* 圆角：大圆角，亲和力 */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
    background-color: var(--bg-color);
    /* 增加一个微妙的噪点或纹理感会让质感更好，这里用纯色渐变模拟氛围 */
    background-image: radial-gradient(circle at 10% 10%, rgba(226, 156, 136, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(139, 168, 142, 0.1) 0%, transparent 40%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    /* 缩小一点宽度，更像手机APP的精致感 */
    margin: 0 auto;
}

/* --- 卡片风格 --- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px;
    /* 增加留白 */
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* --- 排版 --- */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.header h1 {
    color: var(--primary-dark);
    font-size: 2em;
    /* 稍微调小一点，更像杂志标题 */
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.header p {
    color: var(--text-secondary);
    font-size: 1em;
    font-weight: 300;
    margin-bottom: 16px;
}

.badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 50px;
    /* 胶囊形 */
    font-size: 0.85em;
    font-weight: 500;
    margin-top: 8px;
}

/* --- 维度卡片 (Features) --- */
.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 30px 0;
}

.dimension-card {
    background: #FFFEFC;
    /* 极淡的暖白 */
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.dimension-card:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-3px);
}

.dimension-icon {
    font-size: 2.2em;
    margin-bottom: 8px;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.dimension-name {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 4px;
}

.dimension-desc {
    color: var(--text-secondary);
    font-size: 0.8em;
}

/* --- 列表与详情 --- */
.features-list {
    background: var(--bg-color);
    /* 与主背景一致，形成凹陷感 */
    padding: 24px;
    border-radius: var(--radius-md);
    margin: 30px 0;
}

.features-list h3 {
    color: var(--primary-dark);
    margin-bottom: 16px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.features-list ul {
    list-style: none;
    padding: 0 10px;
}

.features-list li {
    padding: 12px 0;
    color: var(--text-main);
    font-size: 0.95em;
    border-bottom: 1px dashed rgba(139, 168, 142, 0.3);
    /* 虚线更柔和 */
    display: flex;
    align-items: center;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li:before {
    content: "✨";
    /* 换成更可爱的符号 */
    margin-right: 12px;
    font-size: 0.8em;
}

/* --- 按钮 (UI核心) --- */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 50px;
    /* 全胶囊 */
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    letter-spacing: 1px;
}

.btn-primary {
    /* 蜜桃 -> 陶土渐变，充满活力 */
    background: linear-gradient(135deg, #E29C88 0%, #D6866E 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(226, 156, 136, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 15px 30px rgba(226, 156, 136, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--primary-dark);
    border: 1px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

/* --- 输入框 --- */
.input-group {
    margin: 24px 0;
}

.input-group input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1.1em;
    text-align: center;
    transition: all 0.3s;
    background: #F9F9F9;
    color: var(--text-main);
}

.input-group input:focus {
    outline: none;
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 168, 142, 0.15);
}

/* --- 进度条 --- */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #F0F0F0;
    border-radius: 20px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    /* 柔和的绿色渐变 */
    background: linear-gradient(90deg, #8BA88E 0%, #6A8D73 100%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 30px;
    font-family: monospace;
    /* 增加一点设计感 */
}

/* --- 题目卡片 --- */
.question-card {
    background: white;
    /* 纯白 */
    padding: 10px 0;
    /* 减少内边距，依靠外层Card */
    border-radius: 0;
    margin-bottom: 30px;
}

.question-text {
    color: var(--text-main);
    font-size: 1.25em;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: center;
    padding: 0 10px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option {
    padding: 16px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1em;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    text-align: center;
}

.option:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.option.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(139, 168, 142, 0.4);
}

/* --- 结果页 --- */
.result-banner {
    /* 结果页Banner改成渐变背景 */
    background: linear-gradient(135deg, #8BA88E 0%, #6A8D73 100%);
    color: white;
    padding: 40px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.rpi-score {
    font-size: 5em;
    margin: 10px 0 0 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.rpi-level {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 1.1em;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chart-container {
    height: 380px;
    margin: 40px 0;
}

/* --- 报告部分 --- */
.report-section {
    background: #FFFEFC;
    padding: 30px;
    border-radius: var(--radius-md);
    margin: 24px 0;
    border: 1px solid var(--border-color);
    /* 移除左侧粗边框，改为顶部细装饰线 */
    border-top: 4px solid var(--primary-color);
}

.report-section h3 {
    color: var(--primary-dark);
    font-size: 1.3em;
    margin-bottom: 20px;
    font-weight: 700;
}

.report-section h4 {
    color: var(--accent-color);
    font-size: 1.1em;
    margin: 24px 0 12px 0;
}

.report-section p {
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

/* --- Utility Classes --- */
.hidden {
    display: none !important;
}

/* --- 弹窗 --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 75, 77, 0.6);
    /* 深灰遮罩 */
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* 确保在最顶层 */
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.4em;
    margin: 0;
}

.modal-close {
    font-size: 2rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    margin-top: -10px;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-align: center;
    font-size: 1rem;
}

.modal-links {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.modal-links a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.9em;
}

.modal-links a:hover {
    text-decoration: underline;
}

.error-message {
    color: #E29C88;
    font-size: 0.9em;
    margin-bottom: 15px;
    text-align: center;
    display: none;
    font-weight: 500;
}

/* --- 隐私提示等小字 --- */
.scan-tip,
.price-note,
.type-score {
    font-size: 0.85em;
    color: var(--text-light);
}

.scan-tip {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 15px;
}

/* --- 适配移动端 --- */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .card {
        padding: 24px 20px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .dimension-icon {
        font-size: 2em;
    }

    .dimensions-grid {
        gap: 12px;
    }

    .dimension-card {
        padding: 15px;
    }
}