/* 兽医病例报告CSS */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #fff;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 60px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 12px 25px;
    border: none;
    background-color: #f8f9fa;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
    color: #666;
}

.tab-btn:hover {
    background-color: #e9ecef;
}

.tab-btn.active {
    background-color: #ffffff;
    color: #0062FF;
    border-color: #eaeaea;
    border-bottom: 2px solid #ffffff;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.header {
    width: 100%;
    height: 294px;
    background: url('../imgs/bg.png') no-repeat center center;
    position: relative;
    display: flex;
    justify-content: center;
}

.header-logo {
    position: absolute;
    top: 40px;
    left: 80px;
    width: 192px;
    height: 52px;
}

.header-content {
    padding-top: 148px;
}

.header-content .content {
    display: flex;
    align-items: center;
    position: relative;
}

.header-content .content .content-img {
    width: 227px;
    height: 56px;
    margin-left: 18px;
}

.header-content .content .decoration-img {
    width: 40px;
    height: 40px;
    position: absolute;
    top: -20px;
    right: -45px;
}

.header-content .content span {
    font-size: 46px;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.content-text {
    position: relative;
}

.content-img-text {
    width: 347px;
    height: 26px;
    position: absolute;
    top: 43px;
    left: 50%;
    transform: translateX(-50%);
}

h1, h2, h3 {
    color: #2c3e50;
    margin-top: 0;
}

.form-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 20px;
}

.form-box .form-group {
    width: 47%;
}
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #666;
}

.form-required {
    font-weight: 500;
    color: #e74c3c;
    margin-right: 5px;
}

input[type="text"], 
input[type="number"], 
select, 
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

textarea {
    height: 120px;
    resize: vertical;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

button {
    background-color: #0062FF;
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #0052d6;
}

#resetBtn {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
}

#resetBtn:hover {
    background-color: #e9ecef;
}

.upload-area {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 4px;
}

#imagePreview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    width: 150px;
    height: 150px;
    border: 1px solid #ddd;
    overflow: hidden;
    border-radius: 4px;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}

.report-container {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    display: none;
}

/* 诊断标题样式 */
.diagnosis-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #3498db;
}

/* 诊断内容样式 */
.diagnosis-content {
    margin-left: 15px;
    margin-bottom: 20px;
}

.diagnosis-content h4 {
    font-size: 1.1em;
    color: #34495e;
    margin-top: 15px;
    margin-bottom: 8px;
}

.diagnosis-basis, .diagnosis-further {
    margin-left: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* 治疗方案样式 */
.treatment-content {
    line-height: 1.8;
}

.treatment-content h1, .treatment-content h2, .treatment-content h3 {
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
}

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

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

.report-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.abnormal-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    border-left: 3px solid #3498db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 异常指标标题样式 */
.indicator-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
}

/* 异常指标内容样式 */
.indicator-content {
    margin-left: 10px;
}

.indicator-content p {
    margin-bottom: 8px;
}

/* 异常方向样式 */
.direction-up {
    color: #e74c3c;
    font-weight: bold;
}

.direction-down {
    color: #3498db;
    font-weight: bold;
}

/* 疾病内容样式 */
.indicator-diseases {
    margin-top: 10px;
}

.diseases-content {
    margin-left: 15px;
    margin-top: 5px;
    line-height: 1.5;
}

/* 检查详情样式 */
.examination-section {
    margin-bottom: 12px;
}

.examination-detail {
    margin-left: 15px;
    margin-top: 5px;
    line-height: 1.6;
    padding: 5px 0;
}

/* 报告部分标题样式增强 */
.report-section h3 {
    font-size: 1.4em;
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

/* 报告部分内容间距优化 */
.report-section {
    margin-bottom: 30px;
}

.report-section h4 {
    font-size: 1.2em;
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 10px;
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.loading.show {
    display: flex;
    opacity: 1;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #ffffff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading p {
    color: #ffffff;
    font-size: 16px;
    margin-top: 10px;
}

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

/* OCR结果容器样式 */
.ocr-result-container {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fff;
}

.ocr-render-view {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    background-color: #fff;
}

.ocr-render-view pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.ocr-edit-view {
    padding: 10px;
    background-color: #f5f5f5;
}

.ocr-edit-view textarea {
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px;
    border: 1px solid #ccc;
}

.ocr-toggle-btn {
    display: block;
    width: 100%;
    padding: 8px;
    text-align: center;
    background-color: #f0f0f0;
    border: none;
    border-top: 1px solid #ddd;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

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

/* Markdown样式 */
.ocr-render-view h1,
.ocr-render-view h2,
.ocr-render-view h3,
.ocr-render-view h4,
.ocr-render-view h5,
.ocr-render-view h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #2c3e50;
}

.ocr-render-view p {
    margin: 0.5em 0;
}

.ocr-render-view ul, 
.ocr-render-view ol {
    padding-left: 20px;
}

.ocr-render-view table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.ocr-render-view th, 
.ocr-render-view td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.ocr-render-view th {
    background-color: #f0f0f0;
}

/* 图片预览模态框样式 */
.image-preview-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
}

.close-modal {
    color: white;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

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

.modal-image {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

/* 鼠标悬停在图片上时显示可点击状态 */
.preview-item img {
    cursor: pointer;
    transition: transform 0.2s;
}

.preview-item img:hover {
    transform: scale(1.05);
}