#ps-chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #e94560;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
#ps-chat-btn:hover { transform: scale(1.1); }
#ps-chat-btn svg { width: 24px; height: 24px; fill: white; }

#ps-chat-window {
    display: none;
    position: fixed;
    bottom: 88px;
    right: 20px;
    width: 340px;
    height: 460px;
    background: #0f0f23;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#ps-chat-window.open { display: flex; }

#ps-chat-header {
    background: #e94560;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#ps-chat-header-info h3 {
    margin: 0;
    color: white;
    font-size: 14px;
    font-weight: 600;
}
#ps-chat-header-status {
    color: rgba(255,255,255,0.7);
    font-size: 11px;
}
#ps-chat-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}

#ps-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ps-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
}
.ps-msg.client {
    align-self: flex-end;
    background: #e94560;
    color: white;
    border-bottom-right-radius: 4px;
}
.ps-msg.operator {
    align-self: flex-start;
    background: #1e1e3a;
    color: #ccc;
    border-bottom-left-radius: 4px;
}
.ps-msg-name {
    font-size: 10px;
    color: #888;
    margin-bottom: 2px;
}
#ps-chat-typing {
    padding: 0 12px 4px;
    font-size: 11px;
    color: #666;
    min-height: 18px;
}

#ps-chat-input-area {
    padding: 10px;
    border-top: 1px solid #1e1e3a;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
#ps-chat-input {
    flex: 1;
    background: #1e1e3a;
    border: none;
    border-radius: 16px;
    padding: 8px 14px;
    color: #eee;
    font-size: 13px;
    outline: none;
    resize: none;
    line-height: 1.4;
    max-height: 96px;
    overflow-y: hidden;
    font-family: inherit;
}
#ps-chat-input::placeholder { color: #666; }
#ps-chat-send {
    width: 36px;
    height: 36px;
    background: #e94560;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#ps-chat-send svg { width: 16px; height: 16px; fill: white; }

#ps-chat-reconnect {
    display: none;
    padding: 6px;
    text-align: center;
    background: #2d2d4a;
    color: #f59e0b;
    font-size: 11px;
}

@media (max-width: 480px) {
    #ps-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        right: 10px;
        bottom: 80px;
    }
}
