/* Centering the Party and Node Sections */
.nodes-container-wrapper {
    display: flex;
    justify-content: center;  /* Center horizontally */
    padding: 20px;
}

.center-grid {
    width: 750px;  /* Use fit-content to size based on content */
    display: flex;
    gap: 20px; /* Space between Party and Node sections */
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

/* Pagination Styling */
.pagination-wrapper {
    display: flex;
    justify-content: center;  /* Center horizontally */
    align-items: center;  /* Align vertically */
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;  /* Ensure pagination can wrap into two rows */
}

.nodes-label {
    font-weight: bold;
    color: #fff;
    padding-right: 10px;  /* Add some space between label and pagination */
    padding-top: 15px;
}

/* Pagination links */
.pagination {
    display: grid;
    grid-template-columns: repeat(10, auto);  /* Two rows of 10 links */
    gap: 10px;
}

.page-link {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 10px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
}

.page-link:hover {
    background-color: rgba(0, 0, 0, 1);
}

.page-link.active {
    background-color: #555;  /* Different color for the active page */
}

/* Circle Grid Styling for Party Section */
.party-grid {
    display: grid;
    grid-template-columns: repeat(2, 80px); /* 2 columns, each 80px wide */
    grid-template-rows: repeat(3, 80px); /* 3 rows, each 80px high */
    gap: 20px; /* Space between the circles */
    justify-content: center; /* Center the grid horizontally */
}

/* Circle Grid Styling for Node Section */
.node-grid {
    display: grid;
    grid-template-columns: repeat(5, 80px); /* 5 columns, each 80px wide */
    grid-template-rows: repeat(5, 80px); /* 5 rows, each 80px high */
    gap: 20px; /* Space between the circles */
    justify-content: center; /* Center the grid horizontally */
}

/* Circle Styling */
.circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, #d3d3d3, #a9a9a9); /* Light grey to darker grey gradient */
    border: 2px solid #555; /* Dark border */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    display: flex;
    align-items: center;
    justify-content: center;
}

.animal-icon {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
}

.node-section {
    margin-left: auto;
}

/* Context Menu Styles */
.custom-context-menu {
    position: absolute;
    display: none;
    z-index: 1000;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    font-family: Arial, sans-serif;
    /* Remove overflow properties that might hide the submenu */
    overflow: visible;
}

.custom-context-menu .menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-context-menu .menu-item {
    padding: 10px 15px;
    cursor: pointer;
    white-space: nowrap;
    position: relative; /* Needed for submenu positioning */
}

.custom-context-menu .menu-item:hover {
    background: linear-gradient(90deg, #f0f0f0, #e0e0e0);
}

.custom-context-menu .menu-item.has-submenu::after {
    content: '▶';
    position: absolute;
    right: 15px;
    font-size: 12px;
}

.custom-context-menu .submenu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 0;
    display: none;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    padding: 10px;
    z-index: 1001;
}

.custom-context-menu .menu-item.has-submenu:hover .submenu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.custom-context-menu .submenu-item {
    padding: 5px;
    cursor: pointer;
    border-radius: 5px;
}

.custom-context-menu .submenu-item:hover {
    background-color: #f0f0f0;
}

.custom-context-menu .submenu-item span {
    display: inline-block;
    margin-left: 5px;
}

.custom-context-menu .submenu-item .node-number {
    font-weight: bold;
}

.node-creature-header {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.node-creature-image {
    width: 48px;
    height: 48px;
    margin-right: 20px; /* Space between image and name */
}