html {
    font-size: 62.5%;
}

body {
    background-color: #222;
    margin: 0;
}

.none {
    display: none;
}

.gap-y-0p5rem {
    row-gap: 0.5rem;
}

.gap-y-1rem {
    row-gap: 1rem;
}

.gap-y-1p5rem {
    row-gap: 1.5rem;
}

.gap-x-1rem {
    column-gap: 1rem;
}

.p-1rem {
    padding: 1rem;
}

.m-1rem {
    margin: 1rem;
}

.relative {
    position: relative;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-grow-1 {
    flex-grow: 1;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: start;
}

.items-end {
    align-items: end;
}

.align-self-end {
    align-self: flex-end;
}

.content-end {
    justify-content: end;
}

.content-between {
    justify-content: space-between;
}

.content-center {
    justify-content: center;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.tight {
    font-family: 'Inter Tight', sans-serif;
}

.text-1p7rem {
    font-size: 1.7rem;
}

.text-1p2rem {
    font-size: 1.2rem;
}

.text-2rem {
    font-size: 2rem;
}

.text-3rem {
    font-size: 3rem;
}

.bold {
    font-weight: bold;
}

.chats {
    background-color: #1a1a1a;
    padding: 1rem 1.5rem;
}

.chat-list {
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem;
}

.chat-list-date-header {
    font-size: 1.3rem;
    color: rgb(228, 228, 228);
    margin-left: 1rem;
}

.specific-chat {
    font-size: 1.6rem;
    color: rgb(229, 229, 229);
    background-color: rgb(48, 48, 48);
    padding: 0.5rem 1rem;
    /* width: fit-content; */
    border-radius: 0.35rem;
}

.settings, .github {
    font-size: 1.6rem;
    color: rgb(202, 202, 202);
    cursor: pointer;
    text-decoration: none;
}
.export-page {
    font-size: 1.6rem;
    color: rgb(202, 202, 202);
    cursor: pointer;
    text-decoration: none;
}

.settings-wrapper {
    background-color: #272727;
    width: 100%;
    height: 100%;
    position: fixed;
    overflow-y: scroll;
    z-index: 2;
}

.settings-x {
    position: fixed;
    top: 0;
    right: 0;
    font-size: 3rem;
    color: rgb(212, 212, 212);
    margin: 1rem 3rem;
    font-weight: 500;
    cursor: pointer;
}

.saved-message {
    background-color: #28b128;
    color: white;
    font-size: 1.7rem;
    border-radius: 0.7rem;
    margin-top: 2rem;
    padding: 1rem 2rem;
    position: fixed;
    z-index: 1;
}

.settings-inner {
    margin: 3rem 5rem;
    color: rgb(183, 183, 183);
    row-gap: 3rem;
    width: 75%;
} 

.main {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
    position: relative;
}

.model-name {
    position: absolute;
    padding: 1rem 2rem 2rem 1.5rem;
    font-size: 1.7rem;
    color: rgb(183, 183, 183);
    font-weight: 600;
    width: min-content;
    height: min-content;
    white-space: nowrap;
    left: 0;
}

.name {
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 3.5rem;
    font-weight: bold;
    color: rgb(198, 198, 198);
    user-select: none;
    bottom: 5rem;
    position: absolute;
    pointer-events: none;
    z-index: -1;
    justify-content: center;
}

.name-text {
    background-color: #222;
    z-index: 1;
    padding: 0.5rem;
    box-shadow: 0 0 2rem #222;
}

.logo {
    background-image: url('../img/deeply_researched.png');
    width: 88%;
    aspect-ratio: 1;
    position: absolute;
    background-repeat: no-repeat;
    background-size: contain;
    filter: contrast(0%);
    opacity: 0.10;
}

.chat-space-wrapper {
    display: flex;
    flex-direction: column-reverse;
    flex-grow: 1;
    height: 100%;
    width: 100%;
    overflow-y: scroll;
    scrollbar-color: #6f6f6f transparent;
}

.chat-space-wrapper::-webkit-scrollbar,
.chat-space-wrapper::-moz-scrollbar {
    background-color: transparent;
}

/* .chat-space-wrapper::-webkit-scrollbar {
    display: none;
} */


.chat-space {
    width: 100%;
    display: flex;
    justify-content: end;
    flex-direction: column;
    /* margin: 3rem; */
    justify-content: end;
}

.message-wrapper {
    padding: 3rem 8rem;
    font-size: 1.6rem;
    color: rgb(225, 225, 225);
    margin: 3rem 7rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: anywhere;
}


.user-message-wrapper {
    background-color: rgb(54, 54, 54);
    padding: 1rem 2rem;
    font-size: 1.6rem;
    color: rgb(236, 236, 236);
    border-radius: 2rem;
    margin: 3rem 7rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    align-self: end;
    margin-left: 30%;
}

.text-source {
    height: 2.2rem;
    width: 2.2rem;
    color: white;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: #373737;
    color: #878787;
    font-size: 1.3rem;
    border-radius: 50%;
}

.body {
    grid-template-columns: 0.8fr 4fr 1.5fr;
    display: grid;
}

.search-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    width: 35%;
    background-color: rgb(73, 73, 73);
    padding: 1rem 1.5rem 1rem 1.25rem;
    border-radius: 3rem;
    margin-bottom: 2rem;
    column-gap: 1rem;
    cursor: text;
    margin-top: 1rem;
    box-shadow: 0px 0 50px #272727;
    transition: 180ms;
}

input {
    border: none;
    outline: none;
    background-color: transparent;
    color: white;
    width: 100%;
}

.search-arrow {
    font-size: 2rem;
    color: rgb(35, 35, 35);
    cursor: pointer;
    background-color: white;
    border-radius: 50%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem;
    line-height: 1;
    font-weight: bold;
    user-select: none;
    transition: 100ms;
    width: 100%;
    transform: rotate(-90deg);
}

.search-arrow:hover {
    background-color: rgb(125, 90, 255);
    color: rgb(237, 237, 237);
}

.status {
    border-left: 1px solid rgb(78, 78, 78);
    height: 100vh;
}

textarea {
    border: none;
    outline: none;
    font-size: 1.8rem;
    background-color: transparent;
    color: white;
    width: 100%;
    resize: none;
    overflow: hidden;
    min-height: 2rem;
    font-family: inherit;
    padding: 0;
    line-height: 2rem;
    scrollbar-width: none;
}

textarea::placeholder {
    line-height: 2rem;
    vertical-align: middle;
}

textarea::-webkit-scrollbar {
    width: 0;
}

.api-key-label {
    color: rgb(214, 214, 214);
    font-size: 1.8rem;
}

.api-key-input {
    border: 2px solid #464646;
    background-color: rgb(35, 35, 35);
    color: white;
    font-size: 1.7rem;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.decoder-bullet-wrapper {
    display: flex;
    margin-right: 0.8rem;
    align-items: center;
    height: 100%;
    padding-top: 6px;
    cursor: pointer;
}

.decoder-bullet {
    height: 1.8rem;
    background-color: #acacac;
    border: 2px solid #acacac;
    border-radius: 50%;
    aspect-ratio: 1;
    box-sizing: border-box;
}

.bullet-selected {
    background-color: #2225e8;
}

.disabled-input {
    opacity: 0.5;
}

.confirm-button, .confirm-max-sources, .delete-model-button {
    background-color: rgb(220, 220, 220);
    border: 2px solid rgb(220, 220, 220);
    color: rgb(27, 27, 27);
    font-size: 1.7rem;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: 100ms;
}

.confirm-button:hover, .confirm-max-sources:hover, .add-model:hover {
    background-color: rgb(69, 59, 255);
    border-color: rgb(69, 59, 255);
    color: white;
}

.delete-model-button {
    color: rgb(222, 80, 80);
    background-color: transparent;
    border: none;
    transition: 100ms;
}

.delete-model-button:hover {
    background-color: rgb(188, 68, 68);
    color: white;
}

.input-wrapper-adv {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.4fr auto;
    align-items: center;
    column-gap: 0.5rem;
}

.input-wrapper-adv-2 {
    display: grid;
    grid-template-columns: auto 1fr 1.2fr 1.4fr auto auto;
    align-items: center;
    column-gap: 0.5rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    column-gap: 0.5rem;
}

.base-presets {
    position: absolute;
    font-size: 1.5rem;
    background-color: rgb(35, 35, 35);
    color: rgb(225, 225, 225);
    width: 100%;
    border: 2px solid #464646;
    box-sizing: border-box;
    border-radius: 0.5rem;
    z-index: 1;
}

.base-presets > div > div {
    padding: 1rem 2rem;
    border-bottom: 1px solid #404040;
    transition: 100ms;
}

.base-presets > div > div:not(.preset-base-title):hover {
    cursor: pointer;
    background-color: #456fbc;
}

.preset-base-title {
    background-color: #1e1e1e;
    text-align: center;
    color: white;
    padding: 0.5rem !important;
}

.add-model {
    font-size: 1.7rem;
    color: rgb(43, 43, 43);
    background-color: rgb(209, 209, 209);
    border-radius: 0.5rem;
    padding: 1rem 2rem;
    width: max-content;
    cursor: pointer;
    transition: 100ms;
    margin-top: 1.5rem;
}




.demo-disclaimer {
    font-size: 1.5rem;
    color: rgb(192, 191, 206);
    margin-bottom: 1rem;
    margin-top: -1rem;
}

.server-status {
    font-size: 1.5rem;
    color: gray;
}

.status-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background-color: rgb(62, 62, 62);
    border-radius: 3rem;
    margin: 1rem 3.5rem;
    color: rgb(226, 226, 226);
    font-size: 1.7rem;
    text-align: center;
}

.status-option {
    padding: 0.5rem 1.5rem;
    border-radius: 3rem;
    margin: 0.5rem;
    transition: 200ms;
}

.status-option:not(.status-option-selected):hover {
  background-color: rgb(98, 89, 255);  
  cursor: pointer;
}

.status-option-selected {
    background-color: rgb(97, 97, 97);
}

.activity {
    margin: 1rem 2rem;
    row-gap: 2rem;
}

.activity-header {
    color: #e2e2e2;
    font-size: 1.7rem;
    position: relative;
    /* word-break: break-word; this or the one below */
    overflow-wrap: anywhere;
}

.activity-working, .activity-understanding {
    background: linear-gradient(
        90deg,
        #757575 0%,
        #ffffff 50%,
        #a1a1a1 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 5s infinite linear;
}

.token-count {
    color: #439eef;
    font-size: 1.3rem;
}

.activity-link-status {
    aspect-ratio: 1;
    border-radius: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 0.8rem;
}

.activity-link-status > div {
    background-color: yellow;
    border-radius: 1rem;
    aspect-ratio: 1;
    width: 100%;
}

.activity-link {
    font-size: 1.4rem;
    color: #6ea0ff;
}

.activity-char-count {
    font-size: 1.4rem;
    color: #c9c9c9;
}

.activity-errors {
    font-size: 1.4rem;
    color: rgb(245, 79, 79);
}

.sources {
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
    margin: 0.8rem 1.5rem;
}

.sources-count {
    font-size: 1.4rem;
    color: white;
    text-align: center;
}

.source {
    background-color: #303030;
    border-radius: 0.8rem;
    padding: 1.5rem 2rem;
    text-decoration: none;
    transition: 100ms;
    cursor: pointer;
}

.source:not(.desc-shown):hover {
    background-color: #354e98;
}

.source-title {
    font-size: 1.5rem;
    color: rgb(213, 213, 213);
}

.source-url {
    font-size: 1.4rem;
    color: rgb(109, 109, 240);
}

.source-length {
    font-size: 1.3rem;
    color: rgb(167, 167, 167);
}

.source-description {
    font-size: 1.4rem;
    color: rgb(209, 209, 209);
    margin-top: 1.5rem;
    line-height: 1.4;
}

.phase {
    font-size: 1.7rem;
    margin: 1rem;
    color: #d8d8d8;
}

.overall-tokens {
    font-size: 1.4rem;
    color: #fcd971;
    /* margin: 1rem; */
    text-align: center;
    margin-bottom: 0.2rem;;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0; /* Changed to start from 200% */
    }
    100% {
        background-position: -200% 0; /* Changed to end at -200% */
    }
}

.progress-bar {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    background-color: #353535;
    color: rgb(205, 205, 205);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    margin: 1.5rem 1rem;
    min-width: 20vw;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.current-search {
    max-width: 40vw;
    width: max-content;
}

.current-search-progress {
    color: rgb(127, 127, 255);
    font-size: 1.3rem;
}

/* :where(.current-search) .current-search-progress:nth-last-child(1 of .current-search-progress) {
    color: red;
} */

.current-search-desc {
    font-size: 1.5rem !important;
}

.current-search-desc:not(:has(~ .current-search-desc)) {
    color: rgb(220, 220, 220);
}

.current-search-keywords {
    font-size: 1.4rem;
    color: gray;
    margin-top: 0.5rem;
}


.current-search-nested {
    border-left: 1px solid #767676;
    padding-left: 2rem;
}

.throbber {
    border: 4px solid transparent;
    border-top: 4px solid rgb(160, 160, 160);
    border-radius: 50%;
    animation: spin 2.5s linear infinite;
    aspect-ratio: 1;
    /* width: 100%; */
}

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

.dropdown {
    position: relative;
    background-color: rgb(35, 35, 35);
    color: white;
    font-size: 1.7rem;
    cursor: pointer;
    display: inline-block;
    user-select: none;
    text-align: center;
}

.dropdown-selected {
    padding: 0.8rem 2rem;
    border: 2px solid #464646;
    border-radius: 0.5rem;
    transition: 100ms;
}

.dropdown-selected:hover {
    background-color: rgb(92, 81, 216);
}

.dropdown-options {
    position: absolute;
    background-color: rgb(35, 35, 35);
    width: 100%;
    z-index: 1;
    display: none;
    box-sizing: border-box;
    border: 2px solid #464646;
    border-radius: 0.5rem;
    text-align: center;
}

.dropdown-option {
    padding: 1rem 1.5rem;
    transition: background-color 100ms;
    border-radius: 0.5rem;
}

.dropdown-option:hover {
    background-color: #456fbc;
}

.settings-grid {
    display: grid;
    grid-template-columns: max-content 0.5fr min-content;
    gap: 1rem;
    width: max-content;
    align-items: center;
}

.dropdown, .api-key-input {
    width: 100%;
}

#max-sources {
    text-align: center;
}

.academic-toggle {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: 0.5rem;
}

.toggle-switch-academic {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-right: 0.5rem;
}

.toggle-switch-academic input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-academic {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider-academic:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-academic {
    background-color: #ff69b4;
}

input:checked + .slider-academic:before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 1.4rem;
    color: #fff;
    margin-left: 0.5rem;
}

.delete-chat {
    display: inline-block;
    margin-left: 1rem;
    color: rgb(150, 150, 150);
    cursor: pointer;
    transition: color 0.2s;
}

.delete-chat:hover {
    color: rgb(255, 80, 80);
}

.specific-chat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    font-size: 1.6rem;
    color: rgb(229, 229, 229);
    background-color: rgb(48, 48, 48);
}

.chat-list-items .specific-chat .delete-chat {
    display: inline-block;
    margin-left: 1rem;
    color: rgb(150, 150, 150);
    cursor: pointer;
    transition: color 0.2s;
}

.chat-list-items .specific-chat .delete-chat:hover {
    color: rgb(255, 80, 80);
}
