#global_chat {
    position: fixed;

    top: 100px;
    right: 16px;

    width: 320px;
    max-height: 520px;

    display: flex;
    flex-direction: column;

    padding: 14px;

    border-radius: 24px;

    background: rgba(17,17,19,.78);
    border: 1px solid rgba(255,255,255,.10);

    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);

    box-shadow:
        0 20px 80px rgba(0,0,0,.6),
        inset 0 1px 0 rgba(255,255,255,.06);

    color: #f5f5f7;

    z-index: 99;

    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    overflow: hidden;

    transition: all 0.3s ease-in-out;
}

#global_chat.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    display: none;
}

.global_chat_header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 2px 3px 12px;

    flex-shrink: 0;
}

.global_chat_title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.global_chat_icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: linear-gradient(
        145deg,
        #2c2c2e,
        #171719
    );

    border: 1px solid rgba(255,255,255,.08);

    box-shadow:
        0 5px 18px rgba(0,0,0,.35),
        inset 0 1px 0 rgba(255,255,255,.08);

    font-size: 17px;
}

.global_chat_title_text {
    min-width: 0;
}

.global_chat_title_text h2 {
    margin: 0;

    font-size: 14px;
    line-height: 18px;

    font-weight: 700;
    letter-spacing: -.2px;
}

.global_chat_title_text span {
    display: block;

    margin-top: 1px;

    color: #6e6e73;

    font-size: 10px;
    line-height: 14px;

    font-weight: 500;
}

.global_chat_status {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #30d158;

    box-shadow:
        0 0 0 3px rgba(48,209,88,.10),
        0 0 10px rgba(48,209,88,.35);

    flex-shrink: 0;
}

#global_chat_messages {
    display: flex;
    flex-direction: column;

    gap: 2px;

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 2px;

    min-height: 0;
}

#global_chat_messages::-webkit-scrollbar {
    width: 5px;
}

#global_chat_messages::-webkit-scrollbar-track {
    background: transparent;
}

#global_chat_messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.16);
    border-radius: 999px;
}

.global_chat_message {
    display: flex;
    gap: 9px;

    padding: 7px 6px;

    border-radius: 14px;

    transition:
        background .18s ease,
        transform .18s ease;

    animation: globalChatMessageIn .25s cubic-bezier(.22,.8,.25,1);
}

.global_chat_message:hover {
    background: rgba(255,255,255,.035);
}

@keyframes globalChatMessageIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.global_chat_avatar {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: block;

    object-fit: cover;

    border-radius: 11px;

    background: #1c1c1e;

    border: 1px solid rgba(255,255,255,.07);

    box-shadow:
        0 3px 10px rgba(0,0,0,.25);
}

.global_chat_content {
    min-width: 0;
    flex: 1;

    padding-top: 1px;
}

.global_chat_header_line {
    display: flex;
    align-items: baseline;

    gap: 6px;

    min-width: 0;
}

.global_chat_username {
    min-width: 0;
    max-width: 75%;

    font-size: 12px;
    line-height: 16px;

    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global_chat_time {
    color: #6e6e73;

    font-size: 9px;
    line-height: 14px;

    font-weight: 500;

    white-space: nowrap;
}

.global_chat_text {
    margin-top: 1px;

    color: #dedee2;

    font-size: 12px;
    line-height: 17px;

    font-weight: 400;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.global_chat_empty {
    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 150px;

    color: #6e6e73;

    text-align: center;

    font-size: 11px;
}

.global_chat_error {
    display: none;

    margin: 0 2px 8px;

    padding: 8px 10px;

    border-radius: 11px;

    background: rgba(255,69,58,.09);
    border: 1px solid rgba(255,69,58,.14);

    color: #ff6961;

    font-size: 10px;
    font-weight: 600;
}

@media (max-width: 700px) {

    #global_chat {
        display: none;
    }

}