:root {
    --fontSize1: 30px;
    --fontSize2: 20px;
    --fontSize3: 16px;
    --fontSize4: 14px;
    --codeFontSize: 10px;
}

body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at top left, #122, #000, #122);
    background-size: 100vw 100vh;
    background-attachment: fixed;
}


header {
    background: #111;
    width: 100%;
    height: 50px;
    font-size: var(--fontSize1);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 5px calc(var(--fontSize1) / 2);
    box-sizing: border-box;
    color: #aff;
    gap: var(--fontSize1);
    position: fixed;
}

header .title {
    font-family: "Raleway";
    font-weight: 500;
}

.chatArea {
    display: flex;
    flex-direction: column;
    padding: 80px var(--fontSize1) 80px var(--fontSize1);
    box-sizing: border-box;
}

.message {
    padding: var(--fontSize3);
    width: fit-content;
    max-width: 70%;
    font-size: var(--fontSize3);
    color: #fff;
    word-wrap: break-word;
    font-family: "Raleway";
    font-weight: 500;
    margin-bottom: var(--fontSize1);
}

.message.user {
    background: #0cc;
    align-self: flex-end;
    text-align: left;
    border-radius: var(--fontSize3) 0 var(--fontSize3) var(--fontSize3);
}

.message.assistant {
    background: #555;
    align-self: flex-start;
    text-align: left;
    border-radius: 0 var(--fontSize3) var(--fontSize3) var(--fontSize3);
}

.message.assistant :nth-last-child(1) {
    margin-bottom: 0;
}
.message.assistant :nth-child(1) {
    margin-top: 0;
}
.message.assistant a {
    color: #3cf;
}

.message pre code {
    font-size: var(--codeFontSize);
    line-height: calc(var(--codeFontSize + 5px));
    background-color: #333;
    display: block;
    padding: var(--fontSize3);
    border-radius: var(--fontSize3);
    margin: var(--fontSize3) 0 var(--fontSize3) 0;
    overflow-x: scroll;
}

.message code {
    display: inline;
    padding: 0;
    background-color: #444;
}


.msgInputBlock {
    display: flex;
    flex-direction: row;
    width: 85%;
    border: 0px solid red;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto calc(var(--fontSize1) / 2) auto;
    color: #fff;
    gap: 10px;
    border-radius: var(--fontSize2);
    background: #222;
    padding: 10px 20px 10px 15px;
    box-sizing: border-box;
    position: fixed;
    bottom: var(--fontSize2);
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 35px -10px #0ff;
}

.MessageInput {
    width: 100%;
    display: block;
    font-size: var(--fontSize2);
    background: transparent;
    border: none;
    outline: none;
    color: #cff;
}

.msgInputBlock .sendBtn {
    color: #8aa;
    display: block;
}


/*  SIDE BAR  *//*  SIDE BAR  */

aside {
    display: flex;
    position: fixed;
    height: 100vh;
    width: 70vw;
    background-color: #0A0A0A;
    color: #fff;
    top: 0;
    left: -70vw;
    padding: var(--fontSize1) var(--fontSize1) var(--fontSize1) var(--fontSize2);
    box-sizing: border-box;
    flex-direction: column;
    gap: var(--fontSize2);
    max-width: 360px;
}

aside .info {
    padding: var(--codeFontSize);
    border: 3px solid #0fa;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--codeFontSize);
    border-radius: var(--fontSize3);
}

aside .info .info-icon {
    color: #0fa;
}

aside .info .text {
    font-size: var(--codeFontSize);
    font-family: "Raleway";
}

aside .credits {
    text-align: center;
    font-size: var(--fontSize4);
}
aside .credits a {
    color: #3cf;
}



aside.visible {
    animation: menuShow 0.3s ease 0s normal forwards;
}
aside.invisible {
    animation: menuHide 0.3s ease 0s normal forwards;
}



@keyframes menuShow {
    0% {
        left: -70vw;
    }
    100% {
        left: 0;
    }
}

@keyframes menuHide {
    0% {
        left: 0;
    }
    100% {
        left: -70vw;
    }
}


/*  LOADING SCREEN  *//*  LOADING SCREEN  */

.loadingScreen {
    z-index: 3;
    position: fixed;
    top: 0;
    left: 0;
    background: #000;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #0fa;
}

.loadingScreen .loader {
    height: calc((var(--fontSize1) * 2) + 10px);
    aspect-ratio: 1;
    margin-bottom: var(--fontSize1);
    position: relative;
}

.loadingScreen .loader .sq1 {
    height: calc(var(--fontSize1) * 2);
    aspect-ratio: 1;
    background: transparent;
    position: absolute;
    border: 5px solid #0fa;
    animation: logoRotate 2s linear 0s infinite;
    
}

.loadingScreen .loader .sq2 {
    height: calc(var(--fontSize1) * 2);
    aspect-ratio: 1;
    background: transparent;
    position: absolute;
    border: 5px solid #0fa;
    animation: logoRotate calc(10s / 3) linear 0s infinite;
}

.loadingScreen .loadingText {
    width: 90%;
    text-align: center;
    font-size: var(--fontSize3);
    font-family: "Raleway";
}

@keyframes logoRotate {
    0% {transform: rotateZ(0deg);}
    100% {transform: rotateZ(-360deg);}
}
