@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
    /* ---------- سیستم تایپوگرافی ---------- */
    --mc-font: 'Vazirmatn', 'Google Sans', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;

    /* ---------- پالت رنگی «Gemini» — آبی/بنفش/صورتی (طبق نظر شما برگردونده شد) ----------
       نام متغیرها (mc-orange-*) از اول همینه، ربطی به رنگ فعلی نداره — فقط یه اسم
       داخلیه؛ تغییرش نده وگرنه باید همه‌ی ~۴۰ جای استفاده‌شده‌ش رو دستی گشت. */
    --mc-orange-1: #8ab4f8;   /* آبی روشن */
    --mc-orange-2: #a142f4;   /* بنفش */
    --mc-orange-3: #f538a0;   /* صورتی */
    --mc-orange-dark: #c58af9; /* لاواندر (برای متن‌های تاکیدی مثل نام کاربری) */
    --mc-orange-soft: rgba(161, 66, 244, 0.16); /* پس‌زمینه‌ی ملایم بنفش برای نشان/حالت فعال */
    --mc-gradient: linear-gradient(135deg, var(--mc-orange-1) 0%, var(--mc-orange-2) 55%, var(--mc-orange-3) 100%);

    --mc-green-1: #1dd3b0;
    --mc-green-2: #22c55e;
    --mc-green-gradient: linear-gradient(135deg, var(--mc-green-1) 0%, var(--mc-green-2) 100%);

    /* فاصله از پایین صفحه؛ باید بلندتر از نوار پایین سایت (پنل/علاقه‌مندی‌ها/خانه/منو)
       باشه تا لانچر روی اون نوار نیفته. اگه توی سایت شما نوار پایین ارتفاع دیگه‌ای
       داره، همین یک عدد رو تغییر بدید، همه‌جا خودش هماهنگ می‌شه. */
    --mc-bottom-clearance: 76px;

    /* ---------- سطوح شیشه‌ای (Glassmorphism) ---------- */
    --mc-surface-0: #0b0c16;
    --mc-surface-1: rgba(255,255,255,0.055);
    --mc-surface-2: rgba(255,255,255,0.095);
    --mc-surface-3: rgba(255,255,255,0.15);
    --mc-border-glass: rgba(255,255,255,0.16);
    --mc-border-glass-soft: rgba(255,255,255,0.08);
    --mc-border-gold: rgba(161, 66, 244, 0.3);
    --mc-border-gold-soft: rgba(161, 66, 244, 0.18);
    --mc-blur: 20px;

    --mc-text-1: #f3f0ff;
    --mc-text-2: rgba(243,240,255,0.72);
    --mc-text-3: rgba(243,240,255,0.46);

    --mc-msg-font-size: 13.5px;

    --mc-radius-lg: 20px;
    --mc-radius-md: 14px;
    --mc-radius-sm: 10px;
    --mc-ease: cubic-bezier(.4,0,.2,1);
}

/* ---------------- لانچر (لیبل + آیکون شناور) ---------------- */
#movie-chat-launcher {
    position: fixed;
    bottom: var(--mc-bottom-clearance);
    left: 20px;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    direction: rtl;
}

#movie-chat-label {
    background: rgba(14, 14, 24, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--mc-text-1);
    font-family: var(--mc-font);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 13px;
    border-radius: 20px;
    border: 1px solid var(--mc-border-glass);
    box-shadow: 0 4px 16px rgba(161, 66, 244, 0.28);
    animation: movie-chat-label-float 2.4s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes movie-chat-label-float {
    0%, 100% { transform: translateY(0); opacity: 0.9; }
    50%      { transform: translateY(-5px); opacity: 1; }
}

#movie-chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--mc-gradient);
    background-size: 220% 220%;
    color: #fff;
    border: none;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(245, 56, 160, 0.5), 0 0 0 1px rgba(255,255,255,0.08) inset;
    position: relative;
    animation: movie-chat-bounce 2.2s ease-in-out infinite, movie-chat-gradient-shift 6s ease infinite;
}

#movie-chat-bubble-icon {
    display: inline-block;
    animation: movie-chat-icon-wiggle 3.2s ease-in-out infinite;
}

@keyframes movie-chat-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-8px) scale(1.04); }
}

@keyframes movie-chat-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes movie-chat-icon-wiggle {
    0%, 80%, 100% { transform: rotate(0deg); }
    85%  { transform: rotate(-12deg); }
    92%  { transform: rotate(10deg); }
    97%  { transform: rotate(-6deg); }
}

#movie-chat-bubble:hover {
    animation-play-state: paused;
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(161, 66, 244, 0.55), 0 0 0 1px rgba(255,255,255,0.12) inset;
}

#movie-chat-bubble.has-unread {
    animation: movie-chat-bounce 1.1s ease-in-out infinite, movie-chat-pulse 1.8s infinite, movie-chat-gradient-shift 6s ease infinite;
}

@keyframes movie-chat-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(161, 66, 244, 0.55), 0 6px 24px rgba(245, 56, 160, 0.5); }
    70%  { box-shadow: 0 0 0 18px rgba(161, 66, 244, 0), 0 6px 24px rgba(245, 56, 160, 0.5); }
    100% { box-shadow: 0 0 0 0 rgba(161, 66, 244, 0), 0 6px 24px rgba(245, 56, 160, 0.5); }
}

#movie-chat-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff3b6b;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: var(--mc-font);
    box-shadow: 0 0 0 2px var(--mc-surface-0);
}

/* ---------------- پنجره چت ---------------- */
#movie-chat-widget {
    position: fixed;
    bottom: var(--mc-bottom-clearance);
    left: 20px;
    width: 340px;
    max-width: 90vw;
    height: 480px;
    max-height: 82vh;
    background: var(--mc-surface-0);
    border-radius: var(--mc-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--mc-border-gold-soft);
    font-family: var(--mc-font);
    direction: rtl;
    overflow: hidden;
    isolation: isolate;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(18px) scale(0.96);
    transition: opacity 0.22s var(--mc-ease), transform 0.22s var(--mc-ease), visibility 0.22s;
}

/* لایه‌ی نور محیطی پشت کل ویجت — حس سالن سینما: طلایی + سرمه‌ای + یه ته‌رنگ زرشکی تیره */
#movie-chat-widget::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 20% 20%, rgba(66, 133, 244, 0.55) 0%, rgba(66, 133, 244, 0) 45%),
        radial-gradient(circle at 82% 12%, rgba(161, 66, 244, 0.5) 0%, rgba(161, 66, 244, 0) 45%),
        radial-gradient(circle at 28% 88%, rgba(245, 56, 160, 0.45) 0%, rgba(245, 56, 160, 0) 45%),
        radial-gradient(circle at 85% 82%, rgba(29, 211, 176, 0.4) 0%, rgba(29, 211, 176, 0) 45%);
    filter: blur(50px);
    animation: movie-chat-aurora 18s ease-in-out infinite alternate;
    z-index: -1;
    opacity: 0.9;
    pointer-events: none;
}

@keyframes movie-chat-aurora {
    0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
    33%  { transform: translate(-4%, 3%) rotate(8deg) scale(1.06); }
    66%  { transform: translate(3%, -4%) rotate(-6deg) scale(1.03); }
    100% { transform: translate(-2%, 2%) rotate(4deg) scale(1.09); }
}

#movie-chat-widget.movie-chat-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#movie-chat-widget input,
#movie-chat-widget button,
#movie-chat-widget textarea {
    font-family: var(--mc-font);
}

#movie-chat-header {
    position: relative;
    /* تن آبی-بنفش (بالای گرادیان Gemini) تا هدر از فوتر مجزا و قابل تشخیص باشه */
    background: linear-gradient(135deg, rgba(66,133,244,0.20) 0%, rgba(161,66,244,0.14) 100%);
    backdrop-filter: blur(var(--mc-blur));
    -webkit-backdrop-filter: blur(var(--mc-blur));
    border-bottom: 1px solid var(--mc-border-glass-soft);
    color: var(--mc-text-1);
    padding: 12px 16px 10px;
    flex-shrink: 0;
}

#movie-chat-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#movie-chat-header-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    width: fit-content;
}

/* فقط متن عنوان گرادیانی می‌شه؛ ایموجی‌ها از این افکت جدا نگه داشته می‌شن
   چون background-clip:text روی خود گلیف ایموجی هم اثر می‌ذاره و رنگ اصلیش
   رو از بین می‌بره (ایموجی رنگی تبدیل به یه شکل تخت تک‌رنگ می‌شه که می‌تونه
   بدشکل/نامناسب به نظر برسه). برای همینه که ایموجی رو تو یه span جدا گذاشتیم. */
#movie-chat-header-title {
    background: var(--mc-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

#movie-chat-header-emoji {
    -webkit-text-fill-color: initial;
    color: initial;
    font-style: normal;
}

#movie-chat-toggle {
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    opacity: 0.75;
    color: var(--mc-text-1);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

#movie-chat-toggle:hover {
    opacity: 1;
    transform: scale(1.12);
}

/* ---------------- نوار آمار سربرگ: آنلاین / تعداد پیام / ساعت ---------------- */
#movie-chat-stats-line {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.movie-chat-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--mc-border-glass-soft);
    border-radius: 20px;
    padding: 3px 9px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mc-text-1);
    font-variant-numeric: tabular-nums;
}

.movie-chat-stat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: movie-chat-dot-pulse 1.6s infinite;
    flex-shrink: 0;
}

.movie-chat-stat-icon {
    font-size: 11px;
    line-height: 1;
}

@keyframes movie-chat-dot-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70%  { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

#movie-chat-clock-line {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--mc-text-3);
    font-variant-numeric: tabular-nums;
    margin-right: auto;
}

#movie-chat-clock-text {
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--mc-text-2);
}

#movie-chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
    background: transparent;
}

/* ---------------- پیام سنجاق‌شده ادمین ---------------- */
#movie-chat-pinned {
    display: none;
    align-items: flex-start;
    gap: 6px;
    background: var(--mc-surface-2);
    backdrop-filter: blur(var(--mc-blur));
    border-bottom: 1px solid var(--mc-border-glass-soft);
    color: var(--mc-text-1);
    font-size: 12px;
    line-height: 1.6;
    padding: 8px 10px;
    flex-shrink: 0;
}

#movie-chat-pinned-icon {
    flex-shrink: 0;
}

#movie-chat-pinned-text {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

#movie-chat-pinned-close {
    cursor: pointer;
    opacity: 0.6;
    font-size: 14px;
    flex-shrink: 0;
    color: var(--mc-text-1);
}

#movie-chat-pinned-close:hover {
    opacity: 1;
}

#movie-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 16px;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}

#movie-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#movie-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.22);
    border-radius: 10px;
}

.movie-chat-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
}

.movie-chat-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 0 0 2px rgba(161, 66, 244, 0.28), 0 2px 8px rgba(0,0,0,0.4);
    cursor: pointer;
}

/* کارت پیام اختصاصی «کافه فیلمونا» — عمداً شبیه حباب پیام‌رسان‌های معمولی نیست:
   کارت گرد با یه نوار طلایی نازک لبه‌ی راست (حس بلیت/رول فیلم سینما) به‌جای
   دم‌گوشه‌ی حباب چت. */
.movie-chat-msg-content {
    position: relative;
    flex: 1;
    min-width: 0;
    font-size: var(--mc-msg-font-size, 13.5px);
    line-height: 1.65;
    background: linear-gradient(135deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.03) 100%);
    backdrop-filter: blur(var(--mc-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--mc-blur)) saturate(150%);
    padding: 9px 34px 9px 13px;
    border-radius: var(--mc-radius-md);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 6px 18px rgba(0,0,0,0.22);
    border: 1px solid var(--mc-border-glass-soft);
    border-right: 2px solid var(--mc-border-gold);
    color: var(--mc-text-1);
}

/* ---------------- ویرایش/حذف پیام ---------------- */
.movie-chat-msg-actions {
    position: absolute;
    top: 4px;
    left: 6px;
    display: flex;
    gap: 2px;
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.movie-chat-msg-content:hover .movie-chat-msg-actions {
    opacity: 1;
}

.movie-chat-action-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 3px;
    line-height: 1;
    color: var(--mc-text-2);
    transition: transform 0.15s ease, color 0.15s ease;
}

.movie-chat-action-btn:hover {
    color: var(--mc-text-1);
    transform: scale(1.15);
}

.movie-chat-edited-tag {
    font-size: 10px;
    color: var(--mc-text-3);
    margin-right: 4px;
}

.movie-chat-edit-wrap {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.movie-chat-edit-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 9px;
    background: var(--mc-surface-1);
    border: 1px solid var(--mc-border-glass);
    border-radius: var(--mc-radius-sm);
    font-size: 13px;
    direction: rtl;
    outline: none;
    color: var(--mc-text-1);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.movie-chat-edit-input:focus {
    border-color: var(--mc-orange-2);
    box-shadow: 0 0 0 3px rgba(161, 66, 244, 0.22);
}

.movie-chat-edit-actions {
    display: flex;
    gap: 6px;
}

.movie-chat-edit-save,
.movie-chat-edit-cancel {
    border: none;
    border-radius: 8px;
    padding: 3px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.movie-chat-edit-save {
    background: var(--mc-gradient);
    color: #fff;
}

.movie-chat-edit-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(161, 66, 244, 0.4);
}

.movie-chat-edit-cancel {
    background: var(--mc-surface-2);
    color: var(--mc-text-2);
}

.movie-chat-user {
    display: inline-block;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
    font-weight: bold;
    color: var(--mc-orange-dark);
    font-size: 13px;
    cursor: pointer;
}

/* ---------------- ساعت ارسال پیام ---------------- */
.movie-chat-msg-time {
    display: inline-block;
    font-size: 10.5px;
    color: var(--mc-text-3);
    margin-right: 6px;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: embed;
}
.movie-chat-dark .movie-chat-msg-time { color: var(--mc-text-3); }

.movie-chat-member-badge {
    color: var(--mc-orange-3);
    font-weight: bold;
    font-size: 12px;
    margin-right: 3px;
}

/* ---------------- بج سطح کاربر — ۴ سطح «کافه فیلمونا» ---------------- */
.movie-chat-level-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: bold;
    padding: 1px 7px;
    border-radius: 10px;
    margin-right: 4px;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass-soft);
    color: var(--mc-text-2);
    vertical-align: middle;
}

/* تازه‌وارد 🎬 — خنثی/خاکستری */
.movie-chat-level-badge.movie-chat-level-newbie {
    background: rgba(255,255,255,0.06);
    border-color: var(--mc-border-glass-soft);
    color: var(--mc-text-2);
}

/* فعال ⭐ — آبی‌نقره‌ای سرد */
.movie-chat-level-badge.movie-chat-level-buff {
    background: rgba(120, 170, 255, 0.14);
    border-color: rgba(120, 170, 255, 0.35);
    color: #9fc2ff;
}

/* منتقد فیلم 🎞️ — فیروزه‌ای سینمایی */
.movie-chat-level-badge.movie-chat-level-critic {
    background: rgba(45, 212, 191, 0.14);
    border-color: rgba(45, 212, 191, 0.38);
    color: #5eead4;
}

/* VIP 👑 — طلایی کامل، شاخص‌ترین سطح */
.movie-chat-level-badge.movie-chat-level-king {
    background: linear-gradient(135deg, rgba(255,215,120,0.28), rgba(245,56,160,0.22));
    border-color: rgba(255,215,120,0.35);
    color: #ffd76a;
}

.movie-chat-text {
    color: var(--mc-text-1);
    word-wrap: break-word;
}

/* ---------------- اسپویلر ---------------- */
.movie-chat-spoiler-wrap {
    position: relative;
    margin-top: 2px;
}

.movie-chat-spoiler-content {
    filter: blur(6px);
    user-select: none;
    color: var(--mc-text-1);
    transition: filter 0.2s ease;
}

.movie-chat-spoiler-wrap.revealed .movie-chat-spoiler-content {
    filter: none;
    user-select: auto;
}

.movie-chat-spoiler-wrap.revealed .movie-chat-spoiler-cover {
    display: none;
}

.movie-chat-spoiler-cover {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: auto;
    background: rgba(161, 66, 244, 0.22);
    border: 1px dashed var(--mc-orange-2);
    border-radius: var(--mc-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11.5px;
    font-weight: bold;
    color: var(--mc-text-1);
    cursor: pointer;
    padding: 4px;
}

/* ---------------- واکنش‌ها ---------------- */
.movie-chat-reactions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.movie-chat-reaction-pill {
    border: 1px solid var(--mc-border-glass);
    background: var(--mc-surface-2);
    backdrop-filter: blur(8px);
    color: var(--mc-text-1);
    border-radius: 12px;
    font-size: 12px;
    padding: 1px 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: transform 0.12s var(--mc-ease), background 0.12s ease;
}

.movie-chat-reaction-pill:hover {
    transform: scale(1.06);
    background: var(--mc-surface-3);
}

.movie-chat-reaction-pill.mine {
    background: var(--mc-gradient);
    border-color: transparent;
    color: #fff;
}

.movie-chat-reaction-add {
    border: 1px dashed var(--mc-border-glass);
    background: transparent;
    border-radius: 12px;
    font-size: 11px;
    padding: 1px 7px;
    cursor: pointer;
    color: var(--mc-text-2);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.movie-chat-reaction-add:hover {
    color: var(--mc-text-1);
    border-color: var(--mc-orange-2);
}

/* ---------------- پاپ‌آورها (پیکر ایموجی و پروفایل) ----------------
 * max-height + overflow-y:auto اینجا حیاتیه: اگه فضای بالای دکمه کم باشه،
 * popover به‌جای برش خوردن زیر لبه‌ی #movie-chat-widget (که overflow:hidden
 * داره)، خودش داخلی اسکرول می‌گیره تا همه‌ی ایموجی‌ها در دسترس بمونن. */
.movie-chat-popover {
    position: absolute;
    left: 14px;
    right: 14px;
    background: rgba(20, 18, 32, 0.88);
    backdrop-filter: blur(26px) saturate(160%);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
    border: 1px solid var(--mc-border-glass);
    border-radius: var(--mc-radius-lg);
    box-shadow: 0 14px 40px rgba(0,0,0,0.45);
    padding: 10px;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s var(--mc-ease), transform 0.18s var(--mc-ease), visibility 0.18s;
    max-height: 220px;
    overflow-y: auto;
    color: var(--mc-text-1);
}

.movie-chat-popover.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#movie-chat-reaction-popover {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.movie-chat-emoji-popover {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.movie-chat-emoji-popover {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.movie-chat-picker-emoji {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    padding: 5px;
    transition: background 0.12s ease, transform 0.12s ease;
}

.movie-chat-picker-emoji:hover {
    background: var(--mc-surface-3);
    transform: scale(1.12);
}

/* ---------------- پاپ‌آور تنظیمات ---------------- */
.movie-chat-settings-block {
    padding: 6px 4px;
}
.movie-chat-settings-block + .movie-chat-settings-block {
    border-top: 1px solid var(--mc-border-glass-soft);
    margin-top: 4px;
}
.movie-chat-settings-label {
    font-size: 11px;
    color: var(--mc-text-3);
    margin-bottom: 6px;
    font-weight: 600;
}
.movie-chat-settings-row-btn {
    width: 100%;
    text-align: right;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass-soft);
    color: var(--mc-text-1);
    border-radius: var(--mc-radius-sm);
    padding: 8px 12px;
    font-size: 12.5px;
    font-family: var(--mc-font);
    cursor: pointer;
    transition: background 0.15s ease;
}
.movie-chat-settings-row-btn:hover { background: var(--mc-surface-3); }

.movie-chat-fontsize-row {
    display: flex;
    gap: 6px;
}
.movie-chat-fontsize-opt {
    flex: 1;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass-soft);
    color: var(--mc-text-2);
    border-radius: var(--mc-radius-sm);
    padding: 7px 4px;
    font-size: 11.5px;
    font-family: var(--mc-font);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.movie-chat-fontsize-opt.active {
    background: var(--mc-gradient);
    color: #fff;
    font-weight: 700;
    border-color: transparent;
}

/* ---------------- پاپ‌آور تنظیمات ---------------- */
.movie-chat-settings-block + .movie-chat-settings-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--mc-border-glass-soft);
}

.movie-chat-settings-label {
    font-size: 11.5px;
    color: var(--mc-text-3);
    margin-bottom: 6px;
    font-weight: 600;
}

.movie-chat-settings-row-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: right;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass-soft);
    color: var(--mc-text-1);
    border-radius: var(--mc-radius-sm);
    padding: 8px 12px;
    font-size: 12.5px;
    font-family: var(--mc-font);
    cursor: pointer;
    transition: background 0.15s ease;
}

.movie-chat-settings-row-btn:hover {
    background: var(--mc-surface-3);
}

.movie-chat-fontsize-row {
    display: flex;
    gap: 6px;
}

.movie-chat-fontsize-opt {
    flex: 1;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass-soft);
    color: var(--mc-text-2);
    border-radius: var(--mc-radius-sm);
    padding: 7px 4px;
    font-size: 11.5px;
    font-family: var(--mc-font);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.movie-chat-fontsize-opt:hover {
    background: var(--mc-surface-3);
}

.movie-chat-fontsize-opt.active {
    background: var(--mc-orange-soft);
    border-color: var(--mc-orange-2);
    color: var(--mc-orange-dark);
    font-weight: 700;
}

#movie-chat-profile-popover {
    text-align: center;
}

.movie-chat-profile-name {
    font-weight: bold;
    font-size: 14px;
    color: var(--mc-orange-dark);
    margin-bottom: 4px;
}

.movie-chat-profile-level {
    margin-bottom: 8px;
}

.movie-chat-profile-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 8px;
}

.movie-chat-profile-stats div {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: var(--mc-text-2);
}

.movie-chat-profile-stats b {
    font-size: 15px;
    color: var(--mc-orange-3);
}

.movie-chat-progress-track {
    background: var(--mc-surface-2);
    height: 6px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.movie-chat-progress-fill {
    background: var(--mc-gradient);
    height: 100%;
}

.movie-chat-progress-label {
    font-size: 11px;
    color: var(--mc-text-3);
}

.movie-chat-profile-loading {
    font-size: 12px;
    color: var(--mc-text-3);
    padding: 10px;
}

/* ---------------- نوار ورودی پیام ---------------- */
#movie-chat-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--mc-border-glass-soft);
    /* تن سبزآبی-صورتی (پایین گرادیان Gemini) — عمداً متفاوت از رنگ هدر */
    background: linear-gradient(135deg, rgba(29,211,176,0.16) 0%, rgba(245,56,160,0.12) 100%);
    backdrop-filter: blur(var(--mc-blur));
    -webkit-backdrop-filter: blur(var(--mc-blur));
    padding: 9px 10px;
    flex-shrink: 0;
}

#movie-chat-attach-btn,
#movie-chat-emoji-btn {
    border: none;
    background: transparent;
    font-size: 18px;
    padding: 0 6px;
    cursor: pointer;
    opacity: 0.6;
    color: var(--mc-text-1);
    line-height: 1;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
#movie-chat-attach-btn:hover,
#movie-chat-emoji-btn:hover {
    opacity: 1;
    transform: scale(1.12);
}

#movie-chat-spoiler-toggle {
    border: none;
    background: transparent;
    font-size: 18px;
    padding: 0 8px;
    cursor: pointer;
    opacity: 0.55;
    color: var(--mc-text-1);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

#movie-chat-spoiler-toggle.active {
    opacity: 1;
    transform: scale(1.15);
    color: var(--mc-orange-3);
}

#movie-chat-input {
    flex: 1;
    border: 1px solid var(--mc-border-glass-soft);
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    direction: rtl;
    background: var(--mc-surface-2);
    border-radius: 22px;
    color: var(--mc-text-1);
    min-width: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#movie-chat-input::placeholder {
    color: var(--mc-text-3);
}

#movie-chat-input:focus {
    background: var(--mc-surface-3);
    border-color: var(--mc-orange-2);
    box-shadow: 0 0 0 3px rgba(161, 66, 244, 0.2), 0 0 18px rgba(245, 56, 160, 0.16);
}

#movie-chat-send-btn {
    background: var(--mc-green-gradient);
    background-size: 220% 220%;
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 0 18px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 3px 14px rgba(29, 211, 176, 0.45);
    transition: transform 0.15s var(--mc-ease), box-shadow 0.15s var(--mc-ease), opacity 0.15s ease, background-position 0.6s ease;
}

#movie-chat-send-icon {
    display: inline-block;
    transform: rotate(180deg);
    font-size: 13px;
}

#movie-chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(34, 197, 94, 0.5);
    background-position: 100% 50%;
}

#movie-chat-send-btn:active {
    transform: translateY(0) scale(0.94);
    box-shadow: 0 2px 8px rgba(29, 211, 176, 0.4);
}

#movie-chat-send-btn:disabled {
    opacity: 0.4;
    cursor: default;
    box-shadow: none;
    transform: none;
}

#movie-chat-spoiler-hint {
    background: var(--mc-surface-2);
    backdrop-filter: blur(8px);
    color: var(--mc-orange-dark);
    font-size: 11.5px;
    text-align: center;
    padding: 5px;
    flex-shrink: 0;
}

/* =====================================================================
   نسخه ۳.۰ — استایل‌های جدید (ریپلای/منشن/پین/نظرسنجی/امتیاز/لیدربورد/
   پروفایل کامل/دنبال‌کردن-بلاک-میوت/گزارش/حالت تاریک/تایپینگ/آنلاین و ...)
   ===================================================================== */

/* ---------------- Safe Area (آیفون) ---------------- */
#movie-chat-launcher {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
}
#movie-chat-widget {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------------- دکمه‌های هدر ---------------- */
#movie-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
#movie-chat-header-actions button {
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass);
    color: var(--mc-text-1);
    border-radius: 8px;
    font-size: 13px;
    padding: 4px 5px;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
#movie-chat-header-actions button:hover {
    background: var(--mc-surface-3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(161, 66, 244, 0.28);
}

/* ---------------- انیمیشن ورود پیام ---------------- */
.movie-chat-msg-enter {
    animation: movie-chat-msg-in 0.28s ease both;
}
@keyframes movie-chat-msg-in {
    0%   { opacity: 0; transform: translateY(10px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.movie-chat-flash {
    animation: movie-chat-flash-kf 1.4s ease;
}
@keyframes movie-chat-flash-kf {
    0%, 100% { background: transparent; }
    30% { background: rgba(161, 66, 244, 0.24); }
}
.movie-chat-mentioned .movie-chat-msg-content {
    box-shadow: 0 0 0 2px var(--mc-orange-2), 0 4px 16px rgba(245, 56, 160, 0.28);
}

/* ---------------- آواتار: عکس واقعی + دایره آنلاین ---------------- */
.movie-chat-avatar {
    position: relative;
    background-size: cover;
    background-position: center;
}
.movie-chat-avatar-img { color: transparent; }
.movie-chat-online-dot {
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #34d399;
    border: 2px solid var(--mc-surface-0);
}

/* ---------------- نشانگر «در حال تایپ» ---------------- */
#movie-chat-typing-line {
    font-size: 11px;
    color: var(--mc-orange-dark);
    padding: 2px 14px 4px;
    flex-shrink: 0;
}

/* ---------------- نوار پیام‌های سنجاق‌شده (چندتایی) ---------------- */
#movie-chat-pinned-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(var(--mc-blur));
    border-bottom: 1px solid var(--mc-border-glass-soft);
    flex-shrink: 0;
}
.movie-chat-pin-chip {
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass);
    border-radius: 10px;
    padding: 4px 9px;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
    color: var(--mc-text-1);
    flex-shrink: 0;
    transition: background 0.12s ease;
}
.movie-chat-pin-chip:hover { background: var(--mc-surface-3); }
.movie-chat-pinned-tag {
    font-size: 11px;
    margin-left: 3px;
}

/* ---------------- ریپلای ---------------- */
#movie-chat-reply-banner {
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.045);
    backdrop-filter: blur(var(--mc-blur));
    border-top: 1px solid var(--mc-border-glass-soft);
    padding: 6px 10px;
    font-size: 11.5px;
    flex-shrink: 0;
}
.movie-chat-reply-icon { flex-shrink: 0; }
.movie-chat-reply-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mc-text-2);
}
.movie-chat-reply-close {
    cursor: pointer;
    opacity: 0.6;
    padding: 0 4px;
    color: var(--mc-text-1);
}
.movie-chat-reply-quote {
    background: var(--mc-surface-2);
    border-right: 3px solid var(--mc-orange-2);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11.5px;
    color: var(--mc-text-2);
    margin-bottom: 4px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.movie-chat-reply-quote:hover { background: var(--mc-surface-3); }

/* ---------------- منشن ---------------- */
.movie-chat-mention {
    color: var(--mc-orange-dark);
    font-weight: bold;
    background: rgba(161, 66, 244, 0.16);
    border-radius: 4px;
    padding: 0 2px;
}
#movie-chat-mention-popover {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.movie-chat-mention-item {
    border: none;
    background: transparent;
    text-align: right;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--mc-text-1);
}
.movie-chat-mention-item:hover { background: var(--mc-surface-3); }

/* ---------------- تایم‌کد ---------------- */
.movie-chat-timecode {
    display: inline-block;
    background: rgba(90, 130, 200, 0.22);
    color: #a9c6f5;
    border-radius: 6px;
    padding: 0 5px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.movie-chat-timecode:hover { background: rgba(90, 130, 200, 0.36); }

/* ---------------- ایموجی/استیکر بزرگ ---------------- */
.movie-chat-big-emoji { font-size: 34px; line-height: 1.3; }

/* ---------------- پیش‌نمایش لینک ---------------- */
.movie-chat-link-preview {
    display: block;
    margin-top: 6px;
    border: 1px solid var(--mc-border-glass);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: var(--mc-surface-1);
    backdrop-filter: blur(10px);
}
.movie-chat-link-image {
    height: 110px;
    background-size: cover;
    background-position: center;
    background-color: var(--mc-surface-2);
}
.movie-chat-link-text { padding: 6px 8px; }
.movie-chat-link-title { font-size: 12.5px; font-weight: bold; color: var(--mc-text-1); }
.movie-chat-link-desc { font-size: 11px; color: var(--mc-text-2); margin-top: 2px; }

/* ---------------- کارت فیلم/سریال داخلی (فاز ۲) — شبیه تایل نتفلیکسی ---------------- */
.movie-chat-movie-card {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    padding: 6px;
    border: 1px solid var(--mc-border-gold-soft);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(10px);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.movie-chat-movie-card:hover {
    border-color: var(--mc-border-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(161, 66, 244, 0.18);
}
.movie-chat-movie-poster {
    flex-shrink: 0;
    width: 56px;
    height: 82px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: var(--mc-surface-2);
}
.movie-chat-movie-poster-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.movie-chat-movie-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.movie-chat-movie-title {
    font-size: 12.5px;
    font-weight: bold;
    color: var(--mc-text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.movie-chat-movie-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.movie-chat-movie-type,
.movie-chat-movie-year,
.movie-chat-movie-rating {
    font-size: 10px;
    color: var(--mc-text-2);
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 1px 6px;
}
.movie-chat-movie-rating {
    color: var(--mc-orange-dark);
    background: var(--mc-orange-soft);
}
.movie-chat-movie-watch-btn {
    display: inline-block;
    width: fit-content;
    font-size: 10.5px;
    font-weight: bold;
    color: #fff;
    background: var(--mc-gradient);
    border-radius: 8px;
    padding: 3px 9px;
    margin-top: 1px;
}

/* ---------------- چیپ پیشنهاد لینک از روی اسم فیلم/سریال (فاز ۲) ---------------- */
.movie-chat-suggestion-chip {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--mc-orange-dark);
    background: var(--mc-orange-soft);
    border: 1px dashed var(--mc-border-gold);
    border-radius: 20px;
    padding: 4px 11px;
    text-decoration: none;
    transition: background 0.15s ease;
}
.movie-chat-suggestion-chip:hover {
    background: rgba(161, 66, 244, 0.26);
}

/* ---------------- کارت نظرسنجی ---------------- */
.movie-chat-poll-card { display: flex; flex-direction: column; gap: 6px; padding: 2px 0; }
.movie-chat-poll-question { font-weight: bold; color: var(--mc-text-1); margin-bottom: 2px; }
.movie-chat-poll-option {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--mc-border-glass);
    border-radius: 10px;
    background: var(--mc-surface-1);
    padding: 7px 9px;
    cursor: pointer;
    overflow: hidden;
    font-size: 12px;
    text-align: right;
    color: var(--mc-text-1);
    transition: border-color 0.15s ease;
}
.movie-chat-poll-option:hover { border-color: var(--mc-orange-2); }
.movie-chat-poll-fill {
    position: absolute;
    inset: 0;
    background: rgba(160, 175, 200, 0.18);
    z-index: 0;
    transition: width 0.3s ease;
}
.movie-chat-poll-label, .movie-chat-poll-pct { position: relative; z-index: 1; }
.movie-chat-poll-option.mine { border-color: var(--mc-orange-3); }
.movie-chat-poll-option.mine .movie-chat-poll-fill { background: rgba(161, 66, 244, 0.3); }
.movie-chat-poll-total { font-size: 10.5px; color: var(--mc-text-3); }

/* ---------------- نوار واکنش سریع (هاور) ----------------
 * top/left با جاوااسکریپت (positionQuickReactBar) تنظیم می‌شه تا برای
 * پیام اول لیست هم به‌جای بریده‌شدن، پایین پیام باز بشه. */
.movie-chat-quick-react {
    position: absolute;
    background: rgba(20, 18, 32, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid var(--mc-border-glass);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    display: flex;
    gap: 2px;
    padding: 3px;
    z-index: 4;
    max-width: calc(100% - 16px);
    overflow-x: auto;
    animation: movie-chat-quick-in 0.12s ease both;
}
@keyframes movie-chat-quick-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.movie-chat-quick-react button {
    border: none;
    background: transparent;
    font-size: 15px;
    padding: 3px 5px;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.12s ease, transform 0.12s ease;
}
.movie-chat-quick-react button:hover { background: var(--mc-surface-3); transform: scale(1.15); }
.movie-chat-msg { position: relative; }

/* ---------------- ساخت نظرسنجی / فرم‌های عمومی داخل پاپ‌آور ---------------- */
.movie-chat-edit-title { font-weight: bold; font-size: 13px; color: var(--mc-orange-dark); margin-bottom: 6px; }
#movie-chat-poll-question, .movie-chat-poll-opt-input, #movie-chat-bio-input, #movie-chat-genre-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 9px;
    background: var(--mc-surface-1);
    border: 1px solid var(--mc-border-glass);
    border-radius: var(--mc-radius-sm);
    font-size: 12.5px;
    direction: rtl;
    margin-bottom: 6px;
    outline: none;
    font-family: inherit;
    color: var(--mc-text-1);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#movie-chat-poll-question:focus, .movie-chat-poll-opt-input:focus, #movie-chat-bio-input:focus, #movie-chat-genre-input:focus {
    border-color: var(--mc-orange-2);
    box-shadow: 0 0 0 3px rgba(161, 66, 244, 0.2);
}
#movie-chat-bio-input { resize: none; height: 50px; }

/* ---------------- امتیاز ستاره‌ای ---------------- */
.movie-chat-star-row { display: flex; gap: 4px; justify-content: center; margin: 6px 0; }
.movie-chat-star-btn {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.35;
    transition: transform 0.12s ease, opacity 0.12s ease;
}
.movie-chat-star-btn.selected, .movie-chat-star-btn:hover { opacity: 1; transform: scale(1.15); }
.movie-chat-rating-summary { text-align: center; font-size: 12px; color: var(--mc-text-2); }

/* ---------------- لیدربورد ---------------- */
.movie-chat-lb-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.movie-chat-lb-tab {
    flex: 1;
    border: 1px solid var(--mc-border-glass);
    background: var(--mc-surface-1);
    border-radius: 8px;
    padding: 5px 4px;
    font-size: 11px;
    cursor: pointer;
    color: var(--mc-text-2);
    transition: background 0.15s ease, color 0.15s ease;
}
.movie-chat-lb-tab.active { background: var(--mc-gradient); color: #fff; border-color: transparent; }
.movie-chat-lb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--mc-border-glass-soft);
    font-size: 12.5px;
    color: var(--mc-text-1);
}
.movie-chat-lb-rank { width: 24px; text-align: center; font-weight: bold; }
.movie-chat-lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movie-chat-lb-score { color: var(--mc-orange-3); font-weight: bold; font-size: 11.5px; }
.movie-chat-lb-empty { text-align: center; color: var(--mc-text-3); font-size: 12px; padding: 14px 0; }
.movie-chat-lb-list { max-height: 280px; overflow-y: auto; }

/* ---------------- بحث‌های داغ فیلمونا (تب hot تو همون پاپ‌آور لیدربورد) — فاز ۳ ---------------- */
.movie-chat-hot-row {
    padding: 8px 6px;
    border-bottom: 1px solid var(--mc-border-glass-soft);
    cursor: pointer;
    transition: background 0.15s ease;
}
.movie-chat-hot-row:hover { background: rgba(255,255,255,0.04); }
.movie-chat-hot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--mc-text-1);
}
.movie-chat-hot-reactions {
    font-size: 11px;
    font-weight: bold;
    color: var(--mc-orange-dark);
    background: var(--mc-orange-soft);
    border-radius: 10px;
    padding: 1px 7px;
}
.movie-chat-hot-preview {
    font-size: 12px;
    color: var(--mc-text-2);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.movie-chat-hot-post {
    font-size: 10.5px;
    color: var(--mc-text-3);
    margin-top: 3px;
}

/* ---------------- پروفایل کامل: کاور/بیو/نشان/دستاورد/روابط ---------------- */
.movie-chat-profile-cover {
    height: 44px;
    border-radius: 12px;
    margin-bottom: -18px;
    background: var(--mc-gradient);
}
.cover-sunset { background: linear-gradient(135deg, #ff512f, #f09819); }
.cover-ocean  { background: linear-gradient(135deg, #2193b0, #6dd5ed); }
.cover-forest { background: linear-gradient(135deg, #56ab2f, #a8e063); }
.cover-royal  { background: linear-gradient(135deg, #654ea3, #eaafc8); }
.cover-candy  { background: linear-gradient(135deg, #ff9a9e, #fecfef); }

.movie-chat-online-status { font-size: 10.5px; color: var(--mc-text-3); margin-bottom: 4px; }
.movie-chat-online-status.online { color: #34d399; }
.movie-chat-profile-bio { font-size: 12px; color: var(--mc-text-2); margin-bottom: 6px; padding: 0 6px; }
.movie-chat-profile-genre { font-size: 11px; color: var(--mc-text-3); margin-bottom: 6px; }

.movie-chat-badges-row { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 6px; }
.movie-chat-badge-chip {
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass-soft);
    color: var(--mc-orange-dark);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 10.5px;
}
.movie-chat-ach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
}
.movie-chat-ach-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 9.5px;
    color: var(--mc-text-3);
    opacity: 0.5;
}
.movie-chat-ach-chip.unlocked { color: #ffd76a; opacity: 1; }
.movie-chat-ach-emoji { font-size: 17px; }

.movie-chat-profile-actions { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.movie-chat-profile-action-btn {
    border: 1px solid var(--mc-border-glass);
    background: var(--mc-surface-1);
    color: var(--mc-text-1);
    border-radius: 16px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}
.movie-chat-profile-action-btn:hover { background: var(--mc-surface-3); transform: translateY(-1px); }
.movie-chat-profile-action-btn.active { background: var(--mc-gradient); color: #fff; border-color: transparent; }
.movie-chat-profile-action-btn.danger { color: #ff6b81; border-color: rgba(255,107,129,0.35); }
.movie-chat-profile-action-btn.danger.active { background: #e0345c; color: #fff; }
.movie-chat-profile-action-btn.disabled { opacity: 0.5; cursor: not-allowed; }

.movie-chat-cover-row { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.movie-chat-cover-swatch {
    width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
}
.movie-chat-cover-swatch.cover-default { background: var(--mc-gradient); }
.movie-chat-cover-swatch.active { border-color: var(--mc-text-1); }

.movie-chat-report-reason { display: block; font-size: 12px; padding: 4px 2px; cursor: pointer; color: var(--mc-text-1); }

/* ---------------- نوتیفیکیشن سبک (Toast) ---------------- */
.movie-chat-toast {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(20, 18, 32, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid var(--mc-border-glass);
    color: var(--mc-text-1);
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 20;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.movie-chat-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================================================================
   پیام خصوصی (دایرکت)
   ===================================================================== */
#movie-chat-dm-open-btn { position: relative; }
#movie-chat-dm-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #ff3b6b;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-shadow: 0 0 0 2px var(--mc-surface-0);
}

/* =====================================================================
   اعلان‌ها (ریپلای/منشن) — فاز ۳
   ===================================================================== */
#movie-chat-notif-btn { position: relative; }
#movie-chat-notif-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #ff3b6b;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-shadow: 0 0 0 2px var(--mc-surface-0);
}
.movie-chat-notif-popover { width: 270px; max-height: 340px; overflow-y: auto; padding: 6px; }
.movie-chat-notif-status { text-align: center; color: var(--mc-text-3); font-size: 12px; padding: 16px 0; }
.movie-chat-notif-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.movie-chat-notif-row:hover { background: rgba(255,255,255,0.05); }
.movie-chat-notif-row.unread { background: rgba(161, 66, 244, 0.08); }
.movie-chat-notif-row.unread:hover { background: rgba(161, 66, 244, 0.14); }
.movie-chat-notif-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--mc-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.movie-chat-notif-text { flex: 1; min-width: 0; font-size: 12px; color: var(--mc-text-1); }
.movie-chat-notif-preview {
    color: var(--mc-text-2);
    font-size: 11.5px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.movie-chat-notif-time { flex-shrink: 0; font-size: 10px; color: var(--mc-text-3); white-space: nowrap; }

/* =====================================================================
   جستجو در پیام‌ها — فاز ۳
   ===================================================================== */
.movie-chat-search-popover { width: 260px; padding: 8px; }
#movie-chat-search-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12.5px;
    outline: none;
    direction: rtl;
    color: var(--mc-text-1);
    font-family: var(--mc-font);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#movie-chat-search-input:focus {
    border-color: var(--mc-orange-2);
    box-shadow: 0 0 0 3px rgba(161, 66, 244, 0.2);
}
#movie-chat-search-results { max-height: 280px; overflow-y: auto; margin-top: 8px; }
.movie-chat-search-status { text-align: center; color: var(--mc-text-3); font-size: 12px; padding: 12px 0; }
.movie-chat-search-result {
    padding: 7px 5px;
    border-bottom: 1px solid var(--mc-border-glass-soft);
    cursor: pointer;
    transition: background 0.15s ease;
}
.movie-chat-search-result:hover { background: rgba(255,255,255,0.04); }
.movie-chat-search-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--mc-text-1);
}
.movie-chat-search-time { font-size: 10px; color: var(--mc-text-3); }
.movie-chat-search-preview {
    font-size: 12px;
    color: var(--mc-text-2);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#movie-chat-dm-panel {
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 17, 0.94);
    backdrop-filter: blur(30px);
    z-index: 30;
    display: none;
    flex-direction: column;
}
#movie-chat-dm-panel.open { display: flex; }

#movie-chat-dm-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.045);
    backdrop-filter: blur(var(--mc-blur));
    border-bottom: 1px solid var(--mc-border-glass-soft);
    color: var(--mc-text-1);
    flex-shrink: 0;
}
#movie-chat-dm-back {
    display: none;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass);
    color: var(--mc-text-1);
    border-radius: 8px;
    font-size: 16px;
    width: 28px;
    height: 28px;
    cursor: pointer;
}
#movie-chat-dm-title {
    flex: 1;
    font-weight: bold;
    font-size: 14px;
    width: fit-content;
    background: var(--mc-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
#movie-chat-dm-close {
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border-glass);
    color: var(--mc-text-1);
    border-radius: 8px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.15s ease;
}
#movie-chat-dm-close:hover { background: var(--mc-surface-3); }

#movie-chat-dm-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.movie-chat-dm-section-title {
    font-size: 12px;
    color: var(--mc-text-3);
    font-weight: bold;
    margin: 10px 4px 4px;
}
.movie-chat-dm-empty {
    text-align: center;
    color: var(--mc-text-3);
    font-size: 13px;
    padding: 30px 10px;
}

.movie-chat-dm-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.12s ease;
}
.movie-chat-dm-row:hover { background: var(--mc-surface-2); }
.movie-chat-dm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mc-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 14px;
}
.movie-chat-dm-row-body { flex: 1; min-width: 0; }
.movie-chat-dm-row-name { font-weight: bold; font-size: 13px; color: var(--mc-text-1); }
.movie-chat-dm-row-preview {
    font-size: 12px;
    color: var(--mc-text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.movie-chat-dm-row-unread {
    background: #ff3b6b;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.movie-chat-dm-request-actions { display: flex; gap: 6px; flex-shrink: 0; }
.movie-chat-dm-accept-btn, .movie-chat-dm-decline-btn {
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.12s ease;
}
.movie-chat-dm-accept-btn:hover, .movie-chat-dm-decline-btn:hover { transform: translateY(-1px); }
.movie-chat-dm-accept-btn { background: var(--mc-green-gradient); color: #fff; }
.movie-chat-dm-decline-btn { background: var(--mc-surface-2); color: var(--mc-text-2); }
.movie-chat-dm-pending-tag { font-size: 11px; color: #f0a742; flex-shrink: 0; }

#movie-chat-dm-thread {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.movie-chat-dm-bubble {
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.6;
    word-wrap: break-word;
    backdrop-filter: blur(14px);
    border: 1px solid var(--mc-border-glass-soft);
}
.movie-chat-dm-bubble.mine {
    align-self: flex-start;
    background: var(--mc-gradient);
    color: #fff;
    border-bottom-left-radius: 4px;
    border-color: transparent;
}
.movie-chat-dm-bubble.theirs {
    align-self: flex-end;
    background: var(--mc-surface-2);
    color: var(--mc-text-1);
    border-bottom-right-radius: 4px;
}
.movie-chat-dm-bubble-time {
    display: block;
    font-size: 10px;
    opacity: 0.75;
    margin-top: 3px;
    direction: ltr;
    text-align: inherit;
}
.movie-chat-dm-admin-notice {
    text-align: center;
    font-size: 11px;
    color: var(--mc-orange-dark);
    background: var(--mc-surface-2);
    padding: 5px;
    border-radius: 8px;
    margin: 6px 10px 0;
}

#movie-chat-dm-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--mc-border-glass-soft);
    background: rgba(255,255,255,0.045);
    backdrop-filter: blur(var(--mc-blur));
    padding: 8px 10px;
    flex-shrink: 0;
}
#movie-chat-dm-input {
    flex: 1;
    border: 1px solid var(--mc-border-glass-soft);
    background: var(--mc-surface-2);
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 13.5px;
    outline: none;
    direction: rtl;
    min-width: 0;
    color: var(--mc-text-1);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#movie-chat-dm-input::placeholder { color: var(--mc-text-3); }
#movie-chat-dm-input:focus {
    border-color: var(--mc-orange-2);
    box-shadow: 0 0 0 3px rgba(161, 66, 244, 0.2);
}
#movie-chat-dm-send-btn {
    background: var(--mc-green-gradient);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0 16px;
    height: 38px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(29, 211, 176, 0.4);
    transition: transform 0.15s var(--mc-ease), box-shadow 0.15s var(--mc-ease);
}
#movie-chat-dm-send-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(34, 197, 94, 0.45); }
#movie-chat-dm-send-btn:active { transform: scale(0.94); }
#movie-chat-dm-send-btn span { display: inline-block; transform: rotate(180deg); }

/* =====================================================================
   حالت تاریک (سوییچ اختیاری کاربر) — نسخه‌ی عمیق‌تر همون تم شیشه‌ای رنگی
   ===================================================================== */
#movie-chat-widget.movie-chat-dark {
    background: #050611;
}
.movie-chat-dark #movie-chat-widget::before { opacity: 0.75; }
.movie-chat-dark #movie-chat-body { background: transparent; }
.movie-chat-dark #movie-chat-messages { background: transparent; }
.movie-chat-dark #movie-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); }
.movie-chat-dark .movie-chat-msg-content {
    background: rgba(255,255,255,0.05);
    color: var(--mc-text-1);
    border-radius: var(--mc-radius-md) 4px var(--mc-radius-md) var(--mc-radius-md);
    border: 1px solid var(--mc-border-glass-soft);
    box-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.35);
}
.movie-chat-dark .movie-chat-text { color: var(--mc-text-1); }
.movie-chat-dark .movie-chat-user { color: var(--mc-orange-dark); }
.movie-chat-dark #movie-chat-pinned { background: var(--mc-surface-2); border-color: var(--mc-border-glass-soft); color: var(--mc-text-1); }
.movie-chat-dark #movie-chat-pinned-strip { background: rgba(255,255,255,0.02); border-color: var(--mc-border-glass-soft); }
.movie-chat-dark .movie-chat-pin-chip { background: var(--mc-surface-1); border-color: var(--mc-border-glass); color: var(--mc-text-1); }
.movie-chat-dark #movie-chat-reply-banner { background: rgba(255,255,255,0.03); border-color: var(--mc-border-glass-soft); }
.movie-chat-dark .movie-chat-reply-text { color: var(--mc-text-2); }
.movie-chat-dark .movie-chat-reply-quote { background: var(--mc-surface-1); color: var(--mc-text-2); }
.movie-chat-dark .movie-chat-mention { background: rgba(161, 66, 244, 0.16); }
.movie-chat-dark .movie-chat-popover { background: rgba(14,13,24,0.92); color: var(--mc-text-1); }
.movie-chat-dark .movie-chat-picker-emoji:hover { background: var(--mc-surface-3); }
.movie-chat-dark .movie-chat-profile-name { color: var(--mc-orange-dark); }
.movie-chat-dark .movie-chat-profile-bio,
.movie-chat-dark .movie-chat-profile-genre { color: var(--mc-text-2); }
.movie-chat-dark #movie-chat-header { background: linear-gradient(135deg, rgba(66,133,244,0.14) 0%, rgba(161,66,244,0.10) 100%); }
.movie-chat-dark #movie-chat-input-row { background: linear-gradient(135deg, rgba(29,211,176,0.11) 0%, rgba(245,56,160,0.08) 100%); border-color: var(--mc-border-glass-soft); }
.movie-chat-dark #movie-chat-input { color: var(--mc-text-1); background: var(--mc-surface-2); }
.movie-chat-dark #movie-chat-input::placeholder { color: var(--mc-text-3); }
.movie-chat-dark #movie-chat-spoiler-hint { background: var(--mc-surface-2); color: var(--mc-orange-dark); }
.movie-chat-dark .movie-chat-reaction-pill { background: var(--mc-surface-2); border-color: var(--mc-border-glass); color: var(--mc-text-1); }
.movie-chat-dark .movie-chat-link-preview { background: var(--mc-surface-1); border-color: var(--mc-border-glass-soft); }
.movie-chat-dark .movie-chat-link-title { color: var(--mc-text-1); }
.movie-chat-dark .movie-chat-poll-option { background: var(--mc-surface-1); border-color: var(--mc-border-glass); color: var(--mc-text-1); }
.movie-chat-dark .movie-chat-poll-fill { background: rgba(160,175,200,0.16); }
.movie-chat-dark .movie-chat-lb-row { border-color: var(--mc-border-glass-soft); }
.movie-chat-dark #movie-chat-poll-question,
.movie-chat-dark .movie-chat-poll-opt-input,
.movie-chat-dark #movie-chat-bio-input,
.movie-chat-dark #movie-chat-genre-input { background: var(--mc-surface-1); color: var(--mc-text-1); border-color: var(--mc-border-glass); }
.movie-chat-dark .movie-chat-quick-react { background: rgba(14,13,24,0.94); }
.movie-chat-dark .movie-chat-quick-react button:hover { background: var(--mc-surface-3); }
.movie-chat-dark .movie-chat-toast { background: rgba(14,13,24,0.94); color: var(--mc-text-1); }
.movie-chat-dark #movie-chat-dm-panel { background: rgba(5,6,17,0.97); }
.movie-chat-dark .movie-chat-dm-row:hover { background: var(--mc-surface-2); }
.movie-chat-dark .movie-chat-dm-row-name { color: var(--mc-text-1); }
.movie-chat-dark .movie-chat-dm-row-preview { color: var(--mc-text-3); }
.movie-chat-dark .movie-chat-dm-decline-btn { background: var(--mc-surface-2); color: var(--mc-text-2); }
.movie-chat-dark .movie-chat-dm-bubble.theirs { background: var(--mc-surface-2); color: var(--mc-text-1); }
.movie-chat-dark #movie-chat-dm-input-row { background: rgba(255,255,255,0.03); border-color: var(--mc-border-glass-soft); }
.movie-chat-dark #movie-chat-dm-input { background: var(--mc-surface-2); color: var(--mc-text-1); border-color: var(--mc-border-glass-soft); }
.movie-chat-dark .movie-chat-dm-admin-notice { background: var(--mc-surface-2); color: var(--mc-orange-dark); }

/* ---------------- واکنش‌گرا برای موبایل: تمام‌صفحه‌ی واقعی ---------------- */
@media (max-width: 480px) {
    #movie-chat-widget {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        height: 100dvh; /* دقیق‌تر از vh — نوار آدرس/کیبورد موبایل رو درست حساب می‌کنه */
        max-height: 100vh;
        max-height: 100dvh;
        bottom: 0;
        left: 0;
        border-radius: 0;
    }
    #movie-chat-header {
        padding-top: max(12px, env(safe-area-inset-top));
    }
    #movie-chat-input-row {
        padding-bottom: max(9px, env(safe-area-inset-bottom));
    }
    /* هدف لمسی حداقل ۴۴ پیکسل (استاندارد اپل/گوگل) برای همه‌ی دکمه‌های تعاملی */
    #movie-chat-header-actions button {
        min-width: 38px;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    #movie-chat-send-btn {
        min-height: 44px;
    }
    #movie-chat-attach-btn,
    #movie-chat-emoji-btn,
    #movie-chat-spoiler-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    #movie-chat-input {
        min-height: 44px;
        box-sizing: border-box;
    }
    #movie-chat-toggle {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .movie-chat-popover {
        left: 0;
        right: 0;
        bottom: 0;
        top: auto !important;
        border-radius: 16px 16px 0 0;
        max-height: 60vh !important;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    .movie-chat-popover.open { transform: translateY(0); }
    .movie-chat-ach-grid { grid-template-columns: repeat(3, 1fr); }
}
