/* 基础变量 */
:root {
    --primary: #005A9C; /* 专业医疗蓝 */
    --primary-dark: #004b80;
    --primary-light: #e6f0f7;
    --secondary: #2ecc71;
    --secondary-dark: #27ae60;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-dark: #34495e;
    --bg-light: #f9f9f9;
    --bg-gradient: linear-gradient(135deg, #3498db, #1abc9c);
    --border-light: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 10px;
    --transition: all 0.3s ease;
    
    /* 风险级别颜色 */
    --risk-very-low: #2ecc71;
    --risk-low: #a0d468;
    --risk-medium: #ffce54;
    --risk-high: #fc6e51;
    --risk-very-high: #ed5565;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f5f8fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 80px; /* 为底部wizard按钮预留空间 */
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--text-dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: var(--transition);
}

input, select, textarea {
    font-family: inherit;
    font-size: 16px;
}
.mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #4a90e2;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
}

.mobile-menu-btn i {
    font-size: 16px;
}

.mobile-menu-btn:hover {
    background-color: #357ac8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.mobile-menu-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

.mobile-menu {
    display: none;
    background-color: white;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 99;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-dark);
    font-weight: 500;
    border-radius: 5px;
}

.mobile-menu a.active, .mobile-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

/* 欢迎区域样式 */
.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 0;
    margin-bottom: 30px;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.welcome-text {
    flex: 1;
    padding: 0 40px;
}

.welcome-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 500;
}

.welcome-text p {
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--text-light);
    max-width: 500px;
}

.welcome-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.welcome-image img {
    max-width: 280px;
    max-height: 280px;
    padding: 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    object-fit: contain;
    animation: welcomeFloat 4s ease-in-out infinite;
}

@keyframes welcomeFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.02);
    }
}

.start-btn {
    background-color: var(--primary);
    color: white;
    font-size: 18px;
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
    transition: all 0.3s;
}

.start-btn:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

/* 表单样式 */
.input-section {
    display: none;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-light);
}

.form-group h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.form-field {
    flex: 1;
    min-width: 200px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-dark);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background-color: white;
    transition: var(--transition);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.form-field small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
}

.form-field.calculated-field {
    background-color: var(--bg-light);
    padding: 10px;
    border-radius: 8px;
}

.calculated-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    text-align: center;
    padding: 5px 0;
}

.range-value {
    text-align: center;
    margin-top: 10px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.reset-btn {
    background-color: #f1f2f6;
    color: var(--text-dark);
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 30px;
    transition: var(--transition);
}

.reset-btn:hover {
    background-color: #e0e0e0;
}

.submit-btn {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 90, 156, 0.2) !important;
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 30px;
    transition: var(--transition);
}

.submit-btn:hover,
.submit-btn:active {
    background-color: var(--primary-dark) !important;
    box-shadow: 0 4px 12px rgba(0, 90, 156, 0.3) !important;
    transform: none !important;
}

/* 加载动画 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 结果展示区域 */
.results-section {
    display: none;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

/* 风险摘要卡片 */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.summary-card h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 500;
}

.risk-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.risk-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.risk-level {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    min-width: 70px;
}

/* 风险级别颜色 */
.risk-level.极低 {
    background-color: var(--risk-very-low);
    box-shadow: 0 3px 8px rgba(46, 204, 113, 0.3);
}

.risk-level.低 {
    background-color: var(--risk-low);
    box-shadow: 0 3px 8px rgba(160, 212, 104, 0.3);
}

.risk-level.中 {
    background-color: var(--risk-medium);
    color: #333;
    box-shadow: 0 3px 8px rgba(255, 206, 84, 0.3);
}

.risk-level.高 {
    background-color: var(--risk-high);
    box-shadow: 0 3px 8px rgba(252, 110, 81, 0.3);
}

.risk-level.极高 {
    background-color: var(--risk-very-high);
    box-shadow: 0 3px 8px rgba(237, 85, 101, 0.3);
}

/* 图表区域 */
.chart-section {
    margin-bottom: 40px;
}

.chart-section-title {
    font-size: 18px;
    color: var(--text-dark);
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.chart-wrapper {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 15px;
    position: relative;
    height: 350px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chart-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.risk-chart-wrapper {
    height: 480px;
    margin-bottom: 25px;
}

.chart-title {
    font-size: 14px;
    color: var(--text-dark);
    text-align: center;
    margin: 0 0 10px 0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 20px;
}

.chart-canvas-container {
    height: calc(100% - 25px);
    position: relative;
}

.risk-level-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
}

.info-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    z-index: 5;
    transition: color 0.2s;
    padding: 5px;
}

.info-button:hover {
    color: var(--primary);
}

/* 健康建议 */
.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-item {
    display: flex;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.recommendation-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.recommendation-icon {
    flex: 0 0 50px;
    font-size: 24px;
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5px;
}

.recommendation-content {
    flex: 1;
}

.recommendation-content h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 500;
}

.recommendation-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.back-btn {
    background-color: #f1f2f6;
    color: var(--text-dark);
    font-weight: 500;
    padding: 12px 25px;
    border-radius: 8px;
    transition: var(--transition);
}

.back-btn:hover {
    background-color: #e0e0e0;
}

.download-btn, .share-btn {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
    padding: 12px 25px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover, .share-btn:hover {
    background-color: var(--primary-dark);
}

.download-btn::before {
    content: '\f019';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.share-btn::before {
    content: '\f064';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* 医疗影像上传 */
.image-upload-section {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.file-upload-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 30px;
    background-color: var(--bg-light);
    border-radius: 12px;
    border: 2px dashed var(--border-light);
    transition: var(--transition);
    position: relative;
}

.file-upload-field:hover {
    border-color: var(--primary);
}

.file-upload-field label {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    margin-bottom: 10px;
}

.file-upload-field input[type="file"] {
    width: 100%;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

.file-upload-preview {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.file-upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: none;
}

.file-name {
    font-size: 14px;
    color: var(--text-light);
}

.image-analysis-results {
    margin-top: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    padding: 25px;
    position: relative;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    width: 24px;
    height: 24px;
    text-align: center;
}

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

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: var(--primary);
    font-size: 20px;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.share-option {
    background-color: #f1f2f6;
    color: var(--text-dark);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    transition: var(--transition);
}

.share-option:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.share-option i {
    font-size: 18px;
}

/* 量表信息弹窗样式 */
.scale-details {
    line-height: 1.6;
}

.scale-details p {
    margin-bottom: 15px;
}

.scale-details ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.scale-details li {
    margin-bottom: 5px;
    position: relative;
    padding-left: 5px;
}

.scale-details li::before {
    content: '•';
    position: absolute;
    left: -15px;
    color: var(--primary);
}

.original-scale-name {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-top: -10px;
    margin-bottom: 15px;
}

/* 关于系统 */
.about-section {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.about-text {
    flex: 3;
    min-width: 300px;
}

.about-text h3 {
    font-size: 20px;
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 15px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.about-text ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.about-text li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 5px;
}

.about-text li::before {
    content: '•';
    position: absolute;
    left: -15px;
    color: var(--primary);
}

.tech-icons {
    flex: 1;
    min-width: 200px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.tech-icon {
    background-color: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
}

.tech-icon:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.tech-icon i {
    font-size: 30px;
    color: var(--primary);
    margin-bottom: 10px;
}

.tech-icon span {
    font-weight: 500;
    color: var(--text-dark);
}

/* 联系我们 */
.contact-section {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.contact-info {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-item i {
    font-size: 20px;
    color: var(--primary);
    width: 30px;
    text-align: center;
}

.contact-item span {
    color: var(--text-light);
}

.contact-form {
    flex: 2;
    min-width: 300px;
}

.contact-form h3 {
    font-size: 20px;
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 20px;
}

/* 页脚 */
.app-footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 40px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo-img {
    height: 40px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 15px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.footer-logo-img:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.footer-logo h3 {
    font-size: 16px;
    color: white;
    font-weight: 400;
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-link-group {
    flex: 1;
    min-width: 150px;
}

.footer-link-group h4 {
    font-size: 16px;
    color: white;
    margin-bottom: 15px;
    font-weight: 500;
}

.footer-link-group ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link-group a {
    color: #bdc3c7;
    transition: var(--transition);
}

.footer-link-group a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #bdc3c7;
    font-size: 14px;
}

.disclaimer {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.8;
}

/* 媒体查询 - 移动端优化 */
@media (max-width: 768px) {
    .app-header {
        padding: 12px 15px;
    }
    
    .logo h1 {
        font-size: 16px;
    }
    
    .logo .logo-img {
        width: 40px;
        height: 40px;
        padding: 6px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .welcome-section {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }
    
    .welcome-text {
        padding: 0;
        text-align: center;
    }
    
    .welcome-text h2 {
        font-size: 24px;
    }
    
    .welcome-text p {
        font-size: 16px;
    }
    
    .welcome-image {
        order: -1;
    }
    
    .welcome-image img {
        max-width: 200px;
        max-height: 200px;
        padding: 16px;
    }
    
    .start-btn {
        font-size: 16px;
        padding: 10px 25px;
    }
    
    .input-section, 
    .results-section, 
    .about-section, 
    .contact-section, 
    .image-upload-section {
        padding: 20px 15px;
        border-radius: 8px;
    }
    
    .section-header h2 {
        font-size: 22px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-field {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reset-btn, .submit-btn {
        width: 100%;
        padding: 12px 0;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .summary-card {
        padding: 15px;
    }
    
    .risk-value {
        font-size: 24px;
    }
    
    .risk-level {
        font-size: 13px;
        padding: 4px 12px;
    }
    
    .chart-section-title {
        font-size: 16px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        height: 220px;
    }
    
    .risk-chart-wrapper {
        height: 280px;
    }
    
    .recommendation-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .recommendation-icon {
        margin-bottom: 5px;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .back-btn, .download-btn, .share-btn {
        width: 100%;
        justify-content: center;
    }
    
    .about-content, .contact-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .tech-icons {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 25px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
    
    /* 移动端图表标题优化 */
    .chart-title {
        font-size: 13px;
        padding: 0 25px 0 5px; /* 为信息按钮留出空间 */
    }
    
    .info-button {
        top: 8px;
        right: 8px;
    }
    
    /* 移动端弹窗优化 */
    .modal-content {
        padding: 20px 15px;
        width: 95%;
        max-width: none;
    }
    
    .modal-content h3 {
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
    }
}

/* 适配小屏幕手机 */
@media (max-width: 375px) {
    .welcome-text h2 {
        font-size: 22px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .chart-wrapper {
        height: 280px;
    }
    
    .risk-chart-wrapper {
        height: 380px;
    }
    
    .tech-icons {
        grid-template-columns: 1fr;
    }
    
    .risk-value {
        font-size: 22px;
    }
}

/* 平板电脑适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .welcome-text h2 {
        font-size: 28px;
    }
    
    .welcome-text p {
        font-size: 16px;
    }
    
    .welcome-image img {
        max-width: 240px;
        max-height: 240px;
        padding: 18px;
    }
}

/* 黑暗模式支持 */
@media (prefers-color-scheme: dark) {
    /* 可以在这里添加黑暗模式的样式，如果需要的话 */
}

/* 无障碍增强 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 新增内联样式，优化图表和标题显示 */
.chart-section {
    margin-bottom: 40px;
}

.chart-section-title {
    font-size: 18px;
    color: #333;
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.chart-wrapper {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 15px;
    position: relative;
    height: 250px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chart-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chart-title {
    font-size: 14px;
    color: #555;
    text-align: center;
    margin: 0 0 10px 0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 20px;
}

.chart-canvas-container {
    height: calc(100% - 25px);
    position: relative;
}

.risk-chart-wrapper {
    height: 350px;
    margin-bottom: 25px;
}

.risk-level-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
    padding: 6px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
}

.info-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    z-index: 5;
    transition: color 0.2s;
}

.info-button:hover {
    color: #3498db;
}

/* 优化结果摘要卡片 */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.summary-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
    font-size: 16px;
    color: #555;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.risk-value {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 8px;
}

.risk-level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    min-width: 60px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-wrapper {
        height: 220px;
    }

    .risk-chart-wrapper {
        height: 300px;
    }

    .summary-card {
        padding: 12px;
    }

    .risk-value {
        font-size: 22px;
    }
}
/* 更美观的AI分析部分样式 */
.ai-analysis-section {
    margin-top: 30px;
    margin-bottom: 40px;
    /* 移除display: none，因为我们希望它作为结果的一部分显示 */
}

.ai-analysis-container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 25px 30px;
    position: relative;
    border-top: 4px solid #3498db;
    overflow: hidden;
}

.ai-analysis-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.03) 0%, rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
}

.ai-analysis-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.loading-hint {
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
}

/* 改进AI图标样式 */
.ai-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    background-color: #27ae60; /* 使用医生绿色 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ai-header-text {
    flex: 1;
}

.ai-header-text h4 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
}

.ai-header-text p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #7f8c8d;
}

.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.ai-loading-dots {
    display: flex;
    margin-bottom: 20px;
}

.ai-loading-dots span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    background-color: #3498db;
    border-radius: 50%;
    opacity: 0.6;
    animation: loadingDots 1.4s infinite ease-in-out both;
}

.ai-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDots {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1.0);
    }
}

.ai-loading p {
    color: #2c3e50;
    font-size: 16px;
    margin: 5px 0;
    text-align: center;
}

.ai-content-text {
    line-height: 1.7;
    font-size: 15px;
    color: #2c3e50;
}

/* Markdown 样式 */
.ai-content-text h1 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ai-content-text h2 {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #3498db;
}

.ai-content-text h3 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.ai-content-text p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.ai-content-text strong {
    color: #2c3e50;
    font-weight: 600;
}

.ai-content-text ul, .ai-content-text ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.ai-content-text li {
    margin-bottom: 8px;
}

.ai-content-text table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0 20px;
    font-size: 14px;
}

.ai-content-text th, .ai-content-text td {
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    text-align: left;
}

.ai-content-text th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.ai-content-text tr:nth-child(even) {
    background-color: #f8f9fa;
}

.ai-content-text blockquote {
    border-left: 4px solid #3498db;
    padding-left: 15px;
    margin-left: 0;
    margin-right: 0;
    color: #7f8c8d;
    font-style: italic;
}

.ai-content-text code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 90%;
    color: #e74c3c;
}

.ai-content-text pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.ai-content-text pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.ai-content-text img {
    max-width: 100%;
    border-radius: 5px;
    margin: 10px 0;
}

.ai-content-text hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 20px 0;
}

.ai-content-text a {
    color: #3498db;
    text-decoration: none;
}

.ai-content-text a:hover {
    text-decoration: underline;
}

/* 错误消息样式 */
.error-message {
    color: #e74c3c;
    padding: 10px;
    border-left: 3px solid #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
}

/* 添加必填项样式 */
.required-field::after {
    content: "*";
    color: #e74a3b;
    margin-left: 4px;
}

.form-note {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #e74a3b;
}

.form-note i {
    color: #e74a3b;
    margin-right: 5px;
}

/* 隐私声明样式 */
.privacy-notice {
    background-color: #f8f9fa;
    border-left: 4px solid #4e73df;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.privacy-notice h4 {
    margin-top: 0;
    color: #4e73df;
    display: flex;
    align-items: center;
}

.privacy-notice p {
    margin-bottom: 10px;
}

.privacy-notice ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    background-color: #e8f4fe;
    color: #0066cc;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.privacy-badge i {
    margin-right: 4px;
    font-size: 0.9rem;
}

/* Wizard Progress */
.wizard-progress-container{margin-bottom:20px}
.wizard-step-indicator{text-align:center;margin-bottom:10px;color:var(--text-light,#7f8c8d);font-size:14px}
.wizard-step-indicator .step-title{display:block;font-weight:600;color:var(--text-dark);margin-top:4px;font-size:16px}
.wizard-progress{width:100%;height:6px;background:#e5e5e5;border-radius:3px;overflow:hidden}
.wizard-progress-fill{height:100%;width:0;background:var(--primary,#3498db);transition:width .3s ease}

/* Wizard Navigation - 保持项目原有按钮风格 */
.wizard-nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:30px;
  gap:15px;
}

.wizard-nav .btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 30px;
  border-radius:30px;
  font-weight:500;
  font-size:14px;
  transition:var(--transition);
  text-decoration:none;
  border:none;
  cursor:pointer;
  min-width:120px;
  justify-content:center;
}

.wizard-nav .btn-secondary{
  background-color:#f1f2f6;
  color:var(--text-dark);
}

.wizard-nav .btn-secondary:hover{
  background-color:#e0e0e0;
  transform:translateY(-2px);
}

.wizard-nav .btn-primary{
  background-color:var(--primary);
  color:white;
  box-shadow:0 4px 10px rgba(52,152,219,0.3);
}

.wizard-nav .btn-primary:hover{
  background-color:var(--primary-dark);
  box-shadow:0 6px 15px rgba(52,152,219,0.4);
  transform:translateY(-2px);
}

.wizard-nav .btn-success{
  background-color:var(--secondary);
  color:white;
  box-shadow:0 4px 10px rgba(46,204,113,0.3);
}

.wizard-nav .btn-success:hover{
  background-color:var(--secondary-dark);
  box-shadow:0 6px 15px rgba(46,204,113,0.4);
  transform:translateY(-2px);
}

/* 错误状态 */
.form-field input.error,.form-field select.error{
  border-color:#dc3545;
  background-color:#fff5f5;
}

.form-field input.error:focus,.form-field select.error:focus{
  box-shadow:0 0 0 0.2rem rgba(220,53,69,0.25);
}

/* 移动端适配 */
/* 移动端样式已整合到新的优化样式中 */

/* ----------------------------- */
/* 👻 Skeleton Loading Animation */
/* ----------------------------- */
@keyframes skeleton-shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background-color: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0 0px, #f7f7f7 40px, #f0f0f0 80px);
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.2s linear infinite;
}

/* 文字占位 */
.skeleton-text { height: 16px; width: 100%; border-radius: 4px; }
/* 圆形头像占位 */
.skeleton-avatar { border-radius: 50%; }
/* 常用卡片骨架 */
.skeleton-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: white; }

/* 新增饮食习惯多选样式 */
#diet_habits {
    min-height: 120px;
    padding: 8px;
}

/* 多选下拉框美化 */
.form-field select[multiple] {
    min-height: 120px;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    background: white;
    font-size: 14px;
    line-height: 1.4;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-field select[multiple]:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-field select[multiple] option {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 4px;
    background: white;
    color: var(--text-dark);
}

.form-field select[multiple] option:checked {
    background: var(--primary);
    color: white;
}

.form-field select[multiple] option:hover {
    background: var(--bg-light);
}

/* 功能状态组样式优化 */
.form-group h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

/* 条件必填字段提示样式 */
.conditional-field {
    position: relative;
    transition: var(--transition);
}

.conditional-field.required::after {
    content: ' (必填)';
    color: #e74c3c;
    font-weight: 600;
    font-size: 12px;
}

.conditional-field.hidden {
    opacity: 0.5;
    pointer-events: none;
}

/* 字段组联动样式 */
.field-group-diabetes,
.field-group-hyperlipidemia {
    transition: var(--transition);
    border-left: 3px solid transparent;
    padding-left: 15px;
    margin-left: -15px;
}

.field-group-diabetes.active,
.field-group-hyperlipidemia.active {
    border-left-color: var(--primary);
    background: rgba(52, 152, 219, 0.02);
}

@media (max-width: 600px) {
    #diet_habits {
        min-height: 100px;
    }
    .form-field select[multiple] {
        font-size: 16px;
    }
    
    .form-field select[multiple] {
        min-height: 100px;
        font-size: 16px;
    }
    
    .form-field select[multiple] option {
        padding: 10px 12px;
        font-size: 16px;
    }
}

/* 脑卒中次数字段样式 */
.stroke-times-field {
    width: 100%;
}

.stroke-times-input-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.stroke-times-input-group > input[type="number"] {
    flex: 1 1 50%;
    width: 50%;
    min-width: 0;
}

.stroke-times-input-group > .checkbox-wrapper {
    flex: 1 1 50%;
    width: 50%;
    padding: 0;
    border: none;
    background: none;
}

/* 修复复选框对号不可见的问题 */
.checkbox-wrapper input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 1.15em;
    height: 1.15em;
    border: 0.15em solid #bdc3c7;
    border-radius: 0.25em;
    transform: translateY(-0.075em);
    display: grid;
    place-content: center;
    cursor: pointer;
}
.checkbox-wrapper input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--primary);
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.checkbox-wrapper input[type="checkbox"]:checked::before {
    transform: scale(1.2);
}
.checkbox-wrapper input[type="checkbox"]:checked {
    border-color: var(--primary);
}

/* ---------- 5. 强制取消所有输入框焦点位移 ---------- */
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    transform: none !important;
}
.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
    transform: none !important;
}
html {
    /* 尝试通过CSS控制浏览器滚动行为，减少跳动 */
    scroll-padding-top: 100px; 
}
body {
    scroll-behavior: smooth;
}

/* 条件显示字段样式 */
.field-group-diabetes,
.field-group-hyperlipidemia {
    display: none;
}

.field-group-diabetes.show,
.field-group-hyperlipidemia.show {
    display: flex;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .stroke-times-field {
        flex: 1 1 100%;
    }
    
    .stroke-times-input-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .stroke-times-input-group input[type="number"] {
        width: 100%;
        max-width: none;
    }
    
    .checkbox-wrapper {
        align-self: flex-start;
    }
    
    /* 条件字段在移动端的样式 */
    .field-group-diabetes,
    .field-group-hyperlipidemia {
        flex: 1 1 100%;
        margin-top: 10px;
    }
}

/* 医生端选择弹窗样式 */
#doctor-portal-modal .modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#doctor-portal-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

#doctor-portal-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

#doctor-portal-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

#doctor-portal-modal .modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

#doctor-portal-modal .modal-body {
    padding: 20px;
}

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

.portal-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.portal-option:hover {
    border-color: var(--primary);
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.portal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.portal-option:first-child .portal-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.portal-option:last-child .portal-icon {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.portal-icon i {
    font-size: 20px;
}

.portal-info {
    flex: 1;
}

.portal-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.portal-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
}

.portal-arrow {
    color: var(--text-light);
    font-size: 16px;
    margin-left: 16px;
}

.portal-option:hover .portal-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* 移动端优化 */
@media (max-width: 768px) {
    #doctor-portal-modal .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .portal-option {
        padding: 12px;
    }
    
    .portal-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .portal-icon i {
        font-size: 18px;
    }
    
    .portal-info h4 {
        font-size: 15px;
    }
    
    .portal-info p {
        font-size: 13px;
    }
}

/* 确保头部医生端按钮靠右显示 */
.app-header .mobile-menu-group {
    margin-left: auto;
}

/* 移除媒体查询中隐藏按钮的规则 */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: inline-flex;
    }
}

/* ---------------------------------------*/
/* Header Layout Fix */
/* ---------------------------------------*/
.app-header {
    display: flex;
    align-items: center;
    /* keep existing spacing settings via padding rules below */
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo .logo-img {
    width: 48px;
    height: 48px;
    padding: 8px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo .logo-img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.logo h1 {
    margin: 0; /* remove default top/bottom margin to center vertically */
}

/* ====================
   移动端图表溢出修复
   ==================== */
/* 1) 防止 Chart.js 生成的 <canvas> 在小屏幕上超出父容器 */
.chart-canvas-container,
.chart-canvas-container canvas {
    width: 100% !important;   /* 宽度始终跟随容器 */
    max-width: 100%;          /* 不允许超过父元素 */
    height: 100% !important;  /* 保持与父容器同步的高度 */
}

/* 2) 当屏幕较小时单列显示并减小高度，避免水平滚动 */
@media (max-width: 600px) {
    .charts-grid {
        grid-template-columns: 1fr; /* 单列布局 */
        gap: 12px;                  /* 缩小间距 */
    }

    .chart-wrapper {
        height: 280px;              /* 增加高度 */
        padding: 10px;              /* 缩小内边距 */
    }
    
    .risk-chart-wrapper {
        height: 380px;              /* 风险图表更高 */
    }

    .chart-canvas-container {
        height: calc(100% - 20px);  /* 适配新的内边距 */
    }
}

/* 3) 额外保护：若内容仍然过宽则隐藏溢出 */
.chart-wrapper {
    overflow: hidden;              /* 隐藏可能的溢出内容 */
}

/* 健康建议区域 */
.recommendations-section {
    margin-top: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    border: 1px solid #e1e8ed;
}

.recommendations-section .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.recommendations-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: #3498db;
    border-radius: 1px;
}

.recommendations-container {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: all 0.2s ease;
}

.recommendation-item:hover {
    background-color: #f1f3f4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.recommendation-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: #3498db;
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.recommendation-content {
    flex: 1;
}

.recommendation-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.recommendation-content p {
    color: #5a6c7d;
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

.no-recommendations {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 30px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #bdc3c7;
}

/* 量表图表样式优化 */
.scale-chart-container {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.scale-chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    text-align: center;
}

.scale-chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .recommendations-container {
        gap: 15px;
    }
    
    .recommendation-item {
        padding: 15px;
        gap: 12px;
    }
    
    .recommendation-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .recommendation-content h4 {
        font-size: 1rem;
    }
    
    .scale-chart-wrapper {
        height: 250px;
    }
}

/* 风险指标样式优化 */
.risk-indicator {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.risk-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.risk-indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.risk-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #3498db;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: color 0.3s ease;
}

.risk-level {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3498db;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.risk-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 风险等级颜色变量 */
:root {
    --risk-very-low: #27ae60;
    --risk-low: #2ecc71;
    --risk-medium: #f39c12;
    --risk-high: #e74c3c;
    --risk-very-high: #c0392b;
}

/* 风险等级特定样式 */
.risk-indicator.risk-very-low {
    border-top-color: var(--risk-very-low);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.risk-indicator.risk-low {
    border-top-color: var(--risk-low);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.2);
}

.risk-indicator.risk-medium {
    border-top-color: var(--risk-medium);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
}

.risk-indicator.risk-high {
    border-top-color: var(--risk-high);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.risk-indicator.risk-very-high {
    border-top-color: var(--risk-very-high);
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.2);
}

/* 风险摘要网格布局优化 */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 移动端风险指标优化 */
@media (max-width: 768px) {
    .risk-value {
        font-size: 2rem;
    }
    
    .risk-level {
        font-size: 1rem;
    }
    
    .risk-label {
        font-size: 0.8rem;
    }
    
    .risk-indicator {
        padding: 15px;
    }
    
    .results-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .results-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* 移动端表单优化 */
@media (max-width: 768px) {
    .form-field {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .form-field label {
        font-size: 16px;
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 8px;
        display: block;
    }
    
    .form-field input,
    .form-field select,
    .form-field textarea {
        width: 100%;
        padding: 16px 18px;
        font-size: 16px !important; /* 防止iOS缩放 */
        border: 2px solid #e1e8ed;
        border-radius: 12px;
        background-color: #ffffff;
        transition: all 0.3s ease;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .form-field input:focus,
    .form-field select:focus,
    .form-field textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        background-color: #ffffff;
        transform: translateY(-1px);
    }
    
    .form-field input:active,
    .form-field select:active,
    .form-field textarea:active {
        transform: translateY(0);
    }
    
    /* 移动端按钮优化 */
    .form-actions {
        position: sticky;
        bottom: 0;
        background: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0.95) 100%);
        padding: 20px 0;
        margin-top: 30px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        z-index: 100;
    }
    
    .reset-btn, .submit-btn {
        width: 100%;
        padding: 18px 24px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        border: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        margin-bottom: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        position: relative;
        overflow: hidden;
    }
    
    .reset-btn {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        color: var(--text-dark);
        border: 1px solid #dee2e6;
    }
    
    .reset-btn:hover, .reset-btn:active {
        background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }
    
    .submit-btn {
        background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    
    .submit-btn:hover, .submit-btn:active {
        background: linear-gradient(135deg, #2980b9 0%, #27ae60 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    }
    
    /* 移动端表单组优化 */
    .form-group {
        padding: 24px 16px;
        margin-bottom: 20px;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .form-group h3 {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 20px;
        text-align: center;
        position: relative;
        background: linear-gradient(135deg, #3498db, #2ecc71);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .form-group h3::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 2px;
        background: linear-gradient(135deg, #3498db, #2ecc71);
        border-radius: 1px;
    }
    
    /* 移动端健康建议优化 */
    .recommendations-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .recommendation-item {
        padding: 20px;
        gap: 15px;
        border-radius: 12px;
    }
    
    .recommendation-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        border-radius: 10px;
    }
    
    .recommendation-content h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .recommendation-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    /* 移动端向导导航优化 */
    .wizard-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0.95) 100%);
        padding: 16px 20px 12px 20px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        z-index: 1000;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
    }
    
    .wizard-nav .btn {
        padding: 16px 32px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        border: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        position: relative;
        overflow: hidden;
    }
    
    .wizard-nav .btn-secondary {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        color: var(--text-dark);
        border: 1px solid #dee2e6;
    }
    
    .wizard-nav .btn-secondary:hover:not(:disabled) {
        background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }
    
    .wizard-nav .btn-primary {
        background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    
    .wizard-nav .btn-primary:hover {
        background: linear-gradient(135deg, #2980b9 0%, #27ae60 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    }
    
    .wizard-nav .btn-success {
        background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    }
    
    .wizard-nav .btn-success:hover {
        background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
    }
    
    .wizard-nav .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
    }
    
    /* 为底部导航预留空间 */
    body {
        padding-bottom: 100px;
    }
    
    /* 移动端输入字段触摸反馈 */
    .form-field input:active,
    .form-field select:active,
    .form-field textarea:active {
        background-color: #f8f9fa;
    }
    
    /* 移动端多选下拉框优化 */
    .form-field select[multiple] {
        min-height: 120px;
        padding: 12px;
        border-radius: 12px;
        background: #ffffff;
        border: 2px solid #e1e8ed;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .form-field select[multiple] option {
        padding: 12px;
        margin: 2px 0;
        border-radius: 8px;
        background: #ffffff;
        color: var(--text-dark);
        font-size: 15px;
    }
    
    .form-field select[multiple] option:checked {
        background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
        color: white;
    }
    
    /* 移动端条件字段优化 */
    .conditional-field {
        transition: all 0.3s ease;
        overflow: hidden;
    }
    
    .conditional-field.hidden {
        max-height: 0;
        opacity: 0;
        margin: 0;
        padding: 0;
    }
    
    /* 移动端复选框优化 */
    .checkbox-wrapper {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        background: #ffffff;
        border-radius: 12px;
        border: 2px solid #e1e8ed;
        margin-bottom: 12px;
        transition: all 0.3s ease;
    }
    
    .checkbox-wrapper:hover {
        border-color: var(--primary);
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
    }
    
    .checkbox-wrapper input[type="checkbox"] {
        width: 20px;
        height: 20px;
        accent-color: var(--primary);
    }
    
    .checkbox-wrapper label {
        font-size: 15px;
        color: var(--text-dark);
        cursor: pointer;
        flex: 1;
        margin: 0;
    }
}

/* 防止移动端输入框聚焦时自动滚动 */
@media (max-width: 768px) {
    .form-field input:focus,
    .form-field select:focus,
    .form-field textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        background-color: #ffffff;
        /* 移除transform，防止自动居中 */
        transform: none;
    }
    
    /* 防止iOS Safari自动缩放 */
    input[type="text"],
    input[type="number"],
    input[type="tel"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* 防止页面滚动到输入框 */
    body {
        scroll-behavior: auto;
    }
}

/* 移动端表单优化 - 简化版本 */
@media (max-width: 768px) {
    .form-field {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .form-field label {
        font-size: 16px;
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 8px;
        display: block;
    }
    
    .form-field input,
    .form-field select,
    .form-field textarea {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px !important; /* 防止iOS缩放 */
        border: 2px solid #e1e8ed;
        border-radius: 8px;
        background-color: #ffffff;
        transition: all 0.2s ease;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .form-field input:focus,
    .form-field select:focus,
    .form-field textarea:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        background-color: #ffffff;
        transform: none; /* 防止自动居中 */
    }
    
    .form-field input:disabled {
        background-color: #f8f9fa;
        color: #6c757d;
        cursor: not-allowed;
    }
    
    /* 简化按钮样式 */
    .form-actions {
        position: sticky;
        bottom: 0;
        background-color: #ffffff;
        padding: 16px 0;
        margin-top: 30px;
        border-top: 1px solid #e1e8ed;
        z-index: 100;
    }
    
    .reset-btn, .submit-btn {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        border: none;
        transition: all 0.2s ease;
        cursor: pointer;
        margin-bottom: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .reset-btn {
        background-color: #f8f9fa;
        color: #495057;
        border: 1px solid #dee2e6;
    }
    
    .reset-btn:hover, .reset-btn:active {
        background-color: #e9ecef;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
    
    .submit-btn {
        background-color: #3498db;
        color: white;
        box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
    }
    
    .submit-btn:hover, .submit-btn:active {
        background-color: #2980b9;
        box-shadow: 0 2px 6px rgba(52, 152, 219, 0.4);
    }
    
    /* 简化表单组样式 */
    .form-group {
        padding: 20px 16px;
        margin-bottom: 20px;
        background-color: #ffffff;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #e1e8ed;
    }
    
    .form-group h3 {
        font-size: 1.2rem;
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 16px;
        text-align: center;
        position: relative;
    }
    
    .form-group h3::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 2px;
        background-color: #3498db;
        border-radius: 1px;
    }
    
    /* 简化健康建议移动端样式 */
    .recommendations-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .recommendation-item {
        padding: 16px;
        gap: 12px;
        border-radius: 6px;
    }
    
    .recommendation-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        border-radius: 6px;
    }
    
    .recommendation-content h4 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .recommendation-content p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* 简化向导导航样式 */
    .wizard-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ffffff;
        padding: 16px 20px 12px 20px;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        border-top: 1px solid #e1e8ed;
    }
    
    .wizard-nav .btn {
        padding: 16px 32px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        border: none;
        transition: all 0.2s ease;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .wizard-nav .btn-secondary {
        background-color: #f8f9fa;
        color: #495057;
        border: 1px solid #dee2e6;
    }
    
    .wizard-nav .btn-secondary:hover:not(:disabled) {
        background-color: #e9ecef;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
    
    .wizard-nav .btn-primary {
        background-color: #3498db;
        color: white;
        box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
    }
    
    .wizard-nav .btn-primary:hover {
        background-color: #2980b9;
        box-shadow: 0 2px 6px rgba(52, 152, 219, 0.4);
    }
    
    .wizard-nav .btn-success {
        background-color: #27ae60;
        color: white;
        box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
    }
    
    .wizard-nav .btn-success:hover {
        background-color: #229954;
        box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4);
    }
    
    .wizard-nav .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 为底部导航预留空间 */
    body {
        padding-bottom: 90px;
        scroll-behavior: auto; /* 防止自动滚动 */
    }
}

/* ======================================== */
/*          滑块（Range Slider）修复         */
/* ======================================== */

/* 清除默认样式，为自定义样式做准备 */
.form-field input[type="range"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    height: 20px !important; /* 增加点击区域 */
    background: transparent !important; /* 轨道背景设为透明 */
    cursor: pointer !important;
    outline: none !important;
}

/* --- 滑块轨道 (Track) --- */
.form-field input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, 
        var(--primary) var(--value-percent, 50%), 
        #dee2e6 var(--value-percent, 50%));
    border-radius: 3px;
}
.form-field input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: #dee2e6; /* Firefox不支持渐变轨道，先用单色 */
    border-radius: 3px;
}

/* --- 滑块本身 (Thumb) --- */
.form-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    margin-top: -7px; /* (轨道高度 - 滑块高度) / 2 */
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.form-field input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ---------- 修复Firefox下的进度条颜色 ---------- */
.form-field input[type="range"]::-moz-range-progress {
    background-color: var(--primary);
    height: 6px;
    border-radius: 3px;
}

/* ======================================== */
/*         条件字段（Conditional Fields）     */
/* ======================================== */

.field-group-diabetes,
.field-group-hyperlipidemia {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
    opacity: 0;
    transition: all 0.4s ease-in-out;
}

.field-group-diabetes.visible,
.field-group-hyperlipidemia.visible {
    max-height: 120px; /* 足够的高度以显示label和input */
    opacity: 1;
    /* 如果需要，可以在这里恢复padding和margin */
}