*{
    box-sizing:border-box;
}

body{
    margin:0;
    background:#0f0f0f;
    color:white;
    font-family:Arial;
    user-select:none;
    overflow:hidden;
}

.center{
    height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
    padding:20px;
}

h2{
    margin-bottom:20px;
}

input{
    padding:12px;
    border:none;
    border-radius:12px;
    width:100%;
    background:#1e1e1e;
    color:white;
    outline:none;
}
button{
    padding:12px 16px;
    border:none;
    border-radius:12px;
    background:#5865f2;
    color:white;
    cursor:pointer;
}

.topbar{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:60px;
    background:#111;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 15px;
    z-index:100;
    border-bottom:1px solid #222;
}
.online{
    font-size:13px;
    color:#4caf50;
}

#typing{
    font-size:12px;
    color:#aaa;
}

#chatBox{
    height:calc(100vh - 130px);
    overflow-y:auto;
    padding:70px 10px 80px 10px;
    display:flex;
    flex-direction:column;
    gap:8px;
    transition:0.3s;
}

.message{
    padding:10px 14px;
    border-radius:16px;
    max-width:75%;
    word-wrap:break-word;
    font-size:14px;
    position:relative;
}
.mine{
    background:#5865f2;
    align-self:flex-end;
    border-bottom-right-radius:4px;
}

.other{
    background:#1f1f1f;
    align-self:flex-start;
    border-bottom-left-radius:4px;
}

.sender{
    font-size:11px;
    opacity:0.7;
    margin-bottom:4px;
}

.chat-image{
    width:180px;
    border-radius:12px;
    margin-top:5px;
}
.bottom{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px;
    background:#111;
    border-top:1px solid #222;
}

.bottom input[type="text"]{
    flex:1;
}

#imageInput{
    display:none;
}

.uploadBtn{
    background:#222;
    padding:10px;
    border-radius:10px;
}
@media(max-width:600px){

    .message{
        max-width:85%;
        font-size:13px;
    }

    button{
        padding:10px 14px;
    }
}