:root {
    --primary-color: #2196F3;
    --hover-color: #1976D2;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Noto Sans SC', "Microsoft YaHei", sans-serif;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/90.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.page-title {
    color: white;
    font-size: 48px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 5px;
    margin: 0 0 15px;
    padding-bottom: 15px;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 20px;
}

.tab-buttons {
    display: flex;
    margin-bottom: 20px;
    position: relative;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    position: relative;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.tab-buttons::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background: #ddd;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-container {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-container.active {
    display: block;
    opacity: 1;
}

button[type="submit"] {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background: var(--hover-color);
}

/* 仪表板样式 */
.dashboard-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.report {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.action-button {
    display: inline-block;
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin: 5px;
}

.action-button:hover {
    background: var(--hover-color);
}

@media screen and (max-width: 768px) {
    .auth-container {
        margin: 0 15px;
        padding: 20px;
    }
    
    .page-title {
        font-size: 36px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
}

/* 确保基础样式正确 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

.login-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 医疗仪表板通用样式 */
.medical-dashboard {
    min-height: 100vh;
    background: rgba(245, 247, 250, 0.85);
    padding: 20px;
    position: relative;
    z-index: 1;
}

.dashboard-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-title {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.logout-button {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.logout-button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 医生上传表单样式 */
.upload-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.file-upload-area {
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    margin: 20px 0;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed rgba(33, 150, 243, 0.3);
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(33, 150, 243, 0.1);
}

.file-upload-area input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 40px;
    color: #666;
    margin-bottom: 10px;
}

.file-info {
    color: #666;
    font-size: 14px;
}

/* 患者报告列表样式 */
.report-list {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    padding: 20px;
}

.report-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0;
    height: auto;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.report-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.report-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-footer {
    padding: 15px;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doctor-name {
    color: var(--primary-color);
    font-weight: 500;
}

.report-date {
    color: #666;
    font-size: 14px;
}

.report-description {
    color: #333;
    margin: 10px 0;
}

/* 按钮样式优化 */
.action-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.primary-button {
    background: var(--primary-color);
    color: white;
    border: none;
}

.primary-button:hover {
    background: var(--hover-color);
    transform: translateY(-1px);
}

.secondary-button {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.secondary-button:hover {
    background: rgba(33, 150, 243, 0.05);
}

/* 调整卡片和表单的背景透明度 */
.dashboard-header,
.upload-form,
.report-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* 增强视觉层次 */
.dashboard-header {
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upload-form,
.report-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 优化标题样式 */
.dashboard-title {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 优化用户信息区域 */
.user-info {
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* 优化按钮样式 */
.logout-button {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.logout-button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 文件上传区域优化 */
.file-upload-area {
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed rgba(33, 150, 243, 0.3);
}

.file-upload-area:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: var(--primary-color);
}

/* 响应式优化 */
@media screen and (max-width: 768px) {
    .medical-dashboard {
        padding: 10px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .report-list {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .report-card {
        margin-bottom: 15px;
    }
}

/* 文件上传区域优化 */
.file-upload-container {
    margin: 20px 0;
    width: 100%;
}

.file-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--primary-color);
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
}

.file-upload-area:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: var(--hover-color);
}

/* 报告卡片优化 */
.report-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.report-content {
    flex: 1;
    overflow: hidden;
}

.report-image-container {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: 4px;
}

.report-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.report-image-container img:hover {
    transform: scale(1.02);
}

/* 下载按钮美化 */
.download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-button:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.download-icon {
    font-size: 18px;
}

.file-name {
    color: #666;
    font-size: 14px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 查看按钮样式 */
.view-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--hover-color);
    color: white;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.view-button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close {
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close:hover {
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
}

/* DICOM 容器样式优化 */
.dicom-container {
    width: 100%;
    height: 70vh;
    background: #000;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

/* 操作提示样式 */
.viewer-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    z-index: 10;
}

/* 诊断记录列表样式 */
.diagnosis-history {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.diagnosis-history h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 500;
}

.patient-name {
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

/* 优化报告卡片在医生界面的显示 */
.report-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.report-description {
    background: rgba(33, 150, 243, 0.05);
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

/* 时间显示优化 */
.report-date {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.report-date::before {
    content: '🕒';
    font-size: 16px;
}

.dicom-toolbar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.dicom-toolbar button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dicom-toolbar button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.zoom-controls {
    display: flex;
    gap: 5px;
}

/* 响应式布局优化 */
@media screen and (max-width: 1200px) {
    .report-list {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .report-list {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .report-card {
        margin-bottom: 15px;
    }
}

/* 修改报告列表为横向滚动 */
.report-list.horizontal {
    display: flex;
    flex-direction: row;
    gap: 20px;
    overflow-x: auto;
    padding: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* 修改报告卡片样式 */
.report-list.horizontal .report-card {
    flex: 0 0 400px; /* 固定宽度，不缩放 */
    scroll-snap-align: start;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 500px; /* 固定高度 */
}

/* 优化滚动条样式 */
.report-list.horizontal::-webkit-scrollbar {
    height: 8px;
}

.report-list.horizontal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.report-list.horizontal::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.report-list.horizontal::-webkit-scrollbar-thumb:hover {
    background: var(--hover-color);
}

/* 滚动提示样式 */
.scroll-hint {
    text-align: center;
    padding: 10px;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* 报告内容布局优化 */
.report-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.report-image-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.report-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 报告容器样式 */
.report-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
}

/* 横向报告列表样式 */
.report-list-horizontal {
    display: flex;
    flex-direction: row;
    gap: 30px;  /* 报告卡片之间的间距 */
    padding: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* 报告卡片样式 */
.report-card {
    flex: 0 0 400px;  /* 固定宽度，不缩放 */
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    scroll-snap-align: start;
    height: 500px;  /* 固定高度 */
}

/* 美化滚动条 */
.report-list-horizontal::-webkit-scrollbar {
    height: 8px;
}

.report-list-horizontal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.report-list-horizontal::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.report-list-horizontal::-webkit-scrollbar-thumb:hover {
    background: var(--hover-color);
}

/* 滚动提示样式 */
.scroll-hint {
    text-align: center;
    padding: 10px;
    color: #666;
    font-size: 14px;
    margin: 10px 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* 诊断文本框样式 */
.description-group {
    margin: 20px 0;
}

.diagnosis-textarea {
    width: 100%;
    min-height: 150px;  /* 增加高度 */
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;    /* 增大字体 */
    line-height: 1.5;   /* 增加行间距 */
    resize: vertical;    /* 允许垂直调整大小 */
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.diagnosis-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.diagnosis-textarea::placeholder {
    color: #999;
}

/* 添加 DICOM 预览样式 */
.dicom-preview {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
    border-radius: 4px;
    border: 1px dashed #ddd;
}

/* 优化图片容器样式 */
.report-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}