body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #f0f0f0;
    height: 100%;
    overflow: hidden;
}

html {
    height: 100%;
    overflow: hidden;
}

#visualization {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.node {
    cursor: pointer;
}

.node circle {
    fill: #666;
    stroke: #fff;
    stroke-width: 1.5px;
    transition: all 0.3s ease;
}

.node text {
    fill: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
}

.link {
    stroke: #999;
    stroke-opacity: 0.6;
    transition: all 0.3s ease;
}

/* Node glow effect */
.node-highlight circle {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
    fill: #ffffff;
    transform: scale(200%,200%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.node-highlight text {
    fill: #000000 !important;
    transform: scale(200%,200%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* First-order connection highlighting */
.link-highlight-first {
    stroke: #ffffff;
    stroke-opacity: 0.9;
    stroke-width: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.node-highlight-first circle {
    stroke: #ffffff;
    fill: #ff2600;
    stroke-width: 2.5px;
    transform: scale(125%,125%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.node-highlight-first text {
        transform: scale(125%,125%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Second-order connection highlighting */
.link-highlight-second {
    stroke: #ffffff;
    stroke-opacity: 0.4;
    stroke-width: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.node-highlight-second circle {
    stroke: #aaaaaa;
    stroke-width: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.node-highlight-second circle {
    fill: #ffffff50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dimmed nodes and links */
.node-dimmed circle {
    opacity: 0.2;
    fill: #666;
    transition: opacity 0.5s ease;
}

.node-dimmed text {
    color: #333;
    fill: #333;
    opacity: 0.1;
    transition: opacity 0.5s ease;
}

.link-dimmed {
    stroke-opacity: 0.1;
    transition: stroke-opacity 0.5s ease;
}

/* Tooltip for truncated nodes */
.tooltip-truncated {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
    pointer-events: none;
    font-size: 14px;
    max-width: 300px;
    z-index: 100;
    text-align: center;
    transform: translateX(-50%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#search-container {
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 10;
}
#search-input {
    padding: 8px;
    width: 250px;
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
}
#search-results {
    background-color: #333;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    width: 250px;
    display: none;
}
.search-result {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #555;
    color: #fff;
}
.search-result:hover {
    background-color: #444;
}

/* Media query for small containers */
@media (max-width: 500px) {
    #search-container {
        top: 10px;
        left: 10px;
    }
    
    #search-input {
        width: 180px;
        padding: 6px;
    }
    
    #search-results {
        width: 180px;
        max-height: 200px;
    }
}

/* Media query for very small containers */
@media (max-width: 300px) {
    #search-container {
        top: 5px;
        left: 5px;
    }
    
    #search-input {
        width: 120px;
        padding: 4px;
        font-size: 12px;
    }
    
    #search-results {
        width: 120px;
        max-height: 150px;
    }
    
    .search-result {
        padding: 6px;
        font-size: 12px;
    }
}
