@keyframes rainbow-horizontal {
    0% {
        background-position: 0% 0%;
    }

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

@keyframes rainbow-vertical {
    0% {
        background-position: 0% 0%;
    }

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

.rainbow-text {
    background-image:
        linear-gradient(to right,
            rgb(255, 64, 64),
            rgb(255, 255, 64),
            rgb(64, 255, 64),
            rgb(64, 255, 255),
            rgb(64, 64, 255),
            rgb(255, 64, 255),
            rgb(255, 64, 64));
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-horizontal .8s infinite linear;
    font-weight: bold;
}

#pluginMenu {
    z-index: 2147483644;
    position: fixed;
    top: 50%;
    right: 0;
    padding: 10px 26px;
    background-color: var(--body-dark);
    border: 1px solid var(--text);
    border-radius: 5px;
    box-shadow: 0 0 10px var(--text);
    transform: translate(calc(100% - 26px)) translateY(-50%);
    transition: transform .3s ease-in-out;
}

#pluginMenu:not(.expanded) {
    overflow: visible;
}

#pluginMenu:not(.expanded)::before {
    content: "";
    mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIj48cGF0aCBkPSJNNTYwLTI0MCAzMjAtNDgwbDI0MC0yNDAgNTYgNTYtMTg0IDE4NCAxODQgMTg0LTU2IDU2WiIvPjwvc3ZnPg==") no-repeat center;
    background-color: var(--text);
    width: 24px;
    height: 24px;
    position: absolute;
    left: 0;
    top: 50%;
    line-height: 0;
    transform: translate(0%, -50%);
}

#pluginMenu.expanded {
    transform: translateX(0) translateY(-50%);
}

#pluginMenu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#pluginMenu li {
    padding: 5px 10px;
    cursor: pointer;
    text-align: center;
    user-select: none;
    color: var(--text);
}

#pluginMenu li:hover {
    background-color: var(--primary-dark);
    border-radius: 3px;
}

#pluginConfig {
    color: var(--text);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 2147483646;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#pluginConfig .main {
    background-color: var(--body);
    padding: 24px;
    margin: 10px;
    overflow-y: auto;
    width: 480px;
}

#pluginConfig .buttonList {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

@media (max-width: 640px) {
    #pluginConfig .main {
        width: 100%;
    }
}

#pluginConfig button {
    background-color: var(--primary);
    margin: 0px 20px 0px 20px;
    padding: 10px 20px;
    color: var(--primary-text);
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#pluginConfig button {
    background-color: var(--primary);
}

#pluginConfig button[disabled] {
    background-color: var(--muted);
    cursor: not-allowed;
}

#pluginConfig p {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    margin-bottom: 0px;
}

#pluginConfig fieldset {
    border: none;
    margin: 10px 0 0 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
}

#pluginConfig fieldset>legend {
    margin: 0 0 5px 0;
    padding: 0;
}

#pluginConfig fieldset>label {
    text-align: center;
}

#pluginConfig p label {
    display: flex;
    flex-direction: column;
    margin: 5px 0 0 0;
}

#pluginConfig .inputRadioLine {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
}

#pluginConfig input[type="text"],
#pluginConfig input[type="password"] {
    outline: none;
    border-top: none;
    border-right: none;
    border-left: none;
    border-image: initial;
    border-bottom: 1px solid var(--muted);
    line-height: 1;
    height: 30px;
    box-sizing: border-box;
    width: 100%;
    background-color: var(--body);
    color: var(--text);
}

#pluginConfig input[type='checkbox'].switch {
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    width: 40px;
    height: 20px;
    background: var(--muted);
    border-radius: 10px;
    transition: border-color .2s, background-color .2s;
}

#pluginConfig input[type='checkbox'].switch::after {
    content: '';
    display: inline-block;
    width: 40%;
    height: 80%;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0, 0, 2px, var(--muted);
    transition: .2s;
    top: 2px;
    position: absolute;
    right: 55%;
}

#pluginConfig input[type='checkbox'].switch:checked {
    background: var(--success);
}

#pluginConfig input[type='checkbox'].switch:checked::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 2px;
}

#pluginOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 2147483645;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#pluginOverlay .main {
    color: var(--text);
    font-size: 24px;
    width: 60%;
    background-color: rgba(64, 64, 64, 0.75);
    padding: 24px;
    margin: 10px;
    overflow-y: auto;
}

@media (max-width: 640px) {
    #pluginOverlay .main {
        width: 100%;
    }
}

#pluginOverlay button {
    padding: 10px 20px;
    color: var(--primary-text);
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#pluginOverlay button {
    background-color: var(--primary);
}

#pluginOverlay button[disabled] {
    background-color: var(--muted);
    cursor: not-allowed;
}

#pluginOverlay .checkbox {
    width: 32px;
    height: 32px;
    margin: 0 4px 0 0;
    padding: 0;
}

#pluginOverlay .checkbox-container {
    display: flex;
    align-items: center;
    margin: 0 0 10px 0;
}

#pluginOverlay .checkbox-label {
    color: var(--text);
    font-size: 32px;
    font-weight: bold;
    margin-left: 10px;
    display: flex;
    align-items: center;
}

.fixed-bottom-right {
    position: fixed;
    bottom: 0px;
    right: 0px;
    background-color: var(--body);
    color: var(--text);
    border-top: 1px solid var(--primary);
    border-left: 1px solid var(--primary);
    border-top-left-radius: 6px;
    padding: 2px 5px 2px 5px;
    margin: 0px;
    user-select: none;
    z-index: 102;
}

.follow {
    bottom: 24px;
    right: 2px;
    border-radius: 2px;
    position: absolute;
    padding: 3px 5px;
    background-color: rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.selectButton {
    accent-color: var(--primary);
    position: absolute;
    width: 38px;
    height: 38px;
    right: 0px;
    cursor: pointer;
    z-index: 102;
    top: 22px;
}

.deleteButton {
    accent-color: var(--danger);
    position: absolute;
    width: 38px;
    height: 38px;
    left: 0px;
    cursor: pointer;
    z-index: 101;
    border: none;
    padding: 0;
    margin: 3px;
    top: 22px;
}

.toast h3 {
    margin: 0 0 10px 0;
}

.toast p {
    margin: 0;
}

.offscreen-container {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
    max-width: 480px;
}

.toast-container {
    isolation: isolate;
    position: fixed;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: transform calc(0.6 * var(--toast-rate) * 1s) ease, opacity calc(0.6 * var(--toast-rate) * 1s) ease;
}

.toast-container.toast-top {
    top: 0;
}

.toast-container.toast-bottom {
    bottom: 0;
}

.toast-container.toast-left {
    left: 0;
    align-items: flex-start;
}

.toast-container.toast-center {
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}

.toast-container.toast-right {
    right: 0;
    align-items: flex-end;
}

#toast-container-top-left .toast {
    margin: 10px 0 0 10px;
    transform-origin: left center;
}

#toast-container-top-center .toast {
    margin: 10px 0 0 0;
    transform-origin: top;
}

#toast-container-top-right .toast {
    margin: 10px 10px 0 0;
    transform-origin: right center;
}

#toast-container-bottom-left .toast {
    margin: 0 0 10px 10px;
    transform-origin: left center;
}

#toast-container-bottom-center .toast {
    margin: 0 0 10px 0;
    transform-origin: bottom;
}

#toast-container-bottom-right .toast {
    margin: 0 10px 10px 0;
    transform-origin: right center;
}

.toast {
    --toast-rate: 1;
    --toast-translate: 0;
    --toast-scale: 1;
    position: relative;
    transition: transform calc(0.4s * var(--toast-rate)) cubic-bezier(0.34, 1.56, 0.64, 1), opacity calc(0.3s * var(--toast-rate)) ease;
    transform: translate3d(0, var(--toast-translate), 0) scale(var(--toast-scale));
    max-width: 480px;
    max-height: 0px;
    will-change: transform, opacity;
    backface-visibility: hidden;
    contain: content;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.toast-close {
    position: absolute;
    color: var(--text);
    top: 5px;
    right: 5px;
    cursor: pointer;
    font-size: 12px;
    line-height: 12px;
    z-index: 2147483648;
    transform-origin: center center;
}

.toast-content {
    border-radius: 6px;
    padding: 14px 18px 14px 18px;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--primary);
    color: var(--primary-text);
    cursor: pointer;
    white-space: normal;
    word-break: break-all;
    overflow: hidden;
    position: relative;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    transform: scaleX(var(--toast-progress, 0));
    transition: transform calc(0.05s * var(--toast-rate)) linear;
    will-change: transform;
    backface-visibility: hidden;
}

.toast:hover {
    z-index: 2147483648;
    --toast-scale: 1.15;
}

.toast-container.toast-left .toast .toast-content .toast-progress {
    transform-origin: left;
}

.toast-container.toast-center .toast .toast-content .toast-progress {
    transform-origin: center;
}

.toast-container.toast-right .toast .toast-content .toast-progress {
    transform-origin: right;
}

.toast-container.toast-top .toast.show {
    animation: toast-in-top calc(0.3 * var(--toast-rate) * 1s) ease-in-out forwards;
}

.toast-container.toast-bottom .toast.show {
    animation: toast-in-bottom calc(0.3 * var(--toast-rate) * 1s) ease-in-out forwards;
}

.toast-container.toast-top .toast.hide {
    animation: toast-out-top calc(0.3 * var(--toast-rate) * 1s) ease-in-out forwards;
}

.toast-container.toast-bottom .toast.hide {
    animation: toast-out-bottom calc(0.3 * var(--toast-rate) * 1s) ease-in-out forwards;
}

@keyframes toast-in-top {
    from {
        opacity: 0;
        max-height: 0px;
    }

    to {
        max-height: var(--toast-height);
    }
}

@keyframes toast-in-bottom {
    from {
        opacity: 0;
        max-height: 0px;
    }

    to {
        max-height: var(--toast-height);
    }
}

@keyframes toast-out-top {
    from {
        max-height: var(--toast-height);
    }

    to {
        opacity: 0;
        max-height: 0px;
    }
}

@keyframes toast-out-bottom {
    from {
        max-height: var(--toast-height);
    }

    to {
        opacity: 0;
        max-height: 0px;
    }
}