body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
}

h1 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.instruction {
    color: #666;
    font-size: 1.1em;
}

.rating-guide {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    font-weight: bold;
    color: #555;
    flex-wrap: wrap;
}

.rating-guide span {
    background: #eef2f5;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

.question-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    transition: all 0.2s;
}

.question-item:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

.question-text {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.options {
    display: flex;
    justify-content: space-between;
    max-width: 400px;
}

.option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    font-size: 0.9em;
    color: #555;
}

.option-label input {
    margin-bottom: 5px;
    cursor: pointer;
}

button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 20px;
}

button:hover {
    background-color: #2980b9;
}

.hidden {
    display: none;
}

#result-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.result-section {
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.result-section h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.score-value {
    font-weight: bold;
    color: #e74c3c;
}

.factor-card {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.factor-card.high-risk {
    border-left-color: #e74c3c;
}

.factor-card h4 {
    margin: 0 0 5px 0;
    display: flex;
    justify-content: space-between;
}

.factor-desc {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.factor-detail {
    font-size: 0.95em;
    color: #34495e;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
    line-height: 1.5;
}

.warning-text {
    color: #e74c3c;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.close-modal:hover {
    color: #333;
}

#redeem-code {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

.redeem-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.redeem-actions .primary-btn {
    flex: 2;
    margin-top: 0; /* Override default button margin */
}

.shop-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ff2442; /* 小红书品牌色 */
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1em; /* Slightly smaller than primary button if needed, or keep same */
    transition: background 0.3s;
    padding: 15px; /* Match button padding */
    box-sizing: border-box;
    white-space: nowrap;
}

.shop-btn:hover {
    background-color: #e01b36;
}

.shop-info {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

/* Progress Bar Styles */
.progress-container {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.progress-bar-bg {
    flex: 1;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    font-weight: bold;
    color: #7f8c8d;
    min-width: 60px;
    text-align: right;
    font-size: 0.9em;
}

/* New Question Card Styles */
.question-card {
    background: #fff;
    padding: 5px; /* Padding handled by container mostly, but good to have */
}

.question-title {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    line-height: 1.4;
}

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

.option-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.option-item:hover {
    background-color: #f8fbff;
    border-color: #3498db;
}

.option-item input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
    cursor: pointer;
}

.option-text {
    font-weight: bold;
    margin-right: 15px;
    min-width: 50px;
    color: #2c3e50;
}

.option-desc {
    font-size: 0.9em;
    color: #7f8c8d;
    flex: 1;
    line-height: 1.4;
}

/* Highlight selected option */
.option-item:has(input:checked) {
    background-color: #e8f4fc;
    border-color: #3498db;
    box-shadow: 0 0 0 1px #3498db;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.secondary-btn {
    background-color: #95a5a6;
}

.secondary-btn:hover {
    background-color: #7f8c8d;
}

.secondary-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.primary-btn {
    background-color: #3498db;
}

/* Intro Section */
#intro-section {
    text-align: center;
}

.intro-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: none;
    padding-bottom: 0;
}

.logo-area {
    margin-bottom: 15px;
}

.logo-area svg {
    filter: drop-shadow(0 4px 6px rgba(74, 144, 226, 0.3));
}

.intro-content {
    text-align: left;
    margin-bottom: 30px;
    line-height: 1.8;
    color: #555;
}

.intro-content p {
    margin-bottom: 15px;
}

.intro-content-card {
    background: #fff;
    border-radius: 12px;
}

.intro-text {
    color: #555;
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: justify;
}

.intro-text p {
    margin-bottom: 15px;
}

.instruction-box {
    background: #f8fbff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.instruction-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #3498db;
    margin: 0 0 15px 0;
    font-size: 1.1em;
}

.instruction-desc {
    margin: 0 0 20px 0;
    color: #666;
}

.rating-scale {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.rating-scale li {
    background: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
}

.rating-scale li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.scale-label {
    font-weight: 700;
    color: #2c3e50;
    background: #eef2f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.scale-desc {
    color: #666;
    font-size: 0.95em;
}

.action-area {
    text-align: center;
    margin-top: 40px;
}

.start-btn-large {
    font-size: 1.2em;
    padding: 18px 50px;
    border-radius: 50px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    width: auto;
    display: inline-block;
    min-width: 240px;
}

.start-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #4aa3df 0%, #3498db 100%);
}

.privacy-note {
    margin-top: 15px;
    color: #95a5a6;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Result Page Styles */
.result-header {
    text-align: center;
    background-color: #f9f9f9;
    padding: 40px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.result-header h3 {
    color: #666;
    font-weight: normal;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.total-score {
    font-size: 4em;
    font-weight: bold;
    margin: 10px 0;
}

.score-normal {
    color: #2ecc71;
}

.score-warning {
    color: #e74c3c;
}

.score-subtitle {
    color: #888;
    font-size: 0.9em;
}

.result-table-container {
    margin-bottom: 30px;
    overflow-x: auto;
}

.result-table-container h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.result-table th {
    background-color: #f0f4f1;
    color: #333;
    font-weight: bold;
    text-align: left;
    padding: 15px;
    font-size: 0.95em;
}

.result-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.result-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    color: white;
    font-weight: bold;
}

.status-normal {
    background-color: #2ecc71;
}

.status-mild {
    background-color: #f1c40f; /* Yellow/Orange for mild */
}

.status-severe {
    background-color: #e74c3c;
}

/* Factor Explanation Styles */
.factor-explanation-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    background-color: #fff; /* 移除大面积背景色，改为白色 */
    border-left: 4px solid transparent; /* 预留左侧边框位置 */
}

.factor-explanation-item.status-normal {
    border-left-color: #2ecc71;
}

.factor-explanation-item.status-mild {
    border-left-color: #f1c40f;
}

.factor-explanation-item.status-severe {
    border-left-color: #e74c3c;
}

.factor-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.factor-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.factor-description {
    color: #555;
    line-height: 1.6;
    font-size: 0.95em;
}

/* 总体结果解释与建议样式 */
.overall-advice {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.advice-content {
    background-color: #f0f9f0; /* 浅绿色背景，参考用户截图风格 */
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #2ecc71;
    color: #333;
}

/* 针对不同风险等级的建议框颜色 */
.score-warning ~ .result-section .advice-content, /* 如果总分是警告色，建议框也变色 */
.advice-content.warning {
    background-color: #fff5f5;
    border-left-color: #e74c3c;
}

.advice-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.advice-list {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.advice-list li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.advice-list li::before {
    content: "•";
    color: #2ecc71;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.advice-note {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px dashed #2ecc71;
}

.advice-note p {
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #666;
}

.advice-note strong {
    color: #27ae60;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 25px 20px;
        margin: 10px auto;
    }
    
    h1 {
        font-size: 1.6em;
    }
    
    .rating-scale {
        grid-template-columns: 1fr;
    }
    
    .start-btn-large {
        width: 100%;
        box-sizing: border-box;
    }

    .result-table th, .result-table td {
        padding: 10px 5px;
        font-size: 0.85em;
    }

    .total-score {
        font-size: 3em;
    }

    .navigation-buttons {
        flex-direction: column-reverse; /* On mobile, put Next/Submit on top or keep side-by-side? Stack is safer */
        gap: 10px;
    }

    .navigation-buttons button {
        margin-top: 0;
    }
}
