.sprotty-graph {
    height: 100%;
    width: 100%;
    background-color: #f5f5f5;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

text {
    stroke-width: 0;
    stroke: #333;
    fill: #333;
    text-anchor: middle;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
}

.sprotty-edge {
    fill: none;
    stroke: #555;
    stroke-width: 2px;
    transition: stroke-width 0.2s ease;
}

/* Node type color schemes with softer, more modern palette */
.project > .sprotty-node {
    fill: rgba(52, 152, 219, 0.1);
    stroke: #3498db;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.environment > .sprotty-node {
    fill: rgba(46, 204, 113, 0.1);
    stroke: #2ecc71;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.system > .sprotty-node {
    fill: rgba(155, 89, 182, 0.1);
    stroke: #9b59b6;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.entity > .sprotty-node {
    fill: rgba(243, 156, 18, 0.1);
    stroke: #f39c12;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.constraint > .sprotty-node {
    fill: rgba(231, 76, 60, 0.1);
    stroke: #e74c3c;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.heading > .sprotty-label {
    font-weight: 600;
    font-size: 16px;
    fill: #333;
    font-family: 'Poppins', Arial, sans-serif;
    letter-spacing: 0.5px;
    user-select: none;
    transition: fill 0.3s ease;
}

.sprotty-node:hover {
    filter: brightness(95%);
    cursor: pointer;
}

.sprotty-edge:hover {
    stroke-width: 3px;
    stroke: #333;
}

.sprotty-label {
    fill: #555;
    font-size: 14px;
    font-family: 'Poppins', Arial, sans-serif;
}

.arrowhead {
    fill: #333;
}

.sprotty-port {
    fill: #3498db;
    stroke: #ffffff;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.sprotty-icon {
    fill: #2ecc71;
    stroke-width: 0;
}

.sprotty-label.icon {
    fill: #ffffff;
}

.sprotty-node.selected {
    stroke-width: 3;
    filter: brightness(90%);
}

/* Context Menu Styling */
.class-context-menu {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
}

.class-context-menu-item {
    background-color: #ffffff;
    padding: 10px 15px;
    min-width: 150px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.class-context-menu-item:hover:not(.disabled-action) {
    background-color: #f1f3f5;
    color: #3498db;
}

.class-context-menu-item.disabled-action {
    color: #adb5bd;
    cursor: not-allowed;
}

.class-context-menu-item:empty {
    border-top: 1px solid #e9ecef;
    margin: 5px 10px;
    padding: 0;
}

/* Previous existing styles remain the same */

.sprotty-popup {
    position: absolute; /* Change from fixed to absolute */
    z-index: 1000;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 300px;
    transform: translate(-50%, -110%); /* Adjust vertical positioning */
}

.sprotty-popup-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: #333;
}

.sprotty-popup-title .fa {
    margin-right: 10px;
    color: #3498db;
}

.sprotty-popup-body {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.sprotty-popup-body p {
    margin-bottom: 10px;
}

.sprotty-hidden {
    position: absolute !important;
    visibility: hidden !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
