/* ============================================================
   CodeKent – Main Stylesheet
   Stack: Pure CSS (no framework)
   Fonts: JetBrains Mono + Space Grotesk
   ============================================================ */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    --bg:           #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary:  #1c2128;
    --border:       #30363d;
    --border-light: #21262d;

    --text:         #e6edf3;
    --text-muted:   #8b949e;
    --text-subtle:  #6e7681;

    --accent:       #58a6ff;
    --accent-hover: #79c0ff;
    --accent-dim:   rgba(88,166,255,.12);

    --green:  #3fb950;
    --red:    #f85149;
    --yellow: #d29922;
    --purple: #bc8cff;
    --orange: #ffa657;

    --code-bg: #161b22;
    --radius:  8px;
    --radius-lg: 14px;
    --shadow:  0 4px 24px rgba(0,0,0,.4);
    --transition: 0.18s ease;

    --nav-h: 64px;
    --font-body: 'Space Grotesk', system-ui, sans-serif;
    --font-code: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

h1,h2,h3,h4 { line-height: 1.3; font-weight: 700; }

code, pre {
    font-family: var(--font-code);
    font-size: 0.9em;
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    padding-top: var(--nav-h);
    min-height: calc(100vh - var(--nav-h));
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(13,17,23,.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.nav-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.2rem;
    color: var(--text) !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.4rem;
    color: var(--accent);
}

.logo-text strong { color: var(--accent); }

/* Nav Search */
.nav-search-wrap {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.nav-search {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .45rem 1rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: .9rem;
    outline: none;
    transition: border-color var(--transition);
}

.nav-search:focus { border-color: var(--accent); }
.nav-search::placeholder { color: var(--text-subtle); }

.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 200;
    display: none;
    overflow: hidden;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 1rem;
    color: var(--text);
    transition: background var(--transition);
    border-bottom: 1px solid var(--border-light);
}

.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg-tertiary); }
.search-name { font-weight: 500; font-size: .9rem; }
.search-cat { font-size: .75rem; color: var(--text-muted); }

/* Nav Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: .25rem;
    flex-shrink: 0;
}

.nav-links a {
    color: var(--text-muted);
    padding: .4rem .75rem;
    border-radius: 6px;
    font-size: .9rem;
    transition: all var(--transition);
}

.nav-links a:hover { color: var(--text); background: var(--bg-secondary); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    list-style: none;
    min-width: 200px;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a {
    display: block;
    padding: .5rem 1rem;
    color: var(--text-muted);
    font-size: .875rem;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition);
}

.dropdown-menu li:last-child a { border-bottom: none; }
.dropdown-menu li a:hover { background: var(--bg-tertiary); color: var(--text); }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: .5rem;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: 999;
    padding: 1rem 1.5rem;
}

.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; }
.mobile-menu li a {
    display: block;
    padding: .6rem 0;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: .6rem 0;
    font-size: .8rem;
    color: var(--text-muted);
}

.breadcrumb-bar a { color: var(--text-muted); }
.breadcrumb-bar a:hover { color: var(--accent); }
.breadcrumb-bar .sep { margin: 0 .4rem; }
.breadcrumb-bar .current { color: var(--text); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1.4rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #0d1117;
}
.btn-primary:hover { background: var(--accent-hover); color: #0d1117; transform: translateY(-1px); }

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-success { background: var(--green); color: #0d1117; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-ghost   { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--accent-dim); }

.btn-lg { padding: .8rem 2rem; font-size: 1rem; }
.btn-sm { padding: .35rem .9rem; font-size: .8rem; }

.btn-copy.copied { background: var(--green); color: #0d1117; }

/* ── Forms / Inputs ───────────────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="password"],
select,
textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: .9rem;
    padding: .65rem 1rem;
    width: 100%;
    outline: none;
    transition: border-color var(--transition);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
}

input::placeholder, textarea::placeholder { color: var(--text-subtle); }

textarea {
    font-family: var(--font-code);
    font-size: .85rem;
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}

select { cursor: pointer; }
select option { background: var(--bg-secondary); }

label {
    font-size: .875rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: .35rem;
    font-weight: 500;
}

.form-group { margin-bottom: 1rem; }

/* ── Tool Page Layout ─────────────────────────────────────── */
.tool-page {
    padding: 2rem 0 4rem;
}

.tool-header {
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: 2rem;
    margin-bottom: .5rem;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.tool-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.tool-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.textarea-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .4rem;
}

.textarea-label label { margin: 0; }

/* Output box */
.output-wrap {
    position: relative;
}

.output-wrap .btn-copy {
    position: absolute;
    top: .5rem;
    right: .5rem;
}

/* ── Tool Description / SEO Content ──────────────────────── */
.tool-description {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.tool-description h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.tool-description p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ── FAQ Section ──────────────────────────────────────────── */
.faq-section {
    margin-bottom: 2rem;
}

.faq-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: .75rem;
    overflow: hidden;
}

.faq-q {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition);
}

.faq-q:hover { background: var(--bg-tertiary); }
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--accent); }
.faq-item.open .faq-q::after { content: '−'; }

.faq-a {
    display: none;
    padding: .75rem 1.25rem 1rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    line-height: 1.7;
}

.faq-item.open .faq-a { display: block; }

/* ── Related Tools ────────────────────────────────────────── */
.related-tools {
    margin-bottom: 2rem;
}

.related-tools h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

/* ── Tool Grid ────────────────────────────────────────────── */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .75rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    padding: .85rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all var(--transition);
    cursor: pointer;
}

.tool-card:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.tool-card-name {
    font-size: .9rem;
    font-weight: 600;
}

.tool-card-cat {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: .2rem;
}

.tool-card-arrow {
    margin-left: auto;
    color: var(--accent);
    opacity: 0;
    transition: opacity var(--transition);
}

.tool-card:hover .tool-card-arrow { opacity: 1; }

/* ── Homepage: Hero ───────────────────────────────────────── */
.hero {
    position: relative;
    padding: 5rem 0 4rem;
    overflow: hidden;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(88,166,255,.15) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(188,140,255,.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--accent-dim);
    border: 1px solid rgba(88,166,255,.3);
    color: var(--accent);
    border-radius: 99px;
    padding: .35rem 1rem;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* Hero search */
.hero-search-wrap {
    position: relative;
    max-width: 620px;
    margin: 0 auto 2rem;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: .85rem 1.25rem;
    gap: .75rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.hero-search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88,166,255,.15);
}

.search-icon { font-size: 1.1rem; flex-shrink: 0; }

.hero-search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    padding: 0;
}

.hero-search-input::placeholder { color: var(--text-subtle); }

.search-hint {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .1rem .4rem;
    font-size: .7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.hero-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.hero-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .8rem 1.25rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.hero-result-item:last-child { border-bottom: none; }
.hero-result-item:hover { background: var(--bg-tertiary); }
.res-name { font-weight: 600; }
.res-cat { font-size: .8rem; color: var(--text-muted); }

.hero-tags {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-tags a {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 99px;
    padding: .3rem .85rem;
    font-size: .8rem;
    transition: all var(--transition);
}

.hero-tags a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}

.stats-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

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

.stat-item strong {
    display: block;
    font-size: 1.8rem;
    color: var(--accent);
    font-weight: 700;
}

.stat-item span {
    font-size: .8rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ── Sections ─────────────────────────────────────────────── */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 1.9rem;
    margin-bottom: .5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ── Category Grid (home) ─────────────────────────────────── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.cat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    color: var(--text);
    transition: all var(--transition);
    cursor: pointer;
}

.cat-card:hover {
    border-color: var(--cat-color, var(--accent));
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.cat-card-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.cat-card-info { flex: 1; }
.cat-card-name { display: block; font-weight: 700; font-size: .95rem; }
.cat-card-count { display: block; font-size: .8rem; color: var(--text-muted); margin-top: .1rem; }
.cat-card-arrow { color: var(--cat-color, var(--accent)); font-size: 1.1rem; opacity: 0; transition: opacity var(--transition); }
.cat-card:hover .cat-card-arrow { opacity: 1; }

/* ── Popular Tools Grid ───────────────────────────────────── */
.popular-section { background: var(--bg-secondary); }

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: .75rem;
}

.popular-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all var(--transition);
}

.popular-card:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.popular-card-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.popular-card-info { flex: 1; }
.popular-card-name { display: block; font-weight: 600; font-size: .9rem; }
.popular-card-cat { display: block; font-size: .75rem; color: var(--text-muted); }
.popular-card-arrow { color: var(--accent); opacity: 0; transition: opacity var(--transition); }
.popular-card:hover .popular-card-arrow { opacity: 1; }

/* ── Why Section ──────────────────────────────────────────── */
.why-section { background: var(--bg); }

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.why-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all var(--transition);
}

.why-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.why-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.why-card h3 {
    font-size: 1.05rem;
    margin-bottom: .5rem;
}

.why-card p {
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.6;
}

/* ── All Tools Page ───────────────────────────────────────── */
.all-tools-header {
    padding: 2.5rem 0 2rem;
    text-align: center;
}

.all-tools-header h1 { font-size: 2rem; margin-bottom: .5rem; }
.all-tools-header p { color: var(--text-muted); margin-bottom: 1.5rem; }

.filter-input {
    max-width: 400px;
    margin: 0 auto 1.25rem;
    display: block;
    text-align: left;
}

.cat-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cat-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 99px;
    padding: .35rem .9rem;
    font-size: .8rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition);
}

.cat-tab:hover, .cat-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0d1117;
    font-weight: 600;
}

.cat-section { margin-bottom: 3rem; }

.cat-heading {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--text);
}

.cat-count {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: .1rem .5rem;
    font-size: .75rem;
    color: var(--text-muted);
}

/* ── Stub Box ─────────────────────────────────────────────── */
.stub-box {
    text-align: center;
    padding: 4rem 2rem;
}

.stub-icon { font-size: 4rem; margin-bottom: 1.5rem; }
.stub-box h2 { margin-bottom: .75rem; }
.stub-box p { color: var(--text-muted); margin-bottom: 2rem; }

/* ── Site Footer ──────────────────────────────────────────── */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3.5rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul li a {
    color: var(--text-muted);
    font-size: .875rem;
    transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-brand .footer-logo {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: 1.1rem;
    color: var(--text) !important;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: .875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-badges {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: .2rem .6rem;
    font-size: .72rem;
    color: var(--text-muted);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .8rem;
    color: var(--text-muted);
}

/* ── Code / Pre ───────────────────────────────────────────── */
pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--font-code);
    font-size: .85rem;
    color: var(--text);
}

/* ── Alert / Notice ───────────────────────────────────────── */
.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    font-size: .875rem;
    margin-bottom: 1rem;
}

.alert-success { background: rgba(63,185,80,.12); border: 1px solid rgba(63,185,80,.3); color: var(--green); }
.alert-error   { background: rgba(248,81,73,.12);  border: 1px solid rgba(248,81,73,.3);  color: var(--red); }
.alert-info    { background: rgba(88,166,255,.12); border: 1px solid rgba(88,166,255,.3); color: var(--accent); }
.alert-warn    { background: rgba(210,153,34,.12); border: 1px solid rgba(210,153,34,.3); color: var(--yellow); }

/* ── Utility ──────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.gap-1 { gap: .5rem; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .nav-search-wrap { max-width: 260px; }
}

@media (max-width: 768px) {
    .tool-row { grid-template-columns: 1fr; }
    .hero { padding: 3.5rem 0 3rem; }
    .hero-title { font-size: 2rem; }
    .stats-inner { gap: 1rem; }
    .stat-divider { display: none; }
    .hide-mobile { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .nav-search-wrap { display: none; }
    .search-hint { display: none; }
}

@media (max-width: 480px) {
    .cat-grid { grid-template-columns: 1fr; }
    .popular-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .tool-grid { grid-template-columns: 1fr 1fr; }
}
