body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #ecf0f1;
}

h1 {
    text-align: center;
    padding: 24px;
    margin: 0;
    background: #2c3e50;
    color: #ecf0f1;
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

#graph {
    width: 100vw;
    height: calc(100vh - 80px);
    border-top: 1px solid #444;
}

.node {
    cursor: pointer;
}

.node circle {
    stroke: #bdc3c7;
    stroke-width: 3px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.node text {
    font-size: 13px;
    font-weight: 600;
    text-anchor: middle;
    fill: #ecf0f1;
    pointer-events: none;
    user-select: none;
}

.link {
    stroke-opacity: 0.7;
    marker-end: url(#arrow);
}

.link-label {
    font-size: 28px;
    font-weight: 500;
    fill: #bbb;
    text-anchor: middle;
    pointer-events: none;
    background: rgba(44, 62, 80, 0.85);
    padding: 2px 6px;
    border-radius: 4px;
}

.legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #2c3e50;
    padding: 16px;
    border-radius: 12px;
    background-color: rgba(44, 62, 80, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    z-index: 10;
    border: 1px solid #444;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

#refresh {
    background-color: #34495e;
    color: #ecf0f1;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    margin-top: 10px;
}

#refresh:hover {
    background-color: #3f5872;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.legend-color {
    width: 20px;
    height: 4px;
    margin-right: 10px;
    border-radius: 2px;
}

#menu-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 35px;
    padding: 8px;
    cursor: pointer;
    z-index: 20;
    background: #2c3e50;
    border-radius: 8px;
    border: 1px solid #444;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

#menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #ecf0f1;
    border-radius: 2px;
}

.hidden {
    display: none;
}

.tooltip {
    position: absolute;
    background: #34495e;
    color: #ecf0f1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-width: 260px;
    line-height: 1.5;
}

.tooltip strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

#intervention-notice ul {
    margin: 5px 0 0 .8rem;
    list-style: circle;
    padding: 0;
}

#intervention-notice li {
    margin-bottom: 4px;
    cursor: pointer;
}

#intervention-notice li:hover {
    text-decoration: underline;
}