:root {
    --font: 'Space Grotesk', 'Segoe UI', sans-serif;
    --bg-color: #0b0b0e;
    --panel: #0e0e12;
    --card-bg: #131317;
    --card-bg-hover: #17171d;
    --text-color: #eeeef5;
    --muted: rgba(238, 238, 245, 0.48);
    --muted-soft: rgba(238, 238, 245, 0.28);
    --accent: #5b8def;
    --accent-hover: #4a7de0;
    --border: rgba(255, 255, 255, 0.07);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    background: var(--bg-color);
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font);
    line-height: 1.5;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(91, 141, 239, 0.55) !important;
}

.container {
    width: min(100%, 1200px);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: 56px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}

.site-header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.brand-mark img {
    width: 30px;
    height: 30px;
    display: block;
}

.header-search {
    position: relative;
    display: flex;
    flex: 1;
    width: min(100%, 460px);
    max-width: 460px;
}

.header-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-soft);
    pointer-events: none;
}

.header-search input {
    width: 100%;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    padding: 0 14px 0 36px;
    font-size: 13px;
    transition: border-color 0.15s;
}

.header-search input::placeholder {
    color: rgba(238, 238, 245, 0.25);
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 250;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.search-results a,
.search-results .search-empty {
    display: block;
    padding: 12px 14px;
}

.search-results a {
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-results a:last-child {
    border-bottom: 0;
}

.search-results a:hover {
    background: var(--card-bg-hover);
}

.search-result-name {
    display: block;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
}

.search-result-meta {
    display: block;
    margin-top: 3px;
    color: var(--muted-soft);
    font-size: 11px;
}

.search-empty {
    color: var(--muted-soft);
    font-size: 13px;
}

.browse-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.browse-sidebar {
    width: 232px;
    min-width: 232px;
    height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
    overflow-y: auto;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 22px 0 48px;
}

.sidebar-label {
    padding: 0 18px 10px;
    color: var(--muted-soft);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.6px;
}

.sidebar-link,
.popular-link {
    text-decoration: none;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 18px;
    color: rgba(238, 238, 245, 0.52);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.12s, color 0.12s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
}

.sidebar-link.active {
    color: var(--accent);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.sidebar-link span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-link span:last-child {
    flex-shrink: 0;
    min-width: 28px;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted-soft);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.sidebar-link.active span:last-child {
    background: rgba(91, 141, 239, 0.18);
    color: var(--accent);
}

.sidebar-separator {
    height: 1px;
    margin: 22px 18px 18px;
    background: var(--border);
}

.popular-link {
    display: block;
    padding: 7px 18px;
    color: rgba(238, 238, 245, 0.4);
    font-size: 13px;
    line-height: 1.35;
    transition: color 0.12s;
}

.popular-link:hover {
    color: var(--text-color);
}

.browse-main {
    flex: 1;
    min-width: 0;
}

.stats-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.stats-bar div {
    min-width: 132px;
    padding: 20px 32px;
    border-right: 1px solid var(--border);
}

.stats-bar strong {
    display: block;
    color: var(--text-color);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.stats-bar .accent-word {
    color: var(--accent);
}

.stats-bar span {
    display: block;
    margin-top: 3px;
    color: var(--muted-soft);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.browse-content {
    padding: 32px;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading.compact {
    margin-top: 42px;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.section-heading h2 {
    font-size: 18px;
}

.section-heading p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.section-heading > span,
.section-heading > a {
    color: var(--muted-soft);
    font-size: 13px;
    white-space: nowrap;
}

.section-heading > a {
    color: var(--accent);
    text-decoration: none;
}

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

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

.list-tile {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.list-tile:hover {
    background: var(--card-bg-hover);
    border-color: rgba(91, 141, 239, 0.35);
    transform: translateY(-2px);
}

.list-tile h3 {
    margin: 0 0 8px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.list-tile p {
    margin: 0;
    color: rgba(238, 238, 245, 0.4);
    font-size: 12px;
    line-height: 1.6;
}

.tile-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tile-meta span:first-child {
    color: rgba(238, 238, 245, 0.22);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.9px;
}

.tile-meta span:last-child {
    color: rgba(91, 141, 239, 0.75);
    font-size: 14px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 80px 0;
    color: var(--muted-soft);
    text-align: center;
}

.breadcrumb {
    margin-bottom: 28px;
    color: var(--muted-soft);
    font-size: 13px;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb li::after {
    content: "›";
    color: rgba(238, 238, 245, 0.2);
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    color: rgba(238, 238, 245, 0.4);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb span[aria-current="page"] {
    color: rgba(238, 238, 245, 0.72);
    font-weight: 500;
}

.tool-page {
    width: min(100%, 768px);
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.tool-heading {
    margin-bottom: 32px;
}

.tool-title {
    margin: 0 0 10px;
    color: var(--text-color);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
}

.tool-intro {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.related-tools {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.related-tools h2 {
    margin: 0 0 16px;
    color: var(--muted-soft);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-list a {
    padding: 9px 16px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(238, 238, 245, 0.55);
    font-size: 13px;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.related-list a:hover {
    border-color: rgba(91, 141, 239, 0.35);
    color: var(--text-color);
}

.site-footer {
    padding: 22px 24px 28px;
    background: var(--panel);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-bottom: 10px;
}

.footer-links a,
.copyright {
    color: rgba(238, 238, 245, 0.4);
    font-size: 13px;
}

.footer-links a {
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-color);
}

.copyright {
    margin: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 0;
}

.pagination-link {
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.pagination-link:hover,
.pagination-link.active {
    border-color: rgba(91, 141, 239, 0.35);
    color: var(--text-color);
}

.pagination-link.active {
    background: rgba(91, 141, 239, 0.18);
    color: var(--accent);
}

.dots {
    color: var(--muted-soft);
}

.info,
.site-main {
    width: min(100%, 900px);
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.info h1,
.info h2 {
    color: var(--text-color);
}

.info p,
.info li,
.text-block {
    color: var(--muted);
}

.info h1 {
    margin: 0 0 14px;
    font-size: 32px;
    line-height: 1.15;
}

.info h2 {
    margin: 34px 0 12px;
    font-size: 18px;
    line-height: 1.3;
}

.info p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.75;
}

.info ul,
.info ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.info li {
    margin-bottom: 6px;
    line-height: 1.65;
}

.legal-page {
    max-width: 780px;
}

.page-updated {
    color: var(--muted-soft) !important;
    font-size: 13px !important;
}

.home-seo,
.home-faq {
    margin-top: 44px;
}

.home-seo {
    max-width: 820px;
}

.home-seo h2,
.home-faq h2 {
    margin: 0 0 16px;
    color: var(--text-color);
    font-size: 20px;
}

.home-seo p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.text-center {
    text-align: center;
}

.w-100 {
    width: 100%;
}

.d-flex {
    display: flex;
}

.jcc {
    justify-content: center;
}

.mt-0 {
    margin-top: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-3 {
    margin-bottom: 3rem !important;
}

.mt-3 {
    margin-top: 3rem !important;
}

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

@media (max-width: 780px) {
    .site-header {
        height: auto;
    }

    .site-header-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px;
    }

    .header-search {
        width: 100%;
    }

    .browse-layout {
        display: block;
    }

    .browse-sidebar {
        position: static;
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding: 16px 0;
    }

    .stats-bar {
        overflow-x: auto;
    }

    .stats-bar div {
        min-width: 118px;
        padding: 16px 22px;
    }

    .browse-content {
        padding: 24px 16px;
    }

    .section-heading {
        display: block;
    }

    .section-heading > span,
    .section-heading > a {
        display: inline-block;
        margin-top: 10px;
    }
}

@media (max-width: 560px) {
    .list-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .tool-page {
        padding: 28px 16px 64px;
    }

    .tool-title {
        font-size: 26px;
    }
}
