body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
}

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

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

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.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: #95a5a6;
    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: #7f8c8d;
}

.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-content {
    text-align: left;
    margin-bottom: 30px;
    line-height: 1.8;
    color: #555;
}

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

/* 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;
}

.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;
}

.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;
}

/* Responsive Table */
@media (max-width: 600px) {
    .result-table th, .result-table td {
        padding: 10px 5px;
        font-size: 0.85em;
    }
    
    .total-score {
        font-size: 3em;
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .options {
        justify-content: space-between;
    }
    
    .option-label span {
        display: none; /* 在移动端隐藏文字，只显示数字或根据需要调整 */
    }
    
    .rating-guide {
        font-size: 0.8em;
    }
    
    .option-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .option-item input[type="radio"] {
        margin-bottom: 10px;
    }
    
    .option-text {
        margin-bottom: 5px;
    }
    
    .navigation-buttons {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    button {
        margin-top: 10px;
    }
}

/* Modal and Button Responsive */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .redeem-actions {
        flex-direction: column;
    }
    
    .shop-btn {
        width: 100%;
    }
    
    .result-card {
        padding: 15px;
    }
    
    .score-value {
        font-size: 2.5em;
    }
    
    .result-table th, .result-table td {
        padding: 8px 5px;
        font-size: 0.9em;
    }
}
