
.tools-page {
    --tool-bg: #080a0d;
    --tool-panel: #0e1116;
    --tool-panel-hover: #121720;
    --tool-border: rgba(255, 255, 255, .09);
    --tool-muted: #939ba8;
    --tool-text: #f0f3f8;
    --tool-accent: #e34b52;
    background: var(--tool-bg);
    color: var(--tool-text);
    min-height: 70vh;
    overflow: hidden;
}

.tools-container {
    width: min(1220px, calc(100% - 48px));
    margin: 0 auto;
}

.tools-hero {
    min-height: 480px;
    position: relative;
    display: flex;
    align-items: center;
    isolation: isolate;
    border-bottom: 1px solid var(--tool-border);
    background:
        radial-gradient(ellipse at 78% 35%, rgba(177, 34, 44, .15), transparent 38%),
        linear-gradient(135deg, #090b0f, #0d1016 65%, #080a0d);
}

.tools-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .2;
    pointer-events: none;
    background-image: linear-gradient(
        rgba(255, 255, 255, .035) 1px,
        transparent 1px
    ), linear-gradient(
        90deg,
        rgba(255, 255, 255, .035) 1px,
        transparent 1px
    );
    background-size: 48px 48px;
    mask-image: linear-gradient(to right, black, transparent 90%);
}

.tools-hero-content {
    position: relative;
    padding-top: 82px;
    padding-bottom: 76px;
    animation: tools-rise .7s ease both;
}

.tools-eyebrow,
.tools-kicker {
    color: #e46a70;
    font: 700 .72rem/1.5 monospace;
    letter-spacing: .14em;
}

.tools-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.tools-status-dot,
.tools-live-indicator span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e34b52;
    box-shadow: 0 0 12px rgba(227, 75, 82, .55);
}

.tools-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -.055em;
}

.tools-hero h1 span,
.tools-section-heading h2 span {
    color: #e35b62;
}

.tools-hero-content > p {
    max-width: 660px;
    margin: 24px 0;
    color: #a6afbc;
    font-size: 1rem;
    line-height: 1.85;
}

.tools-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 25px 0 30px;
    color: #b8c0cb;
    font-size: .8rem;
}

.tools-hero-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tools-hero-meta i {
    color: #e35b62;
}

.tools-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    padding: 14px 19px;
    border: 1px solid #e35b62;
    border-radius: 4px;
    color: #fff;
    background: #b92f39;
    text-decoration: none;
    font-size: .87rem;
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.tools-primary-btn:hover {
    transform: translateY(-3px);
    background: #d43b45;
    box-shadow: 0 9px 28px rgba(190, 42, 53, .2);
}

.tools-hero-decoration {
    position: absolute;
    right: 2%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    color: rgba(255, 255, 255, .045);
    pointer-events: none;
}

.tools-hero-decoration span {
    font-size: clamp(6rem, 17vw, 14rem);
    font-weight: 900;
    letter-spacing: -.1em;
}

.tools-hero-decoration small {
    color: #626a76;
    font: .68rem monospace;
    letter-spacing: .14em;
}

.tools-catalog {
    padding: 78px 0 84px;
}

.tools-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 35px;
}

.tools-section-heading h2 {
    margin: 13px 0;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -.045em;
}

.tools-section-heading p {
    max-width: 650px;
    color: var(--tool-muted);
    line-height: 1.75;
    margin: 0;
}

.tools-total {
    min-width: 175px;
    padding: 17px 20px;
    border: 1px solid var(--tool-border);
    background: rgba(255, 255, 255, .02);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tools-total strong {
    font-size: 2rem;
    line-height: 1;
}

.tools-total span {
    color: var(--tool-muted);
    font-size: .75rem;
}

.tools-controls {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}

.tools-search {
    flex: 1;
    min-width: 0;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 16px;
    border: 1px solid var(--tool-border);
    background: #0d1015;
    transition: border-color .2s ease;
}

.tools-search:focus-within {
    border-color: rgba(227, 75, 82, .7);
}

.tools-search > i {
    color: #e35b62;
}

.tools-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f0f3f8;
    font: inherit;
    font-size: .88rem;
}

.tools-search input::placeholder {
    color: #707987;
}

.tools-search kbd {
    border: 1px solid #343a44;
    border-radius: 3px;
    padding: 3px 7px;
    color: #87909e;
    font-size: .75rem;
}

.tools-sort {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 13px;
    border: 1px solid var(--tool-border);
    background: #0d1015;
}

.tools-sort span {
    color: var(--tool-muted);
    font-size: .76rem;
}

.tools-sort select {
    max-width: 170px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--tool-text);
    font: inherit;
    font-size: .8rem;
}

.tools-sort option {
    background: #10141a;
    color: white;
}

.tools-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 27px;
}

.tools-filter {
    padding: 9px 13px;
    border: 1px solid #272c35;
    border-radius: 3px;
    background: #0c0f13;
    color: #aab2bf;
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    transition: color .2s, border-color .2s, background .2s;
}

.tools-filter:hover,
.tools-filter.active {
    border-color: rgba(227, 75, 82, .65);
    color: #fff;
    background: rgba(190, 42, 53, .12);
}

.tools-results-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
    color: #8993a1;
    font-size: .75rem;
}

.tools-live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font: .65rem monospace;
    letter-spacing: .1em;
}

.tools-live-indicator span {
    width: 6px;
    height: 6px;
    background: #58c68a;
    box-shadow: 0 0 9px rgba(88, 198, 138, .4);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.tool-entry {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 23px;
    border: 1px solid var(--tool-border);
    background: linear-gradient(145deg, #101319, #0c0f13);
    opacity: 0;
    animation: tools-card-in .5s ease forwards;
    animation-delay: calc(min(var(--entry-index, 0), 10) * 35ms);
    transition: border-color .25s, transform .25s, background .25s;
}

.tool-entry:hover {
    transform: translateY(-5px);
    border-color: rgba(227, 75, 82, .5);
    background: var(--tool-panel-hover);
}

.tool-entry[hidden] {
    display: none;
}

.tool-entry-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.tool-entry-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(227, 75, 82, .2);
    background: rgba(227, 75, 82, .075);
    color: #e56a70;
    font-size: 1.2rem;
    transition: transform .25s;
}

.tool-entry:hover .tool-entry-icon {
    transform: rotate(-5deg) scale(1.06);
}

.tool-entry-index {
    color: #626b79;
    font: .75rem monospace;
}

.tool-entry-category {
    color: #e16a70;
    font: 700 .65rem/1.6 monospace;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.tool-entry h3 {
    margin: 9px 0 12px;
    overflow-wrap: anywhere;
    font-size: 1.25rem;
    line-height: 1.35;
}

.tool-entry-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ba5b3;
    font-size: .78rem;
    overflow-wrap: anywhere;
}

.tool-entry-author i {
    color: #6e7886;
}

.tool-entry-description {
    flex: 1;
    margin: 19px 0 23px;
    color: #a3adba;
    font-size: .86rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.tool-entry-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 17px;
    border-top: 1px solid var(--tool-border);
}

.tool-entry-source {
    color: #788391;
    font-size: .7rem;
}

.tool-entry-source i {
    margin-right: 5px;
}

.tool-entry-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f0787e;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.tool-entry-link i {
    transition: transform .2s;
}

.tool-entry-link:hover i {
    transform: translateX(4px);
}

.tools-empty,
.tools-no-results {
    grid-column: 1 / -1;
    padding: 60px 24px;
    border: 1px dashed #303641;
    text-align: center;
    background: rgba(255, 255, 255, .015);
}

.tools-empty-icon {
    margin-bottom: 20px;
    color: #e16a70;
    font-size: 2rem;
}

.tools-empty h3,
.tools-no-results h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.tools-empty p,
.tools-no-results p {
    max-width: 520px;
    margin: 0 auto;
    color: var(--tool-muted);
    line-height: 1.7;
    font-size: .88rem;
}

.tools-no-results > i {
    display: block;
    margin-bottom: 18px;
    color: #e16a70;
    font-size: 1.8rem;
}

.tools-no-results button {
    margin-top: 22px;
    padding: 11px 15px;
    border: 1px solid #754047;
    background: transparent;
    color: #f08b90;
    cursor: pointer;
}

.tools-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 34px;
    padding: 18px;
    border: 1px solid var(--tool-border);
    background: rgba(255, 255, 255, .018);
}

.tools-disclaimer > i {
    margin-top: 3px;
    color: #e16a70;
}

.tools-disclaimer p {
    margin: 0;
    color: #8993a1;
    font-size: .78rem;
    line-height: 1.8;
}

@keyframes tools-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes tools-card-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tools-hero-decoration {
        right: 0;
        opacity: .6;
    }

    .tools-hero-content {
        z-index: 1;
    }
}

@media (max-width: 640px) {
    .tools-container {
        width: min(100% - 30px, 1220px);
    }

    .tools-hero {
        min-height: auto;
    }

    .tools-hero-content {
        padding-top: 62px;
        padding-bottom: 58px;
    }

    .tools-hero h1 {
        font-size: clamp(2.4rem, 12vw, 3.6rem);
    }

    .tools-hero-content > p {
        font-size: .91rem;
    }

    .tools-hero-meta {
        flex-direction: column;
        gap: 12px;
    }

    .tools-hero-decoration {
        top: 15px;
        right: 10px;
        transform: none;
        opacity: .25;
    }

    .tools-hero-decoration span {
        font-size: 5rem;
    }

    .tools-catalog {
        padding: 52px 0;
    }

    .tools-section-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 22px;
    }

    .tools-total {
        min-width: 0;
    }

    .tools-controls {
        flex-direction: column;
    }

    .tools-search {
        min-height: 52px;
    }

    .tools-sort {
        min-height: 48px;
        justify-content: space-between;
    }

    .tools-sort select {
        max-width: 65%;
    }

    .tools-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tool-entry {
        padding: 20px;
    }

    .tools-results-line {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tools-page *,
    .tools-page *::before,
    .tools-page *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
