.commands-page {
    width: min(1200px, calc(100% - 60px));
    margin: 0 auto;
    padding: 175px 0 10px;
}

.commands-heading {
    margin: 0 auto 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.commands-heading h1 {
    margin: 0;
    color: #f5f5f5;
    font-size: clamp(42px, 4.5vw, 60px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
}

.commands-subtitle {
    max-width: 560px;
    margin: 16px auto 0;
    color: #777772;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
    text-align: center;
}

.commands-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    align-items: start;
    gap: 25px;
}

.commands-content {
    min-width: 0;
}

.commands-sidebar {
    position: sticky;
    top: 110px;
    padding: 17px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 13px;
    background: rgba(255, 255, 255, .025);
}

.sidebar-title {
    padding: 4px 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title strong {
    color: #ededeb;
    font-size: 14px;
}

.sidebar-title>span {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .05);
    color: #8a8a85;
    font-size: 11px;
}

.command-category {
    min-height: 43px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #858581;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.command-category i {
    width: 17px;
    flex-shrink: 0;
    color: #686864;
    text-align: center;
}

.command-category>span:first-of-type {
    color: inherit;
    font-size: 13px;
}

.command-category>span:last-child {
    margin-left: auto;
    color: #5d5d59;
    font-size: 10px;
}

.command-category:hover {
    color: #fff;
    background: rgba(255, 255, 255, .04);
}

.command-category.active {
    color: #06130a;
    background: var(--green);
}

.command-category.active i,
.command-category.active>span {
    color: #06130a;
}

.command-search {
    height: 58px;
    margin-bottom: 16px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 11px;
    background: rgba(255, 255, 255, .025);
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.command-search:focus-within {
    border-color: rgba(0, 237, 79, .35);
    background: rgba(0, 237, 79, .025);
    box-shadow: 0 0 0 3px rgba(0, 237, 79, .05);
}

.command-search>i {
    color: #888884;
    transition: color .2s ease;
}

.command-search:focus-within>i {
    color: var(--green);
}

.command-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 15px;
}

.command-search input::placeholder {
    color: #646460;
}

.command-search kbd {
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 5px;
    background: rgba(255, 255, 255, .04);
    color: #777773;
    font-size: 11px;
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.command-card[hidden] {
    display: none !important;
}

.command-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 11px;
    background: rgba(255, 255, 255, .02);
    transition: border-color .2s ease, background .2s ease;
}

.command-card:hover {
    border-color: rgba(255, 255, 255, .11);
}

.command-card[open] {
    border-color: rgba(0, 237, 79, .17);
    background: linear-gradient(120deg, rgba(0, 237, 79, .025),rgba(255, 255, 255, .018));
}

.command-card summary {
    min-height: 88px;
    padding: 16px 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    list-style: none;
    cursor: pointer;
}

.command-card summary::-webkit-details-marker {
    display: none;
}

.command-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.command-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(0, 237, 79, .075);
    color: var(--green);
}

.command-info {
    min-width: 0;
}

.command-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.command-name code {
    color: #f2f2f0;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
}

.command-info p {
    margin-top: 6px;
    color: #767672;
    font-size: 12px;
    line-height: 1.5;
}

.category-tag {
    min-height: 21px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 5px;
    background: rgba(255, 255, 255, .045);
    color: #858581;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.command-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.copy-button {
    padding: 5px;
    border: none;
    background: transparent;
    color: #6e6e69;
    cursor: pointer;
    transition: color .18s ease;
}

.copy-button:hover {
    color: var(--green);
}

.command-arrow {
    color: #62625e;
    font-size: 11px;
    transition: transform .2s ease, color .2s ease;
}

.command-card[open] .command-arrow {
    transform: rotate(180deg);
    color: var(--green);
}

.command-expanded {
    padding: 0 24px 27px;
    border-top: 1px solid rgba(255, 255, 255, .055);
}

.command-section {
    margin-top: 24px;
}

.section-title {
    display: block;
    margin-bottom: 12px;
    color: #646460;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.usage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-box {
    min-height: 47px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 8px;
    background: #141512;
}

.usage-box code {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--green);
    font-family: Consolas, monospace;
    font-size: 12px;
}

.command-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 38px;
    align-items: start;
}

.command-parameters,
.command-details {
    min-width: 0;
}

.command-details .command-section {
    margin-top: 24px;
}

.subcommand {
    margin-bottom: 26px;
}

.subcommand:last-child {
    margin-bottom: 0;
}

.subcommand-name {
    padding-bottom: 10px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.subcommand-name code {
    color: var(--green);
    font-size: 13px;
}

.subcommand-name span {
    color: #6c6c68;
    font-size: 11px;
    line-height: 1.5;
}

.parameter {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
}

.parameter+.parameter {
    margin-top: 16px;
}

.parameter-point {
    width: 6px;
    height: 6px;
    margin-top: 8px;
    border-radius: 50%;
    background: #575753;
}

.parameter-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.parameter-header code {
    color: #e7e7e4;
    font-size: 12px;
    font-weight: 700;
}

.type-tag {
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .035);
    color: #7c7c78;
    font-size: 9px;
}

.required,
.optional {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
}

.required {
    background: rgba(255, 75, 75, .08);
    color: #ff7373;
}

.optional {
    background: rgba(255, 255, 255, .04);
    color: #858581;
}

.parameter p {
    margin-top: 5px;
    color: #70706c;
    font-size: 11px;
    line-height: 1.5;
}

.parameter-values {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.parameter-values>span {
    padding: 4px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .035);
    color: #72726e;
    font-size: 9px;
}

.parameter-values strong {
    color: #aaa;
}

.choice-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.choice-list>span {
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 5px;
    background: rgba(255, 255, 255, .025);
    color: #90908c;
    font-size: 9px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.detail-card {
    min-width: 0;
    min-height: 78px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 8px;
    background: rgba(255, 255, 255, .025);
    transition: border-color .18s ease, background .18s ease;
}

.detail-card:hover {
    border-color: rgba(255, 255, 255, .11);
    background: rgba(255, 255, 255, .03);
}

.detail-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.detail-card-label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7d7d78;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
}

.detail-card-label i {
    width: 14px;
    flex-shrink: 0;
    color: #7d7d78;
    font-size: 10px;
    text-align: center;
}

.detail-card>strong,
.detail-card-permissions-values>strong {
    color: #e2e2de;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.detail-card-permissions-values {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

html[data-theme="light"] .commands-heading h1,
html[data-theme="light"] .sidebar-title strong,
html[data-theme="light"] .command-name code,
html[data-theme="light"] .parameter-header code {
    color: #20201e;
}

html[data-theme="light"] .commands-subtitle {
    color: #747470;
}

html[data-theme="light"] .command-info p,
html[data-theme="light"] .parameter p,
html[data-theme="light"] .subcommand-name span {
    color: #6f6f6a;
}

html[data-theme="light"] .commands-sidebar,
html[data-theme="light"] .command-search,
html[data-theme="light"] .command-card {
    border-color: rgba(0, 0, 0, .08);
    background: rgba(0, 0, 0, .018);
}

html[data-theme="light"] .command-card:hover {
    border-color: rgba(0, 0, 0, .13);
}

html[data-theme="light"] .command-card[open] {
    border-color: rgba(0, 190, 65, .2);
    background: rgba(0, 190, 65, .025);
}

html[data-theme="light"] .command-expanded {
    border-top-color: rgba(0, 0, 0, .07);
}

html[data-theme="light"] .command-search input {
    color: #20201e;
}

html[data-theme="light"] .command-search input::placeholder {
    color: #888883;
}

html[data-theme="light"] .section-title {
    color: #777772;
}

html[data-theme="light"] .usage-box {
    border-color: rgba(0, 0, 0, .07);
    background: #f2f2ef;
}

html[data-theme="light"] .category-tag,
html[data-theme="light"] .type-tag,
html[data-theme="light"] .optional,
html[data-theme="light"] .parameter-values>span,
html[data-theme="light"] .choice-list>span {
    border-color: rgba(0, 0, 0, .07);
    background: rgba(0, 0, 0, .03);
}

html[data-theme="light"] .parameter-point {
    background: #a2a29d;
}

html[data-theme="light"] .subcommand-name {
    border-bottom-color: rgba(0, 0, 0, .07);
}

html[data-theme="light"] .detail-card {
    border-color: rgba(0, 0, 0, .08);
    background: rgba(0, 0, 0, .018);
}

html[data-theme="light"] .detail-card:hover {
    border-color: rgba(0, 0, 0, .12);
    background: rgba(0, 0, 0, .025);
}

html[data-theme="light"] .detail-card-label,
html[data-theme="light"] .detail-card-label i {
    color: #777772;
}

html[data-theme="light"] .detail-card>strong,
html[data-theme="light"] .detail-card-permissions-values>strong {
    color: #2c2c29;
}

@media (max-width: 950px) {
    .commands-layout {
        grid-template-columns: 1fr;
    }

    .commands-sidebar {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .commands-sidebar::-webkit-scrollbar {
        display: none;
    }

    .sidebar-title {
        display: none;
    }

    .command-category {
        flex-shrink: 0;
    }

    .command-bottom-grid {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 28px;
    }
}

@media (max-width: 750px) {
     .commands-page {
        width: calc(100% - 22px);
        padding: 135px 0 100px;
    }

    .commands-heading {
        margin-bottom: 40px;
    }

    .commands-heading h1 {
        font-size: clamp(38px, 12vw, 52px);
        letter-spacing: -2px;
    }

    .commands-subtitle {
        max-width: 420px;
        margin-top: 13px;
        padding: 0 8px;
        font-size: 12px;
        line-height: 1.55;
    }

    .commands-layout {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .commands-content {
        display: contents;
    }

    .command-search {
        order: 1;
        width: 100%;
        height: 56px;
        margin: 0;
        padding: 0 16px;
        border-radius: 16px;
    }

    .command-search input {
        font-size: 15px;
    }

    .command-search kbd {
        display: none;
    }

    .commands-sidebar {
        order: 2;
        width: 100%;
        padding: 8px;
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 8px;
        border: 1px solid rgba(255, 255, 255, .06);
        border-radius: 18px;
        background: rgba(255, 255, 255, .02);
        box-shadow: inset 0 1px rgba(255, 255, 255, .03), 0 10px 30px rgba(0, 0, 0, .16);
        overflow: hidden;
    }

    .command-category {
        width: 100%;
        min-width: 0;
        height: 44px;
        min-height: 44px;
        padding: 0;
        justify-content: center;
        gap: 0;
        border: 1px solid transparent;
        border-radius: 12px;
        color: #8c8c87;
        transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
    }

    .command-category i {
        width: auto;
        margin: 0;
        color: inherit;
        font-size: 14px;
    }

    .command-category>span {
        display: none;
    }

    .command-category:hover {
        background: rgba(255, 255, 255, .03);
        color: #f2f2ef;
    }

    .command-category.active {
        background: var(--green);
        color: #06130a;
        border-color: transparent;
        box-shadow: 0 8px 20px rgba(0, 237, 79, .22);
        transform: translateY(-1px);
    }

    .command-category.active i {
        color: #06130a;
    }

    .command-list {
        order: 3;
        width: 100%;
        margin-top: 0;
    }

    .command-card summary {
        padding: 14px;
        gap: 10px;
    }

    .command-main {
        gap: 11px;
        align-items: flex-start;
    }

    .command-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .command-name {
        gap: 6px;
    }

    .command-name>.category-tag {
        display: none;
    }

    .command-info p {
        margin-top: 7px;
        font-size: 13px;
        line-height: 1.45;
    }

    .command-actions {
        gap: 8px;
    }

    .command-expanded {
        padding: 0 14px 20px;
    }

    .command-bottom-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .command-details {
        margin-top: 22px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, .06);
    }

    .command-details .command-section {
        margin-top: 0;
    }

    html[data-theme="light"] .commands-sidebar {
        border-color: rgba(0, 0, 0, .08);
        background: rgba(0, 0, 0, .02);
        box-shadow: inset 0 1px rgba(255, 255, 255, .8), 0 10px 25px rgba(0, 0, 0, .05);
    }

    html[data-theme="light"] .command-category {
        color: #72726d;
    }

    html[data-theme="light"] .command-category:hover {
        background: rgba(0, 0, 0, .035);
        color: #191917;
    }

    html[data-theme="light"] .command-category.active {
        background: var(--green);
        color: #06130a;
        box-shadow: 0 8px 18px rgba(0, 237, 79, .18);
    }

    html[data-theme="light"] .command-category.active i {
        color: #06130a;
    }

    html[data-theme="light"] .command-details {
        border-top-color: rgba(0, 0, 0, .07);
    }
}

@media (max-width: 480px) {
    .commands-sidebar {
        padding: 7px;
        gap: 7px;
        border-radius: 16px;
    }

    .command-category {
        height: 42px;
        min-height: 42px;
        border-radius: 11px;
    }

    .command-category i {
        font-size: 13px;
    }

    .command-search {
        height: 54px;
        border-radius: 14px;
    }
}

@media (max-width: 450px) {
    .command-category {
        height: 40px;
        min-height: 40px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .detail-card,
    .detail-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .detail-card {
        min-height: 72px;
        padding: 13px 14px;
    }
}