[x-cloak] { display: none !important; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }
[data-theme="dark"] ::-webkit-scrollbar-track,
[data-theme="forest"] ::-webkit-scrollbar-track,
[data-theme="synthwave"] ::-webkit-scrollbar-track,
[data-theme="abyss"] ::-webkit-scrollbar-track { background: #2d3748; }
[data-theme="dark"] ::-webkit-scrollbar-thumb,
[data-theme="forest"] ::-webkit-scrollbar-thumb,
[data-theme="synthwave"] ::-webkit-scrollbar-thumb,
[data-theme="abyss"] ::-webkit-scrollbar-thumb { background: #718096; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover,
[data-theme="forest"] ::-webkit-scrollbar-thumb:hover,
[data-theme="synthwave"] ::-webkit-scrollbar-thumb:hover,
[data-theme="abyss"] ::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

html { font-family: 'Inter', system-ui, sans-serif; }
.font-orbitron { font-family: 'Orbitron', sans-serif; }

html.swal2-shown, body.swal2-shown { height: 100% !important; }

@keyframes wiggle { 0%, 20%, 100% { transform: rotate(0); } 5% { transform: rotate(-8deg); } 15% { transform: rotate(8deg); } }
.animate-p-wiggle { animation: wiggle 6s ease-in-out infinite; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

[data-theme="light"] {
    --p: 0.65 0.11 160;
    --pc: 0.98 0.01 160;

    --s: 0.70 0.09 310;
    --sc: 0.98 0.01 310;

    --a: 0.75 0.10 340;
    --ac: 0.98 0.01 340;

    --n: 0.35 0.03 260;
    --nc: 0.98 0.00 0;

    --b1: 0.99 0.002 160;
    --b2: 0.96 0.005 160;
    --b3: 0.92 0.01 160;
    --bc: 0.20 0.02 160;

    --in: 0.75 0.09 230;
    --inc: 0.20 0.02 230;

    --su: 0.80 0.10 150;
    --suc: 0.20 0.03 150;

    --wa: 0.80 0.12 85;
    --wac: 0.25 0.03 85;

    --er: 0.70 0.14 25;
    --erc: 0.98 0.01 25;

    --pf: 0.65 0.11 160;
    --sf: 0.70 0.09 310;
    --af: 0.75 0.10 340;
    --nf: 0.35 0.03 260;
}

.chat-background::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url('../patterns/chat-bg.svg'); background-repeat: repeat; background-size: 100px; opacity: 0.1; z-index: -1; filter: invert(0); }
[data-theme="dark"] .chat-background::before,
[data-theme="forest"] .chat-background::before,
[data-theme="synthwave"] .chat-background::before,
[data-theme="abyss"] .chat-background::before { filter: invert(1); opacity: 0.1; }

body { isolation: isolate; }
body.body-fixed-background::before { content: ''; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-image: url('../patterns/chat-bg.svg'); background-repeat: repeat; background-size: 100px; background-attachment: fixed; opacity: 0.05; z-index: -1; filter: invert(0); pointer-events: none; }
[data-theme="dark"] body.body-fixed-background::before,
[data-theme="forest"] body.body-fixed-background::before,
[data-theme="synthwave"] body.body-fixed-background::before,
[data-theme="abyss"] body.body-fixed-background::before { filter: invert(1); opacity: 0.05; }

aside {
    position: relative;
    overflow: visible;
}
aside::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, var(--fallback-n, oklch(var(--n) / 1)) 0%, oklch(var(--nf) / 0.9) 100%); opacity: 0.8; z-index: 0; transition: opacity 0.3s ease-in-out; }
aside > div, aside > nav, aside > button { position: relative; z-index: 1; }
aside .font-orbitron { line-height: 1; margin-bottom: -0.1rem; }
aside .font-sans { font-weight: 300; line-height: 1; }

.metallic-shine {
    position: relative;
    overflow: hidden;
}

.metallic-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
        to bottom,
        oklch(1 0 0 / 0.25) 0%,
        oklch(1 0 0 / 0.03) 50%,
        oklch(0 0 0 / 0.02) 100%
    );
    border-radius: inherit;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.7;
    z-index: 1;
}

.metallic-depth {
    box-shadow:
        inset 0 0.5px 1px oklch(1 0 0 / 0.2),
        inset 0 -0.5px 1px oklch(0 0 0 / 0.1);
}

[data-theme="dark"] .metallic-shine::after,
[data-theme="forest"] .metallic-shine::after,
[data-theme="synthwave"] .metallic-shine::after,
[data-theme="luxury"] .metallic-shine::after,
[data-theme="dracula"] .metallic-shine::after,
[data-theme="night"] .metallic-shine::after,
[data-theme="business"] .metallic-shine::after,
[data-theme="coffee"] .metallic-shine::after,
[data-theme="dim"] .metallic-shine::after,
[data-theme="sunset"] .metallic-shine::after,
[data-theme="abyss"] .metallic-shine::after {
    mix-blend-mode: soft-light;
    opacity: 0.6;
    background-image: linear-gradient(
        to bottom,
        oklch(1 0 0 / 0.12) 0%,
        oklch(1 0 0 / 0.02) 40%,
        oklch(0 0 0 / 0.15) 100%
    );
}

[data-theme="dark"] .metallic-depth,
[data-theme="forest"] .metallic-depth,
[data-theme="synthwave"] .metallic-depth,
[data-theme="luxury"] .metallic-depth,
[data-theme="dracula"] .metallic-depth,
[data-theme="night"] .metallic-depth,
[data-theme="business"] .metallic-depth,
[data-theme="coffee"] .metallic-depth,
[data-theme="dim"] .metallic-depth,
[data-theme="sunset"] .metallic-depth,
[data-theme="abyss"] .metallic-depth {
    box-shadow:
        inset 0 0.5px 1px oklch(1 0 0 / 0.08),
        inset 0 -0.5px 1px oklch(0 0 0 / 0.25);
}

.modal-box {
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0.5px 1px oklch(1 0 0 / 0.2),
        inset 0 -0.5px 1px oklch(0 0 0 / 0.1);
}

.modal-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
        to bottom,
        oklch(1 0 0 / 0.25) 0%,
        oklch(1 0 0 / 0.03) 50%,
        oklch(0 0 0 / 0.02) 100%
    );
    border-radius: inherit;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.7;
    z-index: 0;
}

.modal-box > * {
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .modal-box,
[data-theme="forest"] .modal-box,
[data-theme="synthwave"] .modal-box,
[data-theme="luxury"] .modal-box,
[data-theme="dracula"] .modal-box,
[data-theme="night"] .modal-box,
[data-theme="business"] .modal-box,
[data-theme="coffee"] .modal-box,
[data-theme="dim"] .modal-box,
[data-theme="sunset"] .modal-box,
[data-theme="abyss"] .modal-box {
    box-shadow:
        inset 0 0.5px 1px oklch(1 0 0 / 0.08),
        inset 0 -0.5px 1px oklch(0 0 0 / 0.25);
}

[data-theme="dark"] .modal-box::after,
[data-theme="forest"] .modal-box::after,
[data-theme="synthwave"] .modal-box::after,
[data-theme="luxury"] .modal-box::after,
[data-theme="dracula"] .modal-box::after,
[data-theme="night"] .modal-box::after,
[data-theme="business"] .modal-box::after,
[data-theme="coffee"] .modal-box::after,
[data-theme="dim"] .modal-box::after,
[data-theme="sunset"] .modal-box::after,
[data-theme="abyss"] .modal-box::after {
    mix-blend-mode: soft-light;
    opacity: 0.6;
    background-image: linear-gradient(
        to bottom,
        oklch(1 0 0 / 0.12) 0%,
        oklch(1 0 0 / 0.02) 40%,
        oklch(0 0 0 / 0.15) 100%
    );
}

div:where(.swal2-container) {
    z-index: 99999 !important;
}

.swal-z-index-fix {
    z-index: 10000 !important;
}
