@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Flex:opsz,wght,XOPQ,XTRA,YOPQ,YTDE,YTFI,YTLC,YTUC@8..144,100..1000,96,468,79,-203,738,514,712&family=Space+Grotesk:wght@300..700&family=Unbounded:wght@400..800&display=swap');

@font-face {
    font-family: "GS";
    src: url("./Grand-Sport-Font/grandsport.ttf") format("opentype");
    font-weight: 500;
    font-style: normal
}

:root {
    --bg-main: black;
    --bg-panel: #1a1a1b;
    --bg-soft: #202022;
    --border: #1a1a1a;
    --primary: #10a37f;
    --text-main: #e5e5e5;
    --text-muted: #a1a1aa;
    --radius: 12px;
}

/* width of the scrollbar */
::-webkit-scrollbar {
    width: 10px;
    /* vertical scrollbar */
    height: 10px;
    /* horizontal scrollbar */
}

/* transparent track (the non-draggable area) */
::-webkit-scrollbar-track {
    background: transparent;
}

/* the draggable part */
::-webkit-scrollbar-thumb {
    background-color: #fff;
    /* your color */
    border-radius: 8px;
}

/* optional: hover effect */
::-webkit-scrollbar-thumb:hover {
    background-color: #fff;
}

*::selection {
    color: #111;
    background-color: rgba(220, 220, 220, 0.459);
}


* {
    scrollbar-width: thin;
    scrollbar-color: #333537 transparent;
}


@keyframes floatEffect {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

* {
    box-sizing: border-box;
    font-family: google sans;
    font-family: roboto flex;
}

a {
    text-decoration: none;
}

h1,
h2 {
    user-select: none;
    /* Standard syntax */
    -webkit-user-select: none;
    /* Chrome, Safari, newer Edge */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
}

body {
    margin: 0;
    height: 100vh;
    background: black;
    color: var(--text-main);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
}


.swal2-container {
    z-index: 9999 !important;
}

.swal2-container {
    overflow: auto;
}

body.swal2-shown {
    overflow: hidden !important;
}

div:where(.swal2-icon).swal2-warning,
div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line],
div:where(.swal2-icon).swal2-error {
    color: crimson !important;
    border-color: crimson !important;
}

div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line] {
    background: crimson !important;
}

div:where(.swal2-container) h2:where(.swal2-title) {
    font-family: space grotesk;
    font-size: 33px !important;
}

div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover {
    background: none !important;
    color: rgb(201, 201, 201);
}

div:where(.swal2-container).swal2-center>.swal2-popup {
    color: gainsboro;
    background: transparent;
    display: grid;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(9px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.swal2-popup {
    color: gainsboro;
    background: transparent;
    display: grid;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.swal2-cancel {
    background: none;
}

#swal2-title {
    font-size: 22px;
}

#swal2-html-container {
    font-size: 15px;
}

.swal2-confirm {
    width: 70px;
    border-radius: 20px;
    font-family: "JetBrains Mono", monospace;
    color: #f1cac4;
}

.swal2-confirm:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0);
}


/* AUTH */
#auth-container {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#auth-box {
    width: 360px;
    padding: 32px;
    background: var(--bg-panel);
    border-radius: var(--radius);
}

#auth-box h2 {
    margin-bottom: 20px;
}

#auth-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
}

#toggle-auth {
    margin-top: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

/* MAIN LAYOUT */
.main-container {
    display: none;
    height: 100vh;
    width: 100%;
    display: flex;
}

/* SIDEBAR */
.sidebar {
    width: 280px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px;
    height: 100vh;
    padding-right: 4px;
}


.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-family: space grotesk;
}

#sidebar-toggle {
    font-size: 22px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    border: 2px solid hsl(0deg 0% 14.51%);
    background: hsl(0deg 0% 7.84%);
}

#sidebar-toggle:hover {
    background-color: #343637;
}

#new-chat {
    font-family: google sans;
    margin-bottom: 16px;
    padding: 10px;
    background-color: #a8d702;
    color: black;
    outline: none;
    cursor: pointer;
    font-size: 14px;
    border: 1px solid hsl(0deg 0% 21.18%);
    transition: all 0.4s;
    border-radius: 30px;
    font-size: 19px;
    cursor: pointer;
    font-weight: 800;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#new-chat span {
    font-size: 22px;
}

#new-chat:hover {
    border: 1px solid hsl(0deg 0% 27.06%);
}

#chat-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}


.chat-item {
    padding: 9px 14px;
    border-radius: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin: 5px 0px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 450;
    color: hsl(0deg 0% 52.55%);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.4s ease, ;
    margin-right: 4px;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #a8d702;
}

.chat-item.active {
    background-color: #17200e;
}

.chat-item.active .chat-preview {
    color: #a8d702;
}

.chat-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

.chat-preview {
    font-size: 0.9rem;
    /* color: white; */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    font-family: google sans;
    transition: all 0.3s;
}

.chat-preview:hover {
    color: #a8d702;
    /* background: hsl(197.14deg 21.21% 6.47%); */
}


.chat-delete {
    font-weight: 200 !important;
    font-size: 15px;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    /* dark gray background */
    transition: background 0.2s ease, color 0.2s ease;
}

.chat-delete:hover {
    color: #ff6b6b;
    /* soft red accent */
    background: #2a2a2a;
}


/* CHAT AREA */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.chat-header {
    padding: 0px 20px;
    /* border-bottom: 1px solid var(--border); */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h1 {
    font-size: 1.5rem;
    font-weight: 100;
    font-style: italic;
    font-family: GS;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.chat-header h1 img {
    width: 30px;
}

#stop-button {
    /* color: #ef4444; */
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    font-size: 6vh;
    font-weight: 100;
    position: absolute;
    right: 1.8%;
    margin-bottom: 2px;
}

/* MESSAGES */
.chat-messages {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.message {
    margin-bottom: 24px;
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.message-content {
    color: white;
    padding: 14px 16px;
    border-radius: 12px;
    line-height: 1.6;
    padding: 0px 16px;
}

.message-content P {
    font-family: google sans;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


.user-message .message-content {
    background-color: #171717;
    color: #f1f1f1;
    max-width: 75%;
    width: fit-content;
    border-radius: 22px 2px 22px 22px;
    box-shadow: -6 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 15px;
    line-height: 1.5;
    animation: popIn 0.25s ease-out;
    padding: 3px 22px;
}



.bot-message .message-content {
    border-radius: 11px;
    color: white;
}

/* INPUT */
.chat-input-container {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    padding: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: white;
}

#user-input {
    min-height: 56px;
    max-height: 180px;
    overflow-y: hidden;
    /* JS will toggle */
    resize: none;
}


#send-button {
    bottom: 12%;
    padding: 14px 18px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    position: absolute;
    right: 6%;
    height: 7vh;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    font-family: "JetBrains Mono", monospace;
    color: hsl(73.33deg 98.1% 41.37%);
    background-color: hsl(0deg 0% 11.37%);
    background-color: hsl(0, 0%, 14%);
    padding: 8px 18px;
    cursor: pointer;
    background: none;
}

#send-button {
    position: absolute;
    right: 61px;
    bottom: 11px;
    height: 38px;
    padding: 0 16px;
    margin-right: 5px;
}


#auth-title {
    letter-spacing: -1px;
    font-weight: 400;
    font-family: space grotesk;
    font-size: 2rem;
}


/* CODE BLOCKS */
pre {
    background: #0b0b0c;
    padding: 14px;
    border-radius: 8px;
    overflow-x: auto;
}

code {
    color: #e5e7eb;
}

/* SMOOTH SIDEBAR TRANSITION */
.sidebar {
    transition:
        width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.3s ease;
}

/* COLLAPSED STATE */
.sidebar.collapsed {
    width: 72px;
    padding-left: 12px;
    padding-right: 12px;
    margin-left: 22px;
}

/* TEXT FADE */
.sidebar h2,
.sidebar .chat-title,
.sidebar #new-chat {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#new-chat:active {
    /* backgroundv-color: rgb(79, 79, 79); */
    border: 1px solid hsl(0, 1%, 33%);
}

.sidebar.collapsed h2,
.sidebar.collapsed .chat-title,
.sidebar.collapsed #new-chat {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
}

/* KEEP ICONS CENTERED */
.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

/* HAMBURGER ROTATION */
#sidebar-toggle {
    /* transition: transform 0.3s ease; */
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#sidebar-toggle:active {
    background-color: #343637;
}

.sidebar.collapsed #sidebar-toggle {
    margin-left: 55px;
}

/* CHAT AREA EXPANDS NICELY */
.chat-area {
    transition: margin-left 0.3s ease;
}

/* CHAT ITEMS ALIGN */
.sidebar.collapsed .chat-item {
    justify-content: center;
}

/* DELETE ICON SAFETY */
.sidebar.collapsed .chat-delete {
    display: none;
}

/* Hide chat list when sidebar is collapsed */
.sidebar.collapsed #chat-list {
    display: none;
}

/* Hide guest-lock notice when sidebar is collapsed */
.sidebar.collapsed .guest-lock {
    display: none;
}


.message.bot-message {
    align-items: flex-start;
}

.message.bot-message img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.message.bot-message {
    gap: 12px;
}

#empty-state {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: 500;
    color: #c4c7c5;
    text-align: center;
    flex-direction: column;
}

.suggestion-btn {
    font-size: 17px;
    padding: 17px 18px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    /* background-color: #1e2121; */
    color: #c3c6c4;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family: space grotesk;
    background: none;
    border: 2px solid rgb(43 43 44);
}

.suggestion-btn span {
    border-radius: 53%;
    width: 30px;
    display: flex;
    height: 30px;
    justify-content: center;
    align-items: center;

}

.suggestion-btn:hover {
    background-color: hsl(0deg 0% 12.94%);
}


.chat-item.active {
    font-weight: 600;
}

.loader {
    position: relative;
    width: 20px;
    /* smaller to match font size */
    height: 20px;
    margin-left: 8px;
    /* space from "Thinking" */
}

.loader div {
    width: 8%;
    height: 24%;
    background: rgb(128, 128, 128);
    position: absolute;
    left: 50%;
    top: 30%;
    opacity: 0;
    border-radius: 50px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    animation: fade458 1s linear infinite;
}

@keyframes fade458 {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.25;
    }
}

.loader .bar1 {
    transform: rotate(0deg) translate(0, -130%);
    animation-delay: 0s;
}

.loader .bar2 {
    transform: rotate(30deg) translate(0, -130%);
    animation-delay: -1.1s;
}

.loader .bar3 {
    transform: rotate(60deg) translate(0, -130%);
    animation-delay: -1s;
}

.loader .bar4 {
    transform: rotate(90deg) translate(0, -130%);
    animation-delay: -0.9s;
}

.loader .bar5 {
    transform: rotate(120deg) translate(0, -130%);
    animation-delay: -0.8s;
}

.loader .bar6 {
    transform: rotate(150deg) translate(0, -130%);
    animation-delay: -0.7s;
}

.loader .bar7 {
    transform: rotate(180deg) translate(0, -130%);
    animation-delay: -0.6s;
}

.loader .bar8 {
    transform: rotate(210deg) translate(0, -130%);
    animation-delay: -0.5s;
}

.loader .bar9 {
    transform: rotate(240deg) translate(0, -130%);
    animation-delay: -0.4s;
}

.loader .bar10 {
    transform: rotate(270deg) translate(0, -130%);
    animation-delay: -0.3s;
}

.loader .bar11 {
    transform: rotate(300deg) translate(0, -130%);
    animation-delay: -0.2s;
}

.loader .bar12 {
    transform: rotate(330deg) translate(0, -130%);
    animation-delay: -0.1s;
}

/* Make tables scrollable within bot messages */
.message-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    /* horizontal scroll if needed */
    border-collapse: collapse;
}

/* Optional: style table nicely */
.message-content table th,
.message-content table td {
    border: 1px solid #d1d5db;
    /* light gray border */
    padding: 6px 8px;
    text-align: left;
}

/* Ensure table fits within the chat bubble */
.message-content table tr {
    width: max-content;
    /* content width */
}

.input-wrapper {
    position: relative;
    width: 100%;
}

#user-input {
    width: 100%;
    min-height: 56px;
    max-height: 180px;

    /* ⬇️ top | right | bottom | left */
    padding: 14px 110px 56px 14px;
    /* bottom padding = button row */

    background: black;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;

    color: white;
    outline: none;
    font-size: 1.2rem;

    resize: none;
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.input-action {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: black;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-action.stop {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: #717171;
    border: none;
    z-index: 5;
    cursor: pointer;
}


.hidden {
    display: none;
}

.send-btn {
    position: relative;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border: 1px solid #000;
    border-radius: 12px;
    background: #000;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.7s ease-in-out;
    isolation: isolate;
    font-family: space grotesk;
}

.send-btn::before {
    content: "";
    position: absolute;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #a8d702;
    border-radius: 999px;
    left: -100%;
    z-index: -1;
    transition: all 0.4s ease-in-out;
}

.send-btn:hover::before {
    left: 0;
    transform: scale(1.5);
}

.send-btn:hover {
    background: #a8d702;
    color: black !important;
}

/* .nony sets its own explicit color (lime), so it doesn't inherit
   .send-btn's hover color. Without this override the "Send" label
   goes lime-text-on-lime-background and disappears on hover. */
.send-btn:hover .nony,
.send-btn:focus .nony,
.send-btn:active .nony {
    color: #000 !important;
}

.send-btn:hover i,
.send-btn:focus i {
    color: #000;
}

.send-btn:focus {
    background: #fff;
    color: #000;
}

.send-btn:active {
    transform: scale(0.95);
    transition-duration: 0s;
}

.send-text {
    white-space: nowrap;
    transition: transform 0.3s ease-in-out;
}

.send-btn:active .send-text,
.send-btn:focus .send-text {
    transform: translateX(-384px);
}

.send-btn:active {
    transform: translateX(0);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.send-icon {
    transition: all 0.7s ease-in-out;
}

.send-btn:hover .send-icon,
.send-btn:focus .send-icon {
    fill: #000;
}

.send-btn:active .send-icon,
.send-btn:focus .send-icon {
    transform: translateX(384px);
    transition-duration: 0s;
}

.send-btn.processing-active .send-text {
    transform: translateX(-384px);
}

.send-btn.processing-active .processing {
    transform: translateX(0);
}

.send-btn.processing-active .send-icon {
    transform: translateX(384px);
}

.purp {
    top: -21%;
    right: -11%;
    filter: blur(136px);
    border-radius: 50%;
    background-color: #17200e;
    width: 30vw;
    height: 30vw;
    position: absolute;
    z-index: -1;
}

.org {
    bottom: -21%;
    left: -11%;
    filter: blur(136px);
    border-radius: 50%;
    background-color: #17200e;
    width: 30vw;
    height: 30vw;
    position: absolute;
    z-index: -1;
}

/* LOGIN LOADER OVERLAY */
.login-loader {
    position: fixed;
    inset: 0;
    background: black;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.login-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.login-loader .loader-text {
    color: #c4c7c5;
    font-family: space grotesk;
    text-align: center;
    line-height: 1.6;
}

.hidden {
    display: none;
}

.loader-text h1 {
    font-family: GS;
    font-size: 2.9rem;
    font-style: italic;
    font-weight: 100;
    color: white;
    user-select: none;
    /* Standard syntax */
    -webkit-user-select: none;
    /* Chrome, Safari, newer Edge */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;

    font-family: GS;
    font-style: italic;

    background: linear-gradient(90deg,
            #ffcc00,
            #ff9a00,
            #ff5c00,
            #ff2d55,
            #d600ff);

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 3rem;
    margin-bottom: 10px;
}

.loader-text span {
    font-family: space grotesk;
    font-size: 1.5rem;
}

.loadery {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.loadery:before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
}

.loadery-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.loadery-block {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 2px;
    background-color: #fff;
    box-shadow: 0 0 20px #fff;
    animation: loadery_562 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loadery-block:nth-child(1) {
    animation-delay: 0.1s;
}

.loadery-block:nth-child(2) {
    animation-delay: 0.2s;
}

.loadery-block:nth-child(3) {
    animation-delay: 0.3s;
}

.loadery-block:nth-child(4) {
    animation-delay: 0.4s;
}

.loadery-block:nth-child(5) {
    animation-delay: 0.5s;
}

.loadery-block:nth-child(6) {
    animation-delay: 0.6s;
}

.loadery-block:nth-child(7) {
    animation-delay: 0.7s;
}

.loadery-block:nth-child(8) {
    animation-delay: 0.8s;
}

@keyframes loadery_562 {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }

    20% {
        transform: scale(1, 2.5);
        box-shadow: 0 0 50px rgba(255, 255, 255, 0.7);
    }

    40% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
}

#suggestions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* AUTH SPLIT LAYOUT */
.auth-layout {
    width: 100%;
    height: 100vh;
    display: flex;
}

/* LEFT SECTION (70%) */
.auth-left {
    align-items: center;
    width: 70%;
    height: 100%;
    background: black;
    position: relative;
    /* overflow: hidden; */
    display: flex;
    justify-content: center;
    user-select: none;
    /* Standard syntax */
    -webkit-user-select: none;
    /* Chrome, Safari, newer Edge */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    background:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url(img/starsBg.webp);

    background-size: cover;
    background-position: center;
    background-size: contain;
}

/* PROMO STRIP (arno ad) */
.promo-strip {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(20, 20, 20, 0.55);
    border: 1px solid hsl(0deg 0% 26%);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    text-decoration: none;
    white-space: nowrap;
    z-index: 2;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.promo-strip:hover {
    transform: translateX(-50%) translateY(-2px);
    border-color: #a8d702;
    background: rgba(24, 26, 16, 0.65);
}

.promo-badge {
    font-family: 'Space Grotesk';
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #17200e;
    background: #a8d702;
    padding: 3px 9px;
    border-radius: 30px;
    flex-shrink: 0;
}

.promo-text {
    font-family: 'Space Grotesk';
    font-size: 0.82rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.promo-full {
    display: inline;
}

.promo-short {
    display: none;
}

.promo-brand {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: #a8d702;
    letter-spacing: 0.01em;
}

.promo-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Space Grotesk';
    font-size: 0.8rem;
    font-weight: 700;
    color: #a8d702;
    padding-left: 8px;
    border-left: 1px solid hsl(0deg 0% 30%);
    flex-shrink: 0;
}

.promo-cta i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.promo-strip:hover .promo-cta i {
    transform: translateX(3px);
}

/* RIGHT SECTION (30%) */
.auth-right {
    width: 30%;
    height: 100%;
    flex-direction: column;
    /* background: hsl(0deg 0% 9.02%); */
    background-color: hsl(0deg 0% 7.84%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid hsl(0deg 0% 18.04%);
}

/* FORM BOX */
.auth-box {
    width: 100%;
    max-width: 450px;
    padding: 32px;
}

.auth-box h2 {
    margin-bottom: 12px;
}

.auth-box input {
    width: 100%;
    padding: 14px;
    margin-bottom: 14px;
    background: none;
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    outline: none;
    font-family: space grotesk;
}

.auth-box button {
    width: 100%;
    padding: 14px;
    background-color: #fff;
    border: none;
    border-radius: 50px;
    color: black;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Space Grotesk';
    font-size: 20px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}


.auth-box button:hover {
    background: hsl(0deg 0% 87.06%);
}

/* AUTH DIVIDER ("or") */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    user-select: none;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: hsl(0deg 0% 20%);
}

/* GUEST BUTTON */
#guest-button {
    width: 100%;
    padding: 14px;
    background: none;
    border: 1px solid hsl(0deg 0% 24%);
    border-radius: 50px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    font-family: 'Space Grotesk';
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
}

#guest-button:hover {
    border-color: #a8d702;
    color: #a8d702;
}

#guest-button i {
    font-size: 18px;
}

/* SIDEBAR GUEST LOCK BANNER */
.guest-lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 18px 14px;
    margin-bottom: 12px;
    border: 1px dashed hsl(0deg 0% 24%);
    border-radius: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.guest-lock i {
    font-size: 20px;
    color: #a8d702;
    margin-bottom: 2px;
}

.guest-lock p {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.guest-lock span {
    font-size: 0.78rem;
    line-height: 1.4;
}

.guest-lock.hidden {
    display: none;
}

/* MOBILE SIDEBAR BACKDROP */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
}

#toggle-auth {
    margin-top: 16px;
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
}

.auth-left h1 {
    color: #999;
    font-weight: 300;
}

.mobile-div h1 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    font-weight: 300;
}

.mobile-div h1 span {
    font-family: GS;
    font-style: italic;

    background: linear-gradient(90deg,
            #ffcc00,
            #ff9a00,
            #ff5c00,
            #ff2d55,
            #d600ff);

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 3rem;
}

.auth-left h1 span {
    font-family: GS;
    font-style: italic;

    background: linear-gradient(90deg,
            #ffcc00,
            #ff9a00,
            #ff5c00,
            #ff2d55,
            #d600ff);

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 3rem;
}

.card {
    background-color: #212121;
    padding: 2rem;
    max-width: 320px;
    border-radius: 37px;
    box-shadow: 0 20px 30px -20px rgba(5, 5, 5, 0.24);
    position: absolute;
    bottom: 38px;
    right: 0;
    rotate: -11deg;
}

.header {
    display: flex;
    align-items: center;
    grid-gap: 1rem;
    gap: 1rem;
}

.header .image {
    height: 4rem;
    width: 4rem;
    border-radius: 9999px;
    object-fit: cover;
    display: flex;
    overflow: hidden;
}

.stars {
    display: flex;
    justify-content: center;
    grid-gap: 0.125rem;
    gap: 0.125rem;
    color: rgba(34, 197, 94, 1);
}

.stars svg {
    height: 1rem;
    width: 1rem;
}

.name {
    margin-top: 0.25rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 600;
    --tw-text-opacity: 1;
    color: rgba(55, 65, 81, 1);
}

.message {
    overflow: hidden;
    display: flex;
    -webkit-box-orient: vertical;
    margin-top: 1rem;
    color: rgba(107, 114, 128, 1);
}

/* Move the toggle to extreme top-right of auth-right */
.auth-toggle-top {
    position: absolute;
    top: 16px;
    right: 16px;
}

#auth-top-toggle {
    background-color: hsl(0deg 0% 14.12%);
    color: white;
    outline: none;
    cursor: pointer;
    font-size: 14px;
    border: 1px solid hsl(0deg 0% 21.18%);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.4s;
    font-family: 'Space Grotesk';
}

#auth-top-toggle:hover {
    border: 1px solid hsl(0deg 0% 27.06%);
}

#eye {
    font-size: 20px;
    position: absolute;
    right: 4%;
    top: 22%;
    cursor: pointer;
}

.login-eye {
    width: 100%;
}

#auth-title,
#auth-subtitle,
#toggle-auth {
    user-select: none;
    /* Standard syntax */
    -webkit-user-select: none;
    /* Chrome, Safari, newer Edge */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
}

.socials {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}


.auth-left h1 {
    filter: contrast(115%) brightness(1.05);
}


.input-action.stop {
    position: absolute;
    right: 58px;
    /* sits left of send */
    bottom: 10px;
    /* 👈 bottom aligned */
    top: auto;
    transform: none;
}

.hamburger {
    cursor: pointer;
}

.hamburger input {
    display: none;
}

.hamburger svg {
    /* The size of the SVG defines the overall size */
    height: 3em;
    /* Define the transition for transforming the SVG */
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line {
    fill: none;
    stroke: #a8d702;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    /* Define the transition for transforming the Stroke */
    transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
        stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line-top-bottom {
    stroke-dasharray: 12 63;
}

.hamburger input:checked+svg {
    transform: rotate(-45deg);
}

.hamburger input:checked+svg .line-top-bottom {
    stroke-dasharray: 20 300;
    stroke-dashoffset: -32.42;
}

@keyframes softGlow {
    0% {
        background-color: rgba(255, 255, 255, 0.04);
        box-shadow: 0 0 0 rgba(16, 163, 127, 0);
    }

    30% {
        background-color: rgba(16, 163, 127, 0.10);
        box-shadow: 0 0 22px rgba(16, 163, 127, 0.25);
    }

    100% {
        background-color: transparent;
        box-shadow: 0 0 0 rgba(16, 163, 127, 0);
    }
}

.typing {
    font-style: italic;
    color: #c4c7c5;
}

.typing .dot {
    animation: blink 1.4s infinite;
    animation-delay: 0s;
}

.typing .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {

    0%,
    20% {
        opacity: 0;
    }

    50%,
    100% {
        opacity: 1;
    }
}

.chat-item.glow {
    animation: softGlow 1.4s ease-out;
}

#logout {
    font-weight: 600;
    border-radius: 50px;
    font-family: "JetBrains Mono", monospace;
    color: hsl(0deg 0% 52.55%);
    background-color: hsl(0deg 0% 11.37%);
    padding: 8px 18px;
    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
}

/* Hover = clearer, slightly lifted with light edge */
#logout:hover {
    color: hsl(0deg 0% 85%);
    background-color: hsl(0deg 0% 14%);
}

/* Active = pressed in */
#logout:active {
    color: hsl(0deg 0% 90%);
    background-color: hsl(0deg 0% 9%);
}

.nony {
    font-family: jetbrains mono;
    color: #a8d702;
}

#logout i {
    color: #a8d702;
}

.none {
    display: none;
}


.white {
    width: 100%;
    border-radius: 50%;
    position: absolute;
    background-color: hsl(220deg 3.16% 18.63%);
    height: 70%;
    filter: blur(180px);
    top: -40%;
}

.sidebar-socials {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
}

.social-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: hsl(0deg 0% 14%);
    border: 1px solid hsl(0deg 0% 21%);
    color: hsl(0deg 0% 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background: hsl(0deg 0% 18%);
    color: white;
}

.sidebar.collapsed .sidebar-socials {
    display: none;
}

.loaderLoginSignin {
    font-family: space grotesk;
}

/* ============================================================
   RESPONSIVE DESIGN
   Rebuilt as one clean, non-conflicting set of breakpoints.
   Mobile sidebar reuses the existing `.collapsed` toggle class:
   on screens ≤768px, default = hidden off-canvas, and adding
   `.collapsed` (the same class the hamburger already toggles)
   means "open" instead of "icon-only".
   ============================================================ */

/* ---------- AUTH PAGE ---------- */
@media (max-width: 1200px) {
    .auth-left {
        width: 60%;
        font-size: 0.9rem;
    }

    .auth-left h1 span {
        font-size: 2.5rem;
    }

    .auth-right {
        width: 40%;
        padding: 20px;
    }

    .promo-strip {
        top: 28px;
    }
}

/* Mobile/tablet: promo strip lives inline inside .mobile-div instead of
   being absolutely positioned against .auth-left (which is hidden) */
.promo-strip-mobile {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 auto 16px;
    max-width: 90vw;
    justify-content: center;
}

@media (max-width: 900px) {
    .auth-left {
        display: none;
    }

    .auth-right {
        width: 100%;
        padding: 16px;
        background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url(img/starsBg.webp);
        background-size: cover;
        background-position: center;
    }

    .mobile-div {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 12px;
    }

    .auth-box {
        width: 100%;
        max-width: 420px;
        padding: 24px;
    }

    #auth-top-toggle {
        padding: 6px 12px;
        font-size: 12px;
    }

    #auth-title {
        font-size: 1.8rem;
    }

    #auth-subtitle {
        font-size: 0.9rem;
    }

    .auth-box input {
        font-size: 16px;
        /* 16px prevents iOS Safari from auto-zooming in on focus */
        padding: 12px;
    }

    .auth-box button,
    #guest-button {
        font-size: 18px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 20px;
        padding-top: 0px;
    }

    #auth-title {
        font-size: 1.5rem;
    }

    .mobile-div h1 {
        font-size: 1.1rem;
        color: #919191;
    }

    .mobile-div h1 span {
        font-size: 2.3rem;
        margin-bottom: 13px;
    }

    .promo-strip-mobile {
        padding: 6px 10px 6px 6px;
        gap: 6px;
    }

    .promo-strip-mobile .promo-text {
        font-size: 0.72rem;
    }

    .promo-strip-mobile .promo-full {
        display: none;
    }

    .promo-strip-mobile .promo-short {
        display: inline;
    }

    .promo-strip-mobile .promo-cta {
        font-size: 0.72rem;
        padding-left: 6px;
        gap: 3px;
    }

}

/* Very small phones: drop the "Try it" label, keep just the arrow,
   so the pill still fits one line instead of shrinking text past
   legibility. */
@media (max-width: 360px) {
    .promo-cta-label {
        display: none;
    }

    .promo-cta {
        padding-left: 5px;
    }
}

/* ---------- SIDEBAR (TABLET, ICON-COLLAPSE STILL APPLIES) ---------- */
@media (max-width: 1100px) and (min-width: 769px) {
    .sidebar {
        width: 220px;
        padding: 12px;
    }

    .sidebar.collapsed {
        width: 60px;
        padding: 8px;
    }

    #new-chat {
        font-size: 16px;
        padding: 8px;
        border-radius: 8px;
    }

    .chat-title {
        font-size: 0.85rem;
    }
}

/* ---------- MOBILE (≤768px): SIDEBAR BECOMES AN OFF-CANVAS OVERLAY ---------- */
@media (max-width: 768px) {

    .main-container {
        flex-direction: column;
        width: 100vw;
        height: 100dvh;
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        /* NOTE: intentionally using `left` instead of `transform` here.
           A `transform` on .sidebar creates a new containing block for
           any `position: fixed` descendant (the #sidebar-toggle hamburger
           lives inside .sidebar), which silently breaks the toggle button
           by making it move off-canvas along with the sidebar instead of
           staying fixed to the viewport. `left` avoids that entirely. */
        height: 100dvh;
        width: 82vw;
        max-width: 300px;
        padding: 16px;
        margin: 0;
        border-right: 1px solid var(--border);
        transition: left 0.3s ease;
        z-index: 1000;
        background-color: #101010;
        box-shadow: 2px 0 24px rgba(0, 0, 0, 0.55);
    }

    /* Open state: reuse the same toggle class the hamburger already sets */
    .sidebar.collapsed {
        left: 0;
        width: 82vw;
        max-width: 300px;
        padding: 16px;
        margin: 0;
    }

    /* Undo the desktop "icon-only collapse" fade so content is fully visible when open */

    .sidebar.collapsed h2 {
        margin-bottom: 0px;
        margin-top: 65px;
    }

    .sidebar.collapsed h2,
    .sidebar.collapsed .chat-title,
    .sidebar.collapsed #new-chat {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .sidebar.collapsed #chat-list {
        display: block;
    }

    /* On mobile, .collapsed means the sidebar is OPEN, so guest-lock should show
       (but only if it isn't hidden for logged-in users) */
    .sidebar.collapsed .guest-lock:not(.hidden) {
        display: flex;
    }

    .sidebar.collapsed .chat-delete {
        display: flex;
    }

    .sidebar.collapsed .chat-item {
        justify-content: space-between;
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: flex-start;
    }

    .sidebar.collapsed #sidebar-toggle {
        margin-left: 0;
    }

    .sidebar.collapsed .sidebar-socials {
        display: flex;
    }

    /* Dimmed backdrop only shows while the sidebar is open */
    .sidebar.collapsed~.sidebar-overlay {
        display: block;
    }

    #sidebar-toggle {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 1100;
    }

    .chat-header {
        padding: 12px 16px 12px 64px;
    }

    .chat-header h1 {
        font-size: 1.3rem;
        margin-left: 14px;
        margin-top: 16px;
    }


    #logout {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    #chat-messages {
        padding: 20px 14px;
    }

    .user-message .message-content,
    .bot-message .message-content {
        max-width: 88%;
        font-size: 0.95rem;
    }

    #empty-state {
        font-size: 1.8rem;
        padding: 16px;
    }

    #suggestions {
        gap: 8px;
    }

    #suggestions .suggestion-btn {
        flex: 1 1 45%;
        font-size: 13px;
        padding: 10px;
        min-width: 130px;
    }

    /* Input row */
    .chat-input-container {
        padding: 10px 12px;
        border-top: 1px solid var(--border);
    }

    .input-wrapper {
        display: flex;
        align-items: flex-end;
        position: relative;
        width: 100%;
    }

    #user-input {
        font-size: 16px;
        /* prevents iOS zoom-on-focus */
        padding: 13px 56px 13px 16px !important;
        min-height: 48px;
        max-height: 150px;
        border-radius: 24px;
    }

    #send-button {
        position: absolute;
        right: 6px;
        bottom: 6px;
        width: 38px;
        height: 38px;
        min-width: 38px;
        padding: 0 !important;
        border-radius: 50% !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    #send-button .nony {
        display: none;
    }

    .input-action.stop,
    #stop-button {
        right: 50px;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 88vw;
    }

    .sidebar.collapsed {
        width: 88vw;
    }

    .nony,
    .noona {
        display: none;
    }

    .message.bot-message img {
        display: none;
        /* width: 28px;
        height: 28px; */
    }

    .chat-header h1 {
        font-size: 1.5rem;
    }

    #empty-state {
        font-size: 1.4rem;
    }

    #logout {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }
}




/* TEXT OVERFLOW FIX */
.chat-area {
    min-width: 0;
    overflow: hidden;
}

.chat-messages {
    overflow-x: hidden;
}

.message {
    min-width: 0;
    max-width: 100%;
}

.message-content {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
    max-width: 100%;
}

/* PRE CODE BLOCK */
pre {
    background: #1e1f20 !important;
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #2a2a2c;
    color: #aaa;
    border: 1px solid #3a3a3c;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    font-family: "JetBrains Mono", monospace;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #333;
    color: white;
}

.copy-btn.copied {
    color: #10a37f;
    border-color: #10a37f;
}

/* MESSAGE COPY ICON */
.message.bot-message {
    position: relative;
    padding-bottom: 28px;
}

.msg-copy-btn {
    position: absolute;
    bottom: 4px;
    left: 50px;
    background: none;
    border: none;
    color: #555;
    font-size: 19px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
}

.message.bot-message:hover .msg-copy-btn {
    opacity: 1;
}

.msg-copy-btn:hover {
    color: #aaa;
}

.msg-copy-btn.copied {
    color: #10a37f;
    opacity: 1;
}
