/* === RESET & ROOT === */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
        --bg:    #080C18;
        --bg2:   #0C1120;
        --card:  #0F1628;
        --bdr:   rgba(255,255,255,0.06);
        --cyan:  #22D3EE;
        --vio:   #8B5CF6;
        --text:  #F8FAFC;
        --sub:   #CBD5E1;
        --muted: #64748B;
    }
    html { scroll-behavior: smooth; }
    body {
        font-family: 'Inter', system-ui, sans-serif;
        background: var(--bg);
        color: var(--text);
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
    }
    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation-duration: 0.001ms !important;
            transition-duration: 0.001ms !important;
        }
    }

    /* =========================================================
       NAVBAR
    ========================================================= */
    #nav {
        position: fixed; top: 0; left: 0; right: 0; z-index: 100;
        display: flex; align-items: center; justify-content: space-between;
        height: 70px;
        padding: 0 clamp(1.5rem, 5vw, 4rem);
        transition: background .35s, border-color .35s;
        border-bottom: 1px solid transparent;
    }
    #nav.on {
        background: rgba(8,12,24,.9);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        border-color: var(--bdr);
    }
    .logo {
        font-size: 1.55rem; font-weight: 900; letter-spacing: -.055em;
        color: var(--text); text-decoration: none;
    }
    .logo b { color: var(--cyan); }
    .nav-r { display: flex; align-items: center; gap: 1.75rem; }
    .nav-a {
        color: var(--sub); text-decoration: none;
        font-size: .875rem; font-weight: 500;
        transition: color .2s;
    }
    .nav-a:hover { color: var(--text); }

    .btn {
        display: inline-flex; align-items: center; gap: .4rem;
        border: none; border-radius: 100px;
        font-family: inherit; font-weight: 600; cursor: pointer;
        text-decoration: none;
    }
    .btn-g {
        background: linear-gradient(135deg, var(--cyan), var(--vio));
        color: #fff; padding: .55rem 1.3rem; font-size: .875rem;
        transition: opacity .2s, transform .2s;
    }
    .btn-g:hover { opacity: .82; transform: translateY(-1px); }
    .btn-ghost {
        background: rgba(255,255,255,.06);
        border: 1px solid var(--bdr);
        color: var(--sub); padding: .8rem 1.9rem; font-size: .95rem;
        transition: background .2s, color .2s;
    }
    .btn-ghost:hover { background: rgba(255,255,255,.11); color: var(--text); }
    .btn-xl { padding: .85rem 2.1rem; font-size: 1rem; }

    @media (max-width: 580px) { .nav-a { display: none; } }

    /* =========================================================
       HERO
    ========================================================= */
    .hero {
        position: relative; min-height: 100vh; overflow: hidden;
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        text-align: center;
        padding: 120px 1.5rem 100px;
    }

    /* Grid overlay */
    .h-grid {
        position: absolute; inset: 0; pointer-events: none;
        background-image:
            linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
        background-size: 60px 60px;
        -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 45%, #000 15%, transparent 80%);
        mask-image: radial-gradient(ellipse 80% 65% at 50% 45%, #000 15%, transparent 80%);
    }

    /* Ambient blobs */
    .blob { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; animation: drift linear infinite; }
    .b1 { width: 700px; height: 700px; background: radial-gradient(circle, rgba(34,211,238,.28) 0%, transparent 65%); top: -180px; left: -180px; animation-duration: 24s; }
    .b2 { width: 560px; height: 560px; background: radial-gradient(circle, rgba(139,92,246,.25) 0%, transparent 65%); bottom: -130px; right: -130px; animation-duration: 30s; animation-direction: reverse; }
    .b3 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(236,72,153,.18) 0%, transparent 65%); top: 38%; left: 56%; animation-duration: 20s; animation-delay: -10s; }
    @keyframes drift {
        0%,100% { transform: translate(0,0) scale(1); }
        33%      { transform: translate(45px,-38px) scale(1.04); }
        66%      { transform: translate(-25px,30px) scale(.97); }
    }

    /* Content */
    .hero-body { position: relative; z-index: 1; }

    .badge {
        display: inline-flex; align-items: center; gap: .5rem;
        background: rgba(34,211,238,.07); border: 1px solid rgba(34,211,238,.22);
        color: var(--cyan); padding: .4rem 1rem; border-radius: 100px;
        font-size: .775rem; font-weight: 500; letter-spacing: .025em;
        margin-bottom: 2rem;
    }
    .dot {
        width: 7px; height: 7px; background: var(--cyan); border-radius: 50%;
        animation: blink 2s ease-in-out infinite;
        flex-shrink: 0;
    }
    @keyframes blink {
        0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(34,211,238,.5); }
        50%      { opacity:.55; box-shadow: 0 0 0 5px rgba(34,211,238,0); }
    }

    .hero h1 {
        font-size: clamp(2.8rem, 8.5vw, 6.5rem);
        font-weight: 900; line-height: 1.02; letter-spacing: -.04em;
        margin-bottom: 1.5rem;
        animation: up .85s cubic-bezier(.16,1,.3,1) .05s both;
    }
    .gtext {
        background: linear-gradient(135deg, #22D3EE 0%, #8B5CF6 55%, #EC4899 100%);
        background-size: 200%;
        -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        background-clip: text;
        animation: gshift 6s ease infinite;
    }
    @keyframes gshift {
        0%,100% { background-position: 0% 50%; }
        50%      { background-position: 100% 50%; }
    }

    .hero-p {
        max-width: 490px; font-size: 1.02rem; line-height: 1.75; color: var(--muted);
        margin: 0 auto 2.5rem;
        animation: up .85s cubic-bezier(.16,1,.3,1) .2s both;
    }
    .hero-btns {
        display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
        animation: up .85s cubic-bezier(.16,1,.3,1) .35s both;
    }
    @keyframes up {
        from { opacity:0; transform: translateY(28px); }
        to   { opacity:1; transform: translateY(0); }
    }

    /* Scroll cue */
    .scroll-cue {
        position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
        display: flex; flex-direction: column; align-items: center; gap: .5rem;
        color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
        font-family: 'JetBrains Mono', monospace; z-index: 1;
        animation: fadein 1s ease 1.3s both;
    }
    .sc-line {
        width: 1px; height: 44px;
        background: linear-gradient(to bottom, transparent, var(--muted));
        animation: grow 2s ease-in-out infinite;
    }
    @keyframes grow {
        0%   { transform: scaleY(0); opacity:0; transform-origin: top; }
        42%  { transform: scaleY(1); opacity:1; transform-origin: top; }
        58%  { transform: scaleY(1); opacity:1; transform-origin: bottom; }
        100% { transform: scaleY(0); opacity:0; transform-origin: bottom; }
    }
    @keyframes fadein { from { opacity:0; } to { opacity:1; } }

    /* =========================================================
       STATS STRIP
    ========================================================= */
    .stats {
        background: var(--bg2);
        border-top: 1px solid var(--bdr);
        border-bottom: 1px solid var(--bdr);
        padding: 2.5rem 1.5rem;
    }
    .stats-row {
        max-width: 960px; margin: 0 auto;
        display: flex; justify-content: space-around;
        flex-wrap: wrap; gap: 1.5rem 2rem;
    }
    .stat { text-align: center; }
    .sn {
        font-size: 2.1rem; font-weight: 800; letter-spacing: -.04em; line-height: 1;
        background: linear-gradient(135deg, var(--cyan), var(--vio));
        -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .sl { font-size: .75rem; color: var(--muted); margin-top: .3rem; font-weight: 500; letter-spacing: .03em; }

    /* =========================================================
       TOOLS SECTION
    ========================================================= */
    .tools { padding: 7rem 1.5rem 6rem; }
    .tools-hd { text-align: center; margin-bottom: 4rem; }
    .eye {
        font-family: 'JetBrains Mono', monospace;
        font-size: .7rem; color: var(--cyan);
        letter-spacing: .2em; text-transform: uppercase;
        opacity: .8; margin-bottom: 1rem;
    }
    .tools-hd h2 {
        font-size: clamp(1.8rem, 4vw, 2.8rem);
        font-weight: 800; letter-spacing: -.035em; line-height: 1.15;
    }
    .tools-hd p { margin-top: .7rem; font-size: .95rem; color: var(--muted); }

    .grid {
        max-width: 1200px; margin: 0 auto;
        display: grid; grid-template-columns: repeat(auto-fill, minmax(310px,1fr)); gap: 1rem;
    }

    /* =========================================================
       CARD
    ========================================================= */
    .card {
        position: relative;
        background: var(--card); border: 1px solid var(--bdr);
        border-radius: 16px; padding: 1.75rem; overflow: hidden; cursor: pointer;
        transition: border-color .25s, transform .25s, opacity .5s;
        opacity: 0; transform: translateY(18px);
    }
    .card.vis { opacity: 1; transform: translateY(0); }
    .card:hover {
        border-color: var(--glow, rgba(34,211,238,.32));
        transform: translateY(-3px);
    }

    /* Mouse-tracking spotlight via ::before */
    .card::before {
        content: ''; position: absolute; inset: 0; border-radius: 15px;
        background: radial-gradient(270px circle at var(--mx,50%) var(--my,50%),
                    var(--cbg, rgba(34,211,238,.08)) 0%, transparent 80%);
        opacity: 0; transition: opacity .35s; pointer-events: none; z-index: 0;
    }
    .card:hover::before { opacity: 1; }

    /* Top shimmer line */
    .shine {
        position: absolute; top: 0; left: 10%; right: 10%;
        height: 1px; background: var(--cc, var(--cyan));
        filter: blur(1px); opacity: 0; transition: opacity .3s; z-index: 2;
    }
    .card:hover .shine { opacity: .55; }

    /* Bottom sweep bar */
    .bar {
        position: absolute; bottom: 0; left: 0; right: 0;
        height: 2px; background: var(--cc, var(--cyan));
        border-radius: 0 0 16px 16px;
        transform: scaleX(0); transform-origin: left;
        transition: transform .38s cubic-bezier(.4,0,.2,1); z-index: 2;
    }
    .card:hover .bar { transform: scaleX(1); }

    /* All card content above ::before */
    .card > * { position: relative; z-index: 1; }
    .shine, .bar { z-index: 2; }

    .c-icon {
        width: 44px; height: 44px; border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        margin-bottom: 1.2rem;
        transition: transform .25s;
    }
    .card:hover .c-icon { transform: scale(1.1) rotate(-4deg); }
    .c-icon svg { width: 20px; height: 20px; display: block; }

    .tags-row { display: flex; align-items: center; margin-bottom: .6rem; flex-wrap: wrap; gap: .35rem; }
    .c-tag {
        display: inline-block; padding: .18rem .52rem;
        border-radius: 4px;
        font-family: 'JetBrains Mono', monospace;
        font-size: .64rem; font-weight: 500; letter-spacing: .04em;
    }
    .c-new {
        display: inline-flex; align-items: center;
        background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.28);
        color: var(--cyan); padding: .13rem .48rem; border-radius: 4px;
        font-family: 'JetBrains Mono', monospace;
        font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    }
    .card h3 { font-size: 1rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: .45rem; }
    .card p  { font-size: .845rem; line-height: 1.65; color: var(--muted); }

    /* =========================================================
       FOOTER
    ========================================================= */
    footer {
        background: #060910;
        border-top: 1px solid var(--bdr);
        padding: 5rem 1.5rem 2.5rem;
        position: relative; overflow: hidden;
    }
    footer::before {
        content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
        width: 55%; height: 1px;
        background: linear-gradient(90deg, transparent, var(--cyan), var(--vio), transparent);
    }
    .fin { max-width: 1200px; margin: 0 auto; }

    .fgrid {
        display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.4fr;
        gap: 3rem 4rem; margin-bottom: 4rem;
    }
    @media (max-width: 960px)  { .fgrid { grid-template-columns: 1fr 1fr; } }
    @media (max-width: 540px)  { .fgrid { grid-template-columns: 1fr; } .grid { grid-template-columns: 1fr; } }

    .flogo { font-size: 1.7rem; font-weight: 900; letter-spacing: -.05em; color: var(--text); display: block; margin-bottom: .85rem; }
    .flogo b { color: var(--cyan); }
    .fdesc { font-size: .875rem; color: var(--muted); line-height: 1.7; max-width: 220px; }

    .fcol h4 { font-size: .72rem; font-weight: 600; color: #475569; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 1.2rem; }
    .fcol ul { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
    .fcol a  { font-size: .875rem; color: var(--muted); text-decoration: none; transition: color .2s; }
    .fcol a:hover { color: var(--text); }
    .fcol > p { font-size: .875rem; color: var(--muted); line-height: 1.65; margin-bottom: .85rem; }

    .erow { display: flex; border: 1px solid var(--bdr); border-radius: 8px; overflow: hidden; }
    .erow input {
        flex: 1; background: rgba(255,255,255,.03); border: none;
        color: var(--text); padding: .7rem 1rem; font-size: .82rem;
        font-family: inherit; outline: none; transition: background .2s;
    }
    .erow input:focus { background: rgba(255,255,255,.055); }
    .erow input::placeholder { color: var(--muted); }
    .erow button {
        background: linear-gradient(135deg, var(--cyan), var(--vio));
        border: none; color: #fff; padding: 0 1rem; cursor: pointer;
        display: flex; align-items: center; transition: opacity .2s;
    }
    .erow button:hover { opacity: .83; }
    .erow button svg { width: 16px; height: 16px; }

    .fbot {
        border-top: 1px solid var(--bdr); padding-top: 2rem;
        display: flex; justify-content: space-between; align-items: center;
        flex-wrap: wrap; gap: 1rem;
    }
    .fbot p { font-size: .78rem; color: var(--muted); }
    .soc { display: flex; gap: .65rem; }
    .soc a {
        width: 34px; height: 34px; border-radius: 8px;
        border: 1px solid var(--bdr);
        display: flex; align-items: center; justify-content: center;
        color: var(--muted); text-decoration: none; transition: all .2s;
    }
    .soc a:hover { color: var(--cyan); border-color: rgba(34,211,238,.3); background: rgba(34,211,238,.05); }
    .soc svg { width: 15px; height: 15px; }

    /* =========================================================
       SCROLL REVEAL
    ========================================================= */
    .rv { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
    .rv.in { opacity: 1; transform: translateY(0); }

    /* =========================================================
       CUSTOM SELECT & FORM CONTROLS (GLASSMORPHISM)
    ========================================================= */
    select, .form-control {
        width: 100%;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--bdr, rgba(255,255,255,0.06));
        color: var(--text, #F8FAFC);
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 10px;
        outline: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-family: inherit;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
    }

    select {
        cursor: pointer;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CBD5E1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 1em;
        padding-right: 2.5rem;
    }

    select:hover, .form-control:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(34, 211, 238, 0.3);
    }

    select:focus, .form-control:focus {
        background: rgba(8, 12, 24, 0.7);
        border-color: var(--cyan, #22D3EE);
        box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
    }

    select option {
        background: var(--card, #0F1628);
        color: var(--text, #F8FAFC);
        padding: 0.5rem;
    }

    label {
        display: block;
        margin-bottom: 0.5rem;
        color: var(--sub, #CBD5E1);
        font-size: 0.85rem;
        font-weight: 500;
    }

    /* =========================================================
       GLOBAL BUTTON STYLES (GLASSMORPHISM & MODERN)
    ========================================================= */
    button {
        font-family: inherit;
    }

    .btn-primary {
        display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
        background: linear-gradient(135deg, var(--cyan, #22D3EE), var(--vio, #8B5CF6));
        color: #fff;
        border: none;
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 15px rgba(34, 211, 238, 0.2);
        text-decoration: none;
    }
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(34, 211, 238, 0.35);
        opacity: 0.9;
    }
    .btn-primary:active {
        transform: translateY(0);
    }

    .btn-sm {
        display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--bdr, rgba(255,255,255,0.06));
        color: var(--text, #F8FAFC);
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        font-weight: 500;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s;
        text-decoration: none;
    }
    .btn-sm:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        border-color: rgba(255, 255, 255, 0.15);
    }

    .btn-register {
        display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
        background: linear-gradient(135deg, #10B981, #059669);
        color: #fff;
        border: none;
        padding: 0.8rem 1.6rem;
        font-size: 1rem;
        font-weight: 700;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s;
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        text-decoration: none;
    }
    .btn-register:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
    }

    .btn-close-modal {
        display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
        background: transparent;
        border: 1px solid rgba(239, 68, 68, 0.3);
        color: #EF4444;
        padding: 0.8rem 1.6rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s;
        text-decoration: none;
    }
    .btn-close-modal:hover {
        background: rgba(239, 68, 68, 0.1);
        border-color: #EF4444;
    }