:root {
    --theme-colour: #323232;
    /* #EF6351; */

    --colour-1: #5d9c11;
    --colour-2: #f83b2a;
    --colour-3: #a07807;
    --colour-4: #08d471;
    --colour-5: #e343ff;
    --colour-6: #00e1ff;
    --colour-7: #ff5b29;
    --colour-8: #999910;
    --colour-9: #6d82f5;
    --colour-10: #ff528c;
}

@font-face {
    font-family: 'Source Sans 3';
    font-weight: 400;
    font-style: normal;
    font-stretch: normal;
    src: url('../fonts/SourceSans3-Regular.ttf.woff2') format('woff2'),
        url('../fonts/SourceSans3-Regular.otf.woff') format('woff');
}

@font-face {
    font-family: 'Source Sans 3';
    font-weight: 400;
    font-style: italic;
    font-stretch: normal;
    src: url('https://argfuscator.net/assets/fonts/SourceSans3-It.ttf.woff2') format('woff2'),
        url('https://argfuscator.net/assets/fonts/SourceSans3-It.otf.woff') format('woff');
}

@font-face {
    font-family: 'Source Sans 3';
    font-weight: 700;
    font-style: normal;
    font-stretch: normal;
    src: url('../fonts/SourceSans3-Bold.ttf.woff2') format('woff2'),
        url('../fonts/SourceSans3-Bold.otf.woff') format('woff');
}

@font-face {
    font-family: 'Source Sans 3';
    font-weight: 700;
    font-style: italic;
    font-stretch: normal;
    src: url('https://argfuscator.net/assets/fonts/SourceSans3-BoldIt.ttf.woff2') format('woff2'),
        url('https://argfuscator.net/assets/fonts/SourceSans3-BoldIt.otf.woff') format('woff');
}

html {
    font-family: 'Source Sans 3', Arial;
    margin: 0 auto;
    max-width: 1200px;
}

body {
    background-color: #323232;
    margin: 0;
    margin-bottom: 2px;
    /* margin-bottom: calc(20px + 2.5em); */
    padding: 0 3px;
}

header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 10px;
    /* background-color: var(--theme-colour);
    color: #000; */
    /*#EF6351*/
    background: linear-gradient(-45deg, var(--theme-colour), color-mix(in srgb, var(--theme-colour) 80%, red), color-mix(in srgb, var(--theme-colour) 80%, #eeff00), color-mix(in srgb, var(--theme-colour) 80%, blue), var(--theme-colour));
    background-size: 400% 400%;
    animation: gradient 15s cubic-bezier(.79, .14, .15, .86) infinite;

    color: #ff9b05;
    padding: 10px 20px;
    /* padding-top: 0; */

    h1 {
        a {
            color: inherit;
            text-decoration: none;
        }

        a:hover {
            text-decoration: none;
        }
    }
}

a {
    color: var(--theme-colour);
    text-decoration: none;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

header .top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 10px;
    align-items: center;
    margin-bottom: 10px;

    .logo {
        display: flex;
        flex-direction: row;
        font-size: min(max(1.5vh, 1em), 1.5em);
        align-items: center;
        gap: 15px;
        line-height: 1em;

        img.site-logo {
            height: calc(min(max(1.0vh, 0.8em), 1.5em) * 3);
            filter: drop-shadow(1px 0px 0px #888) drop-shadow(-1px 0px 0px #888) drop-shadow(0px 1px 0px #888) drop-shadow(0px -1px 0px #888) drop-shadow(5px 5px 4px rgba(255, 255, 255, 0.46))
        }
    }

    .links {
        display: flex;
        gap: 0 15px;
        flex-wrap: wrap;

        a {
            color: rgb(255, 179, 0);
            text-decoration: none;
        }

        a.emphasis {
            font-weight: bold;
        }
    }
}

header .mid {
    height: 10vh;
    text-transform: capitalize;
    font-weight: bold;
    font-size: min(max(3vh, 1.5em), 3em);
    ;

    display: flex;
    align-items: center;
    justify-content: center;

    .content {
        align-self: center;
        text-align: center;
    }
}

div.tools {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 5px;
}

#input-command {
    /* min-height: 2.5em; */
     font-size: 18px;
    width: 100%;
    box-sizing: border-box;
    field-sizing: content;
    padding: 1em;
    color:#00e1ff;
    background-color: #323232;
}

legend {
    font-size: larger;
    font-weight: bold;
}

legend>span {
    margin-right: 2px;
}

fieldset.collapsible>legend {
    cursor: pointer;
}

div.option {
    background: rgb(254, 170, 2);
    border-radius: 5px;
    color: black;
    font-size: small;
    font-weight: bold;
    display: flex;
    gap: 5px;
    padding: 2px;
}

div.option>div.title {
    display: flex;
}

div.body {
    flex-grow: 1;
}

.probs-container {
    float: right;
}

.probs-slider {
    width: 40px;
    border: 1px solid var(--theme-colour);
    color: var(--theme-colour);
}

div.option>div.drag {
    width: 30px;
    min-width: 30px;
    text-align: center;
    align-self: center;
    cursor: grab;
}

div.body input {
    accent-color: var(--theme-colour);
}

div.body input[type=text] {
    flex-grow: 1;
}

div.body input[type=text]:placeholder-shown,
div.body textarea:placeholder-shown {
    accent-color: rgb(191, 255, 0);
    border: 1px solid rgb(0, 238, 255);
    background: #323232;
    color: rgb(191, 255, 0);
}

div.suboptions {
    align-items: center;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    font-size: small;
    font-weight: normal;
    padding-left: 22px;
}

div.suboptions>div {
    display: flex;
    gap: 5px;
    flex-direction: column;
    flex-wrap: wrap;
}

div.suboptions>div>div.suboption {
    flex-grow: 1;
    display: flex;
    gap: 5px;
    align-items: center;
}

div.suboptions>div.flex-row {
    align-items: center;
    flex: 100%;
    flex-direction: row;
    justify-content: start;
}

div.suboptions>div.flex-row label {
    margin-right: 5px;
}

a.explain {
    color: inherit;
    text-decoration: none;
    text-decoration-thickness: from-font;
}

a.explain::after {
    color: #c3ff00;
    content: '?';
    background-color: #00c8ff;
    font-size: small;
    margin: 3px;
    padding: 0px 4px;
    color: #c3ff00;
    font-weight: normal;
    font-size: smaller;
    text-decoration: none;
}

#tokens,
#output-command {
    color: rgb(255, 213, 0);
    min-height: 1.5em;
    background-color: #323232;
}

#tokens div.token,
#input-command,
#output-command,
code,
.suboption textarea {
    font-family: Monaco, Menlo, Consolas, 'Droid Sans Mono', Inconsolata, 'Courier New', monospace;
}
#tokens {
    align-content: flex-start;
    counter-reset: token-counter 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 4px;
}

#output-command {
    padding: 5px;
    overflow-wrap: anywhere;
}

#output-command>div {
    padding: 2px;
}

#tokens div.token {
    background: #323232;
    color: #b3fe02;
    border: 1px solid #00ffff;
    border-radius: 5px;
    counter-increment: token-counter 1;
    cursor: pointer;
    padding: 2px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

#tokens div.token[data-type="disabled"] {
    background: #323232;
    color: #00ffff;
}

#tokens div.token[data-type="disabled"]::before {
    background: #323232;
    color: #00ffff;
}

#tokens div.token[data-type="command"]::before {
    background: var(--colour-2);
    color: #00ffff;
}

#tokens div.token[data-type="path"]::before {
    background: var(--colour-3);
    color: #00ffff;
}

#tokens div.token[data-type="url"]::before {
    background: var(--colour-4);
    color: #00ffff;
}

#tokens div.token[data-type="value"]::before {
    background: var(--colour-5);
    color: #00ffff;
}

#tokens div.token::before {
    background: var(--colour-1);
    color: #00ffff;
    content: counter(token-counter);
    font-size: x-small;
    margin-right: 5px;
    padding: 0 4px;
    font-family: Arial;
    border-radius: 3px;
}

#tokens div.token[data-type="disabled"]::before {
    color: #333;
}

#tokens .token-holder {
    position: relative;
}

@media screen and (max-width: 700px) {
    .container {
        flex-wrap: wrap;
    }

    img.pct80-width {
        width: 100% !important;
    }
}

@media screen and (max-width: 1200px) {
    header {
        margin: 0 -3px;
    }
}

.picker {
    position: relative;
}

.context-menu {
    background: rgb(44, 42, 42);
    color: rgb(0, 255, 38);
    border: 1px solid rgb(242, 255, 0);
    display: none;
    padding: 1px;
    position: absolute;
    z-index: 2;
    max-height: 15em;
    overflow-y: auto;
    min-width: max-content;
    box-shadow: 0px 2px 2px 0px rgb(100, 255, 4);
}

.context-menu>li {
    cursor: pointer;
    list-style-type: none;
    padding: 2px 10px;
}

.context-menu>li:hover {
    background-color: #878c80;
}

.context-menu>li[data-active="true"] {
    background: color-mix(in srgb, var(--theme-colour) 50%, #000000);
    /*(19, 75, 163);*/
    color: rgb(251, 255, 0);
}

section {
    background-color: color-mix(in srgb, var(--theme-colour) 7%, rgb(49, 46, 46));
    /*#fbfbfb;*/
    padding: 1em;
    margin: 10px 0;

    h1,
    h2 {
        margin-top: 0;
    }
}

section:last-of-type {
    margin-bottom: 0;
}


fieldset {
    background: color-mix(in srgb, var(--theme-colour) 5%, rgb(102, 105, 105));
    margin: 0;
    border: 0;
    border: 1px solid #b3ff00;
    border-radius: 3px;
    color:#00ffff;
}

fieldset,
#options-panel-options {
    display: flex;
    flex-direction: column;
    gap: 5px 0px;
    color:#00ffff;
}

#options-panel-options {
    margin-top: 10px;
}

fieldset[disabled] {
    background: lightgray;
    color: rgb(69, 253, 2);
}

fieldset>legend {
    background: white;
    border-radius: 5px;
    color: color-mix(in srgb, var(--theme-colour) 80%, rgb(174, 255, 0));
    padding: 0 5px;
}

.button,
.button-inverted {
    cursor: pointer;
    display: inline-block;
    padding: 5px;
    text-decoration: none;
    user-select: none;
    border-radius: 5px;
}

.button {
    border: 1px solid var(--theme-colour);
    color: #8cff00;
    background-color: #323232;
}

.button-inverted {
    background-color: #323232;
    color: white;
}

.button-primary {
    background: rgb(174, 94, 3);
}
#obfuscation-run {
    background: #323232;
    color: rgb(255, 213, 0);
    border: 1px solid rgb(0, 255, 242);
}

#obfuscation-run:hover {
    background: #414141;
    color: #ffae00;
    border-color: #00d9ff;
}
.button:hover,
.button-inverted:hover,
.button:hover a,
.button-inverted:hover a {
    transition: all .1s ease-in;
}

.button:hover {
    background: rgb(79, 79, 76);
    color:#f2ff00;
    border-color: rgb(1, 255, 242);
}

.button-inverted:hover {
    background: white;
    color: var(--theme-colour);
    border-color: var(--theme-colour);
}

.button:hover a {
    color: white;
}

.button-inverted:hover a {
    color: #00ffff;
}

/*** Drag & drop ***/
.slist>div {
    border: 1px solid #dfdfdf;
    background: #f5f5f5;
}

.slist>div.hint {
    border: 1px solid var(--theme-colour);
    /* background: ; */
}

.slist>div.active {
    border: 1px dotted #ffa5a5;
    background: var(--theme-colour);
    color: white;
}

footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: color-mix(in srgb, var(--theme-colour) 10%, white);
    color: black;
    border-top: 1px solid white;
    margin: 0 auto;
}

#obfuscation-bar {
    max-width: 1200px;
    position: relative;
    margin: 0px auto;
    padding: 10px 10px;
    display: flex;
    gap: 3px;
}

#obfuscation-bar span>a {
    color: black;
}

#obfuscation-bar>div.fill {
    flex-grow: 1;
}

#obfuscation-bar>* {
    align-self: center;
}

.inbetween {
    height: 5px;
    background: grey;
}

#json-file {
    display: none;
}

#error-messages {
    min-width: min-content;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#error-messages>* {
    background: #fff3cd;
    border-radius: 0.2em;
    border: 1px solid rgb(240, 163, 48);
    color: #856404;
    flex-grow: 1;
    line-height: 1.4em;
    padding: 5px;
}

#error-messages a {
    color: var(--theme-colour);
}

#error-messages code {
    word-break: break-all;
}

.drag-list {
    list-style: none;
    padding: 0;
}

.drag-item {
    background-color: #CC56FF;
    padding: 10px;
    margin-bottom: 5px;
    cursor: move;
}

.collapsed {
    display: none !important;
}

.button-selection {
    color:#00ffff;
    display: flex;
    gap: 2px 5px;
    flex-wrap: wrap;
}

.suboption textarea {
    width: 100%;
    height: 65px;
}
.command-bar {
    display: flex;
    gap: 5px;
    align-items: flex-start;
    justify-content: space-between;
}

.command-bar>a {
    min-width: fit-content;
}

.command-bar #feeling-lucky a {
    color: #ededed;
    text-decoration: none;
    text-decoration-thickness: from-font;
    cursor: pointer;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #282828;
        color: white;
    }

    .slist>div,
    .context-menu {
        border-color: #555;
        background: #3e3e3e;
        color: white;
    }

    fieldset,
    section {
        background: rgb(70, 70, 70);
        color:    #b7ff00;;
        border-color: #00f2ff;

        .button {
            border: 1px solid #555;
            background-color: color-mix(in srgb, var(--theme-colour) 80%, #323232);
            color: #b7ff00;
            /* color-contrast(var(--theme-colour) vs white, black); */
        }

        .button:hover {
            border-color: color-mix(in srgb, var(--theme-colour) 80%, #323232);
            color: color-mix(in srgb, var(--theme-colour) 80%, #323232);
            background: #b7ff00;
        }

        .suboption textarea,
        input[type=text] {
            background: #666;
            color: rgb(6, 238, 255);
        }
    }

    fieldset>legend {
        background-color: color-mix(in srgb, var(--theme-colour) 20%, #414141);
        color: rgb(0, 255, 238);
    }

    .context-menu>li:hover {
        background-color: #555;
    }

    code {
        color: color-mix(in srgb, var(--theme-colour) 20%, #ffcc00) !important;
    }

    section a {
        color: color-mix(in srgb, var(--theme-colour) 20%, #ffcc00);
    }

    table.comparison tbody {
        background-color: color-mix(in srgb, var(--theme-colour) 5%, #555) !important;
    }
}

h2>a {
    color: white;
    text-decoration: none;
    ;
}

h2 {
    margin-bottom: 5px;
}

ul {
    padding-left: 1em;
}

ul.dynamic-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 0 2em;
}

table.comparison thead>tr {
    background-color: var(--theme-colour);
    color: white;
}

table.comparison td:first-child {
    padding-left: 0.5em;
}

table.comparison td:not(:first-child) {
    text-align: center;
}

table.comparison tbody {
    background-color: color-mix(in srgb, var(--theme-colour) 5%, color-mix(in srgb, var(--theme-colour) 7%, white));
}

div.comparison-container {
    overflow-x: auto;
}

code {
    color: color-mix(in srgb, var(--theme-colour) 70%, #000000);
    font-size: calc(100% - 2px);
}

img.full-width {
    width: 100%;
}

img.pct80-width {
    display: block;
    margin: auto;
    width: 80%;
}
.output-row {
    color: rgb(255, 213, 0);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.output-box {
    flex-grow: 1;
    min-height: 2.5em;
    padding: 0.5em 0.8em;
    background: #323232;
    color: rgb(255, 213, 0);
    border: 1px solid rgb(0, 255, 242);
    border-radius: 5px;
    font-size: 1em;
    white-space: pre-wrap;
    word-break: break-all;
}

#copy-button {
    height: 100%;
    padding: 0.3em 1em;
    font-size: 1em;
    color:#ff9900;
    background-color: #323232;
}
