/* =====================================================
                    COMMANDS PAGE
===================================================== */

:root{

    --primary:#00D4FF;
    --secondary:#3B82F6;

    --bg:#070B14;

    --card:#0F172A;

    --card-light:#152238;

    --border:rgba(255,255,255,.08);

    --text:#FFFFFF;

    --text-light:rgba(255,255,255,.75);

    --shadow:
        0 18px 50px rgba(0,0,0,.35);

    --radius:24px;

}

/* =====================================================
                    MAIN
===================================================== */

.commands-hero{

    position:relative;

    overflow:hidden;

    padding:

        170px

        0

        90px;

}

.commands-section{

    padding:

        20px

        0

        120px;

}

.container{

    position:relative;

    z-index:2;

}

/* =====================================================
                    HERO
===================================================== */

.hero-badge{

    display:inline-flex;

    align-items:center;

    gap:10px;

    padding:

        12px

        20px;

    border-radius:999px;

    background:

        rgba(255,255,255,.05);

    border:

        1px solid var(--border);

    color:var(--primary);

    font-weight:700;

    margin-bottom:28px;

    backdrop-filter:blur(20px);

}

.commands-hero h1{

    font-size:

        clamp(

            3rem,

            7vw,

            5.4rem

        );

    line-height:1.05;

    font-weight:900;

    margin-bottom:22px;

}

.commands-hero h1 span{

    background:

        linear-gradient(

            90deg,

            var(--primary),

            var(--secondary)

        );

    -webkit-background-clip:text;

    -webkit-text-fill-color:transparent;

}

.commands-hero p{

    max-width:820px;

    margin:auto;

    line-height:1.9;

    color:var(--text-light);

    font-size:1.08rem;

    margin-bottom:50px;

}

/* =====================================================
                    SEARCH
===================================================== */

.search-wrapper{

    display:flex;

    justify-content:center;

    margin-bottom:45px;

}

.search-box{

    width:min(850px,100%);

    display:flex;

    align-items:center;

    gap:16px;

    padding:

        18px

        24px;

    border-radius:20px;

    background:

        rgba(255,255,255,.05);

    border:

        1px solid var(--border);

    backdrop-filter:blur(20px);

    transition:.25s;

}

.search-box:hover{

    border-color:

        rgba(0,212,255,.3);

}

.search-box:focus-within{

    border-color:

        var(--primary);

    box-shadow:

        0 0 40px

        rgba(0,212,255,.18);

}

.search-box svg{

    color:var(--primary);

    flex-shrink:0;

}

.search-box input{

    width:100%;

    background:none;

    border:none;

    outline:none;

    color:white;

    font-size:1rem;

    font-family:inherit;

}

.search-box input::placeholder{

    color:

        rgba(255,255,255,.45);

}

/* =====================================================
                    CATEGORY PILLS
===================================================== */

.category-container{

    display:flex;

    flex-wrap:wrap;

    justify-content:center;

    gap:14px;

    margin-bottom:45px;

}

.category-container button{

    padding:

        10px

        18px;

    border:none;

    cursor:pointer;

    border-radius:999px;

    background:

        rgba(255,255,255,.05);

    color:white;

    border:

        1px solid var(--border);

    transition:.25s;

    font-weight:600;

}

.category-container button:hover{

    transform:translateY(-2px);

    border-color:

        var(--primary);

}

.category-container button.active{

    background:

        linear-gradient(

            90deg,

            var(--primary),

            var(--secondary)

        );

    color:white;

}

/* =====================================================
                    STATS GRID
===================================================== */

.stats-grid{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(180px,1fr));

    gap:22px;

    margin-top:20px;

}

.stat-card{

    position:relative;

    overflow:hidden;

    background:rgba(255,255,255,.05);

    border:1px solid var(--border);

    backdrop-filter:blur(20px);

    border-radius:22px;

    padding:32px;

    transition:.25s;

}

.stat-card::before{

    content:"";

    position:absolute;

    inset:0;

    background:

        radial-gradient(

            circle at top right,

            rgba(0,212,255,.18),

            transparent 65%

        );

    opacity:0;

    transition:.3s;

}

.stat-card:hover{

    transform:translateY(-8px);

    border-color:var(--primary);

    box-shadow:0 20px 45px rgba(0,0,0,.35);

}

.stat-card:hover::before{

    opacity:1;

}

.stat-card h2{

    font-size:2.5rem;

    font-weight:900;

    color:var(--primary);

    margin-bottom:8px;

}

.stat-card p{

    color:var(--text-light);

    font-size:.95rem;

}

/* =====================================================
                    COMMAND GRID
===================================================== */

.commands-grid{

    display:grid;

    grid-template-columns:

        repeat(auto-fit,minmax(360px,1fr));

    gap:24px;

}

/* =====================================================
                    COMMAND CARD
===================================================== */

.command-card{

    position:relative;

    overflow:hidden;

    background:rgba(255,255,255,.05);

    border:1px solid var(--border);

    backdrop-filter:blur(20px);

    border-radius:24px;

    padding:28px;

    cursor:pointer;

    transition:
        transform .25s,
        border-color .25s,
        box-shadow .25s;

}

.command-card::before{

    content:"";

    position:absolute;

    left:0;

    top:0;

    width:100%;

    height:3px;

    background:

        linear-gradient(

            90deg,

            var(--primary),

            var(--secondary)

        );

    transform:scaleX(0);

    transform-origin:left;

    transition:.3s;

}

.command-card:hover{

    transform:translateY(-8px);

    border-color:var(--primary);

    box-shadow:0 22px 45px rgba(0,0,0,.35);

}

.command-card:hover::before{

    transform:scaleX(1);

}

.command-top{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    gap:16px;

    margin-bottom:18px;

}

.command-top h3{

    font-size:1.35rem;

    font-weight:800;

    color:var(--primary);

    word-break:break-word;

}

.command-card p{

    color:var(--text-light);

    line-height:1.8;

    min-height:60px;

    margin-bottom:24px;

}

/* =====================================================
                    BADGES
===================================================== */

.badge{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:7px 14px;

    border-radius:999px;

    background:rgba(0,212,255,.14);

    color:var(--primary);

    font-size:.82rem;

    font-weight:700;

    white-space:nowrap;

}

/* =====================================================
                    CARD FOOTER
===================================================== */

.command-bottom{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:16px;

}

.command-type{

    color:var(--text-light);

    font-size:.92rem;

    font-weight:600;

}

.copy-button{

    border:none;

    outline:none;

    cursor:pointer;

    padding:10px 18px;

    border-radius:14px;

    background:

        linear-gradient(

            90deg,

            var(--primary),

            var(--secondary)

        );

    color:white;

    font-weight:700;

    transition:.25s;

}

.copy-button:hover{

    transform:translateY(-2px);

    box-shadow:

        0 10px 24px

        rgba(0,212,255,.25);

}

.copy-button:disabled{

    opacity:.75;

    cursor:default;

}

/* =====================================================
                    EMPTY STATE
===================================================== */

.empty-state{

    grid-column:1/-1;

    text-align:center;

    padding:90px 30px;

    background:rgba(255,255,255,.04);

    border:1px solid var(--border);

    border-radius:24px;

}

.empty-state h2{

    color:white;

    margin-bottom:12px;

}

.empty-state p{

    color:var(--text-light);

}

/* =====================================================
                    COMMAND MODAL
===================================================== */

.command-modal{

    position:fixed;

    inset:0;

    display:flex;

    justify-content:center;

    align-items:center;

    padding:30px;

    visibility:hidden;

    opacity:0;

    pointer-events:none;

    transition:.25s;

    z-index:9999;

}

.command-modal.active{

    visibility:visible;

    opacity:1;

    pointer-events:auto;

}

.modal-overlay{

    position:absolute;

    inset:0;

    background:rgba(0,0,0,.72);

    backdrop-filter:blur(10px);

}

.modal-content{

    position:relative;

    width:min(760px,100%);

    max-height:85vh;

    overflow-y:auto;

    background:var(--card);

    border:1px solid var(--border);

    border-radius:28px;

    box-shadow:var(--shadow);

    padding:36px;

    transform:translateY(30px) scale(.96);

    opacity:0;

    transition:
        transform .3s ease,
        opacity .3s ease;

    z-index:2;

}

.command-modal.active .modal-content{

    transform:none;

    opacity:1;

}

.modal-content::-webkit-scrollbar{

    width:8px;

}

.modal-content::-webkit-scrollbar-thumb{

    background:rgba(255,255,255,.18);

    border-radius:999px;

}

.modal-close{

    position:absolute;

    top:18px;

    right:18px;

    width:42px;

    height:42px;

    border:none;

    border-radius:50%;

    cursor:pointer;

    background:rgba(255,255,255,.06);

    color:white;

    font-size:18px;

    transition:.2s;

}

.modal-close:hover{

    background:rgba(255,255,255,.12);

    transform:rotate(90deg);

}

.modal-header{

    margin-bottom:28px;

}

.modal-header h2{

    font-size:2rem;

    color:var(--primary);

    font-weight:800;

    margin-bottom:16px;

}

.modal-badges{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

}

.modal-badge{

    padding:8px 16px;

    border-radius:999px;

    background:rgba(0,212,255,.15);

    color:var(--primary);

    font-weight:700;

    font-size:.85rem;

}

.modal-body{

    display:flex;

    flex-direction:column;

    gap:24px;

}

.modal-group h3{

    font-size:1rem;

    margin-bottom:10px;

    color:white;

}

.modal-group p{

    color:var(--text-light);

    line-height:1.8;

}

.modal-group code{

    display:block;

    padding:14px 18px;

    border-radius:14px;

    background:rgba(255,255,255,.05);

    border:1px solid var(--border);

    color:var(--primary);

    font-family:monospace;

    overflow-x:auto;

}

#modalAliases,
#modalPermissions{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

}

#modalAliases span,
#modalPermissions span{

    padding:8px 14px;

    border-radius:999px;

    background:rgba(255,255,255,.06);

    border:1px solid var(--border);

    color:white;

    font-size:.9rem;

}

.modal-footer{

    display:flex;

    justify-content:flex-end;

    margin-top:36px;

}

.copy-command-btn{

    border:none;

    cursor:pointer;

    padding:12px 22px;

    border-radius:16px;

    font-size:.95rem;

    font-weight:700;

    color:white;

    background:

        linear-gradient(

            90deg,

            var(--primary),

            var(--secondary)

        );

    transition:.25s;

}

.copy-command-btn:hover{

    transform:translateY(-2px);

    box-shadow:

        0 12px 28px

        rgba(0,212,255,.25);

}

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

@media (max-width:768px){

    .modal-content{

        padding:24px;

        border-radius:22px;

    }

    .modal-header h2{

        font-size:1.6rem;

    }

    .modal-footer{

        justify-content:stretch;

    }

    .copy-command-btn{

        width:100%;

    }

}