:root {
    --bg-0: #0b0f17;
    --bg-1: #0e1420;
    --bg-2: #121a2a;
    --glass: rgba(255,255,255,.06);
    --text: #e6f1ff;
    --muted: #9db0c5;
    --neon: #00E5FF;
    --neon-2: #8B5CF6;
    --border: rgba(255,255,255,.12);
    --shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05)
}

html, body {
    height: 100%
}

body {
    background: linear-gradient(160deg,#091019 0%,#0c1220 60%,#0b0f17 100%);
    color: var(--text);
    font-family: ui-sans-serif,system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol")
}

/* background aura */
.bg-warp {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(1200px 600px at 120% -10%, rgba(0,229,255,.15), transparent 60%), radial-gradient(800px 500px at -10% 120%, rgba(139,92,246,.14), transparent 60%), linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
    pointer-events: none
}

    .bg-warp::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: linear-gradient(transparent 95%, rgba(255,255,255,.06) 96%), linear-gradient(90deg, transparent 95%, rgba(255,255,255,.06) 96%);
        background-size: 40px 40px,40px 40px;
        opacity: .05;
        animation: drift 30s linear infinite
    }

@keyframes drift {
    from {
        transform: translateY(0)
    }

    to {
        transform: translateY(40px)
    }
}

/* ---------- NAV ---------- */
.kb-nav-wrap {
    background: transparent;
    margin-top: .5rem
}

.kb-navbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: rgba(13,17,23,.55);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    box-shadow: var(--shadow)
}

.kb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text)
}

    .kb-brand span {
        font-weight: 700;
        letter-spacing: .2px
    }

.kb-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px
}

.kb-item {
    position: relative
}

.kb-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .55rem .9rem;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid transparent;
    background: rgba(255,255,255,.05);
    transition: all .25s
}

    .kb-trigger:hover {
        background: rgba(0,229,255,.16);
        border-color: rgba(255,255,255,.28);
        transform: translateY(-1px)
    }

.kb-quick {
    display: flex;
    align-items: center;
    gap: 8px
}

.kb-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .45rem .8rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border)
}

    .kb-chip:hover {
        background: rgba(0,229,255,.16);
        border-color: rgba(255,255,255,.28)
    }

.kb-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .5rem 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg,var(--neon),var(--neon-2));
    color: #00131c;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(0,229,255,.22);
    font-weight: 700
}

    .kb-cta:hover {
        filter: brightness(1.04)
    }

.kb-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .45rem .8rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    border: 1px dashed rgba(255,255,255,.2)
}

    .kb-help:hover {
        border-color: rgba(0,229,255,.6)
    }

/* mega menu */
.kb-mega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 1000;
    width: 100%;
    border: 1px solid var(--border);
    background: linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.04));
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-top: 10px
}

.kb-mega-inner {
    padding: 18px
}

.kb-col {
    padding: 16px 18px;
    border-right: 1px solid rgba(255,255,255,.08)
}

    .kb-col:last-child {
        border-right: 0
    }

.kb-mega-head {
    font-weight: 700;
    margin-bottom: .55rem
}

.kb-link {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: .44rem .55rem;
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    margin-bottom: 6px;
    border: 1px solid transparent;
    transition: all .2s
}

    .kb-link:hover {
        background: rgba(0,229,255,.16);
        border-color: rgba(255,255,255,.28);
        transform: translateX(2px)
    }

.kb-mega-spot {
    background: linear-gradient(180deg,rgba(0,229,255,.10),rgba(139,92,246,.10));
    border-radius: 12px
}

.kb-spot-eyebrow {
    font-size: .75rem;
    opacity: .85;
    margin-bottom: .25rem
}

.kb-spot-title {
    font-weight: 800;
    margin-bottom: .25rem
}

.kb-spot-sub {
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: .6rem
}

.kb-spot-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .45rem .9rem;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text)
}

    .kb-spot-cta:hover {
        background: rgba(0,229,255,.18);
        border-color: rgba(255,255,255,.3)
    }

@media (min-width:992px) {
    .kb-item:hover > .kb-mega {
        opacity: 1;
        visibility: visible;
        transform: translateY(0)
    }

    .kb-item:hover > .kb-trigger {
        background: rgba(0,229,255,.16);
        border-color: rgba(255,255,255,.28)
    }
}

/* mobile drawer */
.kb-burger {
    width: 44px;
    height: 34px;
    background: transparent;
    border: 0;
    display: inline-grid;
    gap: 5px
}

    .kb-burger span {
        display: block;
        height: 3px;
        background: #cfe9ff;
        border-radius: 2px
    }

.kb-drawer {
    background: linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.04));
    border-left: 1px solid var(--border)
}

    .kb-drawer .offcanvas-header {
        border-bottom: 1px solid var(--border)
    }

.kb-drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700
}

.kb-group {
    margin-top: 16px
}

.kb-group-head {
    font-weight: 700;
    margin-bottom: .5rem
}

.kb-drawer-link {
    display: block;
    text-decoration: none;
    color: var(--text);
    padding: .5rem .6rem;
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid transparent;
    margin-bottom: 6px
}

    .kb-drawer-link:hover {
        background: rgba(0,229,255,.16);
        border-color: rgba(255,255,255,.28)
    }

.kb-drawer-cta {
    margin-top: 14px
}

/* ---------- UTILITY HUB (four animated cards) ---------- */
.kb-hub {
    padding: 18px 0
}

.kb-hub-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px
}

.kb-hub-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.04));
    box-shadow: var(--shadow);
    padding: 18px;
    min-height: 130px;
    transition: transform .25s, box-shadow .25s
}

    .kb-hub-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 40px rgba(0,0,0,.45)
    }

.kb-hub-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(0,229,255,.12);
    border: 1px solid var(--border);
    margin-bottom: 10px
}

.kb-hub-title {
    font-weight: 700;
    margin-bottom: 2px
}

.kb-hub-sub {
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 8px
}

.kb-hub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px
}

.kb-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .28rem .6rem;
    border-radius: 999px;
    font-size: .85rem;
    text-decoration: none;
    color: var(--text);
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border)
}

    .kb-tag:hover {
        background: rgba(0,229,255,.16);
        border-color: rgba(255,255,255,.28)
    }

.kb-card-bg {
    position: absolute;
    inset: auto -30% -40% auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0,229,255,.28), transparent 70%);
    filter: blur(16px);
    pointer-events: none
}

@media(max-width:1200px) {
    .kb-hub-grid {
        grid-template-columns: repeat(3,1fr)
    }
}

@media(max-width:992px) {
    .kb-hub-grid {
        grid-template-columns: repeat(2,1fr)
    }
}

@media(max-width:576px) {
    .kb-hub-grid {
        grid-template-columns: 1fr
    }
}

/* ---------- CONTENT / FORMS / BUTTONS ---------- */
.content-stack > * .card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow)
}

.card {
    border: none;
}

    .card .card-body {
        color: var(--text);
        background: rgb(19, 26, 38);
        border: 1px dashed rgba(255,255,255,.15) !important;
        border-radius: 5px;
    }

.text-muted {
    color: var(--muted) !important
}

.glass-input {
    background: rgba(255,255,255,.07);
    border: 1px solid var(--border);
    color: var(--text)
}

    .glass-input::placeholder {
        color: #a6b8cc
    }

    .glass-input:focus {
        box-shadow: 0 0 0 .25rem rgba(0,229,255,.15);
        border-color: rgba(0,229,255,.6)
    }

.btn-neon {
    background: linear-gradient(90deg,var(--neon),var(--neon-2));
    color: #00131c;
    border: none;
    box-shadow: 0 10px 24px rgba(0,229,255,.25)
}

    .btn-neon:hover {
        filter: brightness(1.05);
        color: #00131c
    }

.btn-outline-light {
    border-color: rgba(255,255,255,.4);
    color: var(--text)
}

    .btn-outline-light:hover {
        background: rgba(255,255,255,.15);
        border-color: #fff;
        color: #fff
    }

/* screenshot button */
.kb-snap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .45rem .8rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.06);
    color: var(--text);
    text-decoration: none
}

    .kb-snap:hover {
        background: rgba(0,229,255,.16);
        border-color: rgba(255,255,255,.28)
    }

/* map */
.mini-map {
    height: 240px;
    background: #0d1524;
    border-radius: 14px
}

.leaflet-container a {
    color: #79e1ff
}

/* code + tables */
pre, code, kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
}

pre {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    color: #d7eaff
}

table.table {
    color: var(--text)
}

.table > :not(caption) > * > * {
    background: transparent
}

/* ad placeholders */
.ad-slot {
    min-height: 90px;
    background: rgba(255,255,255,.05);
    border: 1px dashed rgba(255,255,255,.15);
    border-radius: 14px
}

/* footer */
.site-footer {
    background: linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.02));
    border-top: 1px solid var(--border);
    margin-top: 32px;
    padding: 36px 0 24px
}

    .site-footer a {
        color: var(--text);
        opacity: .9;
        text-decoration: none
    }

        .site-footer a:hover {
            color: #fff;
            opacity: 1
        }

.footer-head {
    font-weight: 600;
    margin-bottom: .6rem
}

.border-glass {
    border-color: var(--border) !important
}

.socials .social {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,.07);
    border: 1px solid var(--border);
    margin-right: 8px
}

    .socials .social:hover {
        background: rgba(0,229,255,.18);
        border-color: rgba(255,255,255,.3)
    }

/* utilities */
.shadow-soft {
    box-shadow: var(--shadow)
}

.rounded-2xl {
    border-radius: 18px
}

/* accessibility + motion */
:focus-visible {
    outline: 2px solid var(--neon);
    outline-offset: 2px;
    border-radius: 6px
}

@media (prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important
    }
}

/* print */
@media print {
    .kb-nav-wrap, .kb-hub, .site-footer, .ad-slot {
        display: none !important
    }

    body {
        background: #fff;
        color: #000
    }
}
/* --- Mega menu: visibility & stacking fix --- */
.kb-nav-wrap {
    position: relative;
    z-index: 2000;
}
/* keep nav above everything */
.kb-navbar {
    position: relative;
}

.kb-mega {
    z-index: 2100; /* above hub/cards */
    background: #0b1220F2; /* high-contrast bg (~95% opacity) */
    color: #eaf4ff;
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
}

/* columns & headings */
.kb-col {
    border-right: 1px solid rgba(255,255,255,.14);
}

    .kb-col:last-child {
        border-right: 0;
    }

.kb-mega-head {
    color: #dbeafe;
    opacity: .95
}

/* links inside the mega */
.kb-link {
    background: rgba(255,255,255,.10);
    color: #eaf4ff;
    border: 1px solid transparent;
}

    .kb-link:hover {
        background: #13243b;
        border-color: #63e7ff66;
        color: #ffffff;
        transform: translateX(2px);
    }

/* Utility Hub must stay below the nav */
.kb-hub {
    position: relative;
    z-index: 1;
}

.kb-tabs .nav-link {
    border: 1px solid var(--border);
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    margin-right: .4rem
}

    .kb-tabs .nav-link.active {
        background: linear-gradient(90deg,var(--neon),var(--neon-2));
        color: #00131c;
        border-color: transparent
    }

.qr-form .form-label {
    font-size: .9rem;
    color: var(--muted)
}

.qr-capture {
    box-shadow: 0 10px 30px rgba(0,0,0,.25)
}
/* Menu visibility */
.kb-navbar, .dropdown-menu, .kb-mega {
    background: #101826;
    color: #eaf6ff;
}

.dropdown-menu {
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

.kb-link, .dropdown-item {
    color: #eaf6ff;
    background: rgba(255,255,255,.06);
}

    .kb-link:hover, .dropdown-item:hover {
        background: rgba(0,229,255,.18);
        color: #ffffff;
    }

.kb-mega-head {
    color: #d9e8ff;
}

/* Pills on QR page */
.kb-pills .nav-link {
    color: #eaf6ff;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
}

    .kb-pills .nav-link.active {
        background: linear-gradient(90deg, var(--neon), var(--neon-2));
        color: #00131c;
        border-color: transparent;
    }

/* QR preview card (white to ensure scannability) */
.qr-card {
    background: #ffffff;
    color: #2b2b2b;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
    display: inline-block;
}

    .qr-card img {
        image-rendering: pixelated;
        display: block;
    }


/* SweetAlert2 dark tune */
:root {
    --swal-bg: rgba(18,26,42,.98);
    --swal-border: rgba(255,255,255,.08);
}

.swal2-popup {
    background: var(--swal-bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--swal-border);
    backdrop-filter: blur(6px);
}

/* App loader */
.kb-loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(7,10,16,.55);
    z-index: 2000;
}

.kb-loader-inner {
    display: grid;
    gap: 12px;
    place-items: center;
    padding: 18px 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
    box-shadow: var(--shadow);
}

.kb-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.2);
    border-top-color: var(--neon);
    animation: kbspin .8s linear infinite;
}

@keyframes kbspin {
    to {
        transform: rotate(360deg);
    }
}

.kb-loader-text {
    font-size: .95rem;
    color: var(--text);
    opacity: .9;
}

.codebox {
    width: 100%;
    min-height: 320px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    padding: 12px 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    line-height: 1.45;
    resize: vertical;
}

.result-card {
    background: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    min-height: 320px;
}

.codeout {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.dropzone {
    border: 2px dashed rgba(255,255,255,.25);
    border-radius: 12px;
    min-height: 150px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.06);
    cursor: pointer;
    transition: .2s;
}

    .dropzone:hover, .dropzone.drag {
        border-color: rgba(0,229,255,.8);
        background: rgba(0,229,255,.08);
    }

.dz-in {
    text-align: center;
    padding: 22px 10px;
}

.dz-title {
    font-weight: 600;
}

.result-card {
    background: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

.dropzone {
    border: 2px dashed rgba(255,255,255,.25);
    border-radius: 12px;
    min-height: 150px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.06);
    cursor: pointer;
    transition: .2s
}

    .dropzone:hover, .dropzone.drag {
        border-color: rgba(0,229,255,.8);
        background: rgba(0,229,255,.08)
    }

.dz-in {
    text-align: center;
    padding: 22px 10px
}

.dz-title {
    font-weight: 600
}

.result-card {
    background: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12)
}

.color-card {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    border-radius: 14px
}

.palette {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(120px,1fr));
    gap: 10px
}

.swatch {
    display: grid;
    place-items: end;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
    background: var(--sw);
    position: relative;
    box-shadow: 0 8px 16px rgba(0,0,0,.12)
}

.swatch-cap {
    background: rgba(255,255,255,.86);
    color: #111;
    border-radius: 10px;
    padding: .25rem .45rem;
    margin: .45rem;
    font-size: .8rem
}

.dropzone {
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 16px;
    background: rgba(255,255,255,.04);
    text-align: center;
    cursor: pointer
}

    .dropzone.drag {
        border-color: rgba(0,229,255,.6);
        background: rgba(0,229,255,.08)
    }

    .dropzone.has-file .dz-title {
        opacity: .6
    }

.kb-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255,255,255,.05);
    transition: transform .15s,box-shadow .15s,border-color .15s
}

    .kb-tile:hover {
        transform: translateY(-2px);
        border-color: rgba(255,255,255,.28);
        box-shadow: 0 10px 24px rgba(0,0,0,.25)
    }

.kb-tile-top {
    display: grid;
    gap: 4px
}

.kb-tile-icon {
    font-size: 20px;
    opacity: .9
}

.kb-tile-title {
    font-weight: 700
}

.kb-tile-sub {
    font-size: .85rem;
    color: var(--muted)
}

.kb-tile-cta {
    margin-top: 8px;
    font-size: .85rem;
    opacity: .9
}

.kb-toc {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem
}

    .kb-toc a {
        padding: .35rem .6rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        text-decoration: none;
        color: var(--text);
        background: rgba(255,255,255,.05)
    }

        .kb-toc a:hover {
            background: rgba(0,229,255,.16);
            border-color: rgba(255,255,255,.28)
        }

.kb-link {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: .44rem .55rem;
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid transparent
}

    .kb-link:hover {
        background: rgba(0,229,255,.16);
        border-color: rgba(255,255,255,.28)
    }

@media only screen and (max-width: 600px) {
    /*For mobile*/
    .kb-group {
        overflow-y: auto;
    }

    .kb-drawer {
        background: #0d0632f0;
    }

    .kb-drawer-brand {
        font-size: 21px;
        color: white;
        font-weight: bold;
    }

    .kb-group-head {
        font-weight: 702;
        margin-bottom: .5rem;
        color: white;
    }

    .kb-drawer-link {
        background: rgba(255, 255, 255, 0.26);
    }

        .kb-drawer-link:hover {
            background: rgba(29, 42, 113, 0.74);
        }

    .btn {
        width: 100%
    }
}

.kb-faq details {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    padding: .75rem 1rem;
}

.kb-faq summary {
    cursor: pointer;
    font-weight: 600;
}

.kb-faq details[open] {
    background: rgba(0,229,255,.08);
}
.form-select:focus-visible {
    color: black;
}