@import url('https://fonts.googleapis.com/css2?family=Poppins&family=Quicksand&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    font-family: 'Quicksand', sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    background: rgb(30,30,30);
}
html{
    scroll-behavior: smooth;
}
.app{
    position: fixed;
    width: 100%;
    height: 100%;
    max-width: 600px;
    background: #2a2d2e;
    color: #fff;
    box-shadow: 0 5px 20px 0 rgba(0,0,0,.6);
    scroll-behavior: smooth;
}
.app > .screen{
    display: none;

}
.app > .screen.active{
    display: block;
    width: 100%;
    height: 100%;
}
.screen .form{
    position: absolute;
    top: 0%;
    left: 50%;
    transform: translate(-50%,50%);
    width: 80%;
    max-width: 400px;
    border: none;
    animation: pop 1.5s ease-in-out;
    padding: .5rem 1rem;
    border-radius: .3rem;
    background: transparent;
    box-shadow: 0 10px 20px 0 rgba(0,0,0,.6);
}
.screen .form-input{
    width: 100%;
    margin: 20px 0 ;
}

.screen h2{
    margin-bottom: 20px;
    font-size: 30px;
    color: inherit;
    border-bottom: 4px solid #555;
    padding: 5px 0 ;
    display: inline-block;
    user-select: none;
}
.screen .form-input label{
    display: block;
    margin-bottom: 5px;
}
.screen .form-input input{
    width: 100%;
    padding: 10px;
    background: #dedede;
    color: #111;
    border-radius: .3rem;
    border: 1px solid #555;
    font-size: 16px;
    outline: none;
}
.screen .form-input button{
    padding: 10px 20px;
    background: #111;
    color: #eee;
    border-radius: .3rem;
    font-size: 20px;
    cursor: pointer;
    outline: none;
    border: none;
    transition: all .3s ease-in-out;
}
.form-input button:hover{
    scale: .95;
    background: hsl(270, 2%, 13%);
    box-shadow: 0 10px 20px 0 rgba(0,0,0,.6);
}
.chat-screen .header{
    background: #111;
    color: #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px  20px;
}
.chat-screen .header .logo{
    font-size: 23px;
    color: #eee;
    font-weight: 600;
}
.chat-screen .header button{
    padding: 5px 10px;
    border: 1px solid #eee;
    background: transparent;
    color: #eee;
    font-size: 15px;
    cursor: pointer;
    outline: none;
    border-radius: .3rem;
}
.chat-screen .messages{
    width: 100%;
    height: calc(100% - 100px);
    background: #2a2d2e;
    color: #fff;
    overflow: auto;
}
.chat-screen .messages::-webkit-scrollbar{
    background: transparent;
    width: 10px;
    border-radius: .5rem;
}
.chat-screen .messages::-webkit-scrollbar-track{
    background: transparent;
    border-radius: .5rem;
}
.chat-screen .messages::-webkit-scrollbar-thumb{
    background: #585858;
    border-radius: .5rem;
}
.chat-screen .messages .message{
    display: flex;
    padding: 10px;
}
.chat-screen .messages .message > div{
    min-width: 30%;
    background: #dedede;
    box-shadow: 0 0 20px 5px rgba(0,0,0,.5);
    padding: 10px;
    border-radius: .4rem;
}

.chat-screen .messages .message.my-message{
    justify-content: flex-end;
    animation: pop 1s ease-in-out;
    transition: all .5s ease-in-out;
}

.chat-screen .messages .message.other-message{
    justify-content: flex-start;
    animation: pop 1s ease-in-out;
    transition: all .5s ease-in-out;
}
@keyframes pop {
    0%{
        scale: 0;
        opacity: 0;
    }
    100%{
        scale: 1;
        opacity: 1;
    }
}
.chat-screen .messages .message .name{
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}
.chat-screen .messages .message .text{
    word-wrap: break-word;   
    color: #000;
}
.chat-screen .messages .update{
    text-align: center;
    padding: 10px;
    font-style: italic;
}
.chat-screen .typebox{
    width: 100%;
    height: 51px;
    display: flex;
    justify-content: space-between;
}

.chat-screen .typebox input{
    flex: 1;
    background: #3a393b;
    height: 51px;
    color: #fff;
    font-size: 18px;
    outline: none;
    border: none;
    transition: all .5s ease-in-out;
    padding: 0 1.5rem;
}
.chat-screen .typebox input:hover{
    background: hsl(270, 2%, 25%);
}
.chat-screen .typebox button{
    width: 80px;
    height: 100%;
    background: #111;
    color: #eee;
    font-size: 20px;
    outline: none;
    border: none;
    cursor: pointer;
    transition: all .3s ease-in-out;
}
.typebox button:hover{
    background: hsl(0, 0%, 10%);
}
.update{
    background: #4b494d;
    padding: .5rem 1rem;
    margin: 1rem 3rem 1rem 3rem;
    border-radius: .5rem;
    user-select: none;
    transition: all .3s ease-in-out;
    animation: pop 1s ease-in-out;
}
.update:hover{
    scale: .95;
}

#exit-chat{
    transition: all .3s ease-in-out;
}
#exit-chat:hover{
    transform: translateY(-2px);
    scale: 1.2;
}
#exit-chat:active{
    scale: .95;
    
