/* 模态框样式 */

/* 模态框容器 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

/* 模态框激活状态 */
.modal.active {
    display: flex;
}

/* 模态框内容 */
.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.4s ease;
}

/* 症状自查模态框特殊样式 */
#symptomCheckModal .modal-content,
#analysisProgressModal .modal-content,
#analysisResultModal .modal-content {
    max-width: 700px;
}

/* 症状自查模态框主体内容 */
#symptomCheckModal .modal-body,
#analysisProgressModal .modal-body,
#analysisResultModal .modal-body {
    padding: 25px;
}

/* 症状自查模态框底部 */
#symptomCheckModal .modal-footer,
#analysisProgressModal .modal-footer,
#analysisResultModal .modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #symptomCheckModal .modal-content,
    #analysisProgressModal .modal-content,
    #analysisResultModal .modal-content {
        max-width: 95vw;
        margin: 10px;
    }
    
    #symptomCheckModal .modal-body,
    #analysisProgressModal .modal-body,
    #analysisResultModal .modal-body {
        padding: 20px 10px;
    }
    
    #symptomCheckModal .modal-footer,
    #analysisProgressModal .modal-footer,
    #analysisResultModal .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    #symptomCheckModal .modal-footer .btn,
    #analysisProgressModal .modal-footer .btn,
    #analysisResultModal .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
}

/* 模态框头部 */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
}

/* 模态框标题 */
.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 关闭按钮 */
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

/* 模态框主体 */
.modal-body {
    padding: 20px;
}

/* 聊天机器人样式 */
.chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    min-height: 300px;
    max-height: 300px;
}

/* 聊天消息 */
.chat-message {
    margin-bottom: 15px;
    max-width: 80%;
    display: flex;
    flex-direction: column;
}

/* 用户消息 */
.chat-message.user {
    margin-left: auto;
    align-items: flex-end;
}

/* 机器人消息 */
.chat-message.bot {
    margin-right: auto;
    align-items: flex-start;
}

/* 消息内容 */
.chat-message-content {
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    max-width: 100%;
}

/* 用户消息内容 */
.chat-message.user .chat-message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

/* 机器人消息内容 */
.chat-message.bot .chat-message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

/* 聊天输入容器 */
.chat-input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* 聊天输入框 */
.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    background: #f9f9f9;
    resize: none;
    min-height: 50px;
    max-height: 100px;
    overflow-y: auto;
}

/* 发送按钮 */
.chat-send {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px var(--shadow-button);
}

/* 动画效果 */
@keyframes slideInUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 模态框滚动条样式 */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 聊天消息滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 症状自查模态框专用样式优化 */

/* 步骤指示器样式优化 */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 8px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.step-indicator .step {
    flex: 1;
    padding: 15px 10px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    white-space: nowrap;
    line-height: 1.3;
    max-width: 160px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.step-indicator .step::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.step-indicator .step:hover::before {
    left: 100%;
}

.step-indicator .step.active {
    background: linear-gradient(135deg, #2c8b4a 0%, #4caf7a 100%);
    color: white;
    font-weight: 600;
    border-color: #2c8b4a;
    box-shadow: 0 4px 15px rgba(44, 139, 74, 0.3);
    transform: translateY(-2px);
}

.step-indicator .step.completed {
    background: linear-gradient(135deg, #4caf7a 0%, #66bb6a 100%);
    color: white;
    font-weight: 600;
    border-color: #4caf7a;
    box-shadow: 0 2px 10px rgba(76, 175, 122, 0.2);
}

/* 身体部位网格样式优化 */
.body-parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 25px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.body-part-item {
    padding: 30px 20px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.body-part-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 139, 74, 0.05) 0%, rgba(76, 175, 122, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.body-part-item:hover {
    border-color: #2c8b4a;
    background: linear-gradient(135deg, #f0f9f4 0%, #e8f5e9 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 139, 74, 0.15);
}

.body-part-item:hover::before {
    opacity: 1;
}

.body-part-item.selected {
    border-color: #2c8b4a;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    box-shadow: 0 8px 25px rgba(44, 139, 74, 0.25);
    transform: translateY(-3px);
}

.body-part-item.selected::before {
    opacity: 1;
}

.body-part-item i {
    font-size: 40px;
    color: #2c8b4a;
    margin-bottom: 12px;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.body-part-item:hover i {
    transform: scale(1.1);
    color: #267a3e;
}

.body-part-item span {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.body-part-item:hover span {
    color: #2c8b4a;
}

/* 症状标签网格样式优化 */
.symptoms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.symptom-tag {
    padding: 12px 24px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.symptom-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 139, 74, 0.1), transparent);
    transition: left 0.5s;
}

.symptom-tag:hover::before {
    left: 100%;
}

.symptom-tag:hover {
    border-color: #2c8b4a;
    background: linear-gradient(135deg, #f0f9f4 0%, #e8f5e9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 139, 74, 0.15);
    color: #2c8b4a;
}

.symptom-tag.selected {
    border-color: #2c8b4a;
    background: linear-gradient(135deg, #2c8b4a 0%, #4caf7a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(44, 139, 74, 0.3);
    transform: translateY(-2px);
}

.symptom-tag.selected i {
    color: white;
}

/* 表单样式优化 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.form-group label i {
    color: #2c8b4a;
    margin-right: 8px;
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #2c8b4a;
    box-shadow: 0 0 0 4px rgba(44, 139, 74, 0.1);
    background: #ffffff;
}

.form-control::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* 严重程度选项样式优化 */
.severity-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.severity-option {
    padding: 25px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.severity-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 139, 74, 0.05) 0%, rgba(76, 175, 122, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.severity-option:hover {
    border-color: #2c8b4a;
    background: linear-gradient(135deg, #f0f9f4 0%, #e8f5e9 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 139, 74, 0.15);
}

.severity-option:hover::before {
    opacity: 1;
}

.severity-option.selected {
    border-color: #2c8b4a;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    box-shadow: 0 8px 25px rgba(44, 139, 74, 0.25);
    transform: translateY(-3px);
}

.severity-option.selected::before {
    opacity: 1;
}

.severity-label {
    font-weight: 700;
    margin-bottom: 8px;
    color: #2c8b4a;
    font-size: 16px;
    position: relative;
    z-index: 1;
}

.severity-desc {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* 按钮样式优化 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    min-height: 45px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #2c8b4a 0%, #4caf7a 100%);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(44, 139, 74, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #267a3e 0%, #3d9e68 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 139, 74, 0.3);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #adb5bd 0%, #ced4da 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn-secondary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 2px solid #dee2e6;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #dee2e6;
    color: #495057;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #2c8b4a;
    color: #2c8b4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 139, 74, 0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 36px;
}

/* 步骤内容样式优化 */
.step-content {
    margin: 25px 0;
    padding: 0 10px;
}

.step-content h4 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.step-content h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #2c8b4a 0%, #4caf7a 100%);
    border-radius: 2px;
}

/* 操作按钮样式优化 */
.action-buttons {
    text-align: center;
    margin-bottom: 20px;
}

/* 症状摘要样式优化 */
.symptom-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-item {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-label {
    font-weight: 600;
    min-width: 120px;
    color: #495057;
    flex-shrink: 0;
}

.summary-value {
    flex: 1;
    color: #2c3e50;
    font-weight: 500;
}

.symptom-description-full {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.symptom-description-full .summary-value {
    margin-top: 10px;
    line-height: 1.6;
    color: #495057;
}

.warning-tip {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    padding: 20px;
    border-radius: 12px;
    margin-top: 25px;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.1);
}

.warning-tip i {
    color: #f39c12;
    margin-right: 10px;
    font-size: 16px;
}

.warning-tip strong {
    color: #d68910;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .step-indicator {
        gap: 4px;
    }
    
    .step-indicator .step {
        padding: 8px 4px;
        font-size: 11px;
        min-height: 40px;
    }
    
    .body-parts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .body-part-item {
        padding: 20px 10px;
        min-height: 100px;
    }
    
    .body-part-item i {
        font-size: 28px;
    }
    
    .symptoms-grid {
        gap: 8px;
    }
    
    .symptom-tag {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .severity-option {
        padding: 15px 12px;
    }
    
    .summary-item {
        margin-bottom: 15px;
    }
    
    .summary-label {
        min-width: auto;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .step-indicator .step {
        font-size: 10px;
        padding: 6px 2px;
        min-height: 35px;
    }
    
    .symptoms-grid {
        justify-content: flex-start;
    }
    
    .symptom-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
}
/* 分析结果模态框专用样式 */

/* 严重程度警告样式 */
.severity-alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.severity-alert.mild {
    background: #e8f5e9;
    border-color: #4CAF50;
    color: #2e7d32;
}

.severity-alert.moderate {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.severity-alert.severe {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.severity-alert.urgent {
    background: #f3e5f5;
    border-color: #9c27b0;
    color: #6a1b9a;
}

/* 分析结果部分样式 */
.section {
    margin: 25px 0;
}

.section h4 {
    border-bottom: 2px solid #2c8b4a;
    padding-bottom: 8px;
    margin-bottom: 15px;
    color: #2c8b4a;
}

.section h5 {
    color: #333;
    margin: 15px 0 8px 0;
    font-size: 15px;
}

.section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.section li {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* 疾病卡片样式 */
.disease-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

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

.disease-header h5 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.probability-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.probability-badge.high {
    background: #ffcdd2;
    color: #c62828;
}

.probability-badge.medium {
    background: #ffe0b2;
    color: #e65100;
}

.probability-badge.low {
    background: #c8e6c9;
    color: #2e7d32;
}

.typical-symptoms {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #e9ecef;
}

/* 免责声明样式 */
.disclaimer {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.disclaimer i {
    color: #ff9800;
    margin-right: 8px;
}

/* 分析进度模态框样式 */
#analysisProgressModal .modal-content {
    max-width: 500px;
}

#analysisResultModal .modal-content {
    max-width: 800px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .disease-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .probability-badge {
        align-self: flex-start;
    }
    
    .section h4 {
        font-size: 16px;
    }
    
    .disease-card {
        padding: 12px;
    }
    
    .typical-symptoms {
        padding: 8px;
        font-size: 13px;
    }
}