* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: aliceblue;
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

#network {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

#title {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    background: rgba(240, 248, 255, 0.9);
    padding: 6px 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
    white-space: nowrap;
}

#legend {
    position: absolute;
    top: 55px;
    left: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.6;
    min-width: 140px;
}

.legend-title {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
    color: #333;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.legend-instructions {
    margin-top: 8px;
    font-size: 11px;
    color: #666;
    border-top: 1px solid #ddd;
    padding-top: 6px;
    line-height: 1.4;
}

#right-panel {
    position: absolute;
    top: 55px;
    right: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px 16px;
    width: 240px;
    font-size: 13px;
    line-height: 1.5;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

#panel-title {
    font-weight: bold;
    font-size: 15px;
    color: #333;
    margin-bottom: 6px;
}

#panel-body {
    color: #555;
}

#panel-body .connection-list {
    margin-top: 8px;
    padding-left: 0;
    list-style: none;
}

#panel-body .connection-list li {
    padding: 3px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

#panel-body .connection-list li:last-child {
    border-bottom: none;
}

.connection-arrow {
    color: #999;
    font-weight: bold;
}
