main {
    margin-bottom: 100px;
}

.main-container {
    grid-template-columns: 200px 1fr;
    grid-template-areas:
        "left main"
        "left right";
}

.neuroset-similar {
    display: none;
}

.top-tools-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 0 auto;
    padding: 20px 20px 100px;
    color: white;
    border: 1px solid var(--line-color);
    border-bottom: none;
    border-left: none;
    border-top: none;
}

.top-tools-container h1 {
    width: 100%;
    text-align: center;
    margin-bottom: 0;
    margin-top: 0;
    font-size: calc(1.25rem + 1.2vw);
}

.tool-list-container {
    width: 20%;
    max-width: 300px;
    min-width: 285px;
    border: 2px solid rgba(155, 121, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.12);
    font-family: 'Times New Roman', serif;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
    transition: transform .18s ease, box-shadow .18s ease;
}

.tool-list-container h2 {
    text-align: center;
    font-size: 1.25rem;
    width: 80%;
    margin: 15px auto;
    position: relative;
    padding-bottom: 10px;
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-list-container h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(to right, var(--site-green), var(--fiolet));
}

.tool-list-container h2 img {
    height: 22px;
    aspect-ratio: 1/1;
}

.tool-list {
    list-style-type: none;
    counter-reset: list-counter 3;
    padding-left: 15px;
    margin-top: 25px;
    margin-bottom: 5px;
    font-size: 1.125rem;
}

.tool-item {
    position: relative;
    padding-left: 30px;
    padding-bottom: 10px;
}

.tool-item:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 6px;
    height: 1px;
    width: 90%;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease-in-out;
}

.tool-item:hover:hover::after {
    background: var(--site-green);
}

.tool-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    background-size: contain;
    background-repeat: no-repeat;
}

.tool-item:nth-child(1)::before {
    background-image: url('/static/neural/img/top-tool-icons/gold-medal.svg');
}

.tool-item:nth-child(2)::before {
    background-image: url('/static/neural/img/top-tool-icons/silver-medal.svg');
}

.tool-item:nth-child(3)::before {
    background-image: url('/static/neural/img/top-tool-icons/bronze-medal.svg');
}

.tool-item:nth-child(n+4) {
    counter-increment: list-counter;
    padding-left: 30px;
}

.tool-item:nth-child(n+4)::before {
    content: counter(list-counter) ".";
    background-image: none;
    position: absolute;
    left: 0;
    top: 0;
    padding-left: 8px;
}

.tool-item:nth-child(10)::before {
    padding-left: 0;
}

.tool-link {
    text-decoration: none;
    color: white;
    width: 90%;
    text-wrap: nowrap;
}

.tool-text {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 44px;
}

.link-icon-img {
    width: 22px;
    height: 22px;
    position: absolute;
    right: 22px;
    top: -2px;
}

.tool-item.empty {
    position: relative;
    padding-left: 30px;
    padding-bottom: 10px;
    height: 31px;
}

.tool-item.empty:before {
    content: "";
}

.tool-item.empty:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 6px;
    height: 1px;
    width: 90%;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease-in-out;
}

/*.tool-item.empty:hover:hover::after {*/
/*    background: rgba(255, 255, 255, 0.1);*/
/*}*/

.link-more {
    display: block;
    text-align: center;
    text-decoration: none;
    width: 90%;
    font-size: 1.25rem;
    font-weight: bold;
    padding: 12px;
    margin: 0 auto 10px;
    color: white;
    border: 1px solid #653dff;
    border-radius: 12px;
    background: rgba(26, 23, 56, 1);
    box-sizing: border-box;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 4px rgba(101, 61, 255, 0.5),
        0 0 8px rgba(101, 61, 255, 0.3),
        inset 0 0 4px rgba(101, 61, 255, 0.2);
}

.link-more:hover {
    background: rgba(26, 23, 56, 0.9);
    animation: pulse 2s infinite;
}


.top-tools-container .tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translate(10px, -50%) scale(1);
    min-width: 250px;
    max-width: 380px;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(20,16,46,0.98), rgba(16,12,40,0.96));
    color: #f7f7fb;
    border-radius: 10px;
    box-shadow:
    0 6px 18px rgba(4,4,10,0.6),
    0 0 28px rgba(101,61,255,0.08);
    border: 1px solid rgba(155,121,255,0.18);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.35;
    display: none;
    z-index: 1200;
    word-wrap: break-word;
    white-space: normal;
    hyphens: auto;
    pointer-events: auto;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.top-tools-container .tooltip::before{
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    background: inherit;
    left: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: -1px 1px 6px rgba(4,4,10,0.25);
    border-left: 1px solid rgba(155,121,255,0.18);
    border-top: 1px solid rgba(255,255,255,0.02);
}

.top-tools-container .tool-item:hover .tooltip,
.top-tools-container .tool-item:focus-within .tooltip,
.top-tools-container .tool-item.show-tooltip .tooltip {
    display: block;
    animation: tt-fade .5s ease-out;
}

.top-tools-container .tooltip.flipped {
    left: auto;
    right: 100%;
    transform: translate(-10px, -50%) scale(1);
}

.top-tools-container .tooltip.flipped::before {
    left: auto;
    right: -6px;
    box-shadow: 1px 1px 6px rgba(4,4,10,0.25);
}

@keyframes pulse {
    0% {
        box-shadow:
            0 0 8px rgba(101, 61, 255, 0.8),
            0 0 16px rgba(101, 61, 255, 0.5),
            inset 0 0 8px rgba(101, 61, 255, 0.4);
    }
    50% {
        box-shadow:
            0 0 12px rgba(101, 61, 255, 1),
            0 0 24px rgba(101, 61, 255, 0.7),
            inset 0 0 12px rgba(101, 61, 255, 0.6);
    }
    100% {
        box-shadow:
            0 0 8px rgba(101, 61, 255, 0.8),
            0 0 16px rgba(101, 61, 255, 0.5),
            inset 0 0 8px rgba(101, 61, 255, 0.4);
    }
}

@media (max-width: 1023px) {
    .top-tools-container h1 {
        margin-bottom: 0;
    }
    .top-tools-container {
        row-gap: 25px;
    }
}

@media screen and (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "left"
            "right";
    }
    .top-tools-container .tooltip {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        top: auto !important;
        bottom: 12px !important;
        transform: translateX(-50%) translateY(-50%) !important;
        width: auto;
        max-width: 95%;
        box-sizing: border-box;
      }
    .top-tools-container .tooltip::before {
      display: none;
    }
}