.chat-widget{
    position:fixed;
    bottom:25px;
    right:25px;
    z-index:9999;
}

.chat-button{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 18px;
    border:none;
    border-radius:999px;
    background:linear-gradient(135deg,#3b82f6,#2563eb);
    color:#fff;
    font-size:14px;
    cursor:pointer;
    box-shadow:0 10px 30px rgba(37,99,235,.4);
    transition:.25s;
}

.chat-button:hover{
    transform:translateY(-2px);
}

.chat-box{
    position:absolute;
    bottom:70px;
    right:0;
    width:320px;
    height:400px;
    background:#fff;
    border-radius:16px;
    box-shadow:0 20px 60px rgba(0,0,0,.2);
    display:flex;
    flex-direction:column;
    opacity:0;
    transform:translateY(20px) scale(.95);
    pointer-events:none;
    transition:.25s;
}

.chat-box.open{
    opacity:1;
    transform:translateY(0) scale(1);
    pointer-events:auto;
}

.chat-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 15px;
    border-bottom:1px solid #eee;
    font-weight:600;
}

.chat-title{
    display:flex;
    align-items:center;
    gap:10px;
}

.chat-title img{
    width:32px;
    height:32px;
    border-radius:8px;
}

.chat-status{
    font-size:12px;
    color:#22c55e;
}

.chat-close{
    background:none;
    border:none;
    font-size:16px;
    cursor:pointer;
}

.chat-body{
    padding:15px;
    font-size:14px;
    flex:1;
    overflow-y:auto;
}

.chat-message{
    display:flex;
    gap:10px;
    margin-bottom:15px;
}

.avatar{
    width:32px;
    height:32px;
    border-radius:50%;
}

.message-content{
    flex:1;
}

.message-header{
    display:flex;
    gap:8px;
    font-size:12px;
    margin-bottom:3px;
}

.name{
    font-weight:600;
}

.time{
    opacity:.5;
}

.message-text{
    background:#f3f4f6;
    padding:10px 12px;
    border-radius:12px;
    font-size:13px;
    line-height:1.4;
}

.chat-start{
    margin-top:10px;
    width:100%;
    padding:10px;
    border:none;
    border-radius:10px;
    background:#2563eb;
    color:#fff;
    cursor:pointer;
    font-size:14px;
}

body.dark .chat-box{
    background:#0f0f0f;
    color:#fff;
    border:1px solid #1f1f1f;
}

body.dark .message-text{
    background:#1f1f1f;
}

@media(max-width:768px){
    .chat-box{
        width:90vw;
        right:0;
    }

    .chat-button span{
        display:none;
    }

    .chat-button{
        padding:14px;
        border-radius:50%;
    }
}