#chat {
    position: absolute;
    top: 50px;
    left: 10px;
    width: 500px;
    height: 300px;
    overflow: hidden;
    z-index: 9999;
    font-family: Arial, sans-serif;
    user-select: none;
    pointer-events: none;
}
    
#chat .msg {
    text-align: left;
    font-size: 15px;
    line-height: 2.0;
    opacity: 1;
    margin: 0;
    transform: translateY(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    user-select: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    display: block;
    width: 490px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
    
#chat .msg.type0 {
    color: white;
    font-weight: normal;
}
    
#chat .msg.type1 {
    color: #20B2AA;
    font-weight: bold;
}
    
#chat .msg:nth-last-child(1) { opacity: 1.0; }
#chat .msg:nth-last-child(2) { opacity: 0.9; }
#chat .msg:nth-last-child(3) { opacity: 0.8; }
#chat .msg:nth-last-child(4) { opacity: 0.7; }
#chat .msg:nth-last-child(5) { opacity: 0.6; }
#chat .msg:nth-last-child(6) { opacity: 0.5; }
#chat .msg:nth-last-child(7) { opacity: 0.4; }
#chat .msg:nth-last-child(8) { opacity: 0.3; }