:root {
    --background-color: rgb(0, 5, 13);

    --radius: 8px;

    --widget-color: rgba(255, 255, 255, 0.01);
    --widget-border: rgb(255, 255, 255, 0.05);

    --button-background: rgba(255, 255, 255, 0.05);


    --main-color: #a86b11;
    --second-color: #C19512;
    --third-color: #12C195;
    --fourth-color: #123EC1;

    --greyed-out-color: rgba(128, 128, 128, 0.65);
    --more-greyed-color: rgba(128, 128, 128, 0.15);
}

* {
    font-family: "Roboto Flex", sans-serif;
}

body {
    background: radial-gradient(125% 125% at 50% 90%, var(--background-color) 65%, var(--main-color) 150%);
    margin: 0;
    height: 100vh;
    width: 100vw;

    background-color: var(--background-color);
    
    color: white;



}

.bg {
    background-color: transparent;
    opacity: 0.5;
    background-image:  radial-gradient(var(--button-background) 1.5px, transparent 0.9px), radial-gradient(var(--button-background) 0.9500000000000001px, transparent 0.9500000000000001px);
    background-size: 32px 32px;
    background-position: 0 0,19px 19px;
    height: 100vh;
    width: 100vw;
    position: fixed;
    z-index: -10;
}



html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  scrollbar-width: thin;
}



@media screen and (max-width: 1400px) {
    .sidebar {
        position: fixed !important;
        
    }
    .main {
        margin-left: 0 !important;
    }
    .message_pfp_home {
        display: none;

    }
    
}

@media screen and (max-width: 600px) {
    .big-widget {
        box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
        margin: auto;
        width: 100% !important;
        height: 100% !important;
        background-color: var(--widget-color);
        overflow: hidden;
        display: none;
        flex-direction: column;
        justify-content: space-between;

        border-radius: 10px;

    }

    .main {
        padding: 0 !important;
        height: 100vh !important;
    }

    body > .send_button {
        top: 0;
        position: fixed !important;
        z-index: 1;
    }

    body {
        overflow:visible;
    }
}

.background {
    position: fixed;
    animation: moveshape 40s cubic-bezier(0.4, 0.1, 0.4, 0.95) infinite alternate;
    z-index: -1;
}

.blob {
    width: 34vw;
    aspect-ratio: 1/1;
    background: linear-gradient(
        var(--main-color) 50%,
        var(--fourth-color)100%
    );
    border-radius: 30% 70% 70% 40% / 30% 40% 70% 70%;
    filter: blur(100px);
    opacity: 0.2;
    animation: changeshape 15s cubic-bezier(0.455, 0.3, 0.515, 0.955) infinite, rotate cubic-bezier(0.455, 0.3, 0.515, 0.955) 120s infinite;
}



.sidebar {

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


    height: 100%;
    width: 250px;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    background: var(--widget-color);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: 0.5s cubic-bezier(0.075, 0.2, 0.4, 1);
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.sidebar a {
    display: block;
    overflow: hidden;
    width: 215px;
    
    text-decoration: none;

}

.sidebar > p {
    display: block;
    overflow: hidden;
    width: 250px;
    text-decoration: none;
    color: rgba(255,255,255,0.5) !important;
    font-size: 0.5em;
}

.sidebar div {
    line-height: 0.6;
    width: 250px;
}

.pfp {
    margin: 0 auto;
    border-radius: 50%;
}



.close_button {
    float: right;
    position:absolute;
    top: 0;
    

    box-shadow: none;
    color: white;
    margin: none;
    padding: none;

}

#main {
    transition: margin-left .5s ease-out;
    padding: 20px;
}

.main {
    margin-left: 250px;
    margin-top: 20px;
    line-height: 0px;
    height: 75vh;

}

.chatmessage {
    margin-top: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
}


.main h3 {
    font-size: 36px;
    font-weight: 400;
    transform: translateY(10px);
}

.main h5 {
    transform: translateY(10px);
    font-weight: 400;
}


.widget {
    box-shadow: 0px 0px 10px rgba(255, 166, 0, 0.3);
    background-color: var(--widget-color);
    border-top: 1px solid var(--widget-border);
    outline: 1px solid var(--main-color);
    min-height: 5vh;
    padding: 20px;
    border-radius: 20px;
    line-height: 1.1;
    transition: all 0.5s ease-out;
    backdrop-filter: blur(15px) brightness(0.9);

    &:hover {
        scale: 1.1;
    }
    
}

.content {
    width: 30vw;
    min-width: 350px;
}

.content > .row {
    justify-content: space-between;
}
.message_pfp_home {
    width: 4em;
    border-radius: 50% 50% 50% 5%;
    transition: all 0.5s ease-out;

    &:hover {
        scale: 1.2;
        border-radius: 50% 50% 5% 50%;
    }
}

input, textarea {
    field-sizing: content;
    width: 85%;
    min-width: 15vw;
    max-height: 200px;
    background-color: transparent;
    outline: none;
    border: none;
    color: white;
    height: fit-content;
}


.row {
    display: flex;
    align-items: center;
}



.chat {
    height: 100vh;
}

.big-widget {
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px) brightness(0.9);
    margin: auto;
    width: 80vw;
    height: 85vh;
    background: linear-gradient( rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.1) 50%);
    overflow: hidden;
    display: none;
    flex-direction: column;
    justify-content: space-between;

    border-top: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 10px;
    
}

.type_area {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--widget-color);
    border-top: 1px solid var(--widget-border);
    height: fit-content;

    & hr {
        width: 50%;
    }
}

.type_area > .row {
    height: fit-content;
    min-height: 42px;

    transition: scale 0.4s ease-out;

    &:hover {
        scale: 1.05;
    }
}


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


/* buttons, links and texts*/

.close_button {
    float: right !important;
    position: absolute !important;
    top: 0 !important;

    margin: 10px;

    

    box-shadow: none;
    color: white;

}

h1, h3 {
    text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.5);
    transition: scale 0.4s ease-out, text-shadow 0.4s ease-out;

    &:hover {
        text-shadow: 2px 2px 25px rgba(255, 255, 255, 0.7);
        scale: 1.1;
    }
}

hr {
    
    animation: expand 3s cubic-bezier(0.175, 0.50, 0.32, 1);

    border: none;
    height: 1px;
    background-color: white;
    box-shadow: 2px 2px 10px rgba(255, 255, 255, 0.5);

    width: 100%;
    margin-top: 5px;
    margin-bottom: 10px;
}

a, button {
    font-size: 1rem;

    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: 0.5s ease-out;
    color: white;
    margin: 5px 10px;
    padding: 7px;
    background-color: var(--button-background);
    border: 1px solid var(--button-background);
    border-radius: var(--radius);

    &:hover {
        box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.5);
        margin: 5px 2px;
        padding: 7px 15px;
        transition: 0.2s ease-out;
        color: black;
        background-color: white;
    }
    &:active {
        scale: 0.9;
    }

    &:focus {
          outline: none; 
    }

}

.send_button {
    transition: all 0.2s ease-out;
    border-radius: 50%;

    width: fit-content;
    height: fit-content;
    text-align: center;
    cursor: pointer;
    display: block !important;
    padding: 1px;
    
    font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 24;




    &:hover {
        background-color: white;
        scale: 1.2;
        color: black;
        box-shadow: 0px 0px 10px white;
    }
    &:active {
        scale: 0.9;
    }

    &:focus {
          outline: none; 
    }
}

/* ============== DONT TOUCH THIS PART ============== */
.container {
    top:0;
    left: 0;
    position: fixed;
    width: 100vw;
    /*animation: moveshape 20s cubic-bezier(0.4, 0.1, 0.4, 0.95) infinite alternate;*/
    z-index: -1;
    filter: blur(50px);
}



/* ======== Chat message bubbles =============== */

.chat_area {
    word-wrap: break-word;
    overflow: auto;
    line-height: 1.1 !important;
    height: 100%;
}

.scroll {
    margin-right: 20px;
    margin-left: 20px;
    margin-top: 30px;
}

.message_user {
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    animation: dropdown 0.5s cubic-bezier(0.075, 0.15, 0.4, 1);
    margin-left: auto;
    width: fit-content;
    max-width: 50%;
    padding: 1px 15px !important;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50px  5px 50px 50px;
}

.message_ai{
    max-width: 60vw;
    min-height: 42px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: dropdown 1s ease-out forwards;
    margin-right: auto;
    width: fit-content;
    padding: 1px 15px !important;
    background-color: rgba(255, 207, 95, 0.2);
    border-radius: 5px  50px 50px 50px;
    margin-bottom: 25px;
}

.message_pfp {
    animation: dropdown 1s cubic-bezier(0.075, 0.15, 0.4, 1);
    border-radius: 50px  50px 50px 5px; 
    max-width: 40px;
}



/* ========== MODAL POPUP HERE ===============*/

.modal::backdrop {
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}


.modal {
    text-align: center;
    border-radius: 20px;
    box-shadow: 9px 9px 30px rgba(0, 0, 0, 0.7);
    z-index: 10;
    background-color: var(--widget-color);
    border: 1px solid var(--widget-border);
    color: white;
    margin: auto;
    width: 40%;
    min-width: 125px;

    max-height: 90%;
  
}

.modal div {
    display: flex;
    gap: 15px;
    flex-direction: column;
}


.animated {
    animation: dropdown 0.5s ease-out forwards;
}

.animatedchat {
    animation: dropdownchat 0.5s ease-out forwards;
}

.message_ai_thinking  {
  height: 24px;
  width: 256px;
}
.message_ai_thinking::after {
  content: "";
  animation: loading 10s steps(1, end) infinite, text_glow 1s ease-in-out infinite alternate;
}

@keyframes loading {
  0% {
    content: " Analysing the Database";
  }
  5% {
    content: ". Analysing the Database";
  }
  10% {
    content: ".. Analysing the Database";
  }
  15% {
    content: "... Looking";
  }
  20% {
    content: "... Thinking";
  }
  25% {
    content: ".. Thinking";
  }
  30% {
    content: ". Procrastinating";
  }
  35% {
    content: " Thinking";
  }
  40% {
    content: " Generating";
  }
  45% {
    content: ". Generating";
  }
  50% {
    content: ".. Generating";
  }
  55% {
    content: "... Generating";
  }
  60% {
    content: "... Crashing Out";
  }
  65% {
    content: ".. Writing";
  }
  70% {
    content: ". Writing";
  }
  75% {
    content: " Procrastinating";
  }
  80% {
    content: " Procrastinating";
  }
  85% {
    content: ". Procrastinating";
  }
  90% {
    content: ".. Looking at the files";
  }
  95% {
    content: "... Looking at the files";
  }
  100% {
    content: "Almost Done";
  }
}

@keyframes text_glow {
    0% {
        text-shadow: 1px 1px 10px white;
    }
    100% {
        text-shadow: 1px 1px 10px transparent;
    }
    
}

@keyframes dropdown {
    0% {
        opacity: 0;
        transform: translateY(-40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

@keyframes dropdownchat {
    0% {
        opacity: 0;
        transform: translateY(-100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}



@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes moveshape {
    0%, 100% {
        transform: translate(28vw, 30vh);
    }
    25% {
        transform: translate(40vw, 40vh);
    }
    50% {
        transform: translate(45vw, 20vh);
    }
    75% {
        transform: translate(35vw, 25vh);
    }
    
}

@keyframes changeshape {
    0%, 100% {
        border-radius: 30% 70% 70% 40% / 30% 40% 70% 70%;
    }
    20% {
        border-radius: 40% 65% 50% 50% / 40% 35% 20% 40%;
    }
    40% {
        border-radius: 40% 65% 65% 30% / 40% 35% 20% 40%;
    }
    60% {
        border-radius: 40% 65% 50% 50% / 40% 35% 70% 75%;
    }
    80% {
        border-radius: 30% 50% 40% 40% / 50% 50% 50% 60%;
    }
    
}