@charset "utf-8";
* {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.container {
    width: 900px;
    height: 600px;
    box-shadow: 0 0 15px 5px lightgray;
    margin: auto;
    display: flex;
    flex-direction: column;
}

.header {
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 26px;
    border-bottom: 1px dotted gray;
}

.content-box {
    flex: 1;
    overflow: auto;
    display: flex;
}

.user-list-ul {
    width: 170px;
    border-right: 1px dashed gray;
    height: 100%;
    overflow: auto;

}

:where(.user-list-ul, .msg-box)::-webkit-scrollbar {
    width: 5px;
    background-color: lightgray;
    border-radius: 5px;
}

:where(.user-list-ul, .msg-box)::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, deeppink, lightseagreen);
}


.user-list-ul>li {
    padding: 0 10px;
    box-sizing: border-box;
    height: 35px;
    line-height: 35px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-list-ul>li:hover {
    background-color: lightgray;
    cursor: pointer;

}

.right-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.msg-box {
    flex: 1;
    overflow: auto;
}

.msg-user-box[data-msgowner="1"] {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

}

.msg-user-box[data-msgowner="1"]>.msg-user-text {
    background-color: deeppink;
}


.input-box {
    height: 50px;
    background-color: white;
    display: flex;
}

.msg-input {
    flex: 1;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid gray;
    outline: none;
}

.btn-send {
    border: none;
    width: 80px;
    background-color: lightseagreen;
    color: white;
    font-weight: bold;
    font-size: 20px;
    cursor: pointer;
    font-style: italic;
}
.btn-send>span{
    font-size: 12px;
    display: block;
    text-align: center;
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: no-drop;
}

.msg-item {
    display: flex;
    justify-content: center;
    font-size: 12px;
    color: gray;
    padding: 5px 0;
}

.msg-user-box {
    font-size: 14px;
    padding: 5px;
}

.msg-name-time {
    font-size: 12px;
}

.msg-user-text {
    background-color: lightseagreen;
    border-radius: 5px;
    padding: 5px;
    color: white;
    margin-top: 5px;
    width: fit-content;
    max-width: 400px;
    word-break: break-all;
}

.msg-user-img {
    margin-top: 5px;
    width: 200px;
    height: auto;
    max-height: 200px;
    padding: 2px;
    border: 1px solid lightgray;
}

.msg-user-img>img {
    width: 200px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

.tool-bar-box {
    height: 30px;
    background-color: #ececec;
    display: flex;
    align-items: center;
    position: relative;
}

.tool-bar-box>.iconfont {
    margin-left: 10px;
    cursor: pointer;
}

.tool-bar-box>.iconfont:hover {
    color: lightseagreen;
}

.emoji-box{
    width: 300px;
    border: 1px solid gray;
    position: absolute;
    bottom: 100%;
    background-color: white;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(auto-fill,30px);
    overflow: hidden;
    transform-origin: bottom;
    transition:all 0.3s linear;
}
.emoji-box>span{
    cursor: pointer;
    display: flex;
    justify-self: center;
    align-items: center;
    box-sizing: border-box;
}
.emoji-box>span:hover{
    outline: 1px solid black;
}
.emoji-box[data-show="0"]{
    /* transform: scaleY(0); */
    opacity: 0;
}
.emoji-box[data-show="1"]{
    /* transform: scaleY(1); */
    opacity: 1;
}

.microphone-box{
    position: fixed;
    width: 100px;
    height: 100px;
    box-shadow: 0 0 15px 5px lightgray;
    border-radius: 50%;
    inset: 0;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}
.microphone-box>.iconfont{
    font-size: 56px;
    animation: huatongani 1s linear infinite paused; 
    text-shadow: 0 0 15px currentColor;
}
.microphone-box:active>.iconfont{
    animation-play-state: running;
}
.microphone-box[data-show="0"]{
    display: none;
}
.microphone-box[data-show="1"]{
    display: flex;
}

@keyframes huatongani{
    0%{
        color: black;
    }
    35%{
        color: red;
    }
    75%{
        color: lightseagreen;
    }
    100%{
        color: black;
    }
}

.mask-box{
    position: fixed;
    z-index: 9999;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s linear;
    overflow: hidden;
}
.mask-box[data-show="0"]{
    transform: scale(0);
    opacity: 0;
}
.mask-box[data-show="1"]{
    transform: scale(1);
    opacity: 1;
}
.login-box{
    padding: 10px;
    background-color: white;
    width: 340px;
}
.form-title{
    text-align: center;
    padding: 10px;
}
.form-item{
    padding: 10px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.form-item>label{
    width: 80px;
}
.form-item>input{
    flex: 1;
    box-sizing: border-box;
    padding: 5px;
}
.from-item-btn-box{
    display: flex;
    justify-content: space-around;
}
.form-item .btn{
    width: 80px;
    height: 30px;
    border: none;
    color: white;
    cursor: pointer;
}
.form-item .btn:hover{
    box-shadow: 0 0 15px 5px lightgray;
}
.btn-login{
    background-color: lightseagreen;
}
.btn-reset{
    background-color: deeppink;
}