@font-face {
    font-family: 'Vazir FD';
    src: url('fonts/Vazir-Thin-FD.eot');
    src: url('fonts/Vazir-Thin-FD.eot?#iefix') format('embedded-opentype'),
         url('fonts/Vazir-Thin-FD.woff2') format('woff2'),
         url('fonts/Vazir-Thin-FD.woff') format('woff'),
         url('fonts/Vazir-Thin-FD.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir FD';
    src: url('fonts/Vazir-Light-FD.eot');
    src: url('fonts/Vazir-Light-FD.eot?#iefix') format('embedded-opentype'),
         url('fonts/Vazir-Light-FD.woff2') format('woff2'),
         url('fonts/Vazir-Light-FD.woff') format('woff'),
         url('fonts/Vazir-Light-FD.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir FD';
    src: url('fonts/Vazir-FD.eot');
    src: url('fonts/Vazir-FD.eot?#iefix') format('embedded-opentype'),
         url('fonts/Vazir-FD.woff2') format('woff2'),
         url('fonts/Vazir-FD.woff') format('woff'),
         url('fonts/Vazir-FD.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir FD';
    src: url('fonts/Vazir-Medium-FD.eot');
    src: url('fonts/Vazir-Medium-FD.eot?#iefix') format('embedded-opentype'),
         url('fonts/Vazir-Medium-FD.woff2') format('woff2'),
         url('fonts/Vazir-Medium-FD.woff') format('woff'),
         url('fonts/Vazir-Medium-FD.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir FD';
    src: url('fonts/Vazir-Bold-FD.eot');
    src: url('fonts/Vazir-Bold-FD.eot?#iefix') format('embedded-opentype'),
         url('fonts/Vazir-Bold-FD.woff2') format('woff2'),
         url('fonts/Vazir-Bold-FD.woff') format('woff'),
         url('fonts/Vazir-Bold-FD.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body, input, textarea, button, .message-text, .msg {
    font-family: 'Vazir FD', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                 "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", 
                 "Segoe UI Symbol", "Noto Color Emoji", sans-serif !important;
}

input, button {
  font-family: 'Vazir-FD' !important;
}
*{box-sizing:border-box}:root{--bg:#0e1621;--panel:#17212b;--panel2:#202b36;--input:#242f3a;--text:#f1f5f9;--muted:#91a0af;--line:#263442;--accent:#2aabee;--bubble:#182533;--mine:#2b5278;--danger:#ef5350}html,body{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:'Vazir FD',sans-serif}.hidden{display:none!important}.center{min-height:100vh;display:grid;place-items:center;padding:20px}.card{background:var(--panel);border-radius:16px;box-shadow:0 12px 40px #0006}.login-card{width:min(420px,100%);padding:34px}.login-card h1{margin:0 0 10px}.login-card p{color:var(--muted);margin-bottom:24px}.login-card form{display:grid;gap:12px}input{height:48px;border:1px solid var(--line);border-radius:12px;padding:0 15px;font-size:16px;background:var(--input);color:var(--text);outline:0}button{cursor:pointer}.login-card button,.composer button{height:48px;border:0;border-radius:12px;background:var(--accent);color:#fff;font-size:16px;font-weight:600}.error{color:#ff7b72;font-size:13px;min-height:18px}.chat-shell{height:100vh;max-width:980px;margin:auto;background:var(--bg);display:flex;flex-direction:column}.topbar{height:64px;padding:0 18px;background:var(--panel);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.topbar small{display:block;color:var(--muted);margin-top:3px}.ghost{border:0;background:transparent;color:var(--muted);padding:9px 13px;border-radius:10px}.messages{flex:1;overflow:auto;padding:24px 18px;background:radial-gradient(circle at 20% 10%,#16222e 0,transparent 28%),radial-gradient(circle at 85% 80%,#14202b 0,transparent 30%),var(--bg)}.msg{width:fit-content;max-width:min(72%,680px);margin:0 0 9px;background:var(--bubble);border-radius:8px 8px 8px 2px;padding:8px 11px 9px;box-shadow:0 1px 2px #0004}.msg.mine{margin-right:auto;margin-left:0;background:var(--mine);border-radius:8px 8px 2px 8px}.meta{display:flex;gap:12px;margin-bottom:3px}.meta strong{font-size:13px;color:#62b5e8}.meta time{color:#718090;font-size:10px}.text{font-size:14px;line-height:1.8;overflow-wrap:anywhere}.photo{display:block;max-width:100%;max-height:440px;margin-top:7px;border-radius:7px}.composer{display:flex;gap:8px;padding:10px 12px;background:var(--panel);border-top:1px solid var(--line);align-items:center}.composer input{flex:1;border-radius:22px}.composer button{border-radius:23px;padding:0 20px}.attach{width:20px;height:46px;border-radius:50%;display:grid;place-items:center;color:var(--muted);font-size:20px}.attach input{display:none}.preview-box{position:relative;display:inline-block;margin:7px 12px}.preview-box img{max-width:180px;max-height:130px;border-radius:9px}.preview-box button{position:absolute;top:-7px;left:-7px;border:0;border-radius:50%;width:25px;height:25px;background:var(--danger);color:#fff}@media(max-width:600px){.messages{padding:14px 10px}.msg{max-width:88%}.composer{padding:8px}.composer button{padding:0 15px}}
.scroll-bottom {
    position: absolute;
    right: 18px;
    bottom: 85px;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    cursor: pointer;

    font-size: 22px;
    line-height: 42px;

    z-index: 20;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.scroll-bottom.hidden {
    display: none;
}
#messageForm {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    direction: rtl;
}

#sendBtn {
    order: 1;
    flex: 0 0 48px;
    margin: 0;
}

#message {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    direction: rtl;
    text-align: right;
}
#message {
    flex: 1;
    background: var(--input) !important;
    color: var(--text) !important;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 15px;
    font-family: inherit;
    outline: 0;
    resize: none;
    line-height: 1.5;
    min-height: 44px;
    max-height: 140px;
    box-sizing: border-box;
    overflow-y: auto;
}

#message::placeholder {
    color: var(--muted, #888);
}

.attach {
    order: 3;
    flex: 0 0 40px;
}

#recordBtn {
    order: 4;
    flex: 0 0 40px;
}

#recordTimer {
    order: 5;
    direction: rtl;
}
/* =========================================================
   Message Context Menu
   ========================================================= */

.message-menu {
    position: fixed;
    z-index: 9999;

    min-width: 150px;

    padding: 6px;

    background: #202b36;

    border: 1px solid rgba(255,255,255,.08);

    border-radius: 10px;

    box-shadow:
        0 8px 30px rgba(0,0,0,.45);

    direction: rtl;
}


.message-menu button {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;

    border: 0;
    border-radius: 7px;

    background: transparent;

    color: #fff;

    font-family: inherit;
    font-size: 14px;

    text-align: right;

    cursor: pointer;
}


.message-menu button:hover {
    background: rgba(255,255,255,.08);
}


/* =========================================================
   Reply Preview Above Input
   ========================================================= */

.reply-preview {
    width: 100%;

    margin-bottom: 6px;

    background: #202b36;

    border-radius: 10px;

    overflow: hidden;
}


.reply-preview.hidden {
    display: none;
}


.reply-preview-inner {
    display: flex;
    align-items: center;

    min-height: 52px;
}


.reply-preview-line {
    width: 4px;
    align-self: stretch;

    background: #5eb5f7;
}


.reply-preview-content {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 7px 10px;

    overflow: hidden;
}


.reply-preview-content strong {
    color: #5eb5f7;

    font-size: 13px;
}


.reply-preview-content span {
    margin-top: 2px;

    color: #b8c3cc;

    font-size: 12px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.reply-preview button {
    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    margin-left: 6px;

    border: 0;

    background: transparent;

    color: #aeb7bf;

    font-size: 24px;

    cursor: pointer;
}


/* =========================================================
   Reply Inside Message
   ========================================================= */

.message-reply {
    display: flex;

    width: 100%;

    margin-bottom: 7px;

    padding: 5px 7px;

    background: rgba(0,0,0,.12);

    border-radius: 6px;

    cursor: pointer;

    overflow: hidden;
}


.message-reply:hover {
    background: rgba(0,0,0,.20);
}


.message-reply-bar {
    width: 3px;

    flex: 0 0 3px;

    margin-left: 7px;

    border-radius: 3px;

    background: #5eb5f7;
}


.message-reply-content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}


.message-reply-content strong {
    color: #5eb5f7;

    font-size: 12px;
}


.message-reply-content span {
    color: #c7d0d8;

    font-size: 12px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.message-reply.deleted {
    opacity: .6;
}


/* =========================================================
   Highlight Original Message
   ========================================================= */

.msg.reply-highlight {
    animation: replyHighlight 1.5s ease;
}


@keyframes replyHighlight {

    0% {
        box-shadow:
            0 0 0 3px rgba(94,181,247,.65);
    }

    100% {
        box-shadow:
            0 0 0 0 transparent;
    }
}


/* =========================================================
   Go To Bottom Button
   ========================================================= */

.scroll-bottom {
    position: absolute;

    right: 18px;
    bottom: 85px;

    width: 42px;
    height: 42px;

    border: none;

    border-radius: 50%;

    cursor: pointer;

    font-size: 22px;

    z-index: 20;

    box-shadow:
        0 3px 12px rgba(0,0,0,.35);
}


.scroll-bottom.hidden {
    display: none;
}

.chat-media-video {
    max-width: 100%;
    max-height: 280px;
    border-radius: 8px;
    display: block;
    background: #000;
}

.chat-media-audio {
    width: 240px;
    height: 38px;
    display: block;
    margin: 4px 0;
}

.record-timer {
    font-size: 12px;
    color: #e53935;
    font-weight: bold;
    margin: 0 4px;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0.5; }
}
