/* style.css */

/* banner样式 */
.banner-gradient {
    background: rgb(20, 70, 85, 0.1); /* 基础背景色 */
    position: relative;
    overflow: hidden;
}

.banner-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(133, 228, 228, 0.8) 0%, 
        rgba(51, 184, 173, 0.6) 25%, 
        rgba(74, 148, 190, 0.6) 50%, 
        rgba(51, 122, 216, 0.6) 75%, 
        rgba(242, 170, 245, 0.8) 100%);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.logo-container {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.text-container {
    flex: 1;
    min-width: 0;
}

.title-text {
    /* background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #cbd5e1 100%); */
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.description-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-weight: 300;
}

@media (max-width: 768px) {
    .logo-container img {
        width: 120px !important;
    }
    .title-text {
        font-size: 1.25rem !important;
    }
    .description-text {
        font-size: 0.75rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 640px) {
    .banner-container {
        padding: 12px 16px !important;
    }
    .banner-flex {
        gap: 12px !important;
    }
}
/* 基础样式 */
body {
    /* background: linear-gradient(135deg, #f0f7ff 0%, #f9fafb 100%); */
    background: linear-gradient(135deg, #f6f6f6 0%, #f6f6f6f6 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 卡片样式 */
.card {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border-radius: 12px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 输入框样式 */
.input-field {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.input-field:focus {
    border-color: #63b3ed;
    box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.25);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2b6cb0 0%, #2c5282 100%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #553c9a 0%, #805ad5 100%);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4a2c8a 0%, #6b46c1 100%);
    transform: translateY(-2px);
}

/* 调试面板样式 */
.debug-panel {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* 加载动画样式 */
.loading-spinner {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid #2c5282;
    border-radius: 50%;
    animation: spinner-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #2c5282 transparent transparent transparent;
}

.spinner-ring:nth-child(1) { animation-delay: -0.45s; }
.spinner-ring:nth-child(2) { animation-delay: -0.3s; }
.spinner-ring:nth-child(3) { animation-delay: -0.15s; }

@keyframes spinner-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 呼吸动画 */
@keyframes breathe {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.loading-spinner {
    animation: breathe 2s ease-in-out infinite;
}

#loading-message {
    animation: breathe 3s ease-in-out infinite;
}

/* 平滑过渡效果 */
.viewer-transition {
    transition: opacity 0.3s ease-in-out;
}

/*wenkang's settings*/
/********************************************************************/
/* 表格容器样式 */
td.wrap { 
    white-space: normal; 
    word-wrap: break-word; 
    max-width: 320px; 
}

/* 筛选按钮容器 */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    border: none;
    /* border-radius: 8px; */
    cursor: pointer;
    min-width: 150px;
    color: white;
    font-weight: 500;
    text-decoration: none;
    background: linear-gradient(135deg, #f8f8f89a 0%, #7cf3d9c4 100%);
}

/* Fanding's modify */
.filter-btn:hover {
    background: linear-gradient(135deg, #fff0ffc4 0%, #f861fdaf 100%);
}

.filter-btn.active {
    background: linear-gradient(135deg, #bfecf3 0%, #fcacff 100%);
}


/* .filter-btn.active {
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
} */

.btn-text {
    font-size: 1.1em;
    font-weight: 600;
}

.btn-count {
    font-size: 0.8em;
    opacity: 0.8;
    margin-top: 4px;
}

/* 控制面板样式 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.detail-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid #e2e8f0;
}

.detail-controls-left {
    display: flex;
    align-items: center;
}

.detail-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-controls .page-size-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-controls .page-jump {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-controls .pagination {
    margin: 0;
    display: flex;
    gap: 5px;
}

.page-size-control, .page-jump {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-control label, .page-jump label {
    font-weight: 500;
    color: #4a5568;
}

.page-size-control select, .page-jump select {
    padding: 4px 8px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.page-jump select {
    min-width: 80px;
}

.page-jump button {
    padding: 4px 12px;
    font-size: 0.9em;
}

.jump-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 2px;
}

.jump-input {
    border: none;
    outline: none;
    padding: 4px 6px;
    width: 60px;
    text-align: center;
    font-size: 0.9em;
}

.jump-input::-webkit-outer-spin-button,
.jump-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.jump-input[type=number] {
    -moz-appearance: textfield;
}

.page-info {
    font-size: 0.85em;
    color: #666;
    white-space: nowrap;
    padding: 0 4px;
}

.jump-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s ease;
}

.jump-btn:hover {
    background: #2c5282;
}

.jump-btn:active {
    background: #2a4365;
}

/* 分页按钮样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.pagination button {
    padding: 5px 10px;
    border: 1px solid #cbd5e0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4a5568;
    font-size: 0.9em;
}

.pagination button:hover {
    background: #e2e8f0;
    border-color: #a0aec0;
}

.pagination button.active {
    background: #3182ce;
    color: white;
    border-color: #3182ce;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-jump {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .jump-input-group {
        flex-direction: row;
        width: 100%;
        max-width: 200px;
    }
    
    .jump-input {
        flex: 1;
        min-width: 50px;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        min-width: 200px;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .pagination {
        justify-content: center;
    }
    
    .pagination button {
        padding: 8px 12px;
        margin: 2px;
    }

    .structure-section {
        padding: 15px;
    }
    
    .structure-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .structure-controls .btn-structure {
        width: 100%;
        text-align: center;
    }

    .protein-structure-side .structure-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .protein-structure-side .structure-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .protein-structure-side .btn-structure {
        flex: 1;
        text-align: center;
    }
    
    .protein-structure-side .structure-viewer {
        height: 300px;
    }

    .dual-structures-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .structure-section-compact {
        padding: 12px;
    }
    
    .structure-section-compact .structure-viewer {
        min-height: 200px;
    }
    
    .structure-section-compact .structure-controls {
        flex-direction: column;
        gap: 6px;
    }
    
    .structure-section-compact .btn-structure {
        width: 100%;
        text-align: center;
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .pdb-list-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
    }
    
    .pdb-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .pdb-metadata {
        flex-direction: column;
        gap: 4px;
    }
    
    .pdb-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .btn-pdb-view,
    .btn-pdb-download {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

@media (max-width: 1024px) {
    .protein-content-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .protein-structures-container {
        gap: 20px;
        grid-column: 1; /* 重置网格列 */
    }

    .protein-structure-side .structure-viewer {
        height: 400px; /* 在小屏幕上恢复原始高度 */
    }

    .dual-structures-container {
        flex-direction: row;
        gap: 12px;
    }
    
    .structure-half {
        flex: 1;
    }
    
    .structure-section-compact .structure-viewer {
        min-height: 200px;
    }
}


/* 筛选按钮悬停效果增强 */
.filter-btn:not(.active):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/* 清除可能的样式冲突 */
#items_protein, #items_compound, #items_disease, #items_go, #items_pathway, #items_phenotype {
  position: relative !important;
  z-index: 1 !important;
}

/* 确保没有多余的div */
.table-section div:empty {
  display: none !important;
}

.table-section {
  display: none;
  margin-bottom: 2rem;
  width: 100%;
}

.table-section.active {
  display: block !important;
}


/* 加载和错误状态样式 */
.table-loading,
.table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: #6b7280;
  font-size: 1rem;
  text-align: center;
  padding: 2rem;
}

.table-loading {
  background: #f8f9fa;
}

.table-empty {
  background: #fafafa;
}

.table-loading i,
.table-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #d1d5db;
}

.table-loading i {
  animation: spin 1s linear infinite;
}

.table-empty h3 {
  margin: 0 0 0.5rem 0;
  color: #6b7280;
  font-size: 1.25rem;
}

.table-empty p {
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

table.dataTable {
  /* display: none !important; */
  text-align: left;
}

/* Compound 结构展示样式 */
.compound-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 左右各占50% */
    gap: 2rem;
    margin-bottom: 0;
    min-height: 500px;
}

/* 左侧基础信息区域 */
.compound-basic-info-side {
    display: flex;
    flex-direction: column;
}

.compound-basic-info-side .info-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.compound-basic-info-side .info-section h4 {
    margin: 0 0 1.5rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.compound-basic-info-side .info-section h4 i {
    margin-right: 0.5rem;
    color: #4299e1;
}

.compound-basic-info-side .info-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compound-basic-info-side .info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.compound-basic-info-side .info-item label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.compound-basic-info-side .info-item .info-value {
    color: #2d3748;
    font-size: 0.95rem;
    word-break: break-all;
    line-height: 1.4;
}

.compound-basic-info-side .info-item .info-value.mono {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    background: #f7fafc;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* 右侧结构展示区域 */
.compound-structures-side {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.compound-structures-container {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 改为单列 */
    gap: 1rem;
    height: 100%;
    min-height: 500px;
}

.compound-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

/* QED模块在下方占整个宽度 */
.compound-qed-bottom {
    width: 100%;
    margin-top: 0rem;
}

/* SDF 查看器样式 */
.sdf-structure-section {
    height: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sdf-viewer {
    position: relative;
    flex: 1;
    min-height: 400px;
    background: #f8f9fa;
}

.sdf-container {
    height: 100%;
    width: 100%;
    min-height: 400px;
}

.sdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #718096;
}

.sdf-loading i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #48bb78;
}

.sdf-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    padding: 2rem;
    text-align: center;
}

.sdf-fallback .fallback-content {
    max-width: 300px;
}

.sdf-fallback .fallback-content i {
    display: block;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.sdf-fallback .fallback-content h4 {
    margin: 0 0 0.5rem 0;
    color: #4a5568;
    font-size: 1.1rem;
}

.sdf-fallback .fallback-actions {
    margin-top: 1.5rem;
}

.sdf-info {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
    font-size: 0.875rem;
    color: #4a5568;
}

.sdf-info p {
    margin: 0.25rem 0;
}

.sdf-info a {
    color: #4299e1;
    text-decoration: none;
}

.sdf-info a:hover {
    text-decoration: underline;
}

.sdf-hints {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.sdf-hints:hover {
    opacity: 1;
}

.sdf-structure-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    background: #f8f9fa;
    color: #718096;
    text-align: center;
    padding: 2rem;
}

.sdf-structure-placeholder .placeholder-content {
    max-width: 300px;
}

.sdf-structure-placeholder .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.sdf-structure-placeholder h4 {
    margin: 0 0 0.5rem 0;
    color: #4a5568;
}

.sdf-structure-placeholder p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.sdf-structure-placeholder ul {
    text-align: left;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.sdf-structure-placeholder li {
    margin: 0.25rem 0;
    font-size: 0.85rem;
}

/* QED药物特性模块样式 */
.qed-module {
    width: 100%;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qed-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid #e2e8f0;
}

.qed-module-header h4 {
    margin: 0;
    color: #1e40af;
    font-size: 1.1rem;
    font-weight: 600;
}

.qed-module-header i {
    margin-right: 0.5rem;
    color: #3b82f6;
}

.qed-module-info .btn-info {
    padding: 6px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: #ffffff;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qed-module-info .btn-info:hover {
    background: #f7fafc;
    border-color: #a0aec0;
}

.qed-info-panel {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.qed-info-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.5;
}

.qed-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.qed-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    transition: all 0.2s ease;
}

.qed-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.qed-card-main {
    grid-column: 1 / -1;
    border: 2px solid #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.qed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.qed-param-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
}

.qed-param-name i {
    margin-right: 0.5rem;
    color: #4299e1;
}

.qed-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qed-status-good {
    background: #d1fae5;
    color: #065f46;
}

.qed-status-warning {
    background: #fef3c7;
    color: #92400e;
}

.qed-status-poor {
    background: #fee2e2;
    color: #991b1b;
}

.qed-status-unknown {
    background: #f3f4f6;
    color: #374151;
}

.qed-card-body {
    padding: 1rem;
}

.qed-param-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.qed-score-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.qed-score-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.qed-score-percentage {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 500;
}

.qed-score-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.qed-score-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.qed-description {
    font-size: 0.875rem;
    color: #4a5568;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.qed-range {
    font-size: 0.8rem;
    color: #718096;
    margin: 0.5rem 0 0 0;
    font-weight: 500;
}

.qed-module-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 2rem;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    background: #f8f9fa;
    color: #718096;
    text-align: center;
    margin: 2rem 0;
}

.qed-module-placeholder .placeholder-content {
    max-width: 400px;
}

.qed-module-placeholder .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.qed-module-placeholder h4 {
    margin: 0 0 0.5rem 0;
    color: #4a5568;
}

.qed-module-placeholder p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.qed-module-placeholder ul {
    text-align: left;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.qed-module-placeholder li {
    margin: 0.25rem 0;
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .qed-cards-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .qed-card-main {
        grid-column: 1;
    }
    
    .qed-module-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .qed-score-value {
        font-size: 2rem;
    }
    
    .qed-param-value {
        font-size: 1.25rem;
    }
}

.structure-image-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;          /* 垂直居中 */
    justify-content: center;      /* 水平居中 */
    padding: 0.5rem;
    overflow: hidden;
    text-align: center;           /* 添加文本居中作为备用 */
}

.structure-image {
    max-width: calc(100% - 0.5rem);
    max-height: calc(100% - 0.5rem);
    width: auto;
    height: auto;
    min-height: 400px;
    /* border-radius: 4px; */
    box-shadow: 0 2px 8px rgb(255, 255, 255);
    user-select: none;
    display: block;               /* 确保图片是块级元素 */
    margin: 0 auto;              /* 添加自动边距作为备用居中方法 */
    object-fit: contain;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .compound-main-content {
        gap: 1.5rem;
    }
    
    .compound-structures-container {
        gap: 0.75rem;
    }
    
    .structure-viewer {
        min-height: 250px;
    }
    
    .structure-image-container {
        min-height: 220px;
    }
    
    .sdf-container {
        min-height: 220px;
    }
}

@media (max-width: 1024px) {
    .compound-main-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .compound-structures-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .structure-viewer {
        min-height: 200px;
    }
    
    .structure-image-container {
        min-height: 180px;
    }
    
    .sdf-container {
        min-height: 180px;
    }
    
    .btn-structure {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
}

.protein-content-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

.protein-basic-info {
    width: 100%;
    box-sizing: border-box;
}

.protein-structure-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: stretch;
    height: 100%;
}
/* 双结构展示容器 - 左右排列版本 */
.dual-structures-container {
    display: flex;
    flex-direction: row; /* 改为水平排列 */
    height: 100%; /* 确保占满父容器高度 */
    width: 100%; /* 确保占满父容器宽度 */
    gap: 10px; /* 结构之间的间距 */
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

.structure-half {
    flex: 1;
    min-height: 0; /* 允许flex子项缩小 */
    min-width: 0;  /* 防止内容溢出 */
    height: 100%;
}

.structure-section-compact {
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.structure-section-compact .structure-section-title {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.structure-section-compact .structure-section-title h4 {
    margin: 0;
    color: #2d3748;
    font-size: 0.85rem; /* 稍微缩小字体以适应左右布局 */
    font-weight: 600;
}


/* 紧凑版本的结构查看器 */
.structure-section-compact .protein-structure-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

.structure-section-compact .structure-header {
    padding: 4px 0; /* 减少内边距以适应左右布局 */
    margin-bottom: 4px;
}

.structure-section-compact .structure-header h4 {
    font-size: 0.85rem; /* 更小的字体 */
}

.structure-section-compact .structure-controls {
    gap: 2px; /* 减少按钮间距 */
    flex-wrap: wrap;
}

.structure-section-compact .btn-structure {
    padding: 2px 4px; /* 更小的按钮 */
    font-size: 0.65rem;
}

.structure-section-compact .structure-viewer {
    flex: 1;
    min-height: 160px; /* 稍微减少最小高度以适应左右布局 */
    height: auto;
    margin: 0;
}

.structure-section-compact .structure-info {
    margin-top: 4px;
    padding: 4px;
    font-size: 1.0rem; /* 更小的字体 */
}

/* 紧凑版本的占位符 */
.structure-section-compact .protein-structure-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px; /* 减少内边距 */
    margin: 0;
}

.structure-section-compact .placeholder-content {
    text-align: center;
}

.structure-section-compact .placeholder-icon {
    font-size: 1.5rem; /* 更小的图标 */
    margin-bottom: 6px;
}

.structure-section-compact .protein-structure-placeholder h4 {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.structure-section-compact .protein-structure-placeholder p {
    font-size: 0.7rem;
    margin-bottom: 6px;
}

/* 在线结构占位符的紧凑版本 */
.structure-section-compact .structure-online-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.structure-section-compact .structure-online-placeholder .placeholder-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.structure-section-compact .structure-online-placeholder h4 {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.structure-section-compact .structure-online-placeholder p {
    font-size: 0.7rem;
    margin-bottom: 8px;
}

.structure-section-compact .structure-online-placeholder .btn-primary {
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* 占位符样式 */
.protein-structure-placeholder {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px dashed #e2e8f0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.placeholder-content {
    color: #718096;
}

.placeholder-icon {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 15px;
}

.protein-structure-placeholder h4 {
    margin: 0 0 10px 0;
    color: #4a5568;
    font-size: 1.1rem;
}

.protein-structure-placeholder p {
    margin: 0 0 15px 0;
    color: #718096;
}

.placeholder-suggestions {
    background: #f7fafc;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    text-align: left;
}

.placeholder-suggestions p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #4a5568;
}

.placeholder-suggestions ul {
    margin: 0;
    padding-left: 20px;
    color: #718096;
}

.placeholder-suggestions li {
    margin-bottom: 5px;
}

.placeholder-suggestions a {
    color: #3182ce;
    text-decoration: underline;
}

.placeholder-suggestions a:hover {
    color: #2c5282;
}

.protein-structure-section {
    margin-top: 0;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
    position: relative; /* 确保不是绝对定位 */
}

.structure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.structure-header h4 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1rem;
}

.structure-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-structure {
    background: #4299e1;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
}

.btn-structure:hover {
    background: #3182ce;
}

.structure-viewer {
    width: 100%;
    height: 350px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    position: relative;
    overflow: hidden; /* 防止内容溢出 */
}

.structure-info {
    margin-top: 10px;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 4px;
    font-size: 1.0rem;
    color: #1e40af;
}

.structure-info a {
    color: #6366f1;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.536);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pdb-error {
    text-align: center;
    padding: 20px;
    background: #fed7d7;
    color: #c53030;
    border-radius: 6px;
    margin-top: 15px;
}

.pdb-error i {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.btn-structure-active {
    background: #4299e1 !important;
    box-shadow: 0 0 10px rgba(66, 153, 225, 0.5);
}

/* PDB结构列表样式 */
.pdb-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
}

.pdb-list-header {
    margin-bottom: 15px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #4299e1;
}

.pdb-summary {
    margin: 0;
    color: #4a5568;
    font-size: 0.95rem;
}

.pdb-summary strong {
    color: #2d3748;
}

.pdb-summary small {
    color: #718096;
    font-size: 0.85rem;
}

/* PDB列表布局 - 响应式优化 */
.pdb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 520px;
    height: 100%;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fafafa;
    flex: 1;
}

/* 网格视图 - 响应式网格 */
.pdb-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    max-height: 500px;
}

/* PDB项目样式 - 移动端优化 */
.pdb-item {
    display: flex;
    flex-direction: row;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 80px;
    align-items: flex-start;
}

.pdb-item:hover,
.pdb-item-hover {
    border-color: #4299e1;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.15);
    transform: translateY(-1px);
}

/* 缩略图区域 - 响应式尺寸 */
.pdb-thumbnail {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    margin-right: 10px;
    border-radius: 6px;
    overflow: hidden;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
}

.pdb-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

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

.pdb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(66, 153, 225, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: white;
    font-size: 1rem;
}

.pdb-item:hover .pdb-overlay {
    opacity: 1;
}

.pdb-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #edf2f7;
    color: #a0aec0;
    font-size: 0.7rem;
    text-align: center;
}

.pdb-thumb-placeholder i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

/* PDB详情区域 - 紧凑布局 */
.pdb-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; /* 防止flex项目溢出 */
}

.pdb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 4px;
}

.pdb-id {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.pdb-id a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pdb-id a:hover {
    color: #4299e1;
    text-decoration: underline;
}

.pdb-rank {
    background: #edf2f7;
    color: #4a5568;
    padding: 1px 4px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* 元数据样式 - 紧凑显示 */
.pdb-metadata {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 4px;
}

.pdb-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}

.meta-label {
    font-weight: 500;
    color: #718096;
    white-space: nowrap;
    min-width: 50px;
    flex-shrink: 0;
}

.meta-value {
    color: #2d3748;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 操作按钮 - 紧凑布局 */
.pdb-actions {
    display: flex;
    gap: 4px;
    margin-top: auto;
    flex-wrap: wrap;
}

.btn-pdb-view,
.btn-pdb-download {
    padding: 3px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid;
    white-space: nowrap;
}

.btn-pdb-view {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

.btn-pdb-view:hover {
    background: #3182ce;
    border-color: #3182ce;
}

.btn-pdb-download {
    background: white;
    color: #4a5568;
    border-color: #e2e8f0;
}

.btn-pdb-download:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

/* 网格视图特殊样式 */
.pdb-list-grid .pdb-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 12px;
}

.pdb-list-grid .pdb-thumbnail {
    width: 80px;
    height: 80px;
    margin-right: 0;
    margin-bottom: 8px;
}

.pdb-list-grid .pdb-details {
    width: 100%;
    align-items: center;
}

.pdb-list-grid .pdb-metadata {
    align-items: center;
    text-align: center;
}

.pdb-list-grid .pdb-actions {
    justify-content: center;
    width: 100%;
}

/* 滚动条样式 */
.pdb-list::-webkit-scrollbar {
    width: 6px;
}

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

.pdb-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.pdb-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
/* 按钮中的图标样式 */
.btn-structure i {
    margin-right: 4px;
    font-size: 0.8rem;
}

/* 自动补全样式 */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background-color: #f0f9ff;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-loading {
    padding: 12px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* 已选择项目的样式 */
.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 20px;
}

.selected-item {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.85rem;
    color: #1e40af;
    gap: 6px;
    max-width: 280px;
}

.selected-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.selected-item-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.selected-item-remove:hover {
    color: #dc2626;
}

/* 输入框激活状态 */
.autocomplete-input:focus {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.autocomplete-container.active .autocomplete-input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: #e2e8f0;
}

/* 实体类型标识 */
.entity-type-badge {
    font-size: 0.7rem;
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

/* 限制提示 */
.limit-warning {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 150px;
    }
    
    .selected-item {
        max-width: 200px;
        font-size: 0.8rem;
    }
}

/* 下方结构区域 - 保持原有设计 */
.protein-structures-bottom {
    width: 100%;
}

/* 蛋白质结构容器 - 左右分布 */
.protein-structures-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 450px;
    width: 100%;
}

/* 结构半区（左右） */
.structure-half {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.structure-half-left {
    /* PDB结构区域的特殊样式 */
}

.structure-half-right {
    /* D-I-TASSER结构区域的特殊样式 */
}

/* 紧凑版结构区域 */
.structure-section-compact {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 紧凑版结构标题 */
.structure-section-compact .structure-section-title {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.structure-section-compact .structure-section-title h4 {
    margin: 0;
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
}

/* 紧凑版结构内容 */
.structure-content-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 调整结构查看器在紧凑布局中的样式 */
.structure-content-compact .protein-structure-section {
    flex: 1;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    height: 100%;
}

.structure-content-compact .structure-header {
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.structure-content-compact .structure-header h4 {
    font-size: 0.9rem;
    color: #4a5568;
}

.structure-content-compact .structure-controls {
    gap: 4px;
    flex-wrap: wrap;
}

.structure-content-compact .btn-structure {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.structure-content-compact .structure-viewer {
    flex: 1;
    min-height: 300px;
    height: auto;
}

/* PDB列表在紧凑布局中的调整 */
.structure-content-compact .pdb-list-container {
    flex: 1;
    height: 100%;
    max-height: 360px;
}

.structure-content-compact .pdb-list {
    max-height: 300px;
    height: auto;
}

.structure-content-compact .pdb-list-header {
    margin-bottom: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.structure-content-compact .pdb-summary {
    font-size: 0.85rem;
}

/* 占位符在紧凑布局中的调整 */
.structure-content-compact .protein-structure-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    height: 100%;
    min-height: 300px;
}

.structure-content-compact .placeholder-content {
    text-align: center;
}

.structure-content-compact .placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #cbd5e0;
}

.structure-content-compact .protein-structure-placeholder h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #4a5568;
}

.structure-content-compact .protein-structure-placeholder p {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 10px;
}

/* ========== 响应式设计适配 ========== */

/* 平板端 (768px - 1023px) */
@media (max-width: 1023px) {
    .protein-structures-container {
        grid-template-columns: 1fr;
        gap: 16px;
        min-height: auto;
    }
    
    .structure-section-compact {
        padding: 12px;
    }
    
    .structure-content-compact .structure-viewer {
        min-height: 250px;
    }
    
    .structure-content-compact .pdb-list-container {
        max-height: 300px;
    }
    
    .structure-content-compact .protein-structure-placeholder {
        min-height: 250px;
    }
}

/* 移动端 (≤767px) */
@media (max-width: 767px) {
    .protein-structures-container {
        gap: 12px;
    }
    
    .structure-section-compact {
        padding: 8px;
    }
    
    .structure-content-compact .structure-viewer {
        min-height: 200px;
    }
    
    .structure-content-compact .pdb-list {
        max-height: 200px;
    }
    
    .structure-content-compact .btn-structure {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    .structure-section-compact .structure-section-title h4 {
        font-size: 0.9rem;
    }
    
    .structure-content-compact .protein-structure-placeholder {
        min-height: 200px;
        padding: 15px;
    }
}

/* 超小屏幕 (≤480px) */
@media (max-width: 480px) {
    .structure-content-compact .structure-viewer {
        min-height: 150px;
    }
    
    .structure-content-compact .protein-structure-placeholder {
        min-height: 150px;
        padding: 10px;
    }
    
    .structure-content-compact .placeholder-icon {
        font-size: 2rem;
    }
    
    .structure-content-compact .protein-structure-placeholder h4 {
        font-size: 0.9rem;
    }
    
    .structure-content-compact .protein-structure-placeholder p {
        font-size: 0.8rem;
    }
}

/* 确保原有的垂直布局样式不影响新布局 */
.protein-vertical-layout .structures-horizontal-container {
    /* 移除或重置可能冲突的样式 */
    display: none !important;
}

/* 确保新的水平容器正确显示 */
.protein-vertical-layout .protein-structures-container {
    display: grid !important;
}

/* 表格外部包裹容器，负责滚动 */
.final-table-wrapper {
    overflow: auto; /* 关键：让容器自身处理滚动 */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.final-table-scroll {
  overflow-y: auto;
}

/* 表格本身 */
.final-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* 让浏览器自动计算列宽 */
    border-spacing: 0;
}

/* 表头 */
.final-table-header {
    position: sticky;
    top: 0;
    z-index: 10;
    /* 背景色很重要，否则滚动的内容会透过来 */
    background: #f8f9fa; 
}

/* 表头单元格 */
.final-th {
    padding: 12px 10px;
    border-bottom: 2px solid #e2e8f0; /* 加强底部边框以示区分 */
    border-left: 1px solid #e2e8f0;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    background: #f8f9fa; /* 再次确保背景色 */
}
.final-th:first-child {
    border-left: none;
}

/* 表体单元格 */
.final-td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    vertical-align: top;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}
.final-td:first-child {
    border-left: none;
}

/* 表格行交替背景色 */
.final-tr-even {
    background-color: #ffffff;
}
.final-tr-odd {
    background-color: #f7fafc;
}

/* 悬停效果 */
.final-table-body tr:hover {
    background-color: #f0f9ff !important;
}

/* 单元格内的链接 */
.final-td a {
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
}
.final-td a:hover {
    text-decoration: underline;
    color: #2c5282;
}

/* 无数据时的单元格样式 */
.final-td-empty {
    padding: 0;
    text-align: center;
}

/* Pathway 图片查看器样式 */
.pathway-content-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.pathway-basic-info {
    display: flex;
    flex-direction: column;
}

.pathway-diagram-side {
    display: flex;
    flex-direction: column;
}

.pathway-diagram-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pathway-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e2e8f0;
}

.pathway-header h4 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
}

.pathway-header i {
    margin-right: 0.5rem;
    color: #48bb78;
}

.pathway-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-pathway {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    color: #4a5568;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-pathway:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
    transform: translateY(-1px);
}

.btn-pathway:active {
    transform: translateY(0);
}

.pathway-viewer {
    position: relative;
    min-height: 400px;
    max-height: 600px;
    background: #f8f9fa;
}

[id^="img-wrapper-"] {
    display: inline-block !important;
    line-height: 0;
    visibility: visible;
}

.pathway-image-container {
    height: 400px;
    overflow: hidden; /* 改为hidden，由JS控制滚动 */
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.pathway-image[src$=".svg"] {
    max-width: 800px;
    max-height: 600px;
    width: auto;
    height: auto;
}

.pathway-image {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    user-select: none; /* 防止选中图片 */
    pointer-events: auto;
}

/* 操作提示样式 */
.pathway-hints {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.pathway-hints:hover {
    opacity: 1;
}

/* 确保容器不被选中 */
.pathway-viewer {
    position: relative;
    min-height: 400px;
    max-height: 600px;
    background: #f8f9fa;
    user-select: none;
}

/* 禁用图片的默认拖拽行为 */
.pathway-image {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.pathway-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #718096;
}

.pathway-loading i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #48bb78;
}

.pathway-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    padding: 2rem;
    text-align: center;
}

.fallback-content {
    max-width: 300px;
}

.fallback-content i {
    display: block;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.fallback-content h4 {
    margin: 0 0 0.5rem 0;
    color: #4a5568;
    font-size: 1.1rem;
}

.fallback-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-fallback {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #4299e1;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.btn-fallback:hover {
    background: #3182ce;
    color: white;
}

.pathway-basic-info-full {
    width: 100%;
    margin-bottom: 2rem;
}

.pathway-diagram-bottom {
    width: 100%;
    margin-top: 1rem;
}

.pathway-info {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
    font-size: 0.875rem;
    color: #4a5568;
}

.pathway-info p {
    margin: 0.25rem 0;
}

.pathway-info a {
    color: #4299e1;
    text-decoration: none;
}

.pathway-info a:hover {
    text-decoration: underline;
}

.pathway-diagram-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    background: #f8f9fa;
    color: #718096;
    text-align: center;
    padding: 2rem;
}

.pathway-diagram-placeholder .placeholder-content {
    max-width: 300px;
}

.pathway-diagram-placeholder .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.pathway-diagram-placeholder h4 {
    margin: 0 0 0.5rem 0;
    color: #4a5568;
}

.pathway-diagram-placeholder p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.pathway-diagram-placeholder ul {
    text-align: left;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.pathway-diagram-placeholder li {
    margin: 0.25rem 0;
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pathway-content-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pathway-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pathway-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pathway-viewer {
        min-height: 300px;
        max-height: 400px;
    }
    
    .pathway-image-container {
        height: 300px;
        padding: 0.5rem;
    }
    
    .fallback-actions {
        flex-direction: column;
        align-items: center;
    }
}

/*wenkang's settings end */
/********************************************************************/


/* 自定义样式用于子图页面 */
.subgraph-container {
    min-height: 500px;
}

.graph-viewer {
    height: 600px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.control-panel {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
}

.relations-table-container {
    max-height: 500px;
    overflow-y: auto;
}

.search-section {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.stats-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    margin-right: 2rem;
    font-size: 0.9rem;
}

.stat-item i {
    margin-right: 0.5rem;
}

.query-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.depth-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.depth-slider {
    width: 120px;
}

.limits-toggle {
    cursor: pointer;
    transition: all 0.2s;
}

.limits-toggle:hover {
    background-color: #f1f5f9;
}