body{
    margin:0;
    height: 100vh;

    background: radial-gradient(1000px 600px at 20% 15%, rgba(34, 197, 94, 0.10), transparent 55%),
                radial-gradient(800px 500px at 80% 35%, rgba(56, 189, 248, 0.10), transparent 60%),
                #020617;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Scrollbar colors */
.messages,
.online-popover,
.emoji-picker,
textarea{
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 197, 94, 0.45) rgba(2, 6, 23, 0.35);
}

.messages::-webkit-scrollbar,
.online-popover::-webkit-scrollbar,
.emoji-picker::-webkit-scrollbar,
textarea::-webkit-scrollbar{
    width: 10px;
    height: 10px;
}

.messages::-webkit-scrollbar-track,
.online-popover::-webkit-scrollbar-track,
.emoji-picker::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track{
    background: rgba(2, 6, 23, 0.35);
    border-radius: 999px;
}

.messages::-webkit-scrollbar-thumb,
.online-popover::-webkit-scrollbar-thumb,
.emoji-picker::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb{
    background: rgba(34, 197, 94, 0.35);
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: 999px;
}

.messages::-webkit-scrollbar-thumb:hover,
.online-popover::-webkit-scrollbar-thumb:hover,
.emoji-picker::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover{
    background: rgba(34, 197, 94, 0.55);
}

.modal[hidden]{
    display: none !important;
}

.modal{
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
}

.modal-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
}

.modal-card{
    position: relative;
    width: min(560px, calc(100vw - 24px));
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.70);
    padding: 12px;
    box-sizing: border-box;
}

.modal-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
}

.modal-title{
    color: rgba(226, 232, 240, 0.90);
    font-weight: 700;
}

.modal-body{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notif-bulb{
    position: absolute;
    left: -44px;
    top: 8px;
    transform: none;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.22);
    background: rgba(34, 197, 94, 0.10);
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.0);
    cursor: default;
    padding: 0;
    z-index: 50;
}

.notif-bulb::before{
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    margin: 0 auto;
    margin-top: 9px;
    background: rgba(34, 197, 94, 0.35);
}

.notif-bulb.is-on{
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.20);
    animation: notifBulbGlow 0.5s ease-out;
}

.notif-bulb.is-on::before{
    background: rgba(34, 197, 94, 0.92);
}

@keyframes notifBulbGlow{
    0%{ box-shadow: 0 0 0 rgba(34, 197, 94, 0.0); }
    30%{ box-shadow: 0 0 24px rgba(34, 197, 94, 0.55); }
    100%{ box-shadow: 0 0 0 rgba(34, 197, 94, 0.0); }
}

.app{
    width: min(1040px, calc(100vw - 24px));
    height: min(860px, calc(100vh - 24px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.app-body{
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 12px;
    position: relative;
}

.app-header{
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
    color: rgba(226, 232, 240, 0.92);
    box-sizing: border-box;
}

.app-title{
    font-weight: 800;
    color: rgba(226, 232, 240, 0.92);
}

.app-header__right{
    display: flex;
    align-items: center;
    gap: 10px;
}

.online{
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.35);
}

.online-wrap{
    position: relative;
}

.online-btn{
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.online-popover{
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(260px, calc(100vw - 40px));
    max-height: 260px;
    overflow: auto;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.92);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    z-index: 60;
}

#room_invite_suggestions.online-popover{
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    max-height: 220px;
    overflow: auto;
}

.online-popover[hidden]{
    display: none !important;
}

.online-user{
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.10);
    background: rgba(148, 163, 184, 0.06);
    color: rgba(226, 232, 240, 0.92);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#room_inbox{
    margin-top: 12px;
}

.online-user:last-child{
    margin-bottom: 0;
}

.avatar-btn{
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.10);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.avatar-btn:hover{
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.16);
}

.avatar-btn__img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
    display: block;
}

.avatar-btn__initials{
    color: rgba(226, 232, 240, 0.92);
    font-weight: 800;
    font-size: 12px;
}

.online__label{ opacity: 0.75; font-size: 12px; }
.online__count{ font-weight: 700; }

.app-footer{
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.10);
    background: rgba(2, 6, 23, 0.25);
    box-sizing: border-box;
    font-size: 12px;
    opacity: 0.85;
}

@media (max-width: 920px){
    body{
        align-items: stretch;
    }

    .app{
        height: calc(100vh - 24px);
        flex-direction: column;
    }

    .app-body{
        flex-direction: column;
    }

    .terminal{
        height: auto;
        flex: 1;
    }

    .sidebar{
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .room{
        flex: 1;
        min-width: 240px;
    }

    .auth{
        flex: 2;
        min-width: 280px;
    }
}

@media (max-width: 520px){
    .app{
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
    }

    .terminal{
        padding: 14px;
    }

    .sidebar{
        flex-direction: column;
    }

    .auth-input{
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .auth-status{
        margin-left: 0;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .emoji-picker{
        right: auto;
        left: 0;
        width: min(260px, calc(100vw - 60px));
    }
}

.terminal{
    flex: 1;
    min-width: 0;
    height: 100%;
    position: relative;
    padding: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
    border-radius: 14px;
    color: #22c55e;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.14);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar{
    width: 320px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.room{
    padding: 10px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: rgba(226, 232, 240, 0.72);
}

.room-shell{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.room-info{
    min-width: 0;
    flex: 1;
    color: rgba(226, 232, 240, 0.88);
}

.global-menu-wrap{
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.global-menu-btn{
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #d1fae5;
    font: inherit;
    cursor: pointer;
}

.global-menu-btn:hover{
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.16);
}

.global-menu{
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(280px, calc(100vw - 40px));
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.96);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.global-menu[hidden]{
    display: none !important;
}

.global-menu-group{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.global-menu-title{
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(226, 232, 240, 0.58);
}

.global-menu-select{
    min-width: 0;
}

.global-menu-action{
    width: 100%;
    text-align: left;
}

.auth{
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: rgba(226, 232, 240, 0.88);
}

.auth-row{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-hint{
    font-size: 12px;
    line-height: 1.35;
    opacity: 0.85;
    color: rgba(226, 232, 240, 0.78);
    padding: 2px 2px;
}

.auth-input{
    flex: 1;
    min-width: 180px;
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(34, 197, 94, 0.18);
    outline: none;
    color: #e2e8f0;
    font: inherit;
    padding: 10px 12px;
    border-radius: 10px;
}

.auth-input::placeholder{
    color: rgba(226, 232, 240, 0.55);
}

.auth-input:focus{
    border-color: rgba(34, 197, 94, 0.55);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.auth-btn{
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #d1fae5;
    font: inherit;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 80ms ease, border-color 120ms ease, background 120ms ease;
}

.auth-btn:hover{
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.16);
}

.auth-btn:active{
    transform: translateY(1px);
}

.auth-btn:disabled{
    opacity: 0.55;
    cursor: default;
}

.auth-status{
    margin-left: auto;
    opacity: 0.95;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.35);
    color: rgba(226, 232, 240, 0.88);
}

.messages{
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 6px;
    padding-top: 4px;
}

.message{
    display: flex;
    align-items: flex-end;
    gap: 0;
    white-space: pre-wrap;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.90);
}

.message-date-separator{
    display: flex;
    justify-content: center;
    margin: 8px 0 2px;
}

.message-date-separator__label{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.88);
    color: rgba(226, 232, 240, 0.72);
    font-size: 12px;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.message--self{
    color: rgba(226, 232, 240, 0.96);
    justify-content: flex-end;
}

.message--other{
    justify-content: flex-start;
}

.mention{
    display: inline-block;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(56, 189, 248, 0.14);
    color: rgba(224, 242, 254, 0.96);
    font-weight: 700;
}

.avatar{
    width: 34px;
    height: 34px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 34px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    background: rgba(2, 6, 23, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(226, 232, 240, 0.88);
    font-weight: 700;
    font-size: 12px;
}

.avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bubble{
    max-width: min(78%, 720px);
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(148, 163, 184, 0.07);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bubble-content{
    min-width: 0;
    flex: 1;
}

.bubble-body{
    min-width: 0;
    flex: 1;
}

.has-bubble-time{
    position: relative;
    padding-right: 52px;
    padding-bottom: 2px;
}

.bubble-body--with-media{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    max-width: min(100%, 260px);
}

.bubble-body--with-media .bubble-content{
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
}

.bubble-body--with-media .bubble-content--attachment{
    width: auto;
    flex: 0 0 auto;
}

.bubble-body--with-media .bubble-content--message{
    width: 100%;
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.bubble--with-media{
    display: inline-flex;
    padding: 8px 10px;
}

.bubble-footer{
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
}

.bubble-footer__text{
    min-width: 0;
    flex: 1;
    width: 0;
}

.bubble-time{
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 11px;
    line-height: 1;
    color: rgba(226, 232, 240, 0.56);
    white-space: nowrap;
}

.bubble-body--with-media .has-bubble-time{
    padding-right: 52px;
}

.message--self .bubble{
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.18);
}

.message--self .content{
    text-shadow: 0 0 16px rgba(34, 197, 94, 0.10);
}

.ts{
    opacity: 0.65;
}

.message--assistant .content{
    color: #ffffff;
}

.message .role{
    opacity: 0.85;
}

.composer{
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(34, 197, 94, 0.2);
}

.attach{
    position: relative;
    display: flex;
    align-items: center;
}

.attach-btn{
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: rgba(226, 232, 240, 0.92);
    font: inherit;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}

.attach-btn:hover{
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.16);
}

.attach-menu{
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    min-width: 220px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.92);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attach-menu[hidden]{
    display: none !important;
}

.attach-item{
    text-align: left;
    font: inherit;
    color: rgba(226, 232, 240, 0.92);
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(148, 163, 184, 0.08);
    cursor: pointer;
}

.attach-item:hover{
    border-color: rgba(34, 197, 94, 0.40);
    background: rgba(34, 197, 94, 0.12);
}

.attachment-label{
    margin-top: 6px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.70);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.attach-card{
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    text-align: left;
    font: inherit;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.42);
    color: rgba(226, 232, 240, 0.92);
    cursor: pointer;
}

.attach-card:hover{
    border-color: rgba(34, 197, 94, 0.40);
    background: rgba(34, 197, 94, 0.12);
}

.attach-card__badge{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.24);
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.attach-card__meta{
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attach-card__title{
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.attach-card__subtitle{
    font-size: 12px;
    color: rgba(226, 232, 240, 0.68);
}

.attach-card:hover{
    border-color: rgba(34, 197, 94, 0.40);
    background: rgba(34, 197, 94, 0.12);
}

.inline-media{
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(100%, 420px);
    margin-top: 6px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.30);
}

.inline-media--video{
    width: min(100%, 460px);
}

.inline-media--image{
    width: min(100%, 360px);
}

.inline-media__header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.inline-media__actions{
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-media-trigger{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    color: rgba(226, 232, 240, 0.92);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.inline-media-trigger--image{
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    overflow: hidden;
    width: auto;
    max-width: min(100%, 260px);
}

.inline-media-trigger:hover{
    border-color: rgba(34, 197, 94, 0.40);
    background: rgba(34, 197, 94, 0.12);
}

.inline-media-trigger--image:hover{
    border-color: transparent;
    background: transparent;
}

.inline-media-trigger__title{
    font-weight: 600;
    word-break: break-word;
}

.inline-media-trigger__hint{
    font-size: 12px;
    color: rgba(226, 232, 240, 0.72);
}

.inline-media-trigger__thumb{
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.65);
}

.inline-media-trigger--image .inline-media-trigger__thumb{
    max-height: 260px;
    border-radius: 12px;
    object-fit: contain;
    width: auto;
    max-width: min(100%, 260px);
}

.inline-media-viewer[hidden]{
    display: none !important;
}

.inline-media-viewer{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inline-media__title{
    min-width: 0;
    flex: 1;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.78);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inline-media__download{
    flex: 0 0 auto;
    color: #22c55e;
    text-decoration: none;
    font-size: 12px;
}

.inline-media__download:hover{
    text-decoration: underline;
}

.inline-media__close{
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.08);
    color: rgba(226, 232, 240, 0.92);
    font: inherit;
    cursor: pointer;
}

.inline-media__close:hover{
    border-color: rgba(34, 197, 94, 0.40);
    background: rgba(34, 197, 94, 0.12);
}

.inline-media__player{
    display: block;
    width: 100%;
    max-width: 100%;
}

.inline-media__player--video{
    max-height: 320px;
    border-radius: 10px;
    background: #000;
}

.inline-media__player--image{
    max-height: 320px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.65);
}

.media-viewer-card{
    width: min(760px, calc(100vw - 24px));
}

.media-viewer-actions{
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-viewer-download{
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.media-viewer-body{
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.media-viewer-audio,
.media-viewer-video,
.media-viewer-image{
    display: block;
    width: 100%;
    max-width: 100%;
}

.media-viewer-audio[hidden],
.media-viewer-video[hidden],
.media-viewer-image[hidden]{
    display: none !important;
}

.media-viewer-image{
    max-height: min(68vh, 560px);
    object-fit: contain;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.65);
}

.media-viewer-video{
    max-height: min(70vh, 560px);
    border-radius: 12px;
    background: #000;
}

.chat-media-viewer[hidden]{
    display: none !important;
}

.chat-media-viewer{
    position: absolute;
    inset: 18px 18px 76px 18px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(6px);
}

.chat-media-viewer__card{
    width: min(760px, 100%);
    max-height: 100%;
    overflow: auto;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.emoji{
    position: relative;
    display: flex;
    align-items: center;
}

.emoji-btn{
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: rgba(226, 232, 240, 0.92);
    font: inherit;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}

.emoji-btn:hover{
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.16);
}

.emoji-picker{
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: 260px;
    max-height: 220px;
    overflow: auto;
    padding: 10px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    z-index: 10;
}

.emoji-picker[hidden]{
    display: none !important;
}

.emoji-item{
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    padding: 6px;
    cursor: pointer;
    line-height: 1;
    font-size: 18px;
}

.emoji-item:hover{
    border-color: rgba(34, 197, 94, 0.40);
    background: rgba(34, 197, 94, 0.12);
}

.composer[data-disabled="1"]{
    opacity: 0.6;
}

.composer[data-disabled="1"] .send{
    pointer-events: none;
}

.username{
    width: 120px;
    background: transparent;
    border: 0;
    outline: none;
    color: #22c55e;
    font: inherit;
}

.prompt{
    user-select: none;
}

.input{
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    color: #22c55e;
    font: inherit;
    resize: none;
    min-height: 42px;
    max-height: 140px;
    overflow: auto;
}

.input::placeholder{
    color: rgba(226, 232, 240, 0.45);
}

.send{
    background: transparent;
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #22c55e;
    font: inherit;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    align-self: center;
}

.send:hover{
    border-color: rgba(34, 197, 94, 0.7);
}

.cursor{
    display: inline-block;
    width: 10px;
    background: #22c55e;
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    50%{opacity: 0;}
}