.network-container {
    position: relative;
    width: 90%;
    height: 75vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: auto;
}

#grnaNetwork {
    width: 100%;
    height: 100%;
}

/* 图例样式 */
.network-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.legend-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* 工具提示样式 */
.network-tooltip {
    position: absolute;
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.network-tooltip.visible {
    display: block;
}

.network-viewer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
}

.network-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 300px;
    pointer-events: auto;
    isolation: isolate;
}

.search-container {
    margin-bottom: 12px;
    position: relative;
    pointer-events: auto;
    display: flex;
    align-items: center;
    z-index: 1003;
}

.search-input {
    width: 100%;
    padding: 6px 30px 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: auto;
}

.clear-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 16px;
    line-height: 1;
    padding: 2px;
    display: none;
}

.clear-search:hover {
    color: #333;
}

.clear-search.visible {
    display: block;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
    display: none;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: auto;
    margin-top: 4px;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    isolation: isolate;
}

.search-result-item {
    padding: 6px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    pointer-events: auto;
    background: white;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: auto;
    position: relative;
    z-index: 1001;
}

.threshold-control {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.threshold-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    pointer-events: auto;
    background-color: #f9f9f9;
    transition: border-color 0.2s;
}

.threshold-input:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.apply-btn {
    padding: 4px 8px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
    pointer-events: auto;
}

.apply-btn:hover {
    background-color: #0b7dda;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 11px;
    color: #666;
    pointer-events: auto;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.edge-count {
    color: #2196F3;
    font-weight: bold;
}

.node-info-panel {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px;
    min-width: 200px;
    z-index: 1000;
    pointer-events: auto;
}

/* 全屏容器样式 */
.network-viewer.fullscreen {
    position: fixed;
    top: 60px; 
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    z-index: 1000;
    background-color: #fff;
}

/* 全屏模式下的控制面板 */
.fullscreen .network-controls {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 1001;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

/* 全屏按钮容器 */
.fullscreen-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

/* 全屏按钮 */
.fullscreen-btn {
    font-size: 14px;
    padding: 5px 10px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

/* 全屏按钮说明文本 */
.fullscreen-text {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* 阈值提示消息框 */
.threshold-message-box {
    display: none;
    padding: 5px 10px;
    background-color: #ffebee;
    color: #d32f2f;
    border-radius: 4px;
    font-size: 12px;
    transition: opacity 0.5s ease-in-out;
    white-space: nowrap;
    position: fixed;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: none;
}

/* 社群检测控制面板 */
.community-controls {
    display: none;  /* 隐藏社群检测控制面板 */
}

/* 社群检测算法选择 */
.community-algorithm-select {
    display: none;  /* 隐藏社群检测算法选择 */
}

/* 社群检测参数设置 */
.community-parameters {
    display: none;  /* 隐藏社群检测参数设置 */
}

/* 社群检测结果展示 */
.community-results {
    display: none;  /* 隐藏社群检测结果展示 */
}

/* 社区控制标题 */
.community-title {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

/* 社区控制按钮容器 */
.community-button-container {
    display: flex;
    gap: 8px;
}

/* 社区方法选择下拉框 */
.community-method-select {
    font-size: 12px;
    padding: 3px;
}

/* 社区检测按钮 */
.detect-communities-btn, .toggle-communities-btn {
    font-size: 12px;
    padding: 3px 6px;
}

/* 社区统计信息 */
.community-stats {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 社区富集分析模态框 */
.enrichment-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9999;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* 模态框关闭按钮 */
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* 模态框遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9998;
}

/* 富集分析标题 */
.enrichment-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2B4B6F;
}

/* 社区信息文本 */
.community-info {
    font-size: 14px;
    margin-bottom: 15px;
}

/* 富集分析表格样式 */
.enrichment-section {
    margin-bottom: 20px;
}

.enrichment-section-title {
    margin-bottom: 10px;
    color: #2B4B6F;
}

.enrichment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.enrichment-table th {
    text-align: left;
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

.enrichment-table th.numeric {
    text-align: center;
}

.enrichment-table td {
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.enrichment-table td.numeric {
    text-align: center;
}

/* 基因列表部分 */
.gene-list-section {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.gene-list-title {
    margin-bottom: 10px;
    color: #2B4B6F;
}

.gene-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.gene-item {
    background-color: #f0f0f0;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

/* 节点信息面板样式 */
.node-info-panel {
    position: absolute;
    background-color: #ffffff;
    border: 2px solid #2B4B6F;
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    min-width: 300px;
    max-width: 400px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1002;
}

.info-header h3 {
    font-size: 18px;
    margin: 8px 0;
    color: #2B4B6F;
}

.info-content {
    font-size: 14px;
    line-height: 1.5;
}

.info-content p, .related-nodes p {
    margin: 8px 0;
}

.related-nodes {
    margin-top: 10px;
    border-top: 1px solid #ddd;
    padding-top: 8px;
}

.related-nodes p {
    margin: 5px 0;
    font-weight: bold;
}

.related-nodes ul {
    margin: 5px 0;
    padding-left: 20px;
}

.related-nodes li {
    margin: 3px 0;
}

.related-path {
    color: #4CAF50;
}

/* 边信息面板样式 */
.edge-info-panel {
    position: absolute;
    background-color: #ffffff;
    border: 2px solid #2B4B6F;
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    min-width: 250px;
    z-index: 1002;
}

/* 无富集分析结果提示 */
.no-results {
    color: #666;
    font-style: italic;
}

/* 社区列表 */
.community-list {
    margin: 5px 0;
    padding-left: 20px;
}

/* 社区基因列表 */
.community-genes {
    font-weight: normal;
}

/* 富集分析按钮 */
.enrichment-btn {
    font-size: 10px;
    padding: 2px 4px;
    margin-left: 5px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.enrichment-btn:hover {
    background-color: #e0e0e0;
}

/* Filters Container */
.filters-container {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.filters-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.filter-group {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.filter-subgroup {
    margin-bottom: 10px;
}

.filter-subgroup:last-child {
    margin-bottom: 0;
}

.filter-input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    background-color: white;
    transition: border-color 0.2s;
}

.filter-input:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.filter-input::-webkit-inner-spin-button,
.filter-input::-webkit-outer-spin-button {
    opacity: 1;
    height: 20px;
}

.apply-btn {
    padding: 4px 8px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.apply-btn:hover {
    background-color: #0b7dda;
}

/* Hidden elements */
.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
} 