/* TAGS GERAIS */
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: white;
}

body{
    width: 100%;
    height: 100vh;
    background-image: url(texturas/background-image.jpg);
}

/* OVERLAY/LOGIN */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: rgba(30, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: rgb(10, 0, 0);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    text-align: center;
    transition: .3s;
}

.modal-content:hover{
    box-shadow: 0px 0px 40px rgba(80, 0, 0, 0.3);
}

.modal-content input {
    width: 100%;
    padding: 10px;
    border: none;
    background-color: rgba(255, 255, 255, 0.03);
    color: white;
}

.modal-content button {
    width: 100%;
    padding: 10px 20px;
    background-color: rgb(80, 5, 5);
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-content button:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.modal-content a{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    text-decoration: none;
    font-size: 10px;
    font-family: 'Courier New', Courier, monospace;
    transition: .3s;
    width: 50%;
    height: 12px;
}

.modal-content a:hover{
    background-color: white;
    color: black;
    transform: scale(1.05);
}

/* HEADER */

header{
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}
header h1{
    width: 490px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
}

header a{
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
}

header img{
    padding: 10px;
    width: 100%;
    height: auto;
}

/* CHAT */

main{
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-box{
    width: 550px;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
}

.text-box{
    background-color: rgba(255, 150, 150, 0.2);
    width: 96%;
    height: 85%;
}

.msg-box{
    width: 96%;
    height: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msg-box input{
    height: 40px;
    width: 95%;
    padding: 0px 10px;
    border: none;
    background-color: rgba(255, 255, 255, 0.2);
}

.msg-box input:focus{
    background-color: rgb(10, 0, 0);
}

.enviar button{
    cursor: pointer;
    height: 40px;
    width: 40px;
    background-color: rgb(50, 5, 5);
    border: none;
    transition: .3s;
}

.enviar button:hover{
    background-color: white;
}

.enviar button i{
    transform: .3s;
}

.enviar button:hover i{
    color: black;
}

/* Balões de conversa */
.text-box {
    overflow-y: auto;
    padding: 5px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.text-box::-webkit-scrollbar {
    width: 0;
}

.message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 5px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message .username {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 2px;
    display: block;
}

/* Mensagens enviadas */
.other-message {
    align-self: flex-end; /* Alinha o balão à direita */
    background-color: rgb(100, 0, 0); /* Cor de destaque */
    border-bottom-right-radius: 0; /* Quebra o canto para o formato de balão */
}

/* Mensagens recebidas */
.self-message {
    align-self: flex-start; /* Alinha o balão à esquerda */
    background-color: rgb(50, 10, 10); /* Cor mais neutra */
    border-bottom-left-radius: 0;
}

@media (max-width: 1100px) {
    header{
        display: none;
    }

    .chat-box{
        width: 100%;
        height: 100dvh;
    }
}