* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    font-size: 62.5%; /* 1 rem = 10px */
}

body {
    background-color: #1a1924;
    font-size: 1.6rem;
    color: #E1E1E6;
}

body * {
    font-family: 'Lato', sans-serif;
}

#app {
    padding: 2.4rem 3.2rem; 
    height: 100vh;
    width: 100vw;
    max-width: 880px;
    display: grid;
    grid-template-rows: max-content 1fr max-content;
    margin: auto;
}

#top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

#user-info img {
    width: 4.8rem;
    height: 4.8rem;
    object-fit: cover;
    border-radius: 50%;
}

#user-status .status {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .4rem;
}

#user-status .status::before {
    content: '';
    width: .8rem;
    height: .8rem;
    display: block;
    background-color:#00B37E;
    border-radius: 50%;
}

#user-status .status {
    color: #00B37E;
    font-size: 1.2rem;
}

#last-seen {
    margin-top: 2.6rem;
    font-size: 1.5rem;
    line-height: 1.4rem;
    text-align: center;
}

.messages {
    margin-top: 3rem;
    display: grid;
    gap: 3rem;
    font-size: 1.5rem;
    line-height: 1.4rem;
    padding-bottom: 5rem;
}

.message .body {
    width: fit-content; /* pega o corpo e faz um ajuste, encaixe conforme o conteudo */
    margin-top: 1rem; /* 10px */
    background-image: linear-gradient(to right, #a120a8d0 50%, #D229DB);
    padding: 1.4rem;
    border-radius: 0 .8rem .8rem .8rem;
}

.message:not(.you) {
    width: 40vw;
}

.message.you {
    margin-left: auto; /* jogou cada mensagem um para cada lado */
}

.message.you .name {
    text-align: right;
}

.message.you .body {
    background: linear-gradient(to right, #272BF2 50%, #2E5FDB);
    border-radius: .8rem .8rem 0 .8rem ;
}

form {
    display: flex;
    align-items: center;
    background: #282843;
    border-radius: 999rem;
    padding: 1.4rem 2.4rem;
}

input {
    flex: 1;
    outline: none;
    color: #e1e1e6;
}

form:focus-within {
    outline: 2px solid white;
}

input::placeholder {
    color: #e1e1e6;
    font-size: 1.4rem;
    line-height: 1.4rem;
}

button i {
    color: #e1e1e6;
    font-size: 2.4rem;
}

input,
button {
    background-color: transparent;
    border: 0;
}