
body {
    margin: 0;
    background: #0a0e17;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#container {
    display: flex;
    flex-direction: column;
    height: 95vh;
}

#pageheader { text-align: center; background: transparent; padding: 5px; width: 100%; text-align: center;}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900; 
    background: linear-gradient(to right, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
    letter-spacing: 2px;
    margin: 0;
}

.game-subtitle {
    font-family: 'Montserrat', sans-serif;
    color: #a0a0a0;
    margin-top: 5px;
}

#graph-container {
    flex: 1;
    border: 2px solid #1a2236;
    border-radius: 10px;
    
    background: linear-gradient(0deg, #173341, #00080c);
    overflow: hidden;
    position: relative;
}

svg {
    width: 100%;
    height: 100%;
}

.node {
    cursor: move;
    transition: r 0.3s;
}

.node:hover {
    r: 35;
}

.node-drone {
    fill: url(#drone-gradient);
    stroke: #00ffff;
    stroke-width: 1;
}


.node-remote {
    fill: url(#remote-gradient);
    stroke: #ff00ff;
    stroke-width: 1;
}

.node-label {
    font-size: 10px;
    fill: white;
    text-anchor: middle;
    font-weight: bold;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.link {
    stroke: #4a5568;
    stroke-width: 1.5;
    stroke-opacity: 0.6;
}

.link:hover {
    stroke: #00ffaa;
    stroke-width: 2;
    stroke-opacity: 1;
}

/* 原始节点样式 - 降低优先级 */
.node circle {
    stroke-width: 2;
    stroke-opacity: 1;
}

/* 无人机节点 - 使用属性选择器降低优先级 */
circle[class*="node-drone"] {
    stroke: #00ffff;
}

/* 遥控器节点 - 使用属性选择器降低优先级 */
circle[class*="node-remote"] {
    stroke: #ff00ff;
}

/* 高亮状态 - 使用更具体的选择器 */
.node.highlighted > circle {
    stroke: #00ffaa !important;
    stroke-width: 4 !important;
    animation: pulse 1.5s infinite alternate;
}

/* 连接状态 */
.node.connected > circle {
    stroke: #ffaa00 !important;
    stroke-width: 3 !important;
}

/* 脉冲动画效果 */
@keyframes pulse {
    from {
        stroke-width: 3;
        stroke-opacity: 0.8;
    }
    to {
        stroke-width: 5;
        stroke-opacity: 1;
    }
}

/* 边的高亮 */
.link.highlighted {
    stroke: #00ffaa !important;
    stroke-width: 1 !important;
    stroke-opacity: 1 !important;
    animation: link-pulse 2s infinite;
}

@keyframes link-pulse {
    0%, 100% {
        stroke-width: 2;
        stroke-opacity: 0.8;
    }
    50% {
        stroke-width: 4;
        stroke-opacity: 1;
    }
}

#tooltip {
    position: absolute;
    padding: 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid #2d3748;
    border-radius: 6px;
    pointer-events: none;
    font-size: 12px;
    color: #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
    max-width: 300px;
    z-index: 100;
}

.tooltip-title {
    color: #00ffff;
    font-weight: bold;
    margin-bottom: 5px;
    border-bottom: 1px solid #2d3748;
    padding-bottom: 3px;
}

.tooltip-matches {
    color: #fff;
    font-size: 11px;
}

#controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.control-btn {
    padding: 8px 20px;
    background: linear-gradient(to right, #1a202c, #2d3748);
    color: #e2e8f0;
    border: 1px solid #4a5568;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
}

.control-btn:hover {
    background: linear-gradient(to right, #2d3748, #4a5568);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.2);
}


/* ===== 新的图例菜单样式 ===== */
#legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid #2d3748;
    border-radius: 10px;
    padding: 10px;
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.legend-title {
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #2d3748;
}

.menu-level {
    transition: all 0.3s ease;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 2px;
    margin: 2px;
    gap: 5px;
    background: rgba(42, 50, 66, 0.6);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

#brand-menu.expanded { }

#brand-menu:not(.expanded) .brand-item{ display: none !important; }

 

.menu-item:hover {
    background: rgba(56, 67, 89, 0.8);
    border-color: #4a5568;
    transform: translateX(5px);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.2), transparent);
    border-color: #00ffff;
}

.menu-item .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
}

.menu-item span {
    flex-grow: 1;
    color: #e2e8f0;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.count-badge {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    padding: 2px 4px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    min-width: 25px;
    text-align: center;
}

.all-color {
    background: linear-gradient(45deg, #00ffff, #ff00ff);
}

/* 二级菜单样式 */
.menu-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2d3748;
}

.back-btn {
    background: none;
    border: 1px solid #4a5568;
    color: #a0a0a0;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 10px;
    transition: all 0.3s;
}

.back-btn:hover {
    border-color: #00ffff;
    color: #00ffff;
}

.current-brand {
    color: #00ffff;
    font-weight: 600;
    font-size: 14px;
    flex-grow: 1;
}

.product-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* 产品项样式 */
.product-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin: 4px 0;
    background: rgba(42, 50, 66, 0.6);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.product-item:hover {
    background: rgba(56, 67, 89, 0.8);
    border-color: #4a5568;
    transform: translateX(5px);
}

.product-item::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.product-item.drone::before {
    background: #00ffff;
    box-shadow: 0 0 5px #00ffff;
}

.product-item.remote::before {
    background: #ff00ff;
    box-shadow: 0 0 5px #ff00ff;
}

.product-name {
    flex-grow: 1;
    color: #e2e8f0;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.product-type {
    color: #a0a0a0;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

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

.product-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.product-list::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 3px;
}

.tooltip-stats {
            margin-top: 8px;
            font-size: 12px;
            line-height: 1.5;
        }
        
        .tooltip-stats div {
            margin: 3px 0;
            color: #e2e8f0;
        }
        
        .tooltip-hint {
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid #2d3748;
            color: #00ffaa;
            font-size: 11px;
            font-style: italic;
        }
        
        .product-category {
            font-weight: 600;
            color: #00ffff;
            margin: 10px 0 5px 0;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .tooltip-content {
            padding: 5px 0;
        }
@media (max-width: 768px) {
        #legend {width: auto; } 
         
    } 