*{
    padding: 0;
    margin: 0;
    list-style: none;
    text-decoration: none;
    font-family: "Kanit", sans-serif;
    box-sizing: border-box;

}

html {
    margin: 0;
    padding: 0px;
    background-color: #000;
    
    background: url('aibackground2.png') no-repeat;
    background-size: 100% 100%;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}





/* ------------------------ APP ------------------ */
.header {
    color: "#fff";
    font-weight: 800;
    font-size: 30px;
}

.par {
    color: #fff;
    z-index: 1;
    font-weight: 400;
    font-size: 18px;
    margin: 0 0 0 8px;
}

#appContainer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-size: 100% 100%;
    flex: 1;
    min-height: 0;
    
    margin: 64px 0 0 0;
    padding: 30px;
    
    overflow: hidden;
    transition: all cubic-bezier(0.075, 0.82, 0.165, 1) 0.5s;
}

#appContainer.reducedPadding {
    padding: 20px 30px 30px 30px;
}

.textGradientDiffusion {
    background: linear-gradient(to right, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#output {
    display: none; /* temporarily set to none  default: block */
    font-family: 'Courier New', Courier, monospace;
    border-style: solid;
    border-color: #fff;
    border-radius: 18px;
    border-width: 1px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(100px);
    height: 80%;
    padding: 60px;
    font-size: 24px;
    font-weight: 300;
    color: #fff;
    flex: 1;
    transition: all 0.3s ease;
    overflow: auto;
}


#output span {
    will-change: opacity;
}


.intro {
    align-self: center;
}

#userInputDiv {
    display: flex;
    justify-content: space-between;
}

#chatContainer {
    display: flex;
    flex-direction: column;
    
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;


    border-style: solid;
    border-color: #fff;
    border-radius: 18px;
    border-width: 0px;

    scrollbar-width: thin;
}

#inputSection {
    flex-shrink: 0;
    margin-top: auto;
}

#warning {
    color: #828282;
    font-size: 14px;
    font-weight: 300;
    margin-top: 2px;
    margin-left: 8px;
    opacity: 0.5;
}

.message { /* this styling applies to both the user's and the ai's message */
    max-width: 80%;
    padding: 18px 24px;
    border-radius: 18px;
    word-wrap: break-word;
    word-break: break-word;
    font-size: 18px;
    animation: fadeInUp 0.5s cubic-bezier(.14,1.25,.49,1.04);
}

.message:not(:last-child) {
    margin-bottom: 20px;
}

.user-message {
    align-self: flex-end;
    background: rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: white;
}

.assistant-message {
    align-self: flex-start;
    border: 1px solid #fff;
    color: white;

    background: linear-gradient(-45deg, rgba(0, 0, 0, 0.5) 30%, rgba(58, 58, 58, 0.8) 50%, rgba(0, 0, 0, 0.5) 70%);
    background-size: 550%;
    background-position-x: 100%;
    animation: shimmer 0.7s 20 linear;
}

.message-content {
    line-height: 1.5;
    overflow-wrap: break-word;
}

.typing-indicator {
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #fff;
    color: white;
    padding: 15px 20px;
    border-radius: 18px;
    font-style: italic;
    opacity: 0.7;
}

#userInput {
    box-sizing: border-box;
    border: 1px #fff solid;
    background-color: #fff;
    color: #000;
    border-radius: 18px;
    padding: 10px 10px 10px 16px;
    resize: none;
    width: 80%;
    font-size: 18px;
    font-weight: 200;
    min-height: 50px;
    max-height: 140px;
    height: 50px;
    outline: none;
    transition: cubic-bezier(0.075, 0.82, 0.165, 1) 1s;
}


#userInput:focus {
    border: 1px #fff dashed;
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(50px);
    color: #fff;
}

#generateButton {
    border: 1px #fff solid;
    background-color: #fff;
    border-radius: 18px;
    width: 19%;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: ease-out 0.2s;
}

#generateButton:hover {
    border: 1px #fff dashed;
    background-color: #000;
    color: #fff;
}

.fadeUpAnim {
    opacity: 0;
    transform: translateY(150px);
    transition: opacity 0.8s cubic-bezier(.94,-0.01,.59,1.01), transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fadeUpAnim.visible {
    opacity: 1;
    transform: translateY(0);
}

.katex {
    font-weight: 200 !important;
    margin: 16px 0;
    max-width: 100%;
    overflow-x: auto;
}




@keyframes fadeInUp {
    from {
        opacity: 0.2;
        transform: translateY(60px);
    } to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes shimmer {
    0% {
        background-position-x: 100%;
    }
    100% {
        background-position-x: 0%;
    }
}



@media screen and (max-width: 720px) {

    #generateButton {
        font-size: 16px;
        font-weight: 400;
    }

    #logo {
        font-size: 30px;
        font-weight: 700;
    }

    #navBarList {
        gap: 0px;
    }

    .message {
        max-width: 90%;
        padding: 12px 16px;
        font-size: 16px;
    }

    #userInput {
        font-size: 16px;
    }

    #appContainer {
        padding: 15px 15px 30px 15px;
    }

    #chatContainer {
        padding: 10px;
    }
}

@media screen and (max-width: 450px) {
    #appContainer {
        padding: 15px 15px 30px 15px;
    }
}