body {
    background-image: url('/static/images/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

/* 遮罩层：深色半透明覆盖 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: -1;
}


#network { 
    width: 100%; 
    height: calc(100vh - 60px); 
    background: transparent;
    position: relative;
    z-index: 1;
    overflow-x: auto; /* 添加横向滚动条 */
    overflow-y: hidden; /* 隐藏纵向滚动条 */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 当抽屉打开时，网络图容器宽度减少384px（抽屉宽度） */
.drawer:not(.drawer-hidden) ~ #network {
    width: calc(100% - 384px);
}
.pixelated { image-rendering: pixelated; }
.drawer { 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
}
.drawer-hidden { transform: translateX(100%); }

/* 网络事件增强效果 */
.vis-network {
    background: transparent !important;
}

/* 头部增强效果 */
header {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(75, 85, 99, 0.5);
}

/* Vis-Network tooltip 样式 - 仿照3d_main.html中的force-graph-tooltip样式 */
.vis-tooltip {
    background: rgba(54, 53, 53, 0.74) !important; /* 纯黑背景，高不透明度 */
    color: #eee9e9 !important; /* 纯白文字，最高对比度 */
    border: none !important; /* 移除边框 */
    border-radius: 0 !important; /* 移除圆角 */
    padding: 16px !important; /* 增加内边距 */
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    font-size: 12px !important; /* 增大字号 */
    box-shadow: none !important; /* 移除阴影 */
    max-width: 450px !important; /* 增加最大宽度 */
    min-width: 300px !important; /* 增加最小宽度 */
    word-wrap: break-word !important;
    white-space: normal !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
    line-height: 1.6 !important; /* 增加行高 */
    backdrop-filter: none !important; /* 移除模糊效果 */
    border-radius: 8px !important; /* 轻微圆角 */
    opacity: 1 !important;
}

/* 简化尖角 - 纯黑色 */
.vis-tooltip::before {
    content: '';
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-width: 8px !important; /* 增加尖角大小 */
    border-style: solid !important;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent !important; /* 纯黑色尖角 */
}

/* tooltip标题样式 - 简化 */
.vis-tooltip .tooltip-title {
    color: #ffffff !important; /* 纯白色 */
    font-weight: bold !important; /* 加粗 */
    margin-bottom: 14px !important; /* 增加边距 */
    font-size: 14px !important; /* 增大字号 */
    padding-bottom: 0 !important; /* 移除内边距 */
    border-bottom: none !important; /* 移除边框 */
}

/* 简化tooltip内容区域 */
.vis-tooltip .tooltip-simple {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important; /* 行间距 */
}

/* 简化行样式 */
.vis-tooltip .tooltip-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important; /* 元素间距 */
    font-size: 12px !important; /* 增大字号 */
    line-height: 0.9 !important; /* 增加行高 */
}

/* 简化标签样式 */
.vis-tooltip .tooltip-label {
    color: #9e9a9a !important; /* 浅灰色标签 */
    font-size: 14px !important; /* 增大字号 */
    font-weight: bold !important;
    min-width: 40px !important; /* 固定标签宽度 */
    
}

/* 简化值样式 */
.vis-tooltip .tooltip-value {
    color: #d1d5db !important; /* 浅灰色值 */
    font-size: 12px !important; /* 增大字号 */
    font-weight: normal !important; /* 正常粗细 */
}

/* 权重值特殊样式 - 简化 */
.vis-tooltip .tooltip-value.weight-value {
    color: #ffcc00 !important; /* 亮黄色，突出权重 */
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    font-size: 14px !important; /* 增大字号 */
    font-weight: bold !important; /* 加粗 */
}

/* 状态样式 */
.vis-tooltip .tooltip-status {
    color: #aaaaaa !important; /* 灰色状态 */
    font-size: 13px !important; /* 稍小字号 */
    font-style: italic !important; /* 斜体 */
}

/* 事件内容样式 - 简化 */
.vis-tooltip .tooltip-event-content {
    color: #ffffff !important; /* 纯白色 */
    font-size: 12px !important; /* 增大字号 */
    line-height: 1.4 !important; /* 增加行高 */
    background: none !important; /* 移除背景 */
    padding: 0 !important; /* 移除内边距 */
    border-radius: 0 !important; /* 移除圆角 */
    border: none !important; /* 移除边框 */
    max-height: none !important;
    overflow-y: visible !important;
    flex: 1 !important; /* 占据剩余空间 */
}

/* 节点呼吸动画 */
@keyframes nodePulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

/* 节点发光效果 */
@keyframes nodeGlow {
    0% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 15px currentColor, 0 0 25px currentColor; }
    100% { box-shadow: 0 0 5px currentColor; }
}

/* 高权重节点特殊效果 */
.high-weight-node {
    animation: nodePulse 3s ease-in-out infinite, nodeGlow 4s ease-in-out infinite;
    filter: brightness(1.2);
}

/* 中权重节点效果 */
.medium-weight-node {
    animation: nodePulse 4s ease-in-out infinite;
    filter: brightness(1.1);
}

/* 低权重节点效果 */
.low-weight-node {
    animation: nodePulse 5s ease-in-out infinite;
    filter: brightness(0.9);
}

/* 搜索面板样式 - 仿照3d_main.css */
#search-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* 搜索图标按钮 - 默认显示 */
.search-toggle {
    width: 48px;
    height: 48px;
    /* background: rgba(0, 0, 0, 0.7); */
    backdrop-filter: blur(10px);
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    /* border-radius: 50%; */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #60a5fa;
    font-size: 20px;
    font-weight: bold;
    /* margin-bottom: 1px; */
}

.search-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(96, 165, 250, 0.5);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.search-toggle:active {
    transform: scale(0.95);
}

/* 搜索表单容器 - 默认隐藏 */
.search-form-container {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    width: 350px;
    max-width: 90vw;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.search-form-container.expanded {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 搜索表单标题 */
.search-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.3);
}

.search-form-title {
    font-size: 14px;
    color: #60a5fa;
    font-weight: bold;
    letter-spacing: 1px;
}

.search-form-close {
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.search-form-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* 搜索输入组 */
.search-input-group {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 8px;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    height: 40px;
    margin-bottom: 10px;
}

.search-input-group:focus-within {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 2px 12px rgba(96, 165, 250, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.search-input {
    flex: 1;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: #e2e8f0;
    font-size: 13px;
    padding: 8px 12px;
    outline: none !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    height: 100%;
    backdrop-filter: blur(0);
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 强制消除所有状态下的背景和边框影响 */
.search-input,
.search-input:focus,
.search-input:active,
.search-input:hover,
.search-input:not(:placeholder-shown),
.search-input:valid,
.search-input:invalid,
.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover, 
.search-input:-webkit-autofill:focus {
    background-color: transparent !important;
    background: transparent !important;
    -webkit-box-shadow: 0 0 0px 1000px transparent inset !important; /* 消除自动填充的底色 */
    transition: background-color 5000s ease-in-out 0s; /* 减缓自动填充颜色的出现 */
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #e2e8f0 !important; /* 默认文字颜色 */
}

/* 焦点和有值状态文字颜色 */
.search-input:focus,
.search-input:not(:placeholder-shown) {
    color: #ffffff !important;
}

/* 自动填充状态文字颜色 */
.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover, 
.search-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #e2e8f0 !important; /* Webkit自动填充文字颜色 */
    color: #e2e8f0 !important;
}

.search-input::placeholder {
    color: #94a3b8;
    font-size: 12px;
    opacity: 0.7;
}

/* 隐藏 Chrome 等浏览器搜索框默认的清除和装饰 */
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
    display: none;
}

.search-select {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 12px;
    padding: 0 8px;
    margin: 0 4px;
    outline: none;
    cursor: pointer;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 4px center;
    background-repeat: no-repeat;
    background-size: 0.9em;
    padding-right: 20px;
    height: 100%;
    border-radius: 0;
}

.search-select:focus {
    color: #ffffff;
    background: transparent;
    box-shadow: none;
}

.search-select option {
    background-color: #1e293b;
    color: #cbd5e1;
}

.search-submit-button {
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
    font-size: 13px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: bold;
    width: 100%;
    margin-top: 5px;
}

.search-submit-button:hover {
    background: rgba(96, 165, 250, 0.3);
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
}

.search-submit-button:active {
    transform: translateY(0);
}

/* 搜索结果区域样式 */
.search-results {
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid rgba(96, 165, 250, 0.2);
    padding-top: 10px;
}

.search-empty {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 13px;
}

.empty-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-text {
    font-size: 12px;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(96, 165, 250, 0.1);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.result-title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.result-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.result-tag.贞 {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.result-tag.又贞 {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-tag.对贞 {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.result-node-id {
    font-size: 13px;
    color: #f8fafc;
    font-weight: bold;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-serial-id {
    font-size: 10px;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
}

.result-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.result-relevance,
.result-weight {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    white-space: nowrap;
}

.relevance-label,
.weight-label {
    color: #94a3b8;
    white-space: nowrap;
}

.relevance-value {
    color: #10b981;
    font-weight: bold;
}

.weight-value {
    color: #f59e0b;
    font-weight: bold;
}

.result-content {
    margin-bottom: 10px;
}

.result-event-tuple {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-tags {
    display: flex;
    gap: 6px;
}

.tag-block {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.result-actions {
    display: flex;
    justify-content: flex-end;
}

.result-action-btn {
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
    font-size: 11px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: bold;
}

.result-action-btn:hover {
    background: rgba(96, 165, 250, 0.3);
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
}

.result-action-btn:active {
    transform: translateY(0);
}

/* ===== TOOLTIP样式（仿照3D界面） ===== */

/* 覆盖 Vis-Network 默认容器样式 */
.vis-tooltip {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
}

/* 自定义 Tooltip 主容器 */
.vis-tooltip-custom {
    max-width: 500px !important;    /* 最大宽度 500px */
    max-height: 550px !important;   /* 最大高度 550px */
    overflow-y: auto !important;    /* 内容过多时允许滚动 */
    background: rgba(17, 24, 39, 0.95) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    padding: 16px;
    font-family: 'monospace';
}

/* 移动端tooltip优化 */
@media (max-width: 768px) {
    .vis-tooltip-custom {
        max-width: 70vw !important;    /* 移动端最大宽度为视口宽度的90% */
        max-height: 50vh !important;   /* 移动端最大高度为视口高度的60% */
        padding: 12px !important;
        font-size: 14px !important;
        /* margin: 80px !important; 加150px的margin，避免tooltip占据太多屏幕空间 */
    }
    
    .tooltip-node-id {
        font-size: 14px !important;
    }
    
    .tooltip-weight-row,
    .tooltip-abstract-row .value-abstract {
        font-size: 12px !important;
    }
}

/* 样式：node_id (标题感) */
.tooltip-node-id {
    color: #60a5fa; /* 亮蓝色 */
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid rgba(75, 85, 99, 0.5);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

/* 样式：serial_id (序列ID) */
.tooltip-serial-id {
    color: #94a3b8; /* 灰色 */
    font-size: 14px;
    margin-bottom: 12px;
    padding-left: 4px;
    font-family: 'monospace';
}

/* 样式：权重 (强调数字) */
.tooltip-weight-row {
    margin-bottom: 6px; /* 减少行距 */
    font-size: 13px;
    line-height: 1.3; /* 减少行高 */
}
.tooltip-weight-row .label {
    color: #94a3b8;
    font-weight: bold; /* 加粗 */
}
.tooltip-weight-row .value-weight {
    color: #f59e0b; /* 橙色强调权重 */
    font-weight: bold;
    margin-left: 4px;
}
.tooltip-weight-row .status-text {
    color: #10b981; /* 绿色状态 */
    margin-left: 6px;
    font-size: 11px;
}

/* 样式：内容摘要 (正文感) */
.tooltip-abstract-row .label {
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 2px; /* 减少间距 */
    font-weight: bold; /* 加粗 */
}
.tooltip-abstract-row .value-abstract {
    color: #e2e8f0; /* 接近白色的文字 */
    font-size: 13px;
    line-height: 1.4; /* 减少行高，更紧凑 */
    word-break: break-all;
    white-space: pre-wrap; /* 保留换行 */
}

/* 自定义滚动条 (适配深色主题) */
.vis-tooltip-custom::-webkit-scrollbar {
    width: 4px;
}
.vis-tooltip-custom::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

/* 确保tooltip-content-body的样式 */
.tooltip-content-body {
    display: flex;
    flex-direction: column;
    gap: 6px; /* 减少间距，更紧凑 */
}

/* ===== EasyMDE 暗黑主题适配 ===== */
.editor-toolbar {
    background-color: #1f2937 !important; /* bg-gray-800 */
    border-color: #374151 !important; /* border-gray-700 */
    border-radius: 6px 6px 0 0 !important;
}

.editor-toolbar button {
    color: #9ca3af !important; /* text-gray-400 */
}

.editor-toolbar button:hover, .editor-toolbar button.active {
    background-color: #374151 !important; /* hover:bg-gray-700 */
    color: #60a5fa !important; /* hover:text-blue-400 */
    border-color: transparent !important;
}

.editor-toolbar i.separator {
    border-left: 1px solid #374151 !important;
    border-right: none !important;
}

.CodeMirror {
    background-color: #111827 !important; /* bg-gray-900 */
    color: #d1d5db !important; /* text-gray-300 */
    border-color: #374151 !important; /* border-gray-700 */
    border-radius: 0 0 6px 6px !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
}

.CodeMirror-cursor {
    border-left: 2px solid #60a5fa !important; /* 光标颜色 */
}

.editor-preview, .editor-preview-side {
    background-color: #111827 !important;
    color: #d1d5db !important;
    border-color: #374151 !important;
}

.editor-statusbar {
    color: #6b7280 !important; /* text-gray-500 */
}

/* ===== 抽屉折叠/展开功能样式 ===== */
.drawer-collapsed {
    transform: translateX(384px) !important; /* 向右移动一个抽屉的距离 */
}

.drawer-collapse-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: 8px;
}

.drawer-collapse-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.drawer-expand-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #60a5fa;
    cursor: pointer;
    width: 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    transition: all 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.drawer-expand-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    width: 36px;
    box-shadow: -3px 0 15px rgba(96, 165, 250, 0.2);
}

.drawer-expand-btn.hidden {
    display: none;
}

/* 当抽屉折叠时，网络图向右移动一个抽屉的距离 */
.drawer-collapsed ~ #network {
    width: calc(100% - 384px) !important;
    transform: translateX(384px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 抽屉折叠时的背景透明度变化 */
.drawer-collapsed {
    background: rgba(17, 24, 39, 0.7) !important;
    backdrop-filter: blur(5px);
}

/* 移动端 header 折叠按钮 — 桌面端隐藏 */
#header-toggle {
    display: none;
}

@media (max-width: 768px) {
    /* 显示折叠按钮 */
    #header-toggle {
        display: flex;
        position: fixed;
        top: 8px;
        left: 8px;
        z-index: 9999;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.45);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: #60a5fa;
        font-size: 18px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        user-select: none;
        transition: background 0.2s;
    }
    #header-toggle:active {
        background: rgba(0, 0, 0, 0.7);
    }

    /* 移动端 header 默认隐藏（向上滑出屏幕） */
    header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 80px;
        z-index: 10000 !important;
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(17, 24, 39, 0.92) !important;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(75, 85, 99, 0.5);
        border-right: 1px solid rgba(75, 85, 99, 0.5);
        border-radius: 0 0 12px 0;
    }
    header.expanded {
        transform: translateY(0);
    }

    /* 移动端 #network 全屏 */
    #network {
        height: 100vh !important;
    }

    /* 移动端 header 内容缩小 */
    header span {
        font-size: 12px !important;
    }
}
