/* 自定义样式：补充Tailwind未覆盖的样式 */
/* 1. 避免页面内容被固定导航栏遮挡（导航栏高度是4rem=64px） */
body {
  padding-top: 4rem;
}

/* 2. 网站图标hover效果（鼠标放上去时名称变蓝） */
nav .flex.items-center a:hover span {
  color: #2563eb; /* Tailwind蓝色-600 */
  transition: color 0.2s ease; /* 平滑过渡 */
}

/* 3. 数据表格样式（参考cfOmics的表格，更清晰） */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb; /* 淡灰色边框 */
  text-align: left;
}

.data-table th {
  background-color: #f3f4f6; /* 浅灰色背景 */
  font-weight: 600;
  color: #1f2937; /* 深灰色文字 */
}

.data-table tr:hover {
  background-color: #f9fafb; /* 鼠标 hover 时淡灰色背景 */
}

/* 4. 按钮通用hover效果 */
.btn-hover {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* --- 2.GISTIC 模块整体容器 --- */
.gistic-section {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    margin-bottom: 50px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

/* --- Tab 按钮美化 --- */
.tabs-header {
    background: #f6f8fa;
    padding: 10px 10px 0 10px;
    border-bottom: 1px solid #d1d5da;
}

.tab-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #586069;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 4px;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #e1e4e8;
    color: #24292e;
}

.tab-btn.active {
    background: #fff;
    color: #0366d6;
    border-color: #d1d5da;
    position: relative;
    z-index: 1;
}

/* --- 表格专业化美化 --- */
.gistic-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.gistic-table th {
    background: #f8f9fa;
    color: #24292e;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 10px;
    border-bottom: 2px solid #e1e4e8;
    letter-spacing: 0.02em;
    text-align: left;
}

.gistic-table td {
    padding: 14px 10px;
    font-size: 13px;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

/* 斑马纹与悬停 */
.gistic-table tbody tr:nth-child(even) { background: #fafbfc; }
.gistic-table tbody tr:hover { 
    background-color: #f1f8ff !important; 
    cursor: pointer;
}

/* 选中行效果 */
.selected-row {
    background-color: #e8f4ff !important;
    outline: 2px solid #0366d6;
    outline-offset: -2px;
}

/* --- 频率标签 (Badges) --- */
.badge-info {
    background-color: none!important;
    color: inherit !important;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
}

/* --- 右侧详情面板美化 --- */
.portal-side {
    background: #ffffff;
    border-left: 1px solid #e1e4e8;
    padding: 25px;
    min-height: 500px;
    position: sticky;
    top: 20px;
}

.portal-side h5 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #24292e;
    border-bottom: 2px solid #0366d6;
    display: inline-block;
}

/* 基因标签优化 */
.gene-tag {
    background: #ffffff;
    color: #0366d6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #0366d6;
    font-weight: 500;
    transition: all 0.2s;
}

.gene-tag:hover {
    background: #0366d6;
    color: #fff;
}

/* 确保父容器是 Flex 布局 */
.portal-layout {
    display: flex;
    flex-direction: row; /* 水平排列 */
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

/* 左侧表格容器：占 70% 宽度，并允许内部横向滚动 */
.portal-main {
    flex: 0 0 70%; /* 固定 70% 宽度 */
    max-width: 70%;
    overflow-x: auto;
}

/* 右侧侧边栏：占 28% 宽度 */
.portal-side {
    flex: 0 0 28%; /* 固定 28% 宽度 */
    max-width: 28%;
    position: sticky;
    top: 20px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 强制表格内容对齐 */
.gistic-table {
    table-layout: fixed; /* 固定布局有助于对齐表头 */
    width: 100%;
}

.gistic-table th, .gistic-table td {
    text-align: left;
    padding: 12px 8px;
    overflow: hidden;
    text-overflow: ellipsis; /* 防止超长内容撑破对齐 */
}

/* 侧边栏内部的小表格样式 */
.gene-detail-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

.gene-detail-table th {
    background: #f1f8ff;
    padding: 8px;
    font-size: 13px;
    border-bottom: 2px solid #0366d6;
}

.gene-detail-table td {
    padding: 6px 8px;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

/* 确保基因列数据对对齐 */
.gistic-table th:nth-child(2), 
.gistic-table td:nth-child(2) {
    text-align: center; /* 或者 left，只要统一就行 */
    width: 80px; /* 给一个固定宽度防止偏移 */
}

/* 可视化图片放大区域的美化 */
/* 灯箱基础样式 */
.lightbox {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* 黑色半透明背景 */
    cursor: zoom-out;
}

/* 大图样式 */
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 4px;
    animation: zoomIn 0.3s;
}

/* 放大动画 */
@keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* 给原始图片添加悬停手势，提示可以点击 */
.fold-content img {
    cursor: zoom-in;
    transition: 0.3s;
}

.fold-content img:hover {
    opacity: 0.8;
}
/* 放大后的图片缩放 */
#imageLightbox {
    overflow: hidden; /* 防止缩放溢出 */
    cursor: zoom-out; /* 点击背景缩小的提示 */
}

#enlargedImg {
    transition: transform 0.1s ease-out; /* 让缩放过程有丝滑的动画感 */
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    user-select: none; /* 防止缩放时意外选中图片变蓝 */
    pointer-events: auto; /* 确保图片能接收到滚轮事件 */
}