#chat-root {
    position: fixed;
    bottom: 20px;
    left: 72px;
    z-index: 2147483500;
    font-family: 'DM Sans', sans-serif;
}

#chat-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #141414;
    border: 1.5px solid #bdf730;
    color: #bdf730;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(189, 247, 48, 0.25);
    transition: box-shadow 0.2s, transform 0.15s;
    user-select: none;
}
#chat-btn:hover {
    box-shadow: 0 0 22px rgba(189, 247, 48, 0.55);
    transform: scale(1.07);
}

#chat-panel {
    display: none;
    position: absolute;
    bottom: 56px;
    left: 0;
    width: 300px;
    background: #141414;
    border: 1px solid rgba(189, 247, 48, 0.2);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(189, 247, 48, 0.08);
    flex-direction: column;
    animation: chat-in 0.18s ease;
}
#chat-panel.open {
    display: flex;
}

@keyframes chat-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

#chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #1c1c1c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    cursor: move;
}
#chat-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex: 1;
}
#chat-online {
    font-size: 11px;
    color: #bdf730;
    white-space: nowrap;
}
#chat-close {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 15px;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}
#chat-close:hover { color: #fff; }

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
    max-height: 280px;
}
#chat-messages::-webkit-scrollbar { width: 3px; }
#chat-messages::-webkit-scrollbar-track { background: transparent; }
#chat-messages::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }

.chat-msg { display: flex; flex-direction: column; gap: 3px; }

.chat-msg-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.chat-msg-user {
    font-size: 10px;
    font-weight: 700;
    color: #00f0ff;
}
.chat-msg.mine .chat-msg-user { color: #bdf730; }
.chat-msg-time {
    font-size: 9px;
    color: #444;
}
.chat-msg-text {
    margin: 0;
    font-size: 12.5px;
    color: #ddd;
    word-break: break-word;
    line-height: 1.45;
}

#chat-footer {
    padding: 8px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #1a1a1a;
    flex-shrink: 0;
}
#chat-user-label {
    font-size: 10px;
    color: #444;
    display: block;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#chat-input-row {
    display: flex;
    gap: 6px;
}
#chat-input {
    flex: 1;
    background: #222;
    border: 1px solid #2e2e2e;
    border-radius: 7px;
    color: #fff;
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    padding: 6px 9px;
    outline: none;
    transition: border-color 0.15s;
}
#chat-input:focus { border-color: #bdf730; }
#chat-input::placeholder { color: #444; }

#chat-send {
    background: #bdf730;
    color: #000;
    border: none;
    border-radius: 7px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
#chat-send:hover { background: #d0ff55; }

#chat-empty {
    color: #333;
    font-size: 12px;
    text-align: center;
    margin: auto;
    padding: 20px 0;
}
