html, body {
    margin: 0;
    height: 100%;
    background: #0b0f17;
    font-family: system-ui;
}

/* FULLSCREEN */
.chat-wrap {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.chat-header {
    height: 56px;
    background: #070a12;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    color: #fff;
}

.chat-header .center {
    font-family: Cinzel, serif;
    letter-spacing: .18em;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-header .right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
}

.chat-header .dot {
    width: 8px;
    height: 8px;
    background: #38d996;
    border-radius: 50%;
}

/* MESSAGES */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;

    /* hide scrollbar */
    scrollbar-width: none;
}
.chat-messages::-webkit-scrollbar {
    display: none;
}

/* MESSAGE ROW */
.msg {
    display: flex;
    max-width: 100%;
    gap: 10px;
    align-items: flex-start;
    font-size: .95rem;
    line-height: 1.55;

    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(255,255,255,.02);
}

.msg.me {
    border-color: rgba(243,208,138,.35);
    background: rgba(243,208,138,.06);
}

.msg.other {
    border-color: rgba(255,255,255,.12);
}

.user-link {
    cursor: pointer;
    color: #f3d08a;
    font-weight: 700;
}

.user-link:hover {
    text-decoration: underline;
    color: #ffe2b5;
}

/* ALIGN */
.msg.me {
    flex-direction: row-reverse;
    align-self: flex-end;
    text-align: right;
}

.msg.other {
    align-self: flex-start;
}

/* ICON */
.msg .icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
}

/* CONTENT */
.msg .content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* NAME */
.msg .name {
    font-size: .75rem;
    font-weight: 600;
}

.msg .name a {
    color: #f3d08a;
    text-decoration: none;
}

/* TEXT */
.msg .text {
    font-size: .95rem;
    color: rgba(255,255,255,.9);

    /* FIX overflow text */
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

/* MY MESSAGE */
.msg.me .text {
    color: #ffffff;
}

/* INPUT */
.chat-input {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 10px;
    background: #070a12;
}

.chat-input form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input textarea {
    flex: 1;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    color: #fff;
    padding: 10px 12px;
    resize: none;
    font-size: 16px;
}

.chat-input button {
    height: 42px;
    width: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.06);
    color: #fff;
}

.chat-input button:hover {
    background: rgba(255,255,255,.12);
}

/* LOGIN NOTICE */
.login-note {
    text-align: center;
    color: rgba(255,255,255,.6);
    font-size: .8rem;
    padding: 8px;
}

#soundToggle.muted {
    position: relative;
    opacity: .6;
}

#soundToggle.muted::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    width: 120%;
    height: 2px;
    background: #ff5470;
    transform: rotate(-20deg);
}






/* ITEME IN CHAT */
.chat-input {
    position: relative;
}

.chat-suggest {
    position: absolute;
    bottom: 60px;
    left: 10px;
    right: 10px;
    background: #070a12;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.chat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    background: rgba(255,255,255,.06);
    border-radius: 6px;
}

.chat-item img {
    width: 28px;
    height: 28px;
}



.chat-suggest div {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-suggest div:hover {
    background: rgba(255,255,255,.08);
}
