body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(45deg, #3a6186, #89253e);
    background-size: cover;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    display: flex;
    justify-content: center;
    width: 80%;
    max-width: 1400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 20px;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
}

.input-group {
    margin-bottom: 15px;
    text-align: center;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

input[type="number"],
textarea {
    width: 200px;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid #ddd;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

input[type="number"]:focus,
textarea:focus {
    border-color: #3a6186;
    box-shadow: 0 0 5px rgba(58, 97, 134, 0.5);
}

textarea {
    text-align: left;
}

.buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #3a6186;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 100px; /* Adjust the minimum width as needed */
}

button:hover {
    background-color: #2a5072;
}

button:active {
    background-color: #1f3a5b;
    transform: translateY(2px);
}

#graph {
    width: 800px;
    height: 800px;
    border: 1px solid #ccc;
    position: relative;
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
}

svg {
    width: 100%;
    height: 100%;
}

.nodes circle:hover {
    cursor: url('custom-cursor.svg') 16 16, auto; /* Custom cursor image with hotspot at 16,16 */
}

.nodes circle:active {
    cursor: url('custom-cursor.svg') 16 16, grabbing; /* Custom grabbing cursor image with hotspot at 16,16 */
}

.texts {
    pointer-events: none; /* Disable pointer events for text inside nodes */
    user-select: none; /* Disable text selection */
}

.algorithms-heading {
    margin-top: 20px;
    text-align: center;
}

.algorithms-heading h2 {
    font-size: 24px;
    color: #3a6186;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.algorithm-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.algorithm-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #3a6186;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.algorithm-buttons button:hover {
    background-color: #2a5072;
}

.algorithm-buttons button:active {
    background-color: #1f3a5b;
    transform: translateY(2px);
}

.highlight {
    stroke: #ff0000;
    stroke-width: 4px;
    transition: stroke 0.5s;
}