:root {
    --bg: #060609;
    --bg-soft: #0a090f;
    --panel: rgba(12,11,17,.91);
    --panel-solid: #0d0c12;

    --text: #f5f3f8;
    --muted: #86818d;
    --muted-dark: #55515c;

    --purple: #8d4cff;
    --purple2: #b47aff;

    --gold: #e0b85b;
    --gold2: #ffda79;

    --green: #42e690;
    --red: #ff636d;

    --line: rgba(255,255,255,.065);
    --line2: rgba(255,255,255,.10);

    --radius: 18px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;

    background: var(--bg);
    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "Segoe UI",
        sans-serif;

    overflow: hidden;
}

button,
textarea,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.grid {
    position: absolute;
    inset: 0;

    opacity: .027;

    background-image:
        linear-gradient(
            rgba(255,255,255,.7) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.7) 1px,
            transparent 1px
        );

    background-size:
        42px 42px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent
        );
}

.glow {
    position: absolute;

    width: 550px;
    height: 550px;

    border-radius: 100%;

    filter: blur(160px);
}

.glow-a {
    right: -260px;
    top: -240px;

    background: #7134ff;

    opacity: .18;
}

.glow-b {
    left: 15%;
    bottom: -450px;

    background: #d6a943;

    opacity: .07;
}


/* APP */

.shell {
    position: relative;

    display: flex;

    width: 100%;
    height: 100dvh;
}


/* SIDEBAR */

.sidebar {
    width: 285px;
    flex: 0 0 285px;

    display: flex;
    flex-direction: column;

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

    background:
        rgba(8,8,12,.89);

    backdrop-filter:
        blur(28px);

    z-index: 50;
}

.side-brand {
    display: flex;
    align-items: center;

    gap: 12px;

    height: 81px;

    padding:
        15px 18px;

    border-bottom:
        1px solid var(--line);
}

.brand-logo {
    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    border:
        1px solid
        rgba(224,184,91,.32);

    background:
        radial-gradient(
            circle at 25% 20%,
            rgba(255,218,121,.20),
            rgba(141,76,255,.12) 55%,
            rgba(12,11,17,.9)
        );

    box-shadow:
        inset 0 0 20px rgba(141,76,255,.10),
        0 0 24px rgba(141,76,255,.06);

    color:
        var(--gold2);

    font-size: 21px;
    font-weight: 950;
}

.brand-name {
    font-size: 14px;

    font-weight: 900;

    letter-spacing:
        .075em;
}

.brand-name b {
    color:
        var(--gold2);
}

.brand-caption {
    margin-top: 5px;

    color:
        var(--muted-dark);

    font-size: 7px;

    font-weight: 900;

    letter-spacing:
        .16em;
}

.new-chat {
    height: 44px;

    margin:
        14px 13px 15px;

    display: flex;
    align-items: center;

    gap: 9px;

    padding:
        0 13px;

    border:
        1px solid
        rgba(224,184,91,.14);

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            rgba(224,184,91,.08),
            rgba(141,76,255,.05)
        );

    color:
        #e9e5ec;

    font-size: 12px;
    font-weight: 700;

    transition:
        .15s ease;
}

.new-chat span {
    color:
        var(--gold2);

    font-size: 20px;
}

.new-chat:hover {
    border-color:
        rgba(224,184,91,.27);

    background:
        linear-gradient(
            135deg,
            rgba(224,184,91,.12),
            rgba(141,76,255,.08)
        );
}

.history-label {
    padding:
        0 18px 8px;

    color:
        #48444e;

    font-size: 8px;
    font-weight: 900;

    letter-spacing:
        .18em;
}

.chat-list {
    flex: 1;

    min-height: 0;

    padding:
        0 9px;

    overflow-y: auto;

    scrollbar-width: none;
}

.chat-list::-webkit-scrollbar {
    display: none;
}

.chat-history-item {
    display: flex;

    align-items: center;

    margin-bottom: 3px;

    border:
        1px solid transparent;

    border-radius: 12px;
}

.chat-history-item:hover {
    background:
        rgba(255,255,255,.025);
}

.chat-history-item.active {
    background:
        rgba(141,76,255,.075);

    border-color:
        rgba(141,76,255,.12);
}

.chat-history-open {
    min-width: 0;

    flex: 1;

    display: block;

    padding:
        10px 10px;

    border: 0;

    background:
        transparent;

    color:
        var(--text);

    text-align: left;
}

.chat-history-open strong {
    display: block;

    overflow: hidden;

    font-size: 11px;
    font-weight: 650;

    white-space: nowrap;

    text-overflow:
        ellipsis;
}

.chat-history-open small {
    display: block;

    margin-top: 5px;

    overflow: hidden;

    color:
        #58535f;

    font-size: 9px;

    white-space: nowrap;

    text-overflow:
        ellipsis;
}

.chat-delete {
    width: 28px;
    height: 28px;

    margin-right: 5px;

    border: 0;

    border-radius: 8px;

    background:
        transparent;

    color:
        #514d57;

    font-size: 17px;
}

.chat-delete:hover {
    color:
        #ff747d;

    background:
        rgba(255,99,109,.08);
}

.sidebar-footer {
    padding:
        10px;

    border-top:
        1px solid var(--line);
}

.profile-button {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 10px;

    padding:
        8px;

    border: 0;

    border-radius: 13px;

    background:
        transparent;

    color:
        var(--text);

    text-align: left;
}

.profile-button:hover {
    background:
        rgba(255,255,255,.03);
}

.profile-avatar {
    width: 34px;
    height: 34px;

    flex:
        0 0 34px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            rgba(224,184,91,.17),
            rgba(141,76,255,.18)
        );

    border:
        1px solid
        rgba(224,184,91,.15);

    color:
        var(--gold2);

    font-size: 12px;
    font-weight: 900;
}

.profile-info {
    min-width: 0;

    flex: 1;
}

.profile-info strong {
    display: block;

    overflow: hidden;

    font-size: 11px;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.profile-info small {
    display: block;

    margin-top: 3px;

    color:
        var(--muted-dark);

    font-size: 8px;
}

.profile-arrow {
    color:
        #5b5662;

    font-size: 20px;
}


/* WORKSPACE */

.workspace {
    position: relative;

    flex: 1;

    min-width: 0;

    display: flex;
    flex-direction: column;
}

.topbar {
    position: relative;

    z-index: 20;

    height: 81px;

    flex:
        0 0 81px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding:
        0 21px;

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

    background:
        rgba(7,7,10,.62);

    backdrop-filter:
        blur(24px);
}

.topbar-left {
    display: flex;

    align-items: center;

    gap: 11px;
}

.current-title {
    max-width:
        min(400px,45vw);

    overflow: hidden;

    font-size: 13px;
    font-weight: 720;

    white-space: nowrap;

    text-overflow:
        ellipsis;
}

.connection {
    display: flex;

    align-items: center;

    gap: 6px;

    margin-top: 6px;

    color:
        #5c5762;

    font-size: 7px;

    font-weight: 900;

    letter-spacing:
        .16em;
}

.status-dot {
    width: 6px;
    height: 6px;

    border-radius: 100%;

    background:
        #59555d;
}

.status-dot.online {
    background:
        var(--green);

    box-shadow:
        0 0 9px
        rgba(66,230,144,.70);
}

.status-dot.offline {
    background:
        var(--red);
}

.top-actions {
    display: flex;

    align-items: center;

    gap: 9px;
}

.agent-badge {
    height: 31px;

    display: flex;
    align-items: center;

    gap: 7px;

    padding:
        0 10px;

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

    border-radius: 10px;

    color:
        #74707a;

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

    font-size: 7px;

    font-weight: 900;

    letter-spacing:
        .14em;
}

.agent-badge span {
    color:
        var(--green);

    font-size: 8px;
}

.square-button {
    width: 38px;
    height: 38px;

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

    border-radius: 11px;

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

    color:
        var(--gold);

    font-size: 21px;
}

.square-button:hover {
    background:
        rgba(255,255,255,.05);
}

.mobile-menu {
    display: none;

    width: 36px;
    height: 36px;

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

    border-radius: 10px;

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

    color:
        var(--text);

    font-size: 16px;
}


/* CHAT */

.chat {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding:
        30px
        clamp(18px,5vw,70px)
        160px;

    scrollbar-width: thin;

    scrollbar-color:
        #242029 transparent;
}

.chat::-webkit-scrollbar {
    width: 5px;
}

.chat::-webkit-scrollbar-thumb {
    border-radius: 20px;

    background:
        #242029;
}


/* WELCOME */

.welcome {
    width: 100%;

    max-width: 850px;

    margin:
        3vh auto 0;

    text-align: center;
}

.hero-mark {
    position: relative;

    width: 142px;
    height: 142px;

    margin:
        0 auto 24px;

    display: grid;
    place-items: center;
}

.hero-core {
    position: relative;

    z-index: 5;

    width: 75px;
    height: 75px;

    display: grid;
    place-items: center;

    border-radius: 24px;

    border:
        1px solid
        rgba(224,184,91,.40);

    background:
        radial-gradient(
            circle at 25% 20%,
            rgba(255,218,121,.28),
            rgba(141,76,255,.17) 48%,
            #0c0a11 82%
        );

    box-shadow:
        0 0 50px rgba(141,76,255,.15),
        0 0 90px rgba(224,184,91,.045),
        inset 0 0 25px rgba(141,76,255,.08);

    color:
        var(--gold2);

    font-size: 29px;
    font-weight: 950;
}

.hero-ring {
    position: absolute;

    border-radius: 100%;
}

.ring-one {
    width: 109px;
    height: 109px;

    border:
        1px solid
        rgba(141,76,255,.27);
}

.ring-two {
    width: 138px;
    height: 138px;

    border:
        1px dashed
        rgba(224,184,91,.14);

    animation:
        rotate 22s linear infinite;
}

.orbit-dot {
    position: absolute;

    top: 15px;
    left: 68px;

    width: 7px;
    height: 7px;

    border-radius: 100%;

    background:
        var(--purple2);

    box-shadow:
        0 0 12px
        var(--purple);

    animation:
        pulse 2s ease infinite;
}

@keyframes rotate {
    to {
        transform:
            rotate(360deg);
    }
}

@keyframes pulse {
    50% {
        transform:
            scale(1.35);

        opacity:
            .65;
    }
}

.eyebrow {
    color:
        var(--gold);

    font-size: 8px;

    font-weight: 900;

    letter-spacing:
        .28em;
}

.welcome h1 {
    max-width: 650px;

    margin:
        13px auto 0;

    font-size:
        clamp(35px,5vw,58px);

    line-height: 1;

    letter-spacing:
        -.05em;

    font-weight: 780;
}

.welcome h1 span {
    background:
        linear-gradient(
            100deg,
            var(--gold2),
            #e7a7cd 48%,
            var(--purple2)
        );

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent;
}

.welcome > p {
    max-width: 560px;

    margin:
        19px auto 0;

    color:
        var(--muted);

    font-size: 13px;

    line-height: 1.6;
}

.quick-grid {
    max-width: 690px;

    margin:
        34px auto 0;

    display: grid;

    grid-template-columns:
        repeat(2,1fr);

    gap: 10px;
}

.quick-card {
    min-height: 86px;

    display: grid;

    grid-template-columns:
        42px 1fr auto;

    align-items: center;

    gap: 11px;

    padding:
        13px;

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

    border-radius:
        17px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.028),
            rgba(255,255,255,.009)
        );

    color:
        var(--text);

    text-align: left;

    transition:
        .17s ease;
}

.quick-card:hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(141,76,255,.18);

    background:
        linear-gradient(
            145deg,
            rgba(141,76,255,.055),
            rgba(224,184,91,.025)
        );
}

.quick-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    border:
        1px solid
        rgba(224,184,91,.12);

    background:
        linear-gradient(
            145deg,
            rgba(224,184,91,.10),
            rgba(141,76,255,.09)
        );

    color:
        var(--gold2);

    font-size: 16px;
}

.quick-card strong {
    display: block;

    font-size: 12px;
}

.quick-card span {
    display: block;

    margin-top: 5px;

    color:
        #68636e;

    font-size: 9px;
}

.quick-card i {
    color:
        #5f5966;

    font-size: 15px;

    font-style: normal;
}


/* MESSAGES */

.message-row {
    width: 100%;

    max-width: 820px;

    margin:
        0 auto 25px;

    display: flex;

    align-items:
        flex-start;

    gap: 12px;
}

.message-avatar {
    width: 32px;
    height: 32px;

    flex:
        0 0 32px;

    display: grid;
    place-items: center;

    border-radius:
        10px;

    font-size: 10px;

    font-weight: 900;
}

.message-row.assistant
.message-avatar {
    border:
        1px solid
        rgba(224,184,91,.20);

    background:
        linear-gradient(
            145deg,
            rgba(224,184,91,.13),
            rgba(141,76,255,.13)
        );

    color:
        var(--gold2);
}

.message-row.user
.message-avatar {
    background:
        rgba(255,255,255,.045);

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

    color:
        #aaa5af;
}

.message-content {
    min-width: 0;

    flex: 1;
}

.message-label {
    margin:
        2px 0 7px;

    color:
        #615c66;

    font-size: 8px;

    font-weight: 900;

    letter-spacing:
        .14em;
}

.message-row.assistant
.message-label {
    color:
        #a879ef;
}

.message-bubble {
    display: inline-block;

    max-width: 100%;

    padding:
        12px 14px;

    border-radius:
        15px;

    white-space:
        pre-wrap;

    word-break:
        break-word;

    font-size: 13px;

    line-height: 1.65;
}

.message-row.user
.message-bubble {
    border:
        1px solid
        rgba(224,184,91,.12);

    background:
        linear-gradient(
            135deg,
            rgba(224,184,91,.09),
            rgba(141,76,255,.035)
        );
}

.message-row.assistant
.message-bubble {
    border:
        1px solid
        rgba(141,76,255,.11);

    background:
        rgba(13,12,18,.70);
}

.generating
.message-bubble::after {
    content: "";

    display: inline-block;

    width: 5px;
    height: 14px;

    margin-left: 5px;

    vertical-align:
        -2px;

    background:
        var(--gold);

    animation:
        caret .75s step-end infinite;
}

@keyframes caret {
    50% {
        opacity: 0;
    }
}

.error-message
.message-bubble {
    color:
        #ff8188;
}


/* COMPOSER */

.composer-wrap {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 30;

    padding:
        26px
        clamp(15px,5vw,55px)
        calc(
            11px +
            env(safe-area-inset-bottom)
        );

    background:
        linear-gradient(
            transparent,
            rgba(6,6,9,.96)
            34%
        );
}

.composer {
    width: 100%;
    max-width: 820px;

    margin: auto;

    display: flex;

    align-items:
        flex-end;

    gap: 8px;

    padding:
        7px;

    border:
        1px solid
        rgba(141,76,255,.18);

    border-radius:
        19px;

    background:
        rgba(14,13,19,.94);

    box-shadow:
        0 12px 45px rgba(0,0,0,.30),
        0 0 30px rgba(141,76,255,.035);

    backdrop-filter:
        blur(24px);
}

textarea {
    flex: 1;

    min-height: 45px;
    max-height: 160px;

    padding:
        12px 12px;

    resize: none;

    border: 0;
    outline: 0;

    background:
        transparent;

    color:
        var(--text);

    font-size: 14px;

    line-height: 1.45;
}

textarea::placeholder {
    color:
        #5e5964;
}

.send-button {
    width: 45px;
    height: 45px;

    flex:
        0 0 45px;

    border: 0;

    border-radius:
        13px;

    background:
        linear-gradient(
            145deg,
            var(--gold2),
            #bb9137
        );

    color:
        #090806;

    font-size: 21px;

    font-weight: 900;

    box-shadow:
        0 5px 20px
        rgba(224,184,91,.10);
}

.send-button:hover {
    transform:
        translateY(-1px);
}

.send-button:disabled {
    opacity: .40;
}

.composer-meta {
    max-width: 800px;

    margin:
        7px auto 0;

    display: flex;

    justify-content:
        space-between;

    color:
        #46414b;

    font-size: 6px;

    font-weight: 900;

    letter-spacing:
        .17em;
}

.composer-meta span:last-child {
    display: flex;

    align-items: center;

    gap: 5px;
}

.composer-meta i {
    width: 5px;
    height: 5px;

    border-radius: 100%;

    background:
        var(--green);

    box-shadow:
        0 0 7px
        rgba(66,230,144,.65);
}


/* MODAL */

.modal {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: grid;

    place-items: center;

    padding:
        18px;

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

    backdrop-filter:
        blur(7px);

    opacity: 0;

    pointer-events: none;

    transition:
        .18s ease;
}

.modal.show {
    opacity: 1;

    pointer-events:
        auto;
}

.settings-card {
    width: 100%;

    max-width: 420px;

    padding:
        20px;

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

    border-radius:
        22px;

    background:
        linear-gradient(
            145deg,
            #14121b,
            #0b0a0f
        );

    box-shadow:
        0 30px 100px
        rgba(0,0,0,.65);
}

.settings-head {
    display: flex;

    justify-content:
        space-between;

    margin-bottom:
        24px;
}

.settings-head h2 {
    margin: 0;

    font-size: 19px;
}

.settings-head p {
    margin:
        6px 0 0;

    color:
        var(--muted);

    font-size: 10px;
}

.close-button {
    width: 34px;
    height: 34px;

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

    border-radius:
        10px;

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

    color:
        #aaa5af;

    font-size: 20px;
}

.settings-card label {
    display: block;

    margin-bottom:
        8px;

    color:
        #aaa5af;

    font-size: 10px;

    font-weight: 700;
}

.settings-card input {
    width: 100%;

    height: 48px;

    padding:
        0 13px;

    border:
        1px solid
        rgba(141,76,255,.17);

    border-radius:
        13px;

    outline: none;

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

    color:
        var(--text);
}

.settings-card input:focus {
    border-color:
        rgba(180,122,255,.43);
}

.settings-note {
    margin-top:
        9px;

    color:
        #57525d;

    font-size: 9px;

    line-height: 1.5;
}

.save-button {
    width: 100%;

    height: 45px;

    margin-top:
        17px;

    border: 0;

    border-radius:
        13px;

    background:
        linear-gradient(
            135deg,
            var(--gold2),
            #bd9237
        );

    color:
        #090806;

    font-weight: 850;
}


/* MOBILE */

.mobile-overlay {
    display: none;
}

@media (max-width: 760px) {

    .sidebar {
        position: fixed;

        left: 0;
        top: 0;
        bottom: 0;

        width:
            min(84vw,310px);

        transform:
            translateX(-105%);

        transition:
            transform .20s ease;
    }

    .sidebar.open {
        transform:
            translateX(0);
    }

    .mobile-overlay {
        position: fixed;

        inset: 0;

        z-index: 40;

        display: block;

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

        backdrop-filter:
            blur(3px);

        opacity: 0;

        pointer-events: none;

        transition:
            opacity .20s;
    }

    .mobile-overlay.show {
        opacity: 1;

        pointer-events:
            auto;
    }

    .mobile-menu {
        display: block;
    }

    .topbar {
        height:
            calc(
                65px +
                env(safe-area-inset-top)
            );

        flex-basis:
            calc(
                65px +
                env(safe-area-inset-top)
            );

        padding:
            env(safe-area-inset-top)
            13px
            0;
    }

    .agent-badge {
        display: none;
    }

    .current-title {
        max-width:
            52vw;

        font-size:
            12px;
    }

    .chat {
        padding:
            20px
            14px
            145px;
    }

    .welcome {
        margin-top:
            2vh;
    }

    .hero-mark {
        width: 125px;
        height: 125px;

        margin-bottom:
            18px;

        transform:
            scale(.88);
    }

    .welcome h1 {
        font-size:
            clamp(34px,11vw,48px);
    }

    .welcome > p {
        max-width:
            340px;

        font-size:
            12px;
    }

    .quick-grid {
        margin-top:
            26px;

        grid-template-columns:
            1fr 1fr;

        gap:
            8px;
    }

    .quick-card {
        min-height:
            79px;

        grid-template-columns:
            37px 1fr;

        padding:
            10px;
    }

    .quick-icon {
        width: 37px;
        height: 37px;
    }

    .quick-card i {
        display: none;
    }

    .quick-card strong {
        font-size:
            11px;
    }

    .quick-card span {
        font-size:
            8px;
    }

    .message-row {
        gap: 9px;

        margin-bottom:
            20px;
    }

    .message-avatar {
        width: 29px;
        height: 29px;

        flex-basis:
            29px;
    }

    .message-bubble {
        padding:
            10px 12px;

        font-size:
            13px;
    }

    .composer-wrap {
        padding:
            21px
            10px
            calc(
                7px +
                env(safe-area-inset-bottom)
            );
    }
}

@media (max-width: 390px) {

    .brand-name {
        font-size:
            12px;
    }

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


/* MODEL SETTINGS */

.settings-group {
    margin-top: 22px;
}

.settings-label {
    margin-bottom: 8px;

    color: #aaa5af;

    font-size: 10px;
    font-weight: 700;
}

.model-select {
    width: 100%;
    height: 48px;

    padding:
        0 42px 0 13px;

    border:
        1px solid rgba(141,76,255,.18);

    border-radius: 13px;

    outline: none;

    background:
        #0b0a10;

    color: #f5f3f8;

    font-size: 12px;

    appearance: none;
    -webkit-appearance: none;

    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            #77717e 50%
        ),
        linear-gradient(
            135deg,
            #77717e 50%,
            transparent 50%
        );

    background-position:
        calc(100% - 18px) 20px,
        calc(100% - 13px) 20px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat:
        no-repeat;
}

.model-select:focus {
    border-color:
        rgba(180,122,255,.45);
}

.model-info {
    margin-top: 10px;

    padding: 12px;

    border:
        1px solid rgba(255,255,255,.055);

    border-radius: 12px;

    background:
        rgba(255,255,255,.018);
}

.model-info-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.model-info-head strong {
    font-size: 11px;
}

.model-info-head span {
    padding:
        4px 7px;

    border-radius: 7px;

    border:
        1px solid rgba(66,230,144,.18);

    background:
        rgba(66,230,144,.06);

    color:
        #63e9a0;

    font-size: 7px;
    font-weight: 900;

    letter-spacing:
        .1em;
}

.model-info-text {
    margin-top: 8px;

    color:
        #6e6875;

    font-size: 9px;

    line-height: 1.5;
}


/* =========================================
   HACK SHARK — SUBTLE IRIDESCENT THEME
========================================= */

:root {
    --hs-gold: #e6b85c;
    --hs-gold-soft: #f0cf84;

    --hs-purple: #9a63ff;
    --hs-purple-soft: #c19cff;

    --hs-green: #4ae29a;
    --hs-green-soft: #82efb9;

    --hs-iridescent:
        linear-gradient(
            115deg,
            var(--hs-gold) 0%,
            var(--hs-gold-soft) 22%,
            var(--hs-purple) 50%,
            var(--hs-green) 78%,
            var(--hs-gold) 100%
        );
}


/* Лёгкая анимация перелива */

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

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

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


/* LOGO */

.brand-logo,
.logo,
.hero-core,
.core-box {
    position: relative;

    border-color:
        rgba(230,184,92,.34) !important;

    box-shadow:
        0 0 26px rgba(154,99,255,.10),
        0 0 34px rgba(74,226,154,.045),
        inset 0 0 24px rgba(230,184,92,.05) !important;
}


.brand-logo span,
.logo span,
.hero-core,
.core-box {
    background:
        var(--hs-iridescent);

    background-size:
        220% 220%;

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent !important;

    animation:
        hsShimmer 9s ease-in-out infinite;
}


/* BRAND NAME */

.brand-name b,
.brand-name span,
.system-label,
.eyebrow {
    background:
        var(--hs-iridescent);

    background-size:
        220% 220%;

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent !important;

    animation:
        hsShimmer 11s ease-in-out infinite;
}


/* HERO GRADIENT TEXT */

.welcome h1 span {
    background:
        linear-gradient(
            100deg,
            var(--hs-gold-soft),
            var(--hs-purple-soft),
            var(--hs-green-soft)
        ) !important;

    background-size:
        180% 180% !important;

    -webkit-background-clip:
        text !important;

    background-clip:
        text !important;

    color:
        transparent !important;

    animation:
        hsShimmer 12s ease-in-out infinite;
}


/* ACTIVE / PRIMARY BUTTONS */

.send-button,
.send,
.save-button,
.save-settings {
    background:
        linear-gradient(
            125deg,
            var(--hs-gold-soft),
            #d9af54 35%,
            var(--hs-purple-soft) 70%,
            var(--hs-green-soft)
        ) !important;

    background-size:
        220% 220% !important;

    animation:
        hsShimmer 10s ease-in-out infinite;

    box-shadow:
        0 5px 22px rgba(230,184,92,.10),
        0 0 24px rgba(154,99,255,.06),
        0 0 28px rgba(74,226,154,.035) !important;
}


/* INPUT BORDER */

.composer {
    border:
        1px solid transparent !important;

    background:
        linear-gradient(
            rgba(14,13,19,.96),
            rgba(14,13,19,.96)
        ) padding-box,
        linear-gradient(
            115deg,
            rgba(230,184,92,.42),
            rgba(154,99,255,.38),
            rgba(74,226,154,.24)
        ) border-box !important;

    box-shadow:
        0 10px 42px rgba(0,0,0,.28),
        0 0 32px rgba(154,99,255,.045),
        0 0 26px rgba(74,226,154,.025) !important;
}


/* QUICK CARDS */

.quick-card,
.action-card {
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}


.quick-card:hover,
.action-card:active {
    border-color:
        rgba(154,99,255,.22) !important;

    box-shadow:
        0 8px 26px rgba(0,0,0,.16),
        0 0 18px rgba(230,184,92,.035),
        0 0 22px rgba(74,226,154,.025);
}


/* ICONS */

.quick-icon,
.action-icon,
.profile-avatar,
.message-row.assistant .message-avatar {
    background:
        linear-gradient(
            145deg,
            rgba(230,184,92,.13),
            rgba(154,99,255,.11),
            rgba(74,226,154,.055)
        ) !important;

    border-color:
        rgba(230,184,92,.16) !important;

    box-shadow:
        inset 0 0 16px rgba(154,99,255,.035);
}


/* ASSISTANT LABEL */

.message-row.assistant .message-label,
.assistant-message::before {
    background:
        linear-gradient(
            90deg,
            var(--hs-purple-soft),
            var(--hs-gold-soft),
            var(--hs-green-soft)
        );

    background-size:
        180% 180%;

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent !important;

    animation:
        hsShimmer 13s ease-in-out infinite;
}


/* STATUS */

.status-dot.online,
#statusDot.online,
.secure i,
.composer-meta i {
    background:
        var(--hs-green) !important;

    box-shadow:
        0 0 7px rgba(74,226,154,.65),
        0 0 14px rgba(74,226,154,.18) !important;
}


/* ACTIVE CHAT */

.chat-history-item.active {
    background:
        linear-gradient(
            110deg,
            rgba(230,184,92,.045),
            rgba(154,99,255,.08),
            rgba(74,226,154,.035)
        ) !important;

    border-color:
        rgba(154,99,255,.14) !important;
}


/* NEW CHAT BUTTON */

.new-chat {
    background:
        linear-gradient(
            120deg,
            rgba(230,184,92,.075),
            rgba(154,99,255,.055),
            rgba(74,226,154,.035)
        ) !important;

    border-color:
        rgba(230,184,92,.15) !important;
}


/* SUBTLE AMBIENT GLOW */

.glow-a,
.glow-purple {
    background:
        radial-gradient(
            circle,
            rgba(154,99,255,.85),
            rgba(154,99,255,0)
        ) !important;

    opacity:
        .15 !important;
}


.glow-b,
.glow-gold {
    background:
        radial-gradient(
            circle,
            rgba(230,184,92,.72),
            rgba(74,226,154,.18),
            rgba(0,0,0,0)
        ) !important;

    opacity:
        .08 !important;
}


/* SECOND VERY SOFT GREEN LIGHT */

.ambient::after,
.background::after {
    content: "";

    position: fixed;

    width: 360px;
    height: 360px;

    right: -220px;
    bottom: -180px;

    border-radius: 50%;

    background:
        rgba(74,226,154,.13);

    filter:
        blur(145px);

    pointer-events:
        none;
}


/* REDUCE MOTION ON LESS POWERFUL DEVICES */

@media (prefers-reduced-motion: reduce) {

    .brand-logo span,
    .logo span,
    .hero-core,
    .core-box,
    .brand-name b,
    .brand-name span,
    .system-label,
    .eyebrow,
    .welcome h1 span,
    .send-button,
    .send,
    .save-button,
    .save-settings,
    .message-row.assistant .message-label,
    .assistant-message::before {
        animation: none !important;
    }
}


/* =========================================
   HACK SHARK — AI MARKDOWN
========================================= */

.message-row.assistant .message-bubble strong {
    font-weight: 750;
    color: #ffffff;
}

.message-row.assistant .message-bubble em {
    color: #ddd8e5;
}

.ai-list-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 6px 0;
}

.ai-list-marker {
    flex: 0 0 25px;
    color: #e0b85b;
    font-weight: 750;
}

.message-row.assistant .message-bubble h1,
.message-row.assistant .message-bubble h2,
.message-row.assistant .message-bubble h3 {
    margin: 17px 0 8px;
    color: #fff;
    line-height: 1.3;
}

.message-row.assistant .message-bubble h1 {
    font-size: 19px;
}

.message-row.assistant .message-bubble h2 {
    font-size: 17px;
}

.message-row.assistant .message-bubble h3 {
    font-size: 15px;
}

.ai-inline-code {
    padding: 2px 6px;
    border: 1px solid rgba(154,99,255,.12);
    border-radius: 6px;
    background: rgba(154,99,255,.07);
    color: #d9c4ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .9em;
}

.ai-code {
    margin: 12px 0;
    padding: 14px;

    overflow-x: auto;

    border: 1px solid rgba(154,99,255,.14);
    border-radius: 13px;

    background: rgba(5,5,8,.92);

    color: #e9e5ee;

    white-space: pre-wrap;
}

.ai-code code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* HACK SHARK AVATAR */

.message-row.assistant .message-avatar {
    position: relative;
    overflow: visible !important;

    width: 52px !important;
    height: 52px !important;

    border: 0 !important;
    border-radius: 0 !important;

    background:
        url("/whitefox-ai/static/hack_shark.jpeg")
        center / cover no-repeat !important;

    color: transparent !important;

    box-shadow: none !important;

    /* края изображения постепенно исчезают */
    -webkit-mask-image:
        radial-gradient(
            circle at center,
            #000 0%,
            #000 48%,
            rgba(0,0,0,.95) 59%,
            rgba(0,0,0,.55) 72%,
            transparent 91%
        );

    mask-image:
        radial-gradient(
            circle at center,
            #000 0%,
            #000 48%,
            rgba(0,0,0,.95) 59%,
            rgba(0,0,0,.55) 72%,
            transparent 91%
        );
}

/* мягкое фиолетово-зелёное свечение */
.message-row.assistant .message-avatar::after {
    content: "";
    position: absolute;
    inset: 4px;

    background:
        radial-gradient(
            circle,
            rgba(179,72,255,.22) 0%,
            rgba(54,235,139,.10) 46%,
            transparent 74%
        );

    filter: blur(10px);
    z-index: -1;
    pointer-events: none;
}


/* =========================================
   HACK SHARK — BORDERLESS ASSISTANT PORTRAIT
========================================= */

.message-row.assistant .message-avatar {
    width: 62px !important;
    height: 62px !important;
    flex: 0 0 62px !important;

    position: relative !important;

    margin-top: -4px !important;

    border: none !important;
    border-radius: 0 !important;

    background:
        url("/whitefox-ai/static/hack_shark.jpeg")
        center 47% / 120% auto
        no-repeat !important;

    color: transparent !important;

    box-shadow: none !important;

    overflow: visible !important;

    opacity: .96;

    filter:
        saturate(.92)
        contrast(1.04)
        drop-shadow(0 0 7px rgba(169,74,255,.18))
        drop-shadow(0 0 9px rgba(71,226,145,.10));

    -webkit-mask-image:
        radial-gradient(
            ellipse 55% 58% at 50% 48%,
            rgba(0,0,0,1) 0%,
            rgba(0,0,0,1) 44%,
            rgba(0,0,0,.92) 57%,
            rgba(0,0,0,.58) 69%,
            rgba(0,0,0,.18) 80%,
            transparent 94%
        );

    mask-image:
        radial-gradient(
            ellipse 55% 58% at 50% 48%,
            rgba(0,0,0,1) 0%,
            rgba(0,0,0,1) 44%,
            rgba(0,0,0,.92) 57%,
            rgba(0,0,0,.58) 69%,
            rgba(0,0,0,.18) 80%,
            transparent 94%
        );
}


/* лёгкая подсветка за персонажем */
.message-row.assistant .message-avatar::before {
    content: "";

    position: absolute;

    inset: 11px 5px 4px;

    z-index: -1;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(183,75,255,.20) 0%,
            rgba(73,232,150,.07) 48%,
            transparent 75%
        );

    filter: blur(10px);

    pointer-events: none;
}


/* полностью убираем старые рамки/фон */
.message-row.assistant .message-avatar::after {
    display: none !important;
}

/* =========================================
   HACK SHARK — HERO IMAGE INSTEAD OF H
========================================= */

.hero-core {
    width: 104px !important;
    height: 104px !important;

    border: none !important;
    border-radius: 0 !important;

    background:
        url("/whitefox-ai/static/hack_shark.jpeg")
        center 44% / 118% auto
        no-repeat !important;

    color: transparent !important;

    box-shadow: none !important;

    filter:
        saturate(.95)
        contrast(1.05)
        drop-shadow(0 0 10px rgba(173,72,255,.22))
        drop-shadow(0 0 12px rgba(74,226,154,.10));

    -webkit-mask-image:
        radial-gradient(
            ellipse 58% 62% at 50% 49%,
            #000 0%,
            #000 46%,
            rgba(0,0,0,.96) 58%,
            rgba(0,0,0,.65) 70%,
            rgba(0,0,0,.25) 82%,
            transparent 96%
        );

    mask-image:
        radial-gradient(
            ellipse 58% 62% at 50% 49%,
            #000 0%,
            #000 46%,
            rgba(0,0,0,.96) 58%,
            rgba(0,0,0,.65) 70%,
            rgba(0,0,0,.25) 82%,
            transparent 96%
        );
}


/* Убираем эффект "иконка внутри кружка" */

.hero-mark {
    width: 150px !important;
    height: 150px !important;
}

.hero-ring {
    opacity: .42 !important;
}

.ring-one {
    border-color:
        rgba(154,99,255,.20) !important;
}

.ring-two {
    border-color:
        rgba(230,184,92,.09) !important;
}


/* слабое зелёно-фиолетовое свечение вокруг картинки */

.hero-mark::before {
    content: "";

    position: absolute;

    width: 115px;
    height: 115px;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(154,99,255,.16) 0%,
            rgba(74,226,154,.08) 38%,
            transparent 72%
        );

    filter: blur(18px);

    pointer-events: none;
}

/* HERO STICKER FINAL */

.hero-mark .ring-one,
.hero-mark .ring-two,
.hero-mark .orbit-dot {
    opacity: 0 !important;
}

.hero-core {
    width: 132px !important;
    height: 132px !important;

    background:
        url("/whitefox-ai/static/hack_shark.jpeg")
        center center / 130% auto
        no-repeat !important;

    border: 0 !important;
    border-radius: 0 !important;
    color: transparent !important;
    box-shadow: none !important;

    filter:
        contrast(1.04)
        saturate(.92)
        drop-shadow(0 0 12px rgba(164,74,255,.22))
        drop-shadow(0 0 13px rgba(64,225,145,.12));

    -webkit-mask-image:
        radial-gradient(
            ellipse at center,
            black 35%,
            rgba(0,0,0,.92) 52%,
            rgba(0,0,0,.55) 68%,
            rgba(0,0,0,.15) 82%,
            transparent 96%
        );

    mask-image:
        radial-gradient(
            ellipse at center,
            black 35%,
            rgba(0,0,0,.92) 52%,
            rgba(0,0,0,.55) 68%,
            rgba(0,0,0,.15) 82%,
            transparent 96%
        );
}
