/* Tooltip Styling */
.tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 0; /* Align tooltip with the top of the link */
    left: calc(100% + 12px); /* Position tooltip slightly to the right of the link with spacing */
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 20px;
    white-space: pre-wrap; /* Allow long text to wrap */
    z-index: 1500;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    max-width: 200px; /* Restrict tooltip width */
    overflow-wrap: break-word; /* Break long words */
}

/* Show Tooltip on Hover */
.menu a:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Tooltip Arrow */
.tooltip::after {
    content: '';
    position: absolute;
    top: 50%; /* Center arrow vertically with the tooltip */
    left: -5px; /* Position the arrow at the left edge of the tooltip */
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent rgba(0, 0, 0, 0.9) transparent transparent; /* Arrow pointing left */
}

/* Menu Styling */
.menu {
    position: relative; /* Needed for tooltip alignment */
    width: 250px; /* Fixed menu width */
    background-color: #575757;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.menu a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 8px 10px;
    background-color: #666;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: background-color 0.3s ease;
    position: relative; /* Required for tooltip to align correctly */
}

.menu a:hover {
    background-color: #888;
}
