* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #0e0b16;
  color: #f8f5fa;
  font-family: 'Tajawal', sans-serif;
  min-height: 100vh;
}

/* الشريط العلوي وبطاقة الشرح الخارجية بهوية رَوْنَق */
.sim-topbar {
  background: rgba(23, 18, 36, 0.96);
  border-bottom: 1px solid rgba(229, 169, 156, 0.18);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.topbar-right, .topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.back-link { color: #f3d5b5; text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.brand-badge {
  background: rgba(229, 169, 156, 0.12);
  border: 1px solid rgba(229, 169, 156, 0.25);
  color: #e5a99c;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}
.tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(229, 169, 156, 0.28);
  color: #f8f5fa;
  padding: 7px 14px;
  border-radius: 50px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: none;
}
.tool-cta { background: linear-gradient(135deg, #e5a99c, #f3d5b5); color: #140f1d; border: none; }

.guide-hero { max-width: 960px; margin: 24px auto 110px; padding: 0 16px; }
.guide-card {
  background: #171224;
  border: 1px solid rgba(229, 169, 156, 0.22);
  border-radius: 24px;
  padding: 26px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.guide-pill {
  display: inline-block;
  background: rgba(229, 169, 156, 0.15);
  color: #f3d5b5;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.guide-head h1 { font-family: 'Cairo', sans-serif; font-size: 1.5rem; margin-bottom: 8px; }
.guide-head p { color: #b4acc2; line-height: 1.7; font-size: 0.96rem; }
.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.g-step {
  background: #1f1930;
  border: 1px solid rgba(229, 169, 156, 0.14);
  border-radius: 18px;
  padding: 18px;
}
.g-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #e5a99c, #f3d5b5);
  color: #140f1d; font-family: 'Cairo', sans-serif; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.g-step h3 { font-family: 'Cairo', sans-serif; font-size: 1.02rem; color: #f3d5b5; margin-bottom: 6px; }
.g-step p { color: #b4acc2; font-size: 0.88rem; line-height: 1.6; }
.guide-launch-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.launch-btn {
  flex: 1; min-width: 240px; padding: 14px 20px; border-radius: 16px; border: none;
  font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 0.98rem; cursor: pointer;
}
.launch-tg { background: #2481cc; color: #ffffff; }
.launch-wa { background: #075e54; color: #ffffff; }

/* الأيقونات العائمة */
.msgr-dock {
  position: fixed; bottom: 18px; left: 18px; z-index: 90;
  display: flex; gap: 12px; background: rgba(20, 15, 32, 0.92);
  padding: 10px 14px; border-radius: 50px;
  border: 1px solid rgba(229, 169, 156, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}
.msgr-head-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.msgr-head-label { font-size: 0.72rem; color: #cbd5e1; font-weight: 700; }
.msgr-circle {
  position: relative; width: 52px; height: 52px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.msgr-circle-tg { background: #2481cc; color: #ffffff; }
.msgr-circle-wa { background: #25D366; color: #ffffff; }
.msgr-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: #fff; font-size: 0.72rem; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.hidden { display: none !important; }

/* =========================================================================
   وضع ملء الشاشة المطابق للصور المرفقة (Full Width Light Messenger UI)
   ========================================================================= */
.msgr-fullscreen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
}
.msgr-fs-bar {
  background: #0b1116;
  padding: 8px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.msgr-fs-info { display: flex; align-items: center; gap: 8px; }
.msgr-fs-title { font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 0.9rem; color: #ffffff; }
.msgr-fs-sub { display: none; }
.msgr-fs-actions { display: flex; gap: 8px; align-items: center; }

.msgr-switch-btn {
  background: #1e293b; color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 50px; padding: 5px 14px;
  font-family: 'Tajawal', sans-serif; font-weight: 700; font-size: 0.8rem; cursor: pointer;
}
.msgr-close-btn {
  background: #e11d48; color: #ffffff; border: none;
  border-radius: 50px; padding: 5px 14px; font-family: 'Tajawal', sans-serif;
  font-weight: 800; font-size: 0.8rem; cursor: pointer;
}

/* تمدد بعرض الشاشة الكامل 100% كما في الصورة */
.msgr-fs-body { flex: 1; display: flex; overflow: hidden; width: 100%; max-width: 100%; margin: 0; }
.pane { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ألوان خلفية المحادثة المطابقة للصور */
.tg-pane { background: #d5e4ed; }
.wa-pane { background: #efeae2; }

.chat-header {
  padding: 10px 18px; display: flex; align-items: center; gap: 12px;
  color: #ffffff;
}
.tg-header { background: #2481cc; }
.wa-header { background: #075e54; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.2); color: #ffffff;
}
.header-title { font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 0.98rem; color: #ffffff; display: flex; align-items: center; gap: 6px; }
.bot-tag { background: rgba(255, 255, 255, 0.22); color: #ffffff; font-size: 0.68rem; padding: 1px 6px; border-radius: 6px; }
.wa-verified { background: #25D366; color: #ffffff; font-size: 0.68rem; width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.tg-header .header-sub, .wa-header .header-sub { font-size: 0.78rem; color: rgba(255, 255, 255, 0.88); }

.chat-messages {
  flex: 1; padding: 18px 22px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.msg-wrap { display: flex; flex-direction: column; max-width: 78%; animation: popIn 0.18s ease; }
@media (max-width: 768px) { .msg-wrap { max-width: 92%; } }
@keyframes popIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.msg-wrap.bot { align-self: flex-start; }
.msg-wrap.user { align-self: flex-end; }

.msg-bubble {
  padding: 12px 16px; border-radius: 14px; font-size: 0.94rem; line-height: 1.65; white-space: pre-line;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* فقاعات رسائل تليجرام الفاتحة */
.tg-pane .msg-wrap.bot .msg-bubble {
  background: #ffffff;
  color: #1e293b;
  border-top-right-radius: 4px;
}
.tg-pane .msg-wrap.user .msg-bubble {
  background: #effdde;
  color: #1e293b;
  border-top-left-radius: 4px;
}

/* فقاعات رسائل واتساب الفاتحة */
.wa-pane .msg-wrap.bot .msg-bubble {
  background: #ffffff;
  color: #111b21;
  border-top-right-radius: 4px;
}
.wa-pane .msg-wrap.user .msg-bubble {
  background: #d9fdd3;
  color: #111b21;
  border-top-left-radius: 4px;
}

/* أزرار التفاعل داخل المحادثة (شبكة منظمة كما في الصورة) */
.inline-keyboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.tg-inline-btn, .wa-inline-btn {
  padding: 9px 12px; border-radius: 10px;
  font-family: 'Tajawal', sans-serif; font-weight: 700; font-size: 0.86rem;
  cursor: pointer; text-align: center; transition: 0.15s;
}
.tg-inline-btn {
  background: #cce4f7;
  color: #16639e;
  border: 1px solid #b3d6f2;
}
.tg-inline-btn:hover { background: #b9dbf5; }

.wa-inline-btn {
  background: #ffffff;
  color: #008069;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.wa-inline-btn:hover { background: #f5f6f6; }

.msg-time { font-size: 0.7rem; color: #64748b; margin-top: 3px; padding: 0 4px; }
.wa-pane .msg-wrap.user .msg-time { color: #53bdeb; }

/* شريط الأوامر السريعة السفلي */
.quick-commands {
  display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.tg-commands { background: #e8f1f6; }
.wa-commands { background: #f0f2f5; }

.quick-commands button {
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 5px 12px; border-radius: 20px; font-size: 0.8rem;
  font-family: 'Tajawal', sans-serif; font-weight: 700; cursor: pointer;
}

/* شريط الكتابة السفلي */
.chat-input-bar {
  display: flex; gap: 10px; padding: 10px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.tg-pane .chat-input-bar { background: #ffffff; }
.wa-pane .chat-input-bar { background: #f0f2f5; }

.chat-input-bar input {
  flex: 1; background: #ffffff; border: 1px solid #cbd5e1; border-radius: 24px;
  padding: 10px 18px; color: #1e293b;
  font-family: 'Tajawal', sans-serif; font-size: 0.95rem; outline: none;
}

.send-btn {
  border: none; border-radius: 24px; padding: 0 22px;
  font-family: 'Tajawal', sans-serif; font-weight: 800; color: #ffffff; cursor: pointer;
}
.tg-send { background: #2481cc; }
.wa-send { background: #075e54; }

.sync-toast {
  position: fixed; top: 48px; left: 50%; transform: translateX(-50%); z-index: 300;
  background: #1e293b; border: 1px solid #2481cc; color: #ffffff;
  padding: 9px 18px; border-radius: 50px; font-size: 0.84rem; font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25); text-align: center; max-width: 92vw;
}
