body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f9f9fb;
    color: #333;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.canvas-container {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    background: #fff;
}

canvas {
    display: block;
    width: 100%;
    height: 800px;
    background-image: linear-gradient(rgba(240, 240, 248, 0.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 240, 248, 0.8) 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: #fff;
}



button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.instructions {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    color: #555;
    border-left: 4px solid #3498db;
}

.descriptions {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-left: 4px solid #3498db;
    border-right: 4px solid #3498db;
    justify-content: center; /* Centers content horizontally */
    align-items: center; /* Centers content vertically */
    text-align: center; /* Centers the text within elements */
}

.instructions h3 {
    margin-top: 0;
    color: #2c3e50;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 5px;
}

.node-style-picker {
    display: flex;
    align-items: center;
    margin-left: 20px;
    gap: 10px;
}

.node-color {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.node-color:hover {
    transform: scale(1.1);
}

.node-color.active {
    border-color: #2c3e50;
}

/* Custom text input for node label */
.custom-node-input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 10px;
}

.node-popup {
    position: absolute;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    max-width: 300px;
    z-index: 100;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    border-left: 4px solid #3498db; /* Default color, will be dynamically set */
    overflow: hidden;
}

.node-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, rgba(52, 152, 219, 0.7), rgba(52, 152, 219, 0.3));
}

.node-popup h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 8px;
}

.node-popup p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.node-popup-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    transform: rotate(45deg);
    left: -6px;
    top: 20px;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.07);
}