.page-shell {
    padding-top: 103px;
}


/* =========================
   ALL CATEGORIES HEADER BUTTONS
========================= */

/* Latest AI button */
.nav-actions .btn-ghost {
    border: 1px solid rgba(109, 93, 252, 0.28);
    background: rgba(109, 93, 252, 0.08);
    color: var(--text);
    box-shadow: 0 8px 20px rgba(11, 13, 18, 0.06);
}

.nav-actions .btn-ghost:hover {
    transform: translateY(-1px);
    background: rgba(109, 93, 252, 0.12);
    border-color: rgba(109, 93, 252, 0.42);
    box-shadow: 0 12px 24px rgba(109, 93, 252, 0.12);
}

.nav-actions .btn-ghost:active {
    transform: translateY(0);
}

/* Dashboard button */
.nav-actions .btn-solid {
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: var(--btn-solid-text);
    box-shadow: 0 12px 28px rgba(109, 93, 252, 0.24);
}

.nav-actions .btn-solid:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 14px 30px rgba(109, 93, 252, 0.30);
}

.nav-actions .btn-solid:active {
    transform: translateY(0);
}

/* focus */
.nav-actions .btn:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 3px rgba(109, 93, 252, 0.16),
        0 12px 28px rgba(109, 93, 252, 0.18);
}

/* dark mode */
@media (prefers-color-scheme: dark) {
    .nav-actions .btn-ghost {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.10);
        color: var(--text);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    }

    .nav-actions .btn-ghost:hover {
        background: rgba(255, 255, 255, 0.10);
        border-color: rgba(125, 95, 255, 0.34);
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
    }

    .nav-actions .btn-solid {
        color: var(--btn-solid-text);
    }
}


/* =========================
   ALL CATEGORIES TOP AREA
========================= */

.page-shell {
    padding-top: 93px;
}

.page-head {
    max-width: 1180px;
    margin: 0 auto 28px;
}

.page-cat-tag {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    margin: 0 auto 23px;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid rgba(109, 93, 252, 0.18);
    background: linear-gradient(135deg,
            rgba(109, 93, 252, 0.08),
            rgba(255, 122, 168, 0.04));
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(109, 93, 252, 0.06);
}

.page-title {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    font-family: var(--font-head);
    font-size: clamp(30px, 4.2vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.035em;
    font-weight: 800;
    color: var(--text);
}

.page-subtitle {
    max-width: 780px;
    margin: 14px auto 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted);
}

/* =========================
   FILTER BAR
========================= */

.filter-bar {
    margin-top: 26px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.filter-left {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 64px;
    border-radius: 20px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
        linear-gradient(135deg, rgba(109, 93, 252, 0.04), rgba(255, 122, 168, 0.03));
    box-shadow:
        0 14px 34px rgba(11, 13, 18, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    overflow: hidden;
}

.filter-left::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 0 0 6px rgba(109, 93, 252, 0.08);
    pointer-events: none;
}

.filter-left::after {
    content: "";
    position: absolute;
    left: 44px;
    top: 16px;
    bottom: 16px;
    width: 1px;
    background: rgba(17, 17, 17, 0.08);
}

.filter-input {
    flex: 1;
    min-width: 0;
    height: 64px;
    padding: 0 100px 0 64px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    box-shadow: none;
}

.filter-input::placeholder {
    color: rgba(11, 13, 18, 0.42);
}

.filter-left:focus-within {
    border-color: rgba(109, 93, 252, 0.26);
    box-shadow:
        0 18px 40px rgba(109, 93, 252, 0.08),
        0 0 0 4px rgba(109, 93, 252, 0.08);
}

.filter-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 42px;
    min-width: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(109, 93, 252, 0.16);
    background: linear-gradient(135deg,
            rgba(109, 93, 252, 0.08),
            rgba(255, 122, 168, 0.04));
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.filter-clear:hover {
    transform: translateY(-50%) translateY(-1px);
    border-color: rgba(109, 93, 252, 0.3);
    background: linear-gradient(135deg,
            rgba(109, 93, 252, 0.14),
            rgba(255, 122, 168, 0.08));
    box-shadow: 0 10px 22px rgba(109, 93, 252, 0.12);
}

.filter-right {
    display: flex;
    align-items: center;
}

.muted-chip,
#catCount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 0 20px;
    border-radius: 18px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: rgba(11, 13, 18, 0.72);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 12px 28px rgba(11, 13, 18, 0.05);
}

/* =========================
   DARK MODE
========================= */

@media (prefers-color-scheme: dark) {
    .page-cat-tag {
        border-color: rgba(155, 107, 255, 0.24);
        background: linear-gradient(135deg,
                rgba(109, 93, 252, 0.16),
                rgba(255, 122, 168, 0.08));
        color: #b9acff;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    }

    .filter-left {
        border-color: rgba(255, 255, 255, 0.1);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.04)),
            linear-gradient(135deg, rgba(109, 93, 252, 0.09), rgba(255, 122, 168, 0.05));
        box-shadow:
            0 14px 36px rgba(0, 0, 0, 0.34),
            inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .filter-left::after {
        background: rgba(255, 255, 255, 0.09);
    }

    .filter-input::placeholder {
        color: rgba(255, 255, 255, 0.42);
    }

    .filter-left:focus-within {
        border-color: rgba(155, 107, 255, 0.32);
        box-shadow:
            0 18px 42px rgba(0, 0, 0, 0.32),
            0 0 0 4px rgba(109, 93, 252, 0.12);
    }

    .filter-clear {
        border-color: rgba(155, 107, 255, 0.22);
        background: linear-gradient(135deg,
                rgba(109, 93, 252, 0.14),
                rgba(255, 122, 168, 0.07));
        color: #c4b7ff;
    }

    .filter-clear:hover {
        border-color: rgba(155, 107, 255, 0.34);
        background: linear-gradient(135deg,
                rgba(109, 93, 252, 0.2),
                rgba(255, 122, 168, 0.1));
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
    }

    .muted-chip,
    #catCount {
        border-color: rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.74);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
    .page-shell {
        padding-top: 96px;
    }

    .page-title {
        font-size: 34px;
        line-height: 1.1;
    }

    .page-subtitle {
        font-size: 15px;
        line-height: 1.65;
    }

    .filter-bar {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .filter-left {
        min-height: 56px;
        border-radius: 18px;
    }

    .filter-left::before {
        left: 18px;
        width: 10px;
        height: 10px;
    }

    .filter-left::after {
        left: 38px;
    }

    .filter-input {
        height: 56px;
        padding: 0 82px 0 56px;
        font-size: 15px;
    }

    .filter-clear {
        height: 38px;
        min-width: 38px;
        padding: 0 12px;
    }

    .muted-chip,
    #catCount {
        min-height: 50px;
        width: fit-content;
        padding: 0 16px;
        border-radius: 16px;
    }
}




/* =========================
   CATEGORY CARD BUTTONS + SCROLL
========================= */

/* top right: View tools (...) */
.cat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    white-space: nowrap;
}

.cat-pill:hover {
    transform: translateY(-1px);
    filter: brightness(1.08) saturate(1.1);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
}

/* bottom Open button */
/* bottom row: dots + open button */
.cat-open-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.cat-open-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.cat-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.cat-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 27px;
    padding: 0 13px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    transition: transform 0.2s cubic-bezier(.34, 1.56, .64, 1), filter 0.18s ease;
}

.cat-open:hover {
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.07);
}

.cat-open span {
    transition: transform 0.18s ease;
}

.cat-open:hover span {
    transform: translateX(3px);
}

/* tool external link icon */
.cat-tool-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    background: rgba(255, 255, 255, 0.82);
    transition: transform 0.18s ease, box-shadow 0.18s ease,
        border-color 0.18s ease, background 0.18s ease;
}

.cat-tool-link:hover {
    transform: translateY(-1px);
    border-color: rgba(109, 93, 252, 0.20);
    background: rgba(109, 93, 252, 0.08);
    box-shadow: 0 10px 18px rgba(109, 93, 252, 0.10);
}

.ext-ic {
    width: 16px;
    height: 16px;
    fill: currentColor;
    color: rgba(11, 13, 18, 0.58);
    transition: color 0.18s ease, transform 0.18s ease;
}

.cat-tool-link:hover .ext-ic {
    color: var(--primary);
    transform: scale(1.06);
}

/* thin scrollbar */
.cat-list-wrap {
    scrollbar-width: thin;
    scrollbar-color: rgba(109, 93, 252, 0.32) transparent;
}

.cat-list-wrap::-webkit-scrollbar {
    width: 6px;
}

.cat-list-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.cat-list-wrap::-webkit-scrollbar-thumb {
    background: rgba(109, 93, 252, 0.28);
    border-radius: 999px;
}

.cat-list-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(109, 93, 252, 0.42);
}

/* dark mode */
@media (prefers-color-scheme: dark) {
    .cat-pill {
        border-color: rgba(255, 110, 110, 0.18);
        background: linear-gradient(135deg,
                rgba(255, 92, 92, 0.14),
                rgba(255, 122, 168, 0.08));
        color: #ff8b8f;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    }

    .cat-pill:hover {
        border-color: rgba(255, 110, 110, 0.28);
        background: linear-gradient(135deg,
                rgba(255, 92, 92, 0.20),
                rgba(255, 122, 168, 0.10));
        color: #ff9da0;
    }

    .cat-tool-link {
        border-color: rgba(255, 255, 255, 0.10);
        background: rgba(255, 255, 255, 0.05);
    }

    .cat-tool-link:hover {
        border-color: rgba(155, 107, 255, 0.22);
        background: rgba(109, 93, 252, 0.14);
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.20);
    }

    .ext-ic {
        color: rgba(255, 255, 255, 0.62);
    }

    .cat-tool-link:hover .ext-ic {
        color: #c4b7ff;
    }

    .cat-list-wrap {
        scrollbar-color: rgba(155, 107, 255, 0.36) transparent;
    }

    .cat-list-wrap::-webkit-scrollbar-thumb {
        background: rgba(155, 107, 255, 0.34);
    }

    .cat-list-wrap::-webkit-scrollbar-thumb:hover {
        background: rgba(154, 107, 255, 0.244);
    }
}

/* =========================
   CATEGORY GRID — SKELETON + SHIMMER (initial load)
========================= */

.cat-card.cat-card--skeleton {
    pointer-events: none;
}

.cat-card.cat-card--skeleton:hover {
    transform: none;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.10);
}

body.theme-dark .cat-card.cat-card--skeleton:hover {
    box-shadow: var(--shadow-dark);
}

.cat-skel-bone {
    position: relative;
    overflow: hidden;
    background: rgba(11, 13, 18, 0.08);
    border-radius: 10px;
}

.cat-skel-bone::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-120%);
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.42) 45%,
            rgba(255, 255, 255, 0.08) 55%,
            transparent 100%);
    animation: catSkelShimmer 1.35s ease-in-out infinite;
}

@keyframes catSkelShimmer {
    100% {
        transform: translateX(120%);
    }
}

.cat-skel-ic-fill {
    width: 100%;
    height: 100%;
    min-height: 46px;
    border-radius: 14px;
}

.cat-skel-title {
    height: 18px;
    width: 72%;
    max-width: 220px;
    border-radius: 8px;
    margin: 0 0 8px;
}

.cat-skel-sub {
    height: 13px;
    width: 38%;
    max-width: 100px;
    border-radius: 6px;
    margin: 0;
}

.cat-skel-pill {
    width: 96px;
    height: 34px;
    border-radius: 9px;
    flex: 0 0 auto;
}

.cat-skel-list-wrap {
    min-height: 200px;
    padding: 10px 10px 14px;
}

.cat-skel-tool-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    border-radius: 12px;
}

.cat-skel-rank {
    width: 24px;
    height: 14px;
    border-radius: 6px;
    flex: 0 0 auto;
}

.cat-skel-tool-logo {
    width: 43px;
    height: 43px;
    border-radius: 9px;
    flex: 0 0 auto;
    padding: 0;
    display: block;
}

.cat-skel-name {
    flex: 1;
    min-width: 0;
    height: 14px;
    border-radius: 7px;
}

.cat-skel-link {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    flex: 0 0 auto;
}

.cat-skel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    padding: 0;
}

.cat-skel-open {
    width: 88px;
    height: 27px;
    border-radius: 999px;
}

.cat-card.cat-card--skeleton:nth-child(3n + 2) .cat-skel-bone::after {
    animation-delay: 0.12s;
}

.cat-card.cat-card--skeleton:nth-child(3n + 3) .cat-skel-bone::after {
    animation-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {

    .cat-skel-bone::after {
        animation: none;
        transform: none;
        opacity: 0;
    }
}

@media (prefers-color-scheme: dark) {
    .cat-skel-bone {
        background: rgba(255, 255, 255, 0.08);
    }

    .cat-skel-bone::after {
        background: linear-gradient(90deg,
                transparent 0%,
                rgba(255, 255, 255, 0.12) 45%,
                rgba(255, 255, 255, 0.04) 55%,
                transparent 100%);
    }
}

body.theme-dark .cat-skel-bone {
    background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .cat-skel-bone::after {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(196, 183, 255, 0.18) 45%,
            rgba(255, 255, 255, 0.06) 55%,
            transparent 100%);
}