/* ==========================================================================
   Xena — نظام التصميم (داكن بنفسجي/كحلي + نيون، بطاقات زجاجية، RTL)
   ========================================================================== */

:root {
  --bg0: #0b1030;
  --bg1: #1a1442;
  --bg2: #241a54;
  --violet: #7c3aed;
  --violet2: #a855f7;
  --cyan: #22d3ee;
  --pink: #e879f9;
  --gold: #ffcf5a;
  --orange: #ff7a1a;
  --text: #f3f0fb;
  --muted: #a99ec9;
  --muted2: #7b71a3;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-brd: rgba(255, 255, 255, 0.12);
  --danger: #ff5470;
  --ok: #34d399;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --nav-h: 66px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: "Cairo", system-ui, "Segoe UI", sans-serif;
  color: var(--text);
  background: #05060f;
}
body { display: grid; place-items: center; overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: inherit; }
a { color: var(--cyan); }
.hidden { display: none !important; }

/* ---- إطار الهاتف ---- */
.phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  max-height: 932px;
  background: radial-gradient(130% 80% at 50% -10%, #3a1f7a 0%, var(--bg1) 42%, var(--bg0) 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
@media (min-width: 460px) and (max-width: 639px) {
  .phone { border-radius: 34px; height: 92dvh; border: 1px solid rgba(255,255,255,.08); }
}
.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
.screen::-webkit-scrollbar { width: 0; }

/* ---- عناصر مشتركة ---- */
.wrap { padding: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.center { align-items: center; text-align: center; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mt { margin-top: 14px; } .mt2 { margin-top: 24px; }
.gap { gap: 10px; }
.hcenter { justify-content: center; }
.wrapflex { display: flex; flex-wrap: wrap; gap: 10px; }

.card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn {
  border: none; border-radius: 999px;
  padding: 13px 20px; font-weight: 700; font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--violet2));
  box-shadow: 0 8px 22px rgba(124, 58, 237, .4);
  transition: transform .08s ease, opacity .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--glass); border: 1px solid var(--glass-brd); box-shadow: none; }
.btn.neon { background: linear-gradient(135deg, var(--cyan), var(--violet2)); box-shadow: 0 8px 22px rgba(34,211,238,.35); }
.btn.gold { background: linear-gradient(135deg, var(--gold), var(--orange)); color: #2a1500; box-shadow: 0 8px 22px rgba(255,160,40,.4); }
.btn.danger { background: linear-gradient(135deg, #ff5470, #b91c4d); box-shadow: none; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.tiny { padding: 6px 12px; font-size: 12px; }

.field { margin-top: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 2px; }
.input, textarea.input, select.input {
  width: 100%; padding: 13px 15px;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px; outline: none;
  transition: border-color .2s;
}
.input:focus { border-color: var(--violet2); }
textarea.input { resize: vertical; min-height: 70px; }

.chip {
  padding: 7px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  font-size: 13px; color: var(--muted); white-space: nowrap;
}
.chip.active { color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet2)); border-color: transparent; }
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chiprow::-webkit-scrollbar { height: 0; }

.pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid var(--glass-brd); }
.badge {
  position: absolute; top: 6px; inset-inline-end: 22px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; display: grid; place-items: center;
}

/* ---- الأفاتار ---- */
.avatar {
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  display: grid; place-items: center; color: #fff; font-weight: 800;
  border: 2px solid rgba(255,255,255,.15);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.av-40 { width: 40px; height: 40px; font-size: 16px; }
.av-48 { width: 48px; height: 48px; font-size: 18px; }
.av-56 { width: 56px; height: 56px; font-size: 20px; }
.av-88 { width: 88px; height: 88px; font-size: 32px; }
.av-ring { padding: 3px; background: linear-gradient(135deg, var(--gold), var(--pink)); }

/* ---- ستايلات الأسماء حسب الطبقة ---- */
.name { font-weight: 700; }
.name.bronze { color: #d9a066; }
.name.silver { color: #cfd6e6; }
.name.gold { color: var(--gold); }
.name.platinum { color: #9fe8ff; }
.name.diamond { color: var(--cyan); text-shadow: 0 0 8px rgba(34,211,238,.6); }
.name.royal { color: var(--pink); text-shadow: 0 0 10px rgba(232,121,249,.7); }
.name.owner {
  background: linear-gradient(90deg, #ffd24a, #ff7a1a, #ff2d2d, #ff7a1a, #ffd24a);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fire 3s linear infinite;
  text-shadow: 0 0 12px rgba(255,120,26,.5);
}
@keyframes fire { to { background-position: 200% center; } }
.owner-badge { font-size: 11px; }

.lvl {
  font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--cyan)); color: #fff;
}

/* ---- الرأس ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(11,16,48,.95), rgba(11,16,48,.4));
  backdrop-filter: blur(8px);
}
.topbar h2 { margin: 0; font-size: 19px; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-brd);
  display: grid; place-items: center; font-size: 18px; color: var(--text);
}

/* ---- الشريط السفلي ---- */
.tabbar {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 40;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(10, 12, 34, .82);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--glass-brd);
}
.tab {
  position: relative; background: none; border: none; color: var(--muted2);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; flex: 1; padding: 6px 0;
}
.tab .tab-ic { font-size: 20px; filter: grayscale(.4); }
.tab.active { color: #fff; }
.tab.active .tab-ic { filter: none; }
.tab-go { flex: 0 0 auto; }
.go-plus {
  width: 52px; height: 52px; margin-top: -18px;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 28px; font-weight: 300; color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  box-shadow: 0 8px 24px rgba(232,121,249,.5);
}

/* ---- السبلاش/الدخول ---- */
.splash { height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 30px; }
.logo {
  font-size: 56px; font-weight: 800; text-align: center; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--pink), var(--violet2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 24px rgba(168,85,247,.5));
}
.splash-sub { text-align: center; color: var(--muted); margin: 6px 0 40px; }
.auth-card { margin-top: 10px; }
.tabs2 { display: flex; background: rgba(0,0,0,.25); border-radius: 999px; padding: 4px; margin-bottom: 6px; }
.tabs2 button { flex: 1; padding: 10px; border: none; background: none; color: var(--muted); border-radius: 999px; font-weight: 700; }
.tabs2 button.active { background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted2); margin: 16px 0; font-size: 12px; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--glass-brd); flex: 1; }
.gbtn { width: 100%; background: #fff; color: #222; border: none; border-radius: 999px; padding: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* ---- بطاقات الغرف (feed) ---- */
.banner {
  border-radius: var(--radius); overflow: hidden; position: relative;
  height: 150px; display: flex; align-items: flex-end; padding: 14px;
  background: linear-gradient(120deg, var(--violet), var(--pink));
  color: #fff;
}
.banner h3 { margin: 0; font-size: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.roomcard {
  position: relative; border-radius: 22px; overflow: hidden; isolation: isolate;
  aspect-ratio: 0.7; color: #fff; cursor: pointer;
  background: linear-gradient(160deg, var(--bg2), var(--bg1));
  border: 1px solid var(--glass-brd);
  box-shadow: 0 12px 28px rgba(10,6,30,.5), 0 2px 8px rgba(124,58,237,.25);
  transition: transform .24s cubic-bezier(.2,.7,.3,1), box-shadow .24s ease;
}
.roomcard:active { transform: scale(.98); }

/* --- الغلاف الفنّي الفريد (لوحة تدرّجات + نقاط ضوئيّة) --- */
.roomcard .rc-cover { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.rc-cover-art, .rc-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .4s ease; }
.rc-cover-img { object-fit: cover; }
.rc-cover-art::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle 2.5px at 22% 26%, rgba(255,255,255,.75), transparent),
    radial-gradient(circle 2px at 74% 20%, rgba(255,255,255,.55), transparent),
    radial-gradient(circle 1.5px at 58% 54%, rgba(255,255,255,.5), transparent),
    radial-gradient(circle 2px at 34% 74%, rgba(255,255,255,.45), transparent),
    radial-gradient(circle 1.5px at 86% 66%, rgba(255,255,255,.4), transparent),
    radial-gradient(circle 1.5px at 46% 38%, rgba(255,255,255,.4), transparent);
}
.rc-cover-emoji {
  position: absolute; top: 12%; inset-inline-end: 9%; z-index: 1; font-size: 72px;
  opacity: .2; transform: rotate(-7deg); filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); pointer-events: none;
}
.roomcard .grad { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(6,4,20,.5) 70%, rgba(3,2,12,.94)); }

/* --- شارات علويّة: LIVE متحرّك + عدّاد المشاهدين بأيقونة عين --- */
.roomcard .live { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 4; display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(90deg, #ff2d55, #ff5470); font-size: 10px; font-weight: 800; padding: 4px 9px; border-radius: 999px; box-shadow: 0 2px 12px rgba(255,45,85,.6); animation: livePulse 1.6s ease-in-out infinite; }
.roomcard .viewers { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 4; display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.16); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.roomcard .viewers .eye { font-style: normal; font-size: 11px; }
@keyframes livePulse { 0%,100% { box-shadow: 0 2px 10px rgba(255,45,85,.5); } 50% { box-shadow: 0 2px 18px rgba(255,45,85,.95); } }

/* ---- أحجام أفاتار إضافية ---- */
.av-24 { width: 24px; height: 24px; font-size: 10px; }
.av-28 { width: 28px; height: 28px; font-size: 12px; }
.av-52 { width: 52px; height: 52px; font-size: 20px; }

.roomcard .live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: livedot 1s infinite; }
@keyframes livedot { 50% { opacity: .25; transform: scale(.7); } }
.verified { flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, #3ba7ff, #1d6fe0); color: #fff; font-size: 9px; font-weight: 900; display: inline-grid; place-items: center; box-shadow: 0 1px 4px rgba(29,111,224,.7); }
.verified.gold { background: linear-gradient(135deg, #ffe08a, #ff9d1a); box-shadow: 0 1px 5px rgba(255,157,26,.8); }

/* ---- اللوح الزجاجي السفلي (Glassmorphism): مشاركون + صورة مضيف كبيرة + عنوان + مضيف + زخارف ---- */
.roomcard .rc-panel {
  position: absolute; bottom: 0; inset-inline: 0; z-index: 2; padding: 12px 12px 13px;
  background: linear-gradient(180deg, rgba(16,10,42,0) 0%, rgba(14,9,38,.45) 40%, rgba(9,6,28,.88) 100%);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
}
/* مشاركون متراكبون (4–8) */
.rc-parts { display: flex; margin-bottom: 9px; }
.part-stack { display: flex; align-items: center; }
.part-stack .avatar { margin-inline-start: -9px; border: 2px solid rgba(255,255,255,.6); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.part-stack .avatar:first-child { margin-inline-start: 0; }
.part-more { margin-inline-start: -6px; background: rgba(0,0,0,.65); border: 2px solid rgba(255,255,255,.5); border-radius: 999px; font-size: 10px; font-weight: 800; padding: 3px 7px; z-index: 1; }
/* صف: صورة مضيف كبيرة + معلومات (عنوان/مضيف) */
.rc-main { display: flex; align-items: flex-end; gap: 9px; }
.rc-hostbig { flex-shrink: 0; }
.rc-hostbig .avatar { box-shadow: 0 3px 10px rgba(0,0,0,.55); }
.rc-meta { flex: 1; min-width: 0; }
.rc-titlerow { display: flex; align-items: center; gap: 6px; }
.roomcard .rc-title { flex: 1; min-width: 0; font-weight: 800; font-size: 14.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.roomcard .rc-hearts { flex-shrink: 0; font-size: 11px; font-weight: 700; color: #ffd0e6; white-space: nowrap; }

/* صفّ اسم المضيف (سطر واحد، بجانب العنوان فوق الصورة الكبيرة) */
.roomcard .rc-host { display: flex; align-items: center; margin-top: 3px; overflow: hidden; }
.rc-hostname { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; font-size: 12px; font-weight: 700; color: #cfc3ef; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* صفّ الشارات بعرض البطاقة الكامل — يعرض كل الزخارف في سطر واحد */
.rc-badges { margin-top: 8px; overflow: hidden; }
.deco-strip { display: flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; flex-wrap: nowrap; }
.deco {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 2px; line-height: 1;
  height: 16px; padding: 0 4px; border-radius: 6px; font-size: 9px; font-weight: 800;
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.deco b { font-weight: 900; font-size: 9px; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deco-host { background: linear-gradient(135deg, #ff5470, #ff2d55); color: #fff; letter-spacing: .3px; border-color: rgba(255,150,160,.5); }
.deco-flag { font-size: 13px; padding: 0; border: none; box-shadow: none; background: none; }
.deco-male { width: 16px; padding: 0; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, #3ba7ff, #1d6fe0); color: #fff; border: none; font-size: 10px; }
.deco-female { width: 16px; padding: 0; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, #ff7ac1, #e84393); color: #fff; border: none; font-size: 10px; }
.deco-vip { background: linear-gradient(135deg, #fff0b8, #ff9d1a); color: #4a2600; border-color: rgba(255,220,150,.6); }
.deco-noble { background: linear-gradient(135deg, #a855f7, #6d28d9); color: #fff; border-color: rgba(200,150,255,.5); box-shadow: 0 0 7px rgba(168,85,247,.55); }
.deco-agency { background: linear-gradient(135deg, #22d3ee, #0ea5e9); color: #06303a; }
.deco-emoji { background: rgba(0,0,0,.4); font-size: 11px; padding: 0 3px; }
.deco-title { background: linear-gradient(135deg, #f472b6, #ff5470); color: #fff; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- بطاقة غرفة VIP مميّزة (Premium): إطار ذهبي متحرّك + وهج نابض + وميض ينساب ---- */
.roomcard.vip { border: 2px solid transparent; background-clip: padding-box; animation: vipGlow 2.8s ease-in-out infinite; }
@keyframes vipGlow {
  0%, 100% { box-shadow: 0 12px 30px rgba(255,170,40,.45), 0 0 16px rgba(255,205,95,.32), 0 0 0 1px rgba(255,215,120,.55) inset; }
  50% { box-shadow: 0 14px 44px rgba(255,190,60,.72), 0 0 36px rgba(255,215,110,.62), 0 0 0 1px rgba(255,230,150,.85) inset; }
}
/* إطار ذهبي متدرّج متحرّك */
.roomcard.vip::before {
  content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit;
  padding: 2px; background: linear-gradient(135deg, #fff0b8, #ff9d1a, #ffcf5a, #ffb347, #fff0b8); background-size: 300% 300%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: goldBorder 3.2s linear infinite;
}
@keyframes goldBorder { to { background-position: 300% 0; } }
/* وميض ذهبي ينساب عبر البطاقة */
.roomcard.vip::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 42%; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,244,200,.42), transparent); transform: skewX(-18deg);
  animation: vipShine 4s ease-in-out infinite;
}
@keyframes vipShine { 0% { inset-inline-start: -60%; } 55%, 100% { inset-inline-start: 130%; } }
.roomcard.vip .grad { background: linear-gradient(180deg, rgba(60,30,0,0) 40%, rgba(50,25,0,.5) 70%, rgba(24,10,0,.9)); }
.roomcard.vip .rc-title { color: #ffe9b3; text-shadow: 0 1px 6px rgba(255,157,26,.55); }
.roomcard.vip .rc-hearts { color: #ffe0a0; }

/* ---- شارة HOT بلهبة متحرّكة ---- */
.hot-badge {
  position: absolute; top: 40px; inset-inline-end: 10px; z-index: 4;
  display: inline-flex; align-items: center; gap: 3px;
  background: linear-gradient(90deg, #ff2d55, #ff7a1a); color: #fff;
  font-size: 10px; font-weight: 900; padding: 3px 9px; border-radius: 999px;
  box-shadow: 0 2px 12px rgba(255,60,40,.65); animation: hotPulse 1.4s ease-in-out infinite;
}
.hot-badge i { font-style: normal; display: inline-block; transform-origin: 50% 90%; animation: flame .7s ease-in-out infinite; }
@keyframes hotPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes flame { 0%, 100% { transform: translateY(0) rotate(-5deg) scale(1); } 50% { transform: translateY(-2px) rotate(5deg) scale(1.2); } }
/* تنّين فخامة خافت (زخرفة للمميّزين) */
.lux-deco { position: absolute; bottom: 34%; inset-inline-start: 6px; z-index: 1; pointer-events: none; font-size: 60px; opacity: .15; transform: rotate(-8deg); filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }

/* ---- تأثيرات المرور (سطح المكتب فقط) ---- */
@media (hover: hover) {
  .roomcard:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(10,6,30,.6), 0 0 26px rgba(124,58,237,.5); }
  .roomcard:hover .rc-cover-art, .roomcard:hover .rc-cover-img { transform: scale(1.07); }
  .roomcard.vip:hover { box-shadow: 0 22px 48px rgba(255,180,50,.6), 0 0 34px rgba(255,210,110,.7); }
}
/* هواتف صغيرة: صورة مضيف أصغر قليلاً لإتاحة مساحة للنص */
@media (max-width: 560px) {
  .av-52 { width: 44px; height: 44px; font-size: 17px; }
  .rc-cover-emoji { font-size: 58px; }
}
/* رقاقة VIP الذهبية في شريط الفلاتر */
.chip.gold { border-color: rgba(255,190,60,.6); color: #ffcf5a; background: rgba(255,180,40,.12); }
.chip.gold.active { color: #4a2600; background: linear-gradient(135deg, #fff0b8, #ff9d1a); border-color: transparent; box-shadow: 0 4px 14px rgba(255,157,26,.5); }

/* ---- (٣) شريط الأخبار المتحرّك أسفل البانر ---- */
.ticker {
  position: relative; margin-top: 10px; overflow: hidden;
  border-radius: 12px; padding: 8px 0;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--glass-brd);
}
.ticker::before, .ticker::after { content: ''; position: absolute; top: 0; bottom: 0; width: 34px; z-index: 2; pointer-events: none; }
.ticker::before { inset-inline-start: 0; background: linear-gradient(90deg, var(--bg0), transparent); }
.ticker::after { inset-inline-end: 0; background: linear-gradient(270deg, var(--bg0), transparent); }
.ticker-track { display: inline-flex; direction: ltr; white-space: nowrap; will-change: transform; animation: tickerMove 26s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tk-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text); padding: 0 18px; }
.tk-item::after { content: '•'; margin-inline-start: 18px; color: var(--violet2); }
@keyframes tickerMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---- (٥) زرّ منتقي الدولة (يفتح ورقة سفليّة) ---- */
.country-select {
  width: 100%; margin-top: 10px; display: flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 14px;
  padding: 12px 14px; color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.country-select .cs-ic { font-size: 17px; }
.country-select .cs-lbl { flex: 1; min-width: 0; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-select .cs-caret { color: var(--muted); font-size: 12px; }
.country-select:active { transform: scale(.99); }
.country-select.active { border-color: var(--violet2); background: rgba(124, 58, 237, .16); }
/* عناوين المناطق داخل ورقة الدول */
.cs-region { font-size: 13px; font-weight: 800; color: var(--muted); margin: 16px 2px 8px; }
.cs-top { margin-top: 14px; grid-template-columns: 1fr; }
.country-btn.active { color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet2)); border-color: transparent; }
.country-btn.cs-all { background: rgba(124, 58, 237, .16); }

/* ---- علم الدولة كصورة حقيقيّة (بدل رموز ISO التي تظهر حروفاً على بعض الأنظمة) ---- */
.flag-img {
  display: inline-block; width: 20px; height: 14px; border-radius: 2px;
  object-fit: cover; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
  background: rgba(255, 255, 255, .06);
}
.deco-flag .flag-img { width: 17px; height: 12px; vertical-align: -1px; }
.cg-flag .flag-img { width: 24px; height: 17px; vertical-align: -3px; }
.country-btn .flag-img { margin-inline-end: 5px; }
.country-select .flag-img { width: 22px; height: 15px; vertical-align: -3px; }

/* ---- زرّ إنشاء غرفة + نموذجه ---- */
.createroom-btn {
  width: 100%; margin-top: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--violet), var(--pink), var(--violet2)); background-size: 200% 200%;
  font-weight: 800; font-size: 15px; box-shadow: 0 8px 22px rgba(124,58,237,.45);
  animation: gradShift 6s ease infinite;
}
.createroom-btn .cr-plus { font-size: 20px; line-height: 1; font-weight: 700; }
.row2 { display: flex; gap: 10px; }
.row2 .field { flex: 1; min-width: 0; }
/* رافِع صورة الغلاف (زرّ + معاينة حيّة + رابط اختياري) */
.cover-uploader { display: flex; gap: 10px; align-items: stretch; }
.cover-preview { flex-shrink: 0; width: 84px; height: 58px; border-radius: 12px; border: 1px solid var(--glass-brd); background-size: cover; background-position: center; background-color: rgba(0,0,0,.3); display: grid; place-items: center; text-align: center; font-size: 9px; font-weight: 700; color: rgba(255,255,255,.75); padding: 4px; overflow: hidden; }
.cover-preview.auto { background-image: none; background: linear-gradient(135deg, #7c3aed, #22d3ee 50%, #e879f9); background-size: 200% 200%; animation: gradShift 6s ease infinite; }
.cover-actions { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cover-actions .btn.sm { align-self: flex-start; }
/* مفتاح HOT في النموذج */
.cr-toggle { display: inline-flex; align-items: center; gap: 8px; height: 46px; cursor: pointer; user-select: none; }
.cr-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.cr-track { width: 44px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid var(--glass-brd); position: relative; transition: background .2s; flex-shrink: 0; }
.cr-track::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.cr-toggle input:checked + .cr-track { background: linear-gradient(90deg, #ff2d55, #ff7a1a); border-color: transparent; }
.cr-toggle input:checked + .cr-track::after { transform: translateX(18px); }
[dir="rtl"] .cr-toggle input:checked + .cr-track::after { transform: translateX(-18px); }
.cr-tlbl { font-size: 13px; font-weight: 700; color: var(--text); }
/* قسم خيارات المشرف داخل نموذج إنشاء الغرفة */
.cr-admin { margin-top: 4px; padding: 12px; border-radius: 14px; border: 1px solid rgba(255,190,60,.4); background: rgba(255,180,40,.08); }
.cr-admin-h { font-size: 13px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
/* أزرار تعديل/حذف الغرفة على البطاقة (لمالكها أو Admin/SUPER_ADMIN) */
.rc-del, .rc-edit { flex-shrink: 0; width: 22px; height: 22px; border: none; border-radius: 50%; color: #fff; font-size: 11px; line-height: 1; cursor: pointer; }
.rc-del { background: rgba(255,45,85,.9); box-shadow: 0 2px 8px rgba(255,45,85,.5); }
.rc-edit { background: rgba(91,139,255,.9); box-shadow: 0 2px 8px rgba(91,139,255,.5); }
.rc-del:active, .rc-edit:active { transform: scale(.9); }

/* أزرار اللوبي حسب الدور (إنشاء/كن مضيفاً/طلبات المضيفين) */
.lobby-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.lobby-actions .btn { flex: 1; min-width: 150px; }
.becomehost-btn, .hostreq-btn { font-weight: 800; }
/* عناصر طلبات المضيفين */
.hr-item { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.07); }
.hr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hr-info b { font-size: 14px; }
.hr-info .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-btns { display: flex; gap: 6px; flex-shrink: 0; }
.btn.tiny { padding: 7px 14px; font-size: 13px; border-radius: 999px; box-shadow: none; }
.btn.tiny.ok { background: linear-gradient(135deg, var(--ok), #12a97a); }
/* شارة "مميّزة" الذهبية بجانب الاسم */
.deco-feat { background: linear-gradient(135deg, #fff0b8, #ff9d1a); color: #4a2600; border-color: rgba(255,220,150,.6); box-shadow: 0 0 7px rgba(255,190,60,.6); }

/* ---- مجموعة غرف دولة ---- */
.country-group { margin-bottom: 22px; }
.cg-head { margin-top: 4px; }
.cg-flag { font-size: 18px; }
.cg-en { font-size: 12px; font-weight: 600; color: var(--muted2); margin-inline-start: 4px; }
.cg-seeall { display: inline-flex; align-items: center; gap: 6px; }
.rc-title-en { font-weight: 600; font-size: 11px; color: rgba(255,255,255,.6); }

/* ---- رأس الرئيسية: بحث + محفظة (ماس/كوينز) + جرس ---- */
.feed-top { gap: 8px; }
.topsearch {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px;
  background: rgba(0,0,0,.28); border: 1px solid var(--glass-brd); border-radius: 999px;
  padding: 8px 13px; color: var(--muted); font-size: 13px; cursor: pointer; overflow: hidden;
}
.topsearch .ts-ph { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 999px;
  padding: 5px 6px 5px 9px; color: var(--text); font-size: 12px; font-weight: 700;
}
.wallet-pill .wp-ic { font-size: 14px; }
.wallet-pill b { font-weight: 800; }
.wallet-pill .wp-plus {
  width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; line-height: 1; color: #fff; font-weight: 700;
}
.wallet-pill.gem { border-color: rgba(34,211,238,.4); box-shadow: 0 0 12px rgba(34,211,238,.18) inset; }
.wallet-pill.gem .wp-plus { background: linear-gradient(135deg, var(--cyan), #1d6fe0); }
.wallet-pill.coin { border-color: rgba(255,207,90,.45); box-shadow: 0 0 12px rgba(255,207,90,.18) inset; }
.wallet-pill.coin .wp-plus { background: linear-gradient(135deg, var(--gold), var(--orange)); color: #3a1f00; }
.wallet-pill:active { transform: scale(.94); }
.iconbtn.bell { position: relative; }
.bell-dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 9px; height: 9px; border-radius: 50%; background: #ff2d55; border: 2px solid var(--bg1); box-shadow: 0 0 6px rgba(255,45,85,.9); }

/* ---- شريط الفلاتر: chips + أيقونة ترتيب ---- */
.filterbar { display: flex; align-items: center; gap: 8px; }
.filterbar .chiprow { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; }
.chip .chip-ic { font-size: 14px; line-height: 1; }
.chip.featured { border-color: rgba(255,122,26,.55); color: var(--gold); background: rgba(255,122,26,.12); }
.chip.featured.active { color: #fff; background: linear-gradient(135deg, var(--orange), var(--pink)); border-color: transparent; box-shadow: 0 4px 14px rgba(255,122,26,.4); }
.chip.chip-country.active { color: #fff; background: linear-gradient(135deg, var(--cyan), var(--violet2)); border-color: transparent; }
.filter-btn {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-brd); color: var(--text);
  display: grid; place-items: center; font-size: 17px;
}
.filter-btn.on { background: linear-gradient(135deg, var(--violet), var(--violet2)); border-color: transparent; box-shadow: 0 4px 14px rgba(124,58,237,.45); }

/* ---- ورقة اختيار الدولة ---- */
.country-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.country-btn { background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 14px; padding: 12px 6px; color: var(--text); font-weight: 700; font-size: 14px; }
.country-btn:active { transform: scale(.95); background: rgba(124,58,237,.2); }

.sec-h { font-size: 16px; margin: 0; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
/* ترويسة قسم: عنوان + رابط/عدّاد على الطرف */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.sec-head .see-all { font-size: 13px; color: var(--cyan); font-weight: 700; cursor: pointer; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff2d55; box-shadow: 0 0 8px rgba(255,45,85,.8); animation: livedot 1s infinite; display: inline-block; }
.count-pill { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 999px; padding: 3px 11px; }

/* ---- البانر المتحرّك: تدرّج ذهبي/نيون متحرّك + وميض ينساب ---- */
.promo { position: relative; height: 156px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow), 0 0 26px rgba(124,58,237,.35); }
/* وميض ينساب عبر البانر (يجعله يبدو حيّاً) */
.promo::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 45%; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.20), transparent);
  transform: skewX(-18deg); animation: promoShine 5s ease-in-out infinite;
}
@keyframes promoShine { 0% { inset-inline-start: -60%; } 55%, 100% { inset-inline-start: 130%; } }
.promo-slide { position: absolute; inset: 0; display: flex; align-items: center; gap: 14px; padding: 0 22px; color: #fff; opacity: 0; transform: scale(1.05); transition: opacity .6s ease, transform .6s ease; pointer-events: none; cursor: pointer; background-size: 200% 200%; }
.promo-slide.on { opacity: 1; transform: scale(1); pointer-events: auto; animation: gradShift 7s ease infinite; }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.promo-slide::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 82% -10%, rgba(255,255,255,.32), transparent 60%); pointer-events: none; }
.promo-emoji { font-size: 62px; filter: drop-shadow(0 3px 10px rgba(0,0,0,.5)); animation: bob 2.6s ease-in-out infinite; z-index: 1; }
@keyframes bob { 50% { transform: translateY(-7px); } }
.promo-txt { z-index: 1; position: relative; min-width: 0; }
.promo-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
.promo-sub { font-size: 13px; opacity: .96; margin-top: 4px; line-height: 1.35; }
.promo-cta { margin-top: 9px; background: #fff; color: #4a1d6e; border: none; border-radius: 999px; padding: 7px 16px; font-weight: 800; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.promo-cta:active { transform: scale(.95); }
.promo-dots { position: absolute; bottom: 9px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.promo-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45); transition: all .3s; }
.promo-dots i.on { background: #fff; width: 18px; border-radius: 999px; }

/* ---- بطاقات العروض/الأخبار (٤ بطاقات بأزرار) ---- */
.offers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.offer-card { position: relative; border-radius: 18px; padding: 14px 12px 14px; color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.35); cursor: pointer; transition: transform .1s; overflow: hidden; }
.offer-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 70% at 85% -10%, rgba(255,255,255,.3), transparent 55%); pointer-events: none; }
.offer-card:active { transform: scale(.97); }
.offer-emoji { font-size: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.offer-title { font-weight: 800; font-size: 14px; margin-top: 6px; }
.offer-sub { font-size: 11px; opacity: .92; margin-top: 2px; }
.offer-btn { margin-top: 10px; background: rgba(255,255,255,.9); color: #222; border: none; border-radius: 999px; padding: 6px 16px; font-weight: 800; font-size: 12px; position: relative; z-index: 1; }
.offer-btn:active { transform: scale(.95); }

/* ---- البروفايل ---- */
.profile-head { text-align: center; padding: 20px 16px 8px; }
.stats3 { display: flex; justify-content: space-around; margin-top: 14px; }
.stat { text-align: center; }
.stat b { font-size: 18px; display: block; }
.wallet { display: flex; gap: 12px; margin-top: 16px; }
.coinbox { flex: 1; border-radius: var(--radius-sm); padding: 12px; text-align: center; background: rgba(0,0,0,.25); border: 1px solid var(--glass-brd); }
.coinbox b { font-size: 18px; display: block; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.feature { text-align: center; }
.feature .fic { width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 18px; display: grid; place-items: center; font-size: 24px; background: var(--glass); border: 1px solid var(--glass-brd); }
.feature span { font-size: 11px; color: var(--muted); }
.listrow { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
.listrow .chev { color: var(--muted2); }

/* ============ البروفايل الكامل (Viora) — غلاف + أفاتار كبير + بطاقات زجاجية ============ */
.prof { position: relative; padding-bottom: 24px; }
.prof-cover { height: 152px; background-size: cover; background-position: center; position: relative; }
.prof-cover.grad { background: linear-gradient(135deg, #3a1f7a, #7c3aed 45%, #e879f9); }
.prof-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,16,48,0) 42%, rgba(11,16,48,.88)); }
.cover-edit { position: absolute; top: 12px; inset-inline-end: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); color: #fff; font-size: 15px; cursor: pointer; }
.prof-av { display: flex; justify-content: center; margin-top: -54px; position: relative; z-index: 2; }
.prof-av .avatar { box-shadow: 0 6px 20px rgba(0,0,0,.55); }
.av-96 { width: 96px; height: 96px; font-size: 38px; }
.prof-info { text-align: center; padding: 10px 16px 0; }
.prof-name { font-size: 20px; font-weight: 800; }
.prof-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge-chip { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--glass-brd); }
.badge-chip.lvl { background: linear-gradient(135deg, var(--cyan), var(--violet2)); color: #fff; border-color: transparent; }
.badge-chip.vip { background: linear-gradient(135deg, #fff0b8, #ff9d1a); color: #4a2600; border-color: transparent; }
.badge-chip.noble { background: linear-gradient(135deg, #a855f7, #6d28d9); color: #fff; border-color: transparent; }
.prof-meta { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.prof-meta.dim { color: var(--muted2); margin-top: 3px; }
.p-country { display: inline-flex; align-items: center; gap: 5px; }
.prof-stats { display: flex; justify-content: center; gap: 10px; margin: 14px 16px 0; }
.prof-stats .stat { flex: 1; max-width: 130px; text-align: center; background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 14px; padding: 10px 6px; backdrop-filter: blur(6px); }
.prof-stats .stat b { display: block; font-size: 17px; font-weight: 800; }
.prof-stats .stat span { font-size: 11px; color: var(--muted); }
.prof-body { padding-top: 16px; }
.wallet2 { display: flex; gap: 12px; }
.wcard { flex: 1; border-radius: 18px; padding: 14px; text-align: center; cursor: pointer; border: 1px solid var(--glass-brd); background: linear-gradient(160deg, rgba(124,58,237,.22), rgba(34,211,238,.1)); }
.wcard:active { transform: scale(.98); }
.wc-ic { font-size: 26px; }
.wc-val { font-size: 20px; font-weight: 800; margin-top: 2px; }
.wc-lbl { font-size: 12px; color: var(--muted); }
.wc-plus { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet2)); padding: 4px 12px; border-radius: 999px; }
.join-card { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; border-radius: 18px; cursor: pointer; color: #fff; background: linear-gradient(135deg, #7c3aed, #e879f9); box-shadow: 0 8px 22px rgba(124,58,237,.4); }
.join-card:active { transform: scale(.99); }
.jc-ic { font-size: 30px; }
.jc-txt { flex: 1; min-width: 0; }
.jc-txt b { display: block; font-size: 15px; }
.jc-txt span { font-size: 12px; opacity: .9; }
.jc-arrow { font-size: 22px; }
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.feat-item { text-align: center; cursor: pointer; padding: 6px 2px; border-radius: 14px; }
.feat-item:active { background: var(--glass); }
.feat-ic { width: 52px; height: 52px; margin: 0 auto 6px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; background: var(--glass); border: 1px solid var(--glass-brd); }
.feat-item span { font-size: 11px; color: var(--muted); }
.prof-tabs { margin-top: 8px; }
.prof-tab { margin-top: 14px; }
.glass-card { background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 16px; padding: 14px; font-size: 14px; line-height: 1.6; backdrop-filter: blur(6px); }
.sec-h2 { font-size: 14px; font-weight: 800; margin: 16px 0 8px; }
.ach-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.ach-row::-webkit-scrollbar { height: 0; }
.ach { flex-shrink: 0; width: 76px; text-align: center; background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 14px; padding: 10px 4px; }
.ach-ic { font-size: 26px; }
.ach span { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.ptile { border-radius: 16px; padding: 14px; text-align: center; border: 1px solid var(--glass-brd); }
.ptile.vip { background: linear-gradient(160deg, rgba(255,180,40,.2), rgba(255,157,26,.08)); }
.ptile.noble { background: linear-gradient(160deg, rgba(168,85,247,.22), rgba(109,40,217,.08)); }
.pt-ic { font-size: 28px; }
.ptile b { display: block; font-size: 13px; margin-top: 4px; }
.ptile span { font-size: 11px; color: var(--muted); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.p-badge { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-brd); }
.rel-sec { margin-top: 6px; }
.viora-card { border-radius: 20px; padding: 18px; margin-top: 8px; color: #fff; background: linear-gradient(135deg, #4a1d6e, #7c3aed 55%, #22d3ee); box-shadow: 0 10px 30px rgba(124,58,237,.5); position: relative; overflow: hidden; }
.viora-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 85% -10%, rgba(255,255,255,.3), transparent 55%); pointer-events: none; }
.vc-top { display: flex; align-items: baseline; justify-content: space-between; position: relative; z-index: 1; }
.vc-brand { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.vc-sub { font-size: 11px; opacity: .85; }
.vc-mid { display: flex; align-items: center; gap: 12px; margin-top: 18px; position: relative; z-index: 1; }
.vc-mid b { font-size: 16px; }
.vc-country { margin-top: 14px; position: relative; z-index: 1; }
.lvl-big { font-size: 40px; font-weight: 800; background: linear-gradient(135deg, var(--cyan), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (min-width: 640px) { .feat-grid { grid-template-columns: repeat(6, 1fr); } .prof-cover { height: 200px; } }

/* ---- التقدّم ---- */
.progress { height: 8px; background: rgba(0,0,0,.3); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); border-radius: 999px; }

/* ---- الغرفة الحيّة ---- */
.live-wrap { position: absolute; inset: 0; background: #05060f; display: flex; flex-direction: column; z-index: 60; }
.live-stage { flex: 1; position: relative; overflow: hidden; }
.seats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; }
.seat { aspect-ratio: 1; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--glass-brd); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; overflow: hidden; }
.seat.filled { background: linear-gradient(160deg, var(--bg2), rgba(124,58,237,.25)); }
.seat video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.seat .sname { font-size: 10px; z-index: 2; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .smute { position: absolute; top: 4px; inset-inline-end: 4px; font-size: 11px; z-index: 2; }
.seat .splus { font-size: 24px; color: var(--muted2); }
.live-top { position: absolute; top: 0; inset-inline: 0; padding: 12px; display: flex; align-items: center; gap: 10px; background: linear-gradient(180deg, rgba(0,0,0,.6), transparent); z-index: 5; }
.live-host { background: rgba(0,0,0,.4); border-radius: 999px; padding: 5px 10px 5px 5px; display: flex; align-items: center; gap: 8px; }
.live-chat { max-height: 34%; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.live-chat::-webkit-scrollbar { width: 0; }
.chatmsg { font-size: 13px; background: rgba(0,0,0,.35); border-radius: 14px; padding: 6px 10px; align-self: flex-start; max-width: 85%; }
.chatmsg b { color: var(--cyan); }
.chatmsg.gift b { color: var(--gold); }
.live-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(10,12,34,.8); }
.live-bar .input { border-radius: 999px; }
.circbtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; border: none; background: var(--glass); border: 1px solid var(--glass-brd); color: #fff; flex-shrink: 0; }

/* ---- أنيميشن الهدايا ---- */
.gift-float {
  position: absolute; bottom: 80px; left: 50%; z-index: 8; pointer-events: none;
  font-size: 60px; transform: translateX(-50%);
  animation: giftUp 1.7s ease-out forwards;
}
.gift-float.big { font-size: 90px; animation: giftBig 2.5s ease-out forwards; }
@keyframes giftUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.4); }
  25% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.1); }
  70% { opacity: 1; transform: translateX(-50%) translateY(-40px) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-140px) scale(.8); }
}
@keyframes giftBig {
  0% { opacity: 0; transform: translateX(-50%) scale(.2) rotate(-15deg); }
  20% { opacity: 1; transform: translateX(-50%) scale(1.4) rotate(8deg); }
  50% { transform: translateX(-50%) scale(1.2) rotate(-4deg); }
  80% { opacity: 1; transform: translateX(-50%) scale(1.25) rotate(0); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.4) translateY(-60px); }
}
.gift-fullscreen {
  position: absolute; inset: 0; z-index: 7; pointer-events: none;
  display: grid; place-items: center; font-size: 150px;
  background: radial-gradient(circle at 50% 55%, rgba(232,121,249,.35), rgba(124,58,237,.15) 45%, transparent 70%);
  animation: flash 2.2s ease-out forwards;
}
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: .9; } 100% { opacity: 0; } }

/* ---- لوحة معركة PK ---- */
.pkbar { position: absolute; top: 58px; inset-inline: 12px; z-index: 6; }
.pk-names { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); margin-bottom: 4px; }
.pk-names b { color: var(--gold); }
.pk-timer { background: rgba(0,0,0,.5); padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.pk-track { display: flex; height: 12px; border-radius: 999px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.pk-track .pk-a { background: linear-gradient(90deg, #ff5470, #ff8a5b); transition: width .5s ease; }
.pk-track .pk-b { background: linear-gradient(90deg, #5b8bff, #22d3ee); transition: width .5s ease; }

/* ---- شارة الدخول الملكي ---- */
.enter-banner {
  position: absolute; top: 70px; inset-inline-start: 0; z-index: 8; pointer-events: none;
  max-width: 92%; padding: 8px 16px; font-size: 13px; color: #fff;
  background: linear-gradient(90deg, rgba(255,120,26,.95), rgba(232,121,249,.9), transparent);
  border-radius: 0 999px 999px 0;
  box-shadow: 0 4px 18px rgba(232,121,249,.5);
  animation: enterSlide 3.6s ease-out forwards;
}
.enter-banner b { color: #fff2c0; }
@keyframes enterSlide {
  0% { transform: translateX(-110%); opacity: 0; }
  12% { transform: translateX(0); opacity: 1; }
  80% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-20%); opacity: 0; }
}

/* ---- نافذة منبثقة ---- */
.overlay { position: absolute; inset: 0; background: rgba(3,4,15,.65); backdrop-filter: blur(4px); z-index: 80; display: flex; align-items: flex-end; }
.sheet { width: 100%; background: linear-gradient(180deg, var(--bg2), var(--bg1)); border-radius: 24px 24px 0 0; border-top: 1px solid var(--glass-brd); padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 82%; overflow-y: auto; animation: up .25s ease; }
@keyframes up { from { transform: translateY(100%); } }
.sheet h3 { margin: 0 0 12px; }
.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gift-item { text-align: center; padding: 12px 6px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-brd); }
.gift-item .ge { font-size: 30px; }
.gift-item .gc { font-size: 12px; color: var(--gold); margin-top: 4px; }

/* ---- التوست ---- */
.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 200; background: rgba(20,16,50,.96); border: 1px solid var(--glass-brd);
  color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px;
  box-shadow: var(--shadow); max-width: 88%; text-align: center;
}
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--danger); }

/* ---- حالات فارغة/تحميل ---- */
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty .big { font-size: 44px; margin-bottom: 10px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--glass-brd); border-top-color: var(--violet2); border-radius: 50%; animation: spin 1s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- رسوم بيانية بسيطة (لوحة الإدارة) ---- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--cyan), var(--violet)); border-radius: 6px 6px 0 0; min-height: 3px; position: relative; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-brd); }
.kpi b { font-size: 22px; display: block; }
.kpi span { font-size: 12px; color: var(--muted); }
.demo-note { font-size: 12px; color: var(--muted); background: rgba(124,58,237,.10); border: 1px solid var(--glass-brd); border-radius: 12px; padding: 10px 12px; line-height: 1.5; }
.mb { margin-bottom: 14px; }

/* ---- نوتيفيكيشن/محادثة عناصر ---- */
.notif { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.05); }
.notif.unread { background: rgba(124,58,237,.08); border-radius: 12px; padding: 12px; }
.convo { display: flex; gap: 12px; padding: 12px 4px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.05); }
.msg-bubble { max-width: 78%; padding: 9px 13px; border-radius: 16px; font-size: 14px; margin-bottom: 8px; }
.msg-bubble.mine { align-self: flex-end; background: linear-gradient(135deg, var(--violet), var(--violet2)); border-bottom-right-radius: 4px; }
.msg-bubble.theirs { align-self: flex-start; background: var(--glass); border: 1px solid var(--glass-brd); border-bottom-left-radius: 4px; }
.thread { display: flex; flex-direction: column; padding: 12px; }

/* ---- فيديوهات (reels) ---- */
.reels { height: calc(100% - 0px); overflow-y: auto; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; }
.reels::-webkit-scrollbar { width: 0; }
.reel { position: relative; height: calc(100dvh - 66px); max-height: 866px; scroll-snap-align: start; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.reel video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.reel-grad { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.7)); }
.reel-side { position: absolute; inset-inline-end: 10px; bottom: 90px; display: flex; flex-direction: column; gap: 18px; z-index: 3; }
.reel-btn { background: none; border: none; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; }
.reel-btn div { font-size: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.reel-btn.like.on div { color: var(--danger); animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.35); } }
.reel-info { position: absolute; inset-inline: 12px; bottom: 20px; z-index: 3; max-width: 78%; }

/* ---- رقعة LUDO ---- */
.lboard { position: relative; width: 100%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(15, 1fr); grid-template-rows: repeat(15, 1fr); background: #0d1030; border-radius: 12px; overflow: hidden; border: 2px solid var(--glass-brd); }
.lc { border: 0.5px solid rgba(255,255,255,.04); }
.lc.blank { background: transparent; }
.lc.path { background: rgba(255,255,255,.08); }
.lc.center { background: linear-gradient(135deg, #ff5470, #34d399, #ffcf5a, #5b8bff); }
.lc.yard.red { background: rgba(255,84,112,.28); }
.lc.yard.green { background: rgba(52,211,153,.28); }
.lc.yard.yellow { background: rgba(255,207,90,.28); }
.lc.yard.blue { background: rgba(91,139,255,.28); }
.lc.home.red, .lc.start.red { background: rgba(255,84,112,.75); }
.lc.home.green, .lc.start.green { background: rgba(52,211,153,.75); }
.lc.home.yellow, .lc.start.yellow { background: rgba(255,207,90,.75); }
.lc.home.blue, .lc.start.blue { background: rgba(91,139,255,.75); }
.lc.safe { box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.ltokens { position: absolute; inset: 0; pointer-events: none; }
.ltok { position: absolute; width: 5.4%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 2px 5px rgba(0,0,0,.5); transition: top .35s ease, left .35s ease; }
.ltok.movable { pointer-events: auto; cursor: pointer; animation: ltokpulse 1s ease-in-out infinite; z-index: 3; }
@keyframes ltokpulse { 50% { transform: translate(-50%,-50%) scale(1.35); box-shadow: 0 0 0 4px rgba(255,255,255,.4); } }
.ldie { font-size: 40px; line-height: 1; }

.ltr { direction: ltr; }
html[dir="ltr"] .badge { inset-inline-end: 22px; }

/* =========================================================================
   استجابة كاملة (Responsive): هاتف → تابلت → سطح مكتب.
   الهاتف يبقى كما هو (أقلّ من 640px). التابلت يتوسّع. سطح المكتب يصبح تطبيق
   ويب مركزيّاً بعرض أقصى ~1400px وشريط جانبي وشبكة بطاقات 3–5 أعمدة.
   ========================================================================= */

/* ---------- تابلت: توسيع طبيعي مع إبقاء الشريط السفلي ---------- */
@media (min-width: 640px) {
  .phone {
    max-width: 960px;
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    border: none;
    margin-inline: auto;
  }
  .wrap { padding: 20px 26px; }
  .grid2 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .offers { grid-template-columns: repeat(4, 1fr); }
  .promo { height: 178px; }
  .promo-title { font-size: 26px; }
  .promo-sub { font-size: 15px; }
  .promo-emoji { font-size: 74px; }
  .promo-cta { font-size: 13px; padding: 8px 20px; }
  .topbar h2 { font-size: 22px; }
  .sec-h { font-size: 18px; }
  .banner { height: 180px; }
  .topsearch { padding: 10px 16px; font-size: 14px; }
}

/* رأس مضغوط على الهواتف الصغيرة جداً: أخفِ نص البحث لإتاحة مساحة للعدّادات */
@media (max-width: 400px) {
  .feed-top { gap: 6px; padding-inline: 12px; }
  .topsearch .ts-ph { display: none; }
  .topsearch { justify-content: center; padding: 8px 11px; }
  .feed-top .logo.brand { font-size: 21px; }
}

/* ---------- سطح المكتب: تطبيق مركزيّ + شريط جانبي + شبكة أوسع ---------- */
@media (min-width: 1024px) {
  .phone {
    max-width: 1400px;
    flex-direction: row;
    background: radial-gradient(120% 60% at 50% -10%, #2a1a5e 0%, var(--bg1) 45%, var(--bg0) 100%);
  }

  /* الشريط السفلي يتحوّل إلى شريط جانبي (على اليمين في RTL) */
  #tabbar.tabbar {
    order: -1;
    position: static;
    height: 100%;
    width: 250px;
    flex: 0 0 250px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 6px;
    padding: 20px 12px calc(20px + env(safe-area-inset-bottom));
    border-top: none;
    border-inline-start: 1px solid var(--glass-brd);
    background: rgba(10, 12, 34, .55);
  }
  #tabbar.tabbar::before {
    content: 'Viora';
    font-size: 30px; font-weight: 800; letter-spacing: 1px; text-align: center;
    padding: 8px 0 18px;
    background: linear-gradient(135deg, var(--cyan), var(--pink), var(--violet2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .tab {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 15px;
    color: var(--muted);
    transition: background .15s;
  }
  .tab:hover { background: rgba(255, 255, 255, .05); }
  .tab.active { background: rgba(124, 58, 237, .2); color: #fff; }
  .tab .tab-ic { font-size: 22px; }
  .tab .tab-lbl { font-size: 15px; }
  /* زرّ البثّ المباشر يصبح زرّاً بارزاً أسفل الشريط */
  .tab-go { order: 99; margin-top: auto; }
  .go-plus {
    width: 100%; height: auto; margin-top: 0;
    border-radius: 14px; padding: 14px; font-size: 24px;
  }
  /* الشارات تتدفّق إلى نهاية الصفّ بدل الزاوية */
  .badge { position: static; inset: auto; margin-inline-start: auto; }

  .screen { padding-bottom: 28px; }
  .wrap { padding: 28px 36px; }
  /* شعار Xena موجود في الشريط الجانبي، فنُخفي شعار الرأس المكرّر في الرئيسية */
  .topbar h2.logo { display: none; }

  /* شبكة الغرف: ٤ أعمدة على سطح المكتب */
  .grid2 { grid-template-columns: repeat(4, 1fr); gap: 18px; }

  .promo { height: 210px; border-radius: 22px; }
  .promo-title { font-size: 32px; }
  .promo-sub { font-size: 16px; }
  .promo-emoji { font-size: 84px; }
  .banner { height: 220px; }
  .offers { gap: 16px; }
  .topbar { padding: 18px 24px 14px; }

  /* الغرفة الحيّة والنوافذ والريلز تبقى بعرض هاتف مركزيّ (تجربة عمودية) */
  .live-wrap { left: 0; right: 0; max-width: 460px; margin-inline: auto; }
  .overlay { align-items: center; }
  .sheet { max-width: 460px; margin-inline: auto; border-radius: 24px; }
  .reels { max-width: 480px; margin-inline: auto; }
  .thread { max-width: 760px; margin-inline: auto; }
}

/* ---------- شاشات كبيرة: ٥ أعمدة ---------- */
@media (min-width: 1360px) {
  .grid2 { grid-template-columns: repeat(5, 1fr); }
}

/* ============================================================================
   3D Premium Effects (Viora) — CSS/SVG only, GPU-friendly, RTL-safe.
   عمق ثلاثي الأبعاد: إطارات VIP، شارات نبالة، هدايا، دخول غرف، أغلفة متوهّجة،
   حدود ذهبيّة متحرّكة، قلوب طائرة، وميض ينساب، ظلال عمق، زجاجيّة، خلفيّة parallax.
   ============================================================================ */

/* --- خلفيّة عمق (parallax orbs) خلف الإطار — تظهر في هوامش سطح المكتب --- */
body::before {
  content: ''; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(124,58,237,.35), transparent) 12% 18% / 360px 360px no-repeat,
    radial-gradient(closest-side, rgba(34,211,238,.22), transparent) 88% 28% / 300px 300px no-repeat,
    radial-gradient(closest-side, rgba(232,121,249,.26), transparent) 18% 86% / 340px 340px no-repeat,
    radial-gradient(closest-side, rgba(91,139,255,.2), transparent) 82% 82% / 280px 280px no-repeat;
  filter: blur(34px); animation: orbDrift 26s ease-in-out infinite alternate; will-change: transform;
}
@keyframes orbDrift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(0,-4%,0) scale(1.08); } }

/* --- بطاقات الغرف: عمق + إمالة 3D عند المرور + توهّج الغلاف --- */
.grid2 { perspective: 1200px; }
.roomcard { box-shadow: 0 14px 30px rgba(6,4,22,.55), 0 3px 10px rgba(124,58,237,.28); }
/* توهّج داخليّ لأغلفة الغرف المميّزة/الساخنة */
.roomcard.vip .rc-cover::after,
.roomcard.hot .rc-cover::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
}
.roomcard.vip .rc-cover::after { box-shadow: inset 0 0 46px rgba(255,190,60,.42); }
.roomcard.hot .rc-cover::after { box-shadow: inset 0 0 40px rgba(255,70,45,.4); }
@media (hover: hover) {
  .roomcard { transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s ease; }
  .roomcard:hover { transform: translateY(-10px) rotateX(6deg) rotateY(-5deg) scale(1.03); box-shadow: 0 30px 55px rgba(6,4,22,.62), 0 0 32px rgba(124,58,237,.5); }
  .roomcard.vip:hover { box-shadow: 0 30px 55px rgba(255,180,50,.55), 0 0 42px rgba(255,210,110,.7); }
  .roomcard:hover .rc-cover-art, .roomcard:hover .rc-cover-img { transform: scale(1.1); }
}

/* --- إطار VIP ثلاثي الأبعاد للأفاتار (معدني ذهبي + وهج نابض) --- */
.av-ring {
  padding: 3px;
  background: conic-gradient(from 210deg, #ff9d1a, #fff0b8, #ffcf5a, #ff9d1a, #fff2c8, #ff9d1a);
  box-shadow: 0 4px 14px rgba(255,170,40,.5);
  animation: vipRingPulse 2.6s ease-in-out infinite; will-change: box-shadow;
}
@keyframes vipRingPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,225,150,.5), 0 5px 14px rgba(255,170,40,.4); }
  50% { box-shadow: 0 0 0 1px rgba(255,240,190,.9), 0 8px 22px rgba(255,190,60,.75), 0 0 20px rgba(255,205,110,.6); }
}

/* --- شارات VIP/النبالة ثلاثيّة الأبعاد (نقش + ظلّ + وميض ينساب + طفو) --- */
.badge-chip { position: relative; overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.5); text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.badge-chip::after { content: ''; position: absolute; top: 0; bottom: 0; width: 36%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: chipShine 3.6s ease-in-out infinite; }
.badge-chip.vip, .badge-chip.noble { animation: badgeFloat 3s ease-in-out infinite; }
@keyframes badgeFloat { 50% { transform: translateY(-2px); } }
@keyframes chipShine { 0% { inset-inline-start: -45%; } 60%, 100% { inset-inline-start: 120%; } }
/* نقش خفيف للشارات الصغيرة على البطاقات (بلا حركة، أداء عالٍ) */
.deco-vip, .deco-noble, .deco-feat, .deco-host, .deco-agency, .deco-title { box-shadow: 0 2px 5px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.4); }
/* بطاقتا VIP/النبالة في البروفايل العام: عمق + وهج */
.ptile.vip { box-shadow: 0 8px 22px rgba(255,170,40,.28), inset 0 1px 0 rgba(255,255,255,.15); }
.ptile.noble { box-shadow: 0 8px 22px rgba(168,85,247,.3), inset 0 1px 0 rgba(255,255,255,.15); }

/* --- تراكب الهدايا ثلاثي الأبعاد (دوران + انبثاق + توهّج) --- */
.gift-float { filter: drop-shadow(0 8px 18px rgba(0,0,0,.55)); will-change: transform, opacity; }
@keyframes giftUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(44px) scale(.3) rotateY(-90deg); }
  25% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.25) rotateY(0deg); }
  70% { opacity: 1; transform: translateX(-50%) translateY(-52px) scale(1) rotateY(18deg); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-165px) scale(.85) rotateY(32deg); }
}
@keyframes giftBig {
  0% { opacity: 0; transform: translateX(-50%) scale(.15) rotateY(-140deg); }
  22% { opacity: 1; transform: translateX(-50%) scale(1.5) rotateY(0deg); }
  55% { transform: translateX(-50%) scale(1.25) rotateY(20deg); }
  82% { opacity: 1; transform: translateX(-50%) scale(1.3) rotateY(-8deg); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.5) translateY(-70px) rotateY(24deg); }
}
.gift-fullscreen { perspective: 800px; }
.gift-fullscreen::after { content: none; }

/* --- قلوب طائرة (3 قلوب متتابعة تتمايل صعوداً) --- */
.float-heart {
  position: absolute; bottom: 76px; font-size: 24px; z-index: 6; pointer-events: none;
  color: #ff5a8a; filter: drop-shadow(0 2px 6px rgba(255,45,110,.6));
  animation: heartRise 1.8s ease-out forwards; will-change: transform, opacity;
}
@keyframes heartRise {
  0% { opacity: 0; transform: translateY(20px) scale(.5) rotate(-8deg); }
  15% { opacity: 1; transform: translateY(0) scale(1.15) rotate(5deg); }
  60% { transform: translateY(-120px) scale(1) rotate(-6deg); }
  100% { opacity: 0; transform: translateY(-230px) scale(.9) rotate(6deg); }
}

/* --- دخول الغرفة ثلاثي الأبعاد (تكبير من العمق) --- */
.live-wrap { animation: roomEnter .5s cubic-bezier(.2,.85,.25,1); }
@keyframes roomEnter { from { opacity: 0; transform: perspective(1100px) translateZ(-220px) scale(.92); } to { opacity: 1; transform: none; } }
/* منصّة المضيف والمقاعد: عمق + زجاجيّة */
#hostTile { box-shadow: 0 12px 30px rgba(124,58,237,.5), inset 0 0 0 1px rgba(255,255,255,.1); }
.seat.filled { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 20px rgba(0,0,0,.5); }
.live-host { box-shadow: 0 6px 18px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); }

/* --- شارة الدخول الملكي ثلاثيّة الأبعاد --- */
.enter-banner { box-shadow: 0 8px 26px rgba(232,121,249,.6); }
@keyframes enterSlide {
  0% { transform: perspective(650px) translateX(-115%) rotateY(38deg); opacity: 0; }
  12% { transform: perspective(650px) translateX(0) rotateY(0deg); opacity: 1; }
  80% { transform: perspective(650px) translateX(0) rotateY(0deg); opacity: 1; }
  100% { transform: perspective(650px) translateX(-22%) rotateY(-22deg); opacity: 0; }
}

/* --- بطاقة إنشاء الغرفة + بطاقة الانضمام: وميض ينساب خفيف --- */
.join-card { position: relative; overflow: hidden; }
.join-card::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent); transform: skewX(-18deg); animation: chipShine 4.5s ease-in-out infinite; }

/* --- احترام تفضيل تقليل الحركة --- */
@media (prefers-reduced-motion: reduce) {
  body::before, .av-ring, .badge-chip.vip, .badge-chip.noble, .badge-chip::after, .join-card::after, .live-wrap { animation: none !important; }
  .roomcard:hover { transform: translateY(-4px) !important; }
}

/* ============================================================================
   الغرفة المتقدّمة (Advanced Live Room — Viora): رأس، خلفيّة، إعلان، ٢٠ مقعداً،
   مسابقة، دردشة بشارات، هدايا، مايك — بنفسجي داكن + زجاجيّة + إطارات VIP ذهبيّة، RTL.
   ============================================================================ */
.adv-room { overflow: hidden; background: #150c30; }
.ar-bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; background-color: #1a1030; }
.ar-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,7,32,.7) 0%, rgba(12,7,32,.86) 55%, rgba(8,5,22,.95) 100%); }
.adv-room > *:not(.ar-bg) { position: relative; z-index: 1; }

/* رأس الغرفة */
.ar-top { display: flex; align-items: center; gap: 8px; padding: 12px 12px 6px; }
.ar-hostbox { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.4); border: 1px solid var(--glass-brd); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; min-width: 0; }
.ar-hostmeta { min-width: 0; }
.ar-hostmeta b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.ar-id { font-size: 10px; color: var(--muted); }
.ar-follow { flex-shrink: 0; }
.ar-viewers { margin-inline-start: auto; flex-shrink: 0; background: rgba(0,0,0,.45); border: 1px solid var(--glass-brd); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 700; }

/* شريط المسابقة */
.ar-contest { margin: 4px 12px; padding: 9px 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,180,40,.22), rgba(124,58,237,.24)); border: 1px solid rgba(255,190,60,.45); box-shadow: 0 6px 18px rgba(124,58,237,.3); }
.ar-contest-h { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--gold); }
.ar-timer { background: rgba(0,0,0,.45); padding: 2px 9px; border-radius: 999px; color: #fff; font-variant-numeric: tabular-nums; }
.ar-rank { display: flex; gap: 8px; margin-top: 7px; overflow-x: auto; scrollbar-width: none; }
.ar-rank::-webkit-scrollbar { height: 0; }
.ar-rk { flex-shrink: 0; font-size: 11px; font-weight: 700; white-space: nowrap; background: rgba(0,0,0,.32); border: 1px solid var(--glass-brd); padding: 3px 9px; border-radius: 999px; }
.ar-rk.r1 { border-color: rgba(255,207,90,.6); } .ar-rk.r1 b { color: var(--gold); }

/* بطاقة الإعلان الزجاجيّة */
.ar-announce { margin: 8px 12px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.ar-ann-ic { font-size: 16px; }
.ar-ann-txt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; }
.ar-ann-edit { flex-shrink: 0; background: none; border: none; color: var(--cyan); cursor: pointer; font-size: 15px; }

/* المسرح + شبكة المقاعد (٢٠ مقعداً + المضيف مميّز) */
.adv-room .live-stage { flex: 1; overflow-y: auto; }
.adv-room .live-stage::-webkit-scrollbar { width: 0; }
.ar-seats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 4px; padding: 10px 10px 4px; }
.ar-seat { display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; cursor: pointer; }
.ar-av { position: relative; display: inline-grid; place-items: center; }
.ar-av .avatar { width: 52px; height: 52px; }
.ar-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; z-index: 1; }
.ar-mic { position: absolute; bottom: -2px; inset-inline-end: -2px; z-index: 3; width: 20px; height: 20px; border-radius: 50%; background: rgba(10,8,30,.9); border: 1px solid var(--glass-brd); display: grid; place-items: center; font-size: 10px; }
.ar-crown { position: absolute; top: -8px; z-index: 3; font-size: 15px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.ar-name { font-size: 11px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f2ecff; }
.ar-score { font-size: 10px; font-weight: 700; color: var(--gold); }
.ar-seat.empty .ar-plus, .ar-seat.locked .ar-lock { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--muted2); background: rgba(255,255,255,.05); border: 1px dashed var(--glass-brd); }
.ar-seat.locked .ar-lock { border-style: solid; background: rgba(0,0,0,.4); }
.ar-seat.host .ar-name { color: var(--gold); font-weight: 800; }
/* المتحدّث النشِط (توهّج أخضر) */
.ar-seat.speaking .ar-av { box-shadow: 0 0 0 3px rgba(52,211,153,.85), 0 0 16px rgba(52,211,153,.6); border-radius: 50%; }

/* الدردشة + الشارات */
.adv-room .live-chat { max-height: 30%; }
.cbadge { display: inline-block; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 5px; margin-inline-end: 4px; vertical-align: 1px; }
.cbadge.admin { background: linear-gradient(135deg, #ff5470, #ff2d55); color: #fff; }
.cbadge.mod { background: linear-gradient(135deg, #22d3ee, #0ea5e9); color: #04303a; }
.cbadge.vip { background: linear-gradient(135deg, #fff0b8, #ff9d1a); color: #4a2600; }
.cbadge.lvl { background: rgba(124,58,237,.55); color: #fff; }

/* لوحة الهدايا (اختيار المستلم) + الإيموجي */
.gift-recips { margin-bottom: 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-top: 10px; }
.emoji-btn { font-size: 24px; background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 12px; padding: 8px 0; cursor: pointer; }
.emoji-btn:active { transform: scale(.9); }

/* ============================================================================
   تجربة البثّ الفاخرة بملء الشاشة (Full-screen Live — Viora)
   ============================================================================ */
.av-36 { width: 36px; height: 36px; font-size: 15px; }
.fs-live { background: #0a0618; }
.fs-bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; background-color: #150c30; }
.fs-bg #stageVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; transition: opacity .5s ease; }
.fs-bg.has-video #stageVideo { opacity: 1; }
.fs-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10,6,24,.6) 0%, rgba(10,6,24,.12) 26%, rgba(10,6,24,.2) 58%, rgba(6,4,18,.9) 100%); }
.fs-fx { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }

/* الهيدر (المقاعد + بيانات المضيف) داخل التدفّق أعلى العمود المرن — بلا تراكب مطلق. */
.fs-header { position: relative; z-index: 5; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 4px; }
.fs-top { display: flex; align-items: flex-start; gap: 8px; }
.fs-hostcard { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; cursor: pointer; min-width: 0; max-width: 58%; }
.fs-hostmeta { min-width: 0; }
.fs-hostmeta b { font-size: 12px; display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-sub { font-size: 10px; color: var(--muted); }
.fs-followbtn { flex-shrink: 0; border: none; color: #fff; font-size: 11px; font-weight: 800; padding: 6px 14px; border-radius: 999px; background: linear-gradient(135deg, var(--violet), var(--pink)); box-shadow: 0 3px 12px rgba(232,121,249,.5); cursor: pointer; }
.fs-followbtn.on { background: rgba(255,255,255,.16); box-shadow: none; }
.fs-followbtn:active { transform: scale(.94); }
.fs-topstats { margin-inline-start: auto; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.fs-stat { background: rgba(0,0,0,.42); border: 1px solid var(--glass-brd); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.fs-close { flex-shrink: 0; }
.fs-online { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.fs-online::-webkit-scrollbar { height: 0; }
.fs-onuser { position: relative; flex-shrink: 0; cursor: pointer; }
.fs-onmic { position: absolute; bottom: -2px; inset-inline-end: -2px; width: 16px; height: 16px; border-radius: 50%; background: rgba(10,8,30,.9); border: 1px solid var(--glass-brd); display: grid; place-items: center; font-size: 9px; z-index: 2; }
.fs-onvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 50%; z-index: 1; }
.fs-onuser.speaking .vipframe, .fs-onuser.speaking .avatar { box-shadow: 0 0 0 2px rgba(52,211,153,.9), 0 0 12px rgba(52,211,153,.6); border-radius: 50%; }
.fs-onadd { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px dashed var(--glass-brd); background: rgba(255,255,255,.06); color: var(--muted2); font-size: 18px; cursor: pointer; }
.fs-announce { display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin: 0; }
.fs-contest { margin: 0; }

.fs-giftbar { position: absolute; inset-inline-end: 8px; bottom: 84px; z-index: 5; display: flex; flex-direction: column; gap: 8px; }
.fs-giftshort { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 46px; padding: 6px 0; border-radius: 14px; background: rgba(20,14,44,.5); border: 1px solid var(--glass-brd); backdrop-filter: blur(6px); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.fs-giftshort:hover, .fs-giftshort:active { transform: translateY(-2px) scale(1.06); box-shadow: 0 6px 16px rgba(124,58,237,.5); }
.fs-gi { font-size: 22px; line-height: 1; }
.fs-gp { font-size: 9px; font-weight: 800; color: var(--gold); }
.fs-giftshort.more { background: linear-gradient(135deg, var(--violet), var(--violet2)); }

/* ====== غرفة بثّ فاخرة بنمط Xena: شبكة مقاعد أعلى/وسط + دردشة مدمجة أسفل اليسار + هدايا يمين ======
   الطبقات الخلفيّة مطلقة تملأ الشاشة (تتغلّب على .adv-room > * العامّة). */
.fs-live .fs-bg { position: absolute; inset: 0; z-index: 0; }
.fs-live .fs-overlay { position: absolute; inset: 0; z-index: 1; }
.fs-live .fs-fx { position: absolute; inset: 0; z-index: 3; }
/* عمود: هيدر رفيع + منطقة العرض (تملأ الوسط) + شريط إدخال أسفل. */
.fs-live .fs-header { position: relative; z-index: 6; flex: 0 0 auto; }
.fs-live .fs-bar { position: relative; z-index: 7; flex: 0 0 auto; }
/* منطقة العرض عمود مرن: الشبكة تأخذ ارتفاعها الطبيعي بالأعلى (مرصوصة) بلا تمدّد. */
.fs-live .fs-stage-area { position: relative; z-index: 4; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* --- شبكة المقاعد تملأ الأعلى والوسط (مرصوصة من الأعلى) --- */
.fs-live .fs-seatgrid { position: relative; z-index: 4; flex: 0 0 auto; align-content: start; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 4px; padding: 8px 12px 0; }
.fs-seat { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.fs-seat-av { position: relative; width: 52px; height: 52px; display: grid; place-items: center; }
.fs-seat-av .vipframe, .fs-seat-av .avatar { width: 100%; height: 100%; }
.fs-seat .fs-onmic { position: absolute; bottom: -2px; inset-inline-end: -2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(10,8,30,.92); border: 1px solid var(--glass-brd); display: grid; place-items: center; font-size: 10px; z-index: 3; }
.fs-seat-name { font-size: 10.5px; font-weight: 700; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.75); }
.fs-seat-name.muted { color: var(--muted2); font-weight: 600; }
.fs-seat.vacant .fs-seat-slot { width: 48px; height: 48px; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.22); background: rgba(255,255,255,.05); display: grid; place-items: center; font-size: 20px; color: var(--muted2); }
.fs-seat.vacant.locked .fs-seat-slot { border-style: solid; font-size: 18px; }
.fs-seat.filled .fs-onvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; z-index: 1; }
.fs-seat.filled.speaking .vipframe, .fs-seat.filled.speaking .avatar { box-shadow: 0 0 0 2px rgba(52,211,153,.9), 0 0 12px rgba(52,211,153,.6); border-radius: 50%; }

/* --- الإعلان الزجاجي + الدردشة المدمجة أسفل اليسار --- */
.fs-live .fs-contest { position: absolute; top: 4px; inset-inline: 8px; margin: 0; z-index: 5; }
.fs-live .fs-lowerleft { position: absolute; left: 8px; bottom: 6px; width: 62%; max-width: 268px; z-index: 5; display: flex; flex-direction: column; gap: 6px; }
.fs-live .fs-announce { position: relative; inset: auto; margin: 0; padding: 7px 11px; border-radius: 14px; font-size: 12px; }
.fs-live .fs-chat { position: relative; z-index: 5; flex: 0 1 auto; width: 100%; max-width: 100%; max-height: 32vh; min-height: 0; inset: auto; padding: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 5px; -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%); mask-image: linear-gradient(180deg, transparent, #000 14%); }
.fs-live .fs-chat::before { content: ''; margin-block-start: auto; flex-shrink: 0; }
.fs-chat::-webkit-scrollbar { width: 0; }
/* رسائل مدمجة صغيرة (لا بطاقات عريضة). */
.fs-live .fs-msg { padding: 3px 9px 4px; border-radius: 13px; gap: 6px; background: rgba(8,5,20,.5); border-color: rgba(255,255,255,.06); align-items: center; }
.fs-live .fs-msg .avatar, .fs-live .fs-msg .vipframe { width: 26px; height: 26px; }
.fs-live .fs-msgname { font-size: 9.5px; }
.fs-live .fs-msgtext { font-size: 12px; line-height: 1.3; }

/* ====== إطارات الرسائل الفاخرة حسب الرتبة (CSS خفيف + لمعان) — نمط Xena/Bigo ====== */
/* flex-shrink:0 ضروري: overflow:hidden على عنصر flex يجعل حدّه الأدنى 0 فينضغط داخل عمود الدردشة. */
.fs-live .fs-msg { position: relative; flex-shrink: 0; }
.fs-live .fs-msg.tier-vip, .fs-live .fs-msg.tier-noble, .fs-live .fs-msg.tier-staff, .fs-live .fs-msg.gift { overflow: hidden; border: 1.5px solid transparent; }

/* VIP: توهّج ذهبي/بنفسجي */
.fs-live .fs-msg.tier-vip {
  background: linear-gradient(rgba(20,10,38,.74), rgba(20,10,38,.74)) padding-box,
             linear-gradient(135deg, #ffcf5a, #e879f9) border-box;
  box-shadow: 0 2px 10px rgba(232,121,249,.3);
}
.fs-live .fs-msg.tier-vip.vip-3 {
  background: linear-gradient(rgba(24,10,40,.76), rgba(24,10,40,.76)) padding-box,
             linear-gradient(135deg, #ffd76a, #ff6ec7, #a855f7) border-box;
  box-shadow: 0 2px 14px rgba(232,121,249,.42);
}
/* Noble: إطار فاخر ذهبي متحرّك */
.fs-live .fs-msg.tier-noble {
  background: linear-gradient(rgba(28,14,34,.8), rgba(28,14,34,.8)) padding-box,
             linear-gradient(120deg, #ffe08a, #ffb347, #ff6ec7, #ffe08a) border-box;
  box-shadow: 0 2px 16px rgba(255,180,90,.45);
}
/* Admin/Mod: إطار أزرق مميّز */
.fs-live .fs-msg.tier-staff {
  background: linear-gradient(rgba(8,16,40,.84), rgba(8,16,40,.84)) padding-box,
             linear-gradient(135deg, #38bdf8, #6366f1) border-box;
  box-shadow: 0 2px 12px rgba(56,189,248,.42);
}
/* Gift: إطار هدية أكبر ذهبي متوهّج */
.fs-live .fs-msg.gift {
  padding: 5px 11px 6px;
  background: linear-gradient(rgba(48,30,4,.72), rgba(48,30,4,.72)) padding-box,
             linear-gradient(135deg, #ffd76a, #ff9a3c, #ffd76a) border-box;
  box-shadow: 0 2px 15px rgba(255,180,60,.5);
}
.fs-live .fs-msg.gift .fs-msgtext { font-size: 12.5px; }

/* لمعان منزلق خفيف (طبقة علويّة شفّافة تمرّ عبر الإطار) */
.fs-live .fs-msg.tier-vip::after,
.fs-live .fs-msg.tier-noble::after,
.fs-live .fs-msg.gift::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.26) 50%, transparent 62%);
  background-size: 250% 100%;
  animation: msgShine 3.4s ease-in-out infinite;
}
.fs-live .fs-msg.tier-noble::after {
  animation-duration: 2.8s;
  background-image: linear-gradient(115deg, transparent 36%, rgba(255,240,200,.4) 50%, transparent 64%);
}
@keyframes msgShine { 0% { background-position: 145% 0; } 55%, 100% { background-position: -55% 0; } }

/* بادج النُّبل في اسم الرسالة */
.cbadge.noble { background: linear-gradient(135deg, #ffb347, #ff6ec7); color: #2a1200; }

/* لمعان خفيف على إطار الدخول */
.fs-entrance { overflow: hidden; }
.fs-entrance::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.3) 50%, transparent 60%);
  background-size: 260% 100%; animation: msgShine 2.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .fs-live .fs-msg::after, .fs-entrance::after { animation: none; }
}

/* --- شريط الهدايا على اليمين: مثبّت أسفل شبكة المقاعد وفوق شريط الأدوات (بارتفاعه الطبيعي،
   يحترم المساحة الآمنة). مثبّت من الأسفل فلا يتداخل مع المقاعد (٥ و٩) ولا مع أزرار الأسفل. --- */
.fs-live .fs-giftbar { position: absolute; inset-inline: auto; right: 8px; left: auto; top: auto; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 5; flex: 0 0 auto; }

/* --- نموذج الإدخال: الحقل يتمدّد وزرّ الإرسال ثابت بجانبه --- */
.fs-live .fs-inputform { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; margin: 0; }
.fs-live .fs-inputform .input { min-width: 0; }
/* --- زر الإرسال: أساسي بارز وأيقونة واضحة (تُعكس أفقيّاً لاتجاه RTL) --- */
.fs-live .fs-send { background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; box-shadow: 0 3px 12px rgba(232,121,249,.5); flex-shrink: 0; }
.fs-live .fs-send svg { display: block; transform: scaleX(-1); }
.fs-live .fs-send:active { transform: scale(.92); }

/* --- عند فتح لوحة المفاتيح: شريط الإدخال أوضح والدردشة أصغر قليلاً فوقه (لا نُخفي شيئاً) --- */
.fs-live.kb-open .fs-bar { background: rgba(10,12,34,.97); }
.fs-live.kb-open .fs-chat { max-height: 30vh; }
.fs-live.kb-open .fs-seatgrid { opacity: .4; transition: opacity .15s; }
.fs-msg { display: flex; align-items: flex-start; gap: 7px; background: rgba(14,9,32,.55); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 5px 9px 6px; backdrop-filter: blur(6px); animation: msgIn .28s cubic-bezier(.2,.8,.3,1); max-width: 100%; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.fs-msg .avatar, .fs-msg .vipframe { flex-shrink: 0; }
.fs-msgbody { min-width: 0; }
.fs-msgname { display: block; font-size: 10px; font-weight: 800; color: #cbb8ff; }
.fs-msgtext { font-size: 13px; color: #f2ecff; word-break: break-word; }
.fs-msgtext.gift { color: var(--gold); font-weight: 700; }
.fs-msg.gift { border-color: rgba(255,207,90,.4); background: rgba(60,40,0,.4); }
/* شريط الأدوات ثابت أسفل العمود المرن. */
.fs-bar { position: relative; z-index: 6; flex-shrink: 0; }

.vipframe { position: relative; display: inline-grid; place-items: center; border-radius: 50%; padding: 3px; }
.vipframe > .avatar { display: block; }
.vipframe::before { content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: 0; }
.vipframe.v1::before { background: conic-gradient(from 0deg, #e8edf5, #b8c6d8, #ffffff, #9fb0c4, #e8edf5); }
.vipframe.v2::before { background: conic-gradient(from 0deg, #fff0b8, #ff9d1a, #ffe08a, #ffb347, #fff0b8); }
.vipframe.v3::before { background: conic-gradient(from 0deg, #a0f0ff, #7c3aed, #e879f9, #22d3ee, #a0f0ff); }
.vipframe > * { position: relative; z-index: 1; }
.vipframe.v1 { box-shadow: 0 0 10px rgba(180,200,220,.6); animation: vipPulseS 2.6s ease-in-out infinite; }
.vipframe.v2 { box-shadow: 0 0 12px rgba(255,180,60,.7); animation: vipPulseG 2.4s ease-in-out infinite; }
.vipframe.v3 { box-shadow: 0 0 16px rgba(124,58,237,.8); animation: vipPulseD 2.2s ease-in-out infinite; }
@keyframes vipPulseS { 50% { box-shadow: 0 0 16px rgba(200,220,240,.85); } }
@keyframes vipPulseG { 50% { box-shadow: 0 0 20px rgba(255,200,80,.95); } }
@keyframes vipPulseD { 50% { box-shadow: 0 0 24px rgba(168,85,247,1); } }
.vipframe::after { content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: 2; pointer-events: none; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.75) 50%, transparent 60%); background-size: 250% 250%; animation: vipShineSweep 3.2s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes vipShineSweep { 0% { background-position: 200% 0; } 55%, 100% { background-position: -60% 0; } }

.fs-giftfly { position: absolute; inset-inline-start: 50%; bottom: 22%; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: linear-gradient(135deg, rgba(124,58,237,.85), rgba(232,121,249,.75)); border: 1px solid rgba(255,255,255,.3); box-shadow: 0 8px 26px rgba(124,58,237,.6); color: #fff; white-space: nowrap; transform: translateX(-50%); animation: giftFlyUp 2.4s cubic-bezier(.2,.7,.3,1) forwards; }
.fs-giftfly.big { animation-duration: 3s; }
.fg-icon { font-size: 40px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)); animation: giftSpin 1.2s ease-in-out infinite; }
.fg-info { line-height: 1.2; }
.fg-info b { font-size: 12px; }
.fg-info span { display: block; font-size: 11px; opacity: .95; }
.fg-info i { color: var(--gold); font-style: normal; font-weight: 800; }
@keyframes giftFlyUp { 0% { opacity: 0; transform: translateX(-50%) translateY(60px) scale(.6); } 18% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.05); } 76% { opacity: 1; transform: translateX(-50%) translateY(-120px) scale(1); } 100% { opacity: 0; transform: translateX(-50%) translateY(-220px) scale(.9); } }
@keyframes giftSpin { 50% { transform: rotate(-12deg) scale(1.12); } }
.fg-spark { position: absolute; inset-inline-start: 24px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle, #fff, #ffcf5a); box-shadow: 0 0 8px #ffcf5a; transform: rotate(calc(var(--i) * 45deg)) translateX(0); animation: sparkBurst 1s ease-out forwards; animation-delay: .15s; }
@keyframes sparkBurst { 0% { opacity: 1; transform: rotate(calc(var(--i) * 45deg)) translateX(0) scale(1); } 100% { opacity: 0; transform: rotate(calc(var(--i) * 45deg)) translateX(46px) scale(.2); } }

.fs-entrance { position: absolute; inset-inline-start: 0; top: 40%; z-index: 4; display: flex; align-items: center; gap: 10px; max-width: 92%; padding: 8px 18px 8px 10px; color: #fff; border-radius: 0 999px 999px 0; background: linear-gradient(90deg, rgba(124,58,237,.95), rgba(232,121,249,.6), transparent); box-shadow: 0 6px 24px rgba(124,58,237,.5); animation: entranceSlide 4s ease-out forwards; }
.fs-entrance.silver { background: linear-gradient(90deg, rgba(150,170,190,.95), rgba(210,220,235,.5), transparent); }
.fs-entrance.gold { background: linear-gradient(90deg, rgba(255,157,26,.95), rgba(255,207,90,.55), transparent); color: #3a2400; }
.fs-entrance.diamond { background: linear-gradient(90deg, rgba(124,58,237,.95), rgba(34,211,238,.55), transparent); }
.fe-txt { min-width: 0; }
.fe-txt b { display: flex; align-items: center; gap: 5px; font-size: 14px; }
.fe-txt span { font-size: 12px; opacity: .95; }
.fe-vip { flex-shrink: 0; font-size: 11px; font-weight: 900; background: rgba(0,0,0,.3); padding: 3px 10px; border-radius: 999px; }
@keyframes entranceSlide { 0% { transform: translateX(-110%); opacity: 0; } 12% { transform: translateX(0); opacity: 1; } 82% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(-16%); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .vipframe.v1, .vipframe.v2, .vipframe.v3, .vipframe::after, .fg-icon { animation: none !important; }
}

/* ---- صفحة الاستكشاف (Discover): غرف رائجة أفقيّة + أشخاص مقترحون ---- */
.disc-rooms { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.disc-rooms::-webkit-scrollbar { display: none; }
.disc-room { flex: 0 0 152px; width: 152px; cursor: pointer; }
.dr-cvwrap { position: relative; width: 100%; aspect-ratio: 16 / 11; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.dr-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-art { background: linear-gradient(140deg, #7c3aed, #e879f9); }
.dr-badge { position: absolute; top: 8px; inset-inline-start: 8px; font-size: 13px; background: rgba(0,0,0,.5); border-radius: 999px; padding: 2px 8px; }
.dr-badge.hot { background: linear-gradient(135deg,#ff5a1e,#ff9d1e); }
.dr-badge.feat { background: linear-gradient(135deg,#ffd76a,#ff8a1e); }
.dr-viewers { position: absolute; bottom: 8px; inset-inline-end: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); border-radius: 999px; padding: 3px 8px; }
.dr-title { margin-top: 7px; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-host { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   لوحة المبيعات الاحترافية (Sales Dashboard) — داكنة متجاوبة تطابق النظام
   ========================================================================== */
.sales-wrap { padding-bottom: calc(var(--nav-h) + 24px); }
.sales { display: flex; flex-direction: column; gap: 14px; }
.sales .card { background: linear-gradient(160deg, var(--bg2), var(--bg1)); border: 1px solid var(--glass-brd); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.sales .mb { margin-bottom: 10px; }
.sales .row.between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sales .grow { flex: 1; }

/* ---- filter bar ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.rchips { display: flex; gap: 6px; flex-wrap: wrap; }
.rchip { background: var(--glass); border: 1px solid var(--glass-brd); color: var(--muted); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; transition: .15s; }
.rchip.active { background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(124,58,237,.5); }
.date-range { display: flex; align-items: center; gap: 6px; }
.date-range input[type=date] { background: var(--glass); border: 1px solid var(--glass-brd); color: var(--text); border-radius: 10px; padding: 6px 9px; font-size: 12px; color-scheme: dark; }
.btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }

/* ---- KPI grid ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-sm); background: linear-gradient(160deg, var(--bg2), var(--bg1)); border: 1px solid var(--glass-brd); position: relative; overflow: hidden; }
.kpi-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); }
.kpi-card.purple::before { background: var(--violet2); } .kpi-card.green::before { background: var(--ok); }
.kpi-card.blue::before { background: var(--cyan); } .kpi-card.teal::before { background: #2dd4bf; } .kpi-card.pink::before { background: var(--pink); }
.kpi-ic { font-size: 24px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.07); flex-shrink: 0; }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-body b { font-size: 19px; line-height: 1.15; white-space: nowrap; }
.kpi-body span { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---- period cards ---- */
.period-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.period-card { text-align: center; padding: 12px 8px; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-brd); }
.period-card .pl { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.period-card b { font-size: 15px; color: var(--gold); }

/* ---- charts ---- */
.chart-card .chart { width: 100%; height: auto; display: block; }
.chart { overflow: visible; }
.revline { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .grid { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.chart .pt { fill: var(--gold); }
.gbar { fill: url(#none); fill: #7c9dff; opacity: .85; }
.chart-foot { margin-top: 6px; }
.legend { display: flex; gap: 16px; margin-top: 8px; justify-content: center; }
.lg { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.gift { background: var(--gold); } .dot.vip { background: var(--pink); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- donut ---- */
.donut-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.donut { width: 120px; height: 120px; flex-shrink: 0; }
.dc-num { fill: var(--text); font-size: 15px; font-weight: 800; text-anchor: middle; }
.dc-lbl { fill: var(--muted); font-size: 8px; text-anchor: middle; }
.donut-legend { flex: 1; min-width: 130px; }

/* ---- lists / pills / mini stats ---- */
.sales .listrow { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 13.5px; }
.sales .listrow.sm { padding: 6px 2px; font-size: 12.5px; }
.sales .listrow:last-child { border-bottom: 0; }
.sales .listrow .ms { color: var(--gold); margin-inline-start: 8px; }
.sales .sub { margin: 6px 0 2px; font-weight: 700; }
.pill { padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill.purple { background: rgba(168,85,247,.22); color: #d8b4fe; }
.pill.green { background: rgba(52,211,153,.2); color: #6ee7b7; }
.pill.muted { background: rgba(255,255,255,.08); color: var(--muted); }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini { text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--glass); border: 1px solid var(--glass-brd); }
.mini b { display: block; font-size: 15px; } .mini span { font-size: 10.5px; color: var(--muted); }

/* ---- transactions ---- */
.tx-list { display: flex; flex-direction: column; }
.tx { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.tx:last-child { border-bottom: 0; }
.tx-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: rgba(255,255,255,.06); flex-shrink: 0; }
.tx-ic.gift { background: rgba(255,110,199,.16); } .tx-ic.vip { background: rgba(255,207,90,.16); }
.tx-ic.purchase { background: rgba(74,222,128,.16); } .tx-ic.grant { background: rgba(124,157,255,.16); }
.tx-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx-mid b { font-size: 13px; } .tx-mid span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt { text-align: end; display: flex; flex-direction: column; } .tx-amt b { font-size: 13px; color: var(--gold); }

/* ---- export ---- */
.export-row { display: flex; gap: 10px; }
.export-row .btn { flex: 1; }
.empty.sm { padding: 22px 8px; font-size: 12px; text-align: center; color: var(--muted); }
.sales-top .grow { flex: 1; }

/* ---- responsive: tablet/desktop widen the phone frame layouts ---- */
@media (min-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 380px) {
  .two-col { grid-template-columns: 1fr; }
  .kpi-body b { font-size: 17px; }
}

/* ==========================================================================
   سيّارات الدعم / مركبات الدخول — CSS خفيف (تحوّل/شفافية فقط، متجاوب)
   ========================================================================== */
/* ألوان الندرة */
.rar-common { --rar: #9aa4b2; } .rar-rare { --rar: #38bdf8; } .rar-epic { --rar: #a855f7; }
.rar-legendary { --rar: #ffcf5a; } .rar-mythic { --rar: #ff5470; }
.rar-txt-common { color: #9aa4b2; } .rar-txt-rare { color: #38bdf8; } .rar-txt-epic { color: #c084fc; }
.rar-txt-legendary { color: var(--gold); } .rar-txt-mythic { color: #ff6b8a; }
.car-fallback { display: grid; place-items: center; font-size: 30px; width: 100%; height: 100%; }
.car-lottie { position: relative; width: 100%; height: 100%; }
.car-lottie .car-fallback { position: absolute; inset: 0; z-index: 0; }
.car-lottie lottie-player { position: relative; z-index: 1; width: 100%; height: 100%; }

/* ---- إدارة السيّارات ---- */
.car-admin-list { display: flex; flex-direction: column; gap: 10px; }
.car-admin-row { display: flex; align-items: center; gap: 12px; padding: 10px; }
.car-thumb { width: 60px; height: 44px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: rgba(255,255,255,.05); border: 1.5px solid var(--rar, var(--glass-brd)); display: grid; place-items: center; }
.car-thumb-media { width: 100%; height: 100%; object-fit: cover; }
.car-admin-btns { display: flex; gap: 4px; flex-shrink: 0; }
.iconbtn.sm { width: 34px; height: 34px; font-size: 15px; }
.car-preview-box { height: 130px; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(124,58,237,.3), rgba(10,6,24,.6)); border: 1px solid var(--glass-brd); display: grid; place-items: center; margin-bottom: 12px; }
.car-prev-media { max-width: 90%; max-height: 118px; object-fit: contain; }

/* ---- متجر السيّارات ---- */
.car-store-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.car-store-item { background: linear-gradient(160deg, var(--bg2), var(--bg1)); border: 1.5px solid var(--rar, var(--glass-brd)); border-radius: 16px; padding: 10px; text-align: center; box-shadow: 0 3px 12px rgba(0,0,0,.3); }
.car-store-item.active { box-shadow: 0 0 0 2px var(--rar), 0 4px 16px rgba(0,0,0,.4); }
.car-store-item.locked { opacity: .82; }
.car-store-media { position: relative; height: 84px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rar) 26%, transparent), rgba(10,6,24,.5)); display: grid; place-items: center; margin-bottom: 8px; }
.car-store-vis { max-width: 96%; max-height: 80px; object-fit: contain; }
.car-lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6,4,16,.55); font-size: 11px; font-weight: 800; color: #fff; }
.car-badge-on { position: absolute; top: 4px; inset-inline-start: 4px; background: rgba(52,211,153,.9); color: #06210f; font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.car-store-name { display: block; font-size: 13px; }
.car-store-rar { display: block; font-size: 10.5px; font-weight: 800; margin: 1px 0 8px; }
.car-store-act .btn { font-size: 12px; }

/* ---- تراكب الدخول في الغرفة (ينساب في نطاق آمن بين المقاعد والدردشة) ---- */
.car-entrance { position: absolute; top: 39%; inset-inline: 0; z-index: 8; pointer-events: none; display: flex; justify-content: center; }
.car-ent-inner { display: inline-flex; align-items: center; gap: 10px; max-width: 94%; padding: 7px 16px 7px 8px; border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rar) 32%, rgba(8,5,20,.7)), rgba(8,5,20,.35));
  border: 1.5px solid var(--rar); box-shadow: 0 6px 22px color-mix(in srgb, var(--rar) 45%, transparent);
  backdrop-filter: blur(5px); animation: carDrive 7.2s cubic-bezier(.3,.7,.3,1) forwards; will-change: transform, opacity; }
.car-ent-rider { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.car-ent-txt b { display: block; font-size: 13px; line-height: 1.1; color: #fff; white-space: nowrap; }
.car-ent-txt span { font-size: 10px; color: var(--gold); white-space: nowrap; }
.car-ent-vehicle { flex-shrink: 0; height: 52px; display: grid; place-items: center; }
.car-ent-media { height: 52px; width: auto; max-width: 128px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
@keyframes carDrive {
  0% { transform: translateX(122%); opacity: 0; }
  14% { opacity: 1; }
  32%, 66% { transform: translateX(0); }
  86% { opacity: 1; }
  100% { transform: translateX(-132%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .car-ent-inner { animation: carFade 7.2s ease forwards; } @keyframes carFade { 0%,100%{opacity:0} 15%,85%{opacity:1;transform:none} } }
@media (max-width: 380px) { .car-store-grid { grid-template-columns: repeat(2, 1fr); } .car-ent-media { height: 44px; } }

/* ==================== 🎙 مدير غرف البث (SUPER_ADMIN) ==================== */
.room-mgr .field select.input, .room-mgr .field input.input { min-height: 42px; }
.room-mgr .chiprow { flex-wrap: wrap; }
.room-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px;
  background: linear-gradient(135deg, rgba(124,58,237,.28), rgba(168,85,247,.18)); border: 1px solid rgba(168,85,247,.5);
  border-radius: 14px; box-shadow: 0 6px 20px rgba(124,58,237,.28); }
.room-bulk.hidden { display: none; }
.rm-card { padding: 12px; margin-bottom: 12px; border: 1px solid var(--glass-brd);
  background: linear-gradient(160deg, rgba(36,26,84,.9), rgba(26,20,66,.9)); transition: border-color .18s, box-shadow .18s; }
.rm-card.rm-sel { border-color: var(--violet2); box-shadow: 0 0 0 2px rgba(168,85,247,.5) inset, 0 8px 24px rgba(124,58,237,.35); }
.rm-head { display: flex; gap: 10px; align-items: flex-start; }
.rm-check { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--violet2); flex: 0 0 auto; }
.rm-cover { width: 60px; height: 60px; border-radius: 12px; background-size: cover; background-position: center;
  flex: 0 0 auto; border: 1px solid var(--glass-brd); }
.rm-nocover { display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: linear-gradient(135deg, var(--violet), var(--violet2)); }
.rm-title { display: block; font-size: 15px; }
.rm-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.rm-tag { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; line-height: 1.7;
  background: var(--glass); border: 1px solid var(--glass-brd); color: var(--muted); }
.rm-tag.live { color: #fff; background: rgba(255,84,112,.22); border-color: rgba(255,84,112,.55); }
.rm-tag.off { color: var(--muted2); }
.rm-tag.pin { color: var(--gold); background: rgba(255,207,90,.14); border-color: rgba(255,207,90,.5); }
.rm-tag.lock { color: #ffb27a; border-color: rgba(255,122,26,.5); }
.rm-tag.hide { color: var(--muted2); }
.rm-tag.priv { color: var(--cyan); border-color: rgba(34,211,238,.45); }
.rm-tag.vip { color: #2a1500; background: linear-gradient(135deg, var(--gold), var(--orange)); border: none; }
.rm-tag.badge { color: var(--pink); border-color: rgba(232,121,249,.5); }
.rm-stats { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--glass-brd); }
.rm-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rm-actions .btn { flex: 1 1 auto; }
.rm-chks { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; padding: 10px 12px;
  background: var(--glass); border-radius: 12px; border: 1px solid var(--glass-brd); }
.rm-chk { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.rm-chk input { width: 18px; height: 18px; accent-color: var(--violet2); }
.room-mgr textarea.input { resize: vertical; font-family: inherit; }
.row.center { justify-content: center; align-items: center; }

/* ==================== 🏠 الرئيسية بأسلوب Xena — تدفّق رأسيّ بملء الشاشة ==================== */
.screen { position: relative; } /* حاوية تموضع للتدفّق الكامل */
.xfeed-shell { position: absolute; inset: 0; overflow: hidden; background: #05030f; }
/* الحاوية الماسحة (snap عموديّ، شريحة لكل بثّ) */
.xfeed {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.xfeed::-webkit-scrollbar { width: 0; height: 0; }
.xf-spin { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }

.xslide {
  position: relative;
  height: 100%; width: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  contain: layout paint size;
}
.xslide-sentinel { height: 1px; }

/* الغلاف (صورة/فيديو/فنّ) */
.xs-cover { position: absolute; inset: 0; z-index: 0; cursor: pointer; }
.xs-img, .xs-video, .xs-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xs-art-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 90px; opacity: .16; }
.xslide.active .xs-img, .xslide.active .xs-art { animation: xsKen 16s ease-out both; }
@keyframes xsKen { from { transform: scale(1.02); } to { transform: scale(1.14); } }
.xs-grad { position: absolute; inset: 0; z-index: 1; background:
  linear-gradient(180deg, rgba(5,3,15,.55) 0%, rgba(5,3,15,0) 22%, rgba(5,3,15,0) 46%, rgba(5,3,15,.72) 82%, rgba(3,2,10,.96) 100%); }

/* الرأس العائم */
.xfeed-top { position: absolute; top: 0; inset-inline: 0; z-index: 20; padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
  background: linear-gradient(180deg, rgba(5,3,15,.6), rgba(5,3,15,0)); pointer-events: none; }
.xfeed-top > * { pointer-events: auto; }
.xf-row1 { display: flex; align-items: center; gap: 8px; }
.xf-logo { font-size: 22px; margin: 0; }
.xf-icon { width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.xf-icon .bell-dot { position: absolute; top: 6px; inset-inline-end: 8px; }
.xf-row2 { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.xf-secs { flex: 1; overflow-x: auto; }
.xf-secs .chip { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; }
.xf-secs .chip.active { background: linear-gradient(135deg, var(--violet), var(--violet2)); }
.xf-country { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); max-width: 130px; }
.xf-country > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* شارات علويّة داخل الشريحة (تحت الرأس) */
.xs-tags { position: absolute; top: calc(env(safe-area-inset-top) + 92px); inset-inline-start: 12px; z-index: 6; display: flex; flex-wrap: wrap; gap: 6px; max-width: 70%; }
.xs-tags .live { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(90deg, #ff2d55, #ff5470); font-size: 10px; font-weight: 800; padding: 4px 9px; border-radius: 999px; box-shadow: 0 2px 12px rgba(255,45,85,.55); animation: livePulse 1.6s ease-in-out infinite; }
.xs-tags .live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.xs-tags .viewers, .xs-country-tag { display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.16); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.xs-tags .hot-badge { display: inline-flex; align-items: center; gap: 3px; background: linear-gradient(90deg, #ff7a1a, #ff2d55); font-size: 10px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.xs-country-tag img { width: 16px; border-radius: 2px; }

/* شريط الإجراءات الجانبي */
.xs-rail { position: absolute; inset-inline-end: 10px; bottom: calc(var(--nav-h) + 140px); z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.xs-railbtn { width: 52px; height: 52px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.xs-railbtn:active { transform: scale(.92); }
.xs-railbtn.xs-enter { background: linear-gradient(135deg, var(--violet), var(--violet2)); }
.xs-railbtn em { font-style: normal; font-size: 8px; font-weight: 800; margin-top: 1px; }
.xs-hearts { color: #fff; font-size: 12px; display: flex; flex-direction: column; align-items: center; }
.xs-hearts b { font-size: 12px; }

/* معلومات المضيف بالأسفل */
.xs-info { position: relative; z-index: 6; padding: 0 78px calc(var(--nav-h) + 22px) 14px; }
.xs-parts { display: flex; margin-bottom: 8px; }
.xs-parts .av-24 { margin-inline-start: -8px; border: 2px solid rgba(5,3,15,.6); border-radius: 50%; }
.xs-parts .av-24:first-child { margin-inline-start: 0; }
.xs-parts .part-more { align-self: center; margin-inline-start: 4px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.4); padding: 2px 7px; border-radius: 999px; }
.xs-hostrow { display: flex; align-items: center; gap: 10px; }
.xs-hostmeta { min-width: 0; flex: 1; }
.xs-title { font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xs-hostname { font-size: 13px; color: rgba(255,255,255,.85); display: flex; align-items: center; gap: 4px; }
.xs-hostname .verified { color: var(--cyan); } .xs-hostname .verified.gold { color: var(--gold); }
.xs-mng { display: flex; gap: 6px; }
.xs-mng button { width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(0,0,0,.4); color: #fff; font-size: 14px; }
.xs-badges { margin-top: 10px; }
.xs-cta { margin-top: 14px; width: 100%; border: none; border-radius: 16px; padding: 14px; font-size: 15px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--violet), var(--pink)); box-shadow: 0 10px 30px rgba(124,58,237,.5); }
.xs-cta:active { transform: scale(.98); }

/* الحالة الفارغة */
.xslide-empty { align-items: center; justify-content: center; }
.xf-empty { text-align: center; padding: 30px; }
.xf-empty-emoji { font-size: 64px; margin-bottom: 12px; }
.xf-empty h3 { font-size: 20px; margin: 0 0 6px; }
.xf-empty-go { margin-top: 20px; padding: 14px 30px; font-size: 16px; }

/* زرّ البثّ العائم */
.xf-fab { position: absolute; inset-inline-end: 16px; bottom: calc(var(--nav-h) + 20px); z-index: 15; width: 56px; height: 56px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--pink), var(--violet2)); color: #fff; font-size: 24px; box-shadow: 0 8px 26px rgba(232,121,249,.55); }
.xf-fab:active { transform: scale(.94); }

@media (prefers-reduced-motion: reduce) { .xslide.active .xs-img, .xslide.active .xs-art { animation: none; } }

/* ==================== الزينة الموحّدة (إطارات/شارات/ألوان/فقاعات/دخول) ==================== */
.decor-frame { position: relative; display: inline-block; line-height: 0; }
.decor-frame-img { position: absolute; inset: -18%; width: 136%; height: 136%; object-fit: contain; pointer-events: none; z-index: 2; }
.decor-name.colored { font-weight: 800; }
.decor-vip { display: inline-flex; align-items: center; font-size: 9px; font-weight: 800; color: #2a1500; background: linear-gradient(135deg, var(--gold), var(--orange)); padding: 1px 6px; border-radius: 999px; margin-inline-start: 4px; vertical-align: middle; }
.decor-badge { display: inline-flex; align-items: center; margin-inline-start: 4px; vertical-align: middle; }
.decor-badge img { height: 15px; width: auto; vertical-align: middle; }
.seat-badge { position: absolute; bottom: -2px; inset-inline-end: -2px; z-index: 3; font-size: 12px; line-height: 1; }
.seat-badge img { height: 16px; width: auto; }
/* فقاعة الدردشة المُشتراة */
.fs-msg.has-bubble .fs-msgtext, .fs-msgtext[style*="background"] { padding: 4px 10px; border-radius: 12px; color: #fff; }
/* رقعة لون (متجر ألوان الأسماء/الفقاعات) */
.cosm-swatch { display: inline-block; width: 46px; height: 46px; border-radius: 12px; border: 2px solid rgba(255,255,255,.25); }
/* مؤثّر دخول تجميليّ في الغرفة */
.cosm-entrance { position: absolute; inset-inline: 0; top: 34%; z-index: 40; display: flex; justify-content: center; pointer-events: none; animation: cosmEnt 6s ease both; }
.cosm-ent-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; background: rgba(10,6,30,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(232,121,249,.4); border-radius: 18px; padding: 12px 20px; box-shadow: 0 10px 40px rgba(232,121,249,.4); }
.cosm-ent-vis { width: 120px; height: 90px; object-fit: contain; }
.cosm-ent-txt { color: #fff; font-weight: 800; font-size: 14px; text-align: center; }
.cosm-ent-txt span { display: block; font-size: 11px; color: var(--pink); font-weight: 700; }
@keyframes cosmEnt { 0% { opacity: 0; transform: translateY(20px) scale(.9); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-14px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .cosm-entrance { animation: none; } }

/* بوّابة صوت الغرفة على iOS (تظهر فقط إن حجب المتصفّح التشغيل التلقائي للصوت) */
.audio-gate { position: absolute; top: calc(env(safe-area-inset-top) + 150px); left: 50%; transform: translateX(-50%); z-index: 60;
  border: none; border-radius: 999px; padding: 10px 18px; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--pink)); box-shadow: 0 8px 26px rgba(124,58,237,.55); animation: livePulse 1.8s ease-in-out infinite; }

/* ==================== 🎥 شاشة إنشاء البثّ (معاينة كاميرا حيّة كـ Xena) ==================== */
.golive { position: absolute; inset: 0; display: flex; flex-direction: column; background: #05030f; z-index: 5; }
.gl-preview { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #0a0618; }
#glVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #0a0618; transition: opacity .2s; }
.gl-cover-layer { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; pointer-events: none; }
.gl-cover-layer.shown { opacity: .5; }
.gl-permask { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; background: radial-gradient(120% 80% at 50% 30%, #241a54, #0a0618); }
.gl-permask.hidden { display: none; }
.gl-permask-emoji { font-size: 60px; opacity: .8; }
.gl-permask .btn { padding: 12px 28px; }
.gl-back { position: absolute; top: calc(env(safe-area-inset-top) + 10px); inset-inline-start: 12px; z-index: 4; background: rgba(0,0,0,.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gl-toolbar { position: absolute; inset-inline-end: 12px; top: calc(env(safe-area-inset-top) + 10px); z-index: 4; display: flex; flex-direction: column; gap: 10px; }
.gl-tool { width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 20px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.gl-tool.on { background: linear-gradient(135deg, var(--violet), var(--violet2)); }
.gl-tool:active { transform: scale(.92); }
.gl-form { flex: 0 0 auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(10,6,24,0), #0a0618 18%); }
.gl-form .field { margin-bottom: 10px; }
.gl-start { margin-top: 6px; padding: 15px; font-size: 16px; font-weight: 800; }

/* ==================== 🏠 الرئيسيّة الجديدة (Home) — شبكة بثّ فاخرة داكنة ==================== */
.home { position: absolute; inset: 0; display: flex; flex-direction: column; background:
  radial-gradient(120% 60% at 50% -8%, #241247 0%, #0c0820 42%, #060412 100%); z-index: 5; }

/* --- الشريط العلويّ (تبويبات + أيقونات) — يحترم المساحة الآمنة أعلى iPhone --- */
.home-top { flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 8px;
  background: linear-gradient(180deg, rgba(10,6,26,.96), rgba(10,6,26,.62) 70%, rgba(10,6,26,0));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: relative; z-index: 6; }
.home-tabs { display: flex; align-items: flex-end; gap: 4px; flex: 1 1 auto; min-width: 0; }
.home-tab { position: relative; border: none; background: none; color: var(--muted2); font-family: inherit;
  font-size: 18px; font-weight: 800; padding: 6px 12px 10px; cursor: pointer; letter-spacing: .2px;
  transition: color .2s ease, transform .2s ease; }
.home-tab span { position: relative; z-index: 1; }
.home-tab.active { color: #fff; }
.home-tab .home-tab-glow { position: absolute; inset-inline: 10px; bottom: 2px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--violet), var(--pink)); opacity: 0; transform: scaleX(.3);
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 0 10px rgba(232,121,249,.9), 0 0 20px rgba(124,58,237,.7); }
.home-tab.active .home-tab-glow { opacity: 1; transform: scaleX(1); }
.home-tab:not(.active):active { transform: scale(.94); }
.home-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.home-ic { position: relative; width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.06); color: #eae4ff; display: grid; place-items: center; cursor: pointer;
  transition: background .2s ease, transform .12s ease; }
.home-ic:active { transform: scale(.9); }
.home-ic:hover { background: rgba(255,255,255,.12); }
.home-avbtn { padding: 0; background: none; overflow: visible; }
.home-avbtn .avatar { box-shadow: 0 0 0 2px rgba(232,121,249,.55); }
.home-dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: #ff3b6b; border: 2px solid #0c0820; }

/* --- منطقة التمرير (بانر + شبكة) — تمرير داخليّ 60fps فوق المساحة الآمنة السفليّة --- */
.home-scroll { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain; padding: 4px 0 calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px);
  scrollbar-width: none; }
.home-scroll::-webkit-scrollbar { width: 0; }

/* --- البانر (carousel) --- */
.home-banner { position: relative; margin: 8px 12px 4px; border-radius: 20px; overflow: hidden;
  aspect-ratio: 40 / 17; background: #17102f; box-shadow: 0 12px 34px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.05); }
.home-banner.hidden { display: none; }
.hb-track { position: absolute; inset: 0; }
.hb-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; cursor: pointer; }
.hb-slide.on { opacity: 1; }
.hb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.hb-slide.ld .hb-img { opacity: 1; }
.hb-skel { position: absolute; inset: 0; background: linear-gradient(100deg, #1b1338 30%, #2a1f52 50%, #1b1338 70%);
  background-size: 200% 100%; animation: hbShimmer 1.3s linear infinite; }
.hb-cap { position: absolute; inset-inline: 0; bottom: 0; padding: 22px 16px 12px; color: #fff; font-weight: 800; font-size: 15px;
  background: linear-gradient(180deg, transparent, rgba(6,4,16,.82)); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.hb-dots { position: absolute; inset-inline: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.hb-dots i { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.4); transition: width .3s ease, background .3s ease; }
.hb-dots i.on { width: 18px; background: #fff; }
@keyframes hbShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- شبكة البطاقات بعمودين --- */
.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 8px 12px; align-content: start; }
.lc { position: relative; border-radius: 18px; overflow: hidden; cursor: pointer; background: #150e2e;
  box-shadow: 0 10px 26px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,255,255,.05);
  content-visibility: auto; contain-intrinsic-size: 210px; transition: transform .16s ease, box-shadow .2s ease; }
.lc:active { transform: scale(.975); }
.lc.vip { box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 0 0 1.5px rgba(255,210,120,.65); }
.lc.pinned::after { content: '📌'; position: absolute; top: 6px; inset-inline-start: 6px; font-size: 12px; z-index: 4;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.lc-cover { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #100a24; }
.lc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: 0; transition: opacity .45s ease; transform: translateZ(0); }
.lc.img-ok .lc-img { opacity: 1; }
.lc.img-ok .lc-skel, .lc.img-err .lc-skel { opacity: 0; }
.lc-skel { position: absolute; inset: 0; background: linear-gradient(100deg, #1a1236 30%, #2a1f52 50%, #1a1236 70%);
  background-size: 200% 100%; animation: hbShimmer 1.3s linear infinite; transition: opacity .3s ease; }
.lc-art { position: absolute; inset: 0; }
.lc-art-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; opacity: .32; }
.lc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,4,16,.35) 0%, transparent 34%, transparent 55%, rgba(6,4,16,.72) 100%); }
/* شارات علويّة */
.lc-top { position: absolute; top: 7px; inset-inline-end: 7px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; z-index: 3; max-width: 88%; }
.lc-live { display: inline-flex; align-items: center; gap: 4px; background: #ff2b52; color: #fff; font-size: 9.5px; font-weight: 800;
  padding: 3px 7px; border-radius: 999px; box-shadow: 0 2px 8px rgba(255,43,82,.5); letter-spacing: .3px; }
.lc-live i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: lcPulse 1.3s ease-in-out infinite; }
@keyframes lcPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.lc-pk { background: linear-gradient(135deg, #f43f5e, #7c3aed); color: #fff; font-size: 9.5px; font-weight: 800; padding: 3px 7px; border-radius: 999px; box-shadow: 0 2px 8px rgba(124,58,237,.5); }
.lc-hot { background: linear-gradient(135deg, #ff8a1a, #ff3b6b); color: #fff; font-size: 9.5px; font-weight: 800; padding: 3px 7px; border-radius: 999px; }
.lc-feat { background: rgba(10,6,24,.6); color: #ffd75a; font-size: 11px; padding: 2px 6px; border-radius: 999px; backdrop-filter: blur(4px); }
.lc-viewers { position: absolute; bottom: 7px; inset-inline-start: 8px; z-index: 3; display: inline-flex; align-items: center; gap: 3px;
  color: #fff; font-size: 11px; font-weight: 800; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.lc-viewers b { font-weight: 800; }
.lc-mng { position: absolute; bottom: 5px; inset-inline-end: 5px; z-index: 4; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(10,6,24,.55); color: #fff; font-size: 16px; line-height: 1; display: grid; place-items: center;
  backdrop-filter: blur(4px); cursor: pointer; }
.lc-mng:active { transform: scale(.9); }
/* ذيل البطاقة */
.lc-foot { display: flex; align-items: center; gap: 8px; padding: 8px 9px 9px; }
.lc-hostav { flex: 0 0 auto; }
.lc-meta { min-width: 0; flex: 1 1 auto; }
.lc-title { font-size: 12.5px; font-weight: 700; color: #f3efff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-hostrow { display: flex; align-items: center; gap: 4px; margin-top: 2px; min-width: 0; }
.lc-flag { flex: 0 0 auto; display: inline-flex; }
.lc-flag .flag-img { width: 15px; height: 11px; border-radius: 2px; object-fit: cover; }
.lc-hostname { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.lc-hostname .decor-name { font-size: 10.5px; }
.lc-hostname .decor-vip, .lc-hostname .decor-badge { display: none; }
.lc-lvl { flex: 0 0 auto; font-size: 8.5px; font-weight: 800; padding: 1.5px 5px; border-radius: 999px; color: #1a1030; }
.lv-bronze { background: linear-gradient(135deg, #cd8c52, #a3672f); color: #fff; }
.lv-silver { background: linear-gradient(135deg, #d7dbe6, #9aa2b4); }
.lv-gold { background: linear-gradient(135deg, #ffdf6b, #f0a91d); }
.lv-plat { background: linear-gradient(135deg, #b6f0e6, #5fd0c0); }
.lv-diamond { background: linear-gradient(135deg, #8fe3ff, #4aa8ff); color: #fff; }
.lv-royal { background: linear-gradient(135deg, #ff9bf0, #b23bff); color: #fff; }

/* --- حالات فارغة + زرّ عائم --- */
.home-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted); }
.home-empty-emoji { font-size: 54px; opacity: .8; margin-bottom: 8px; }
.home-empty h3 { margin: 0 0 6px; color: #fff; font-size: 17px; }
.home-empty-go { margin-top: 16px; }
.home-fab { position: absolute; inset-inline-end: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); z-index: 12;
  width: 56px; height: 56px; border-radius: 50%; border: none; color: #fff; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--pink)); box-shadow: 0 10px 26px rgba(124,58,237,.6);
  cursor: pointer; transition: transform .14s ease; }
.home-fab:active { transform: scale(.9); }

/* هياكل تحميل الذيل (skeleton) */
.lc.sk .lc-foot { display: block; }
.sk-line { height: 9px; border-radius: 6px; margin: 4px 0; background: linear-gradient(100deg, #1a1236 30%, #2a1f52 50%, #1a1236 70%);
  background-size: 200% 100%; animation: hbShimmer 1.3s linear infinite; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; }

/* تعطيل الأنيميشن لمن يفضّل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .hb-slide, .lc-img, .home-tab, .home-tab-glow { transition: none !important; }
  .hb-skel, .lc-skel, .sk-line, .lc-live i { animation: none !important; }
}

/* ==================== 🎁 لوحة الهدايا الفاخرة (Xena-style) ==================== */
.giftpanel-sheet { padding-top: 14px; }
.gp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.gp-head h3 { margin: 0; }
.gp-bal { font-size: 13px; font-weight: 800; color: #ffd75a; background: rgba(255,207,90,.12); border: 1px solid rgba(255,207,90,.3); padding: 5px 12px; border-radius: 999px; }
.gp-recips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.gp-recips::-webkit-scrollbar { height: 0; }
.gp-recip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 60px; border: none; background: none; color: var(--muted); font-size: 10px; cursor: pointer; opacity: .6; transition: opacity .15s, transform .15s; }
.gp-recip span { max-width: 58px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-recip.active { opacity: 1; color: #fff; transform: translateY(-2px); }
.gp-recip.active .avatar { box-shadow: 0 0 0 2px var(--violet), 0 0 12px rgba(124,58,237,.7); }
.gp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 44vh; overflow-y: auto; padding: 4px 2px; scrollbar-width: none; }
.gp-grid::-webkit-scrollbar { width: 0; }
.gp-tile { position: relative; border: 1.5px solid rgba(255,255,255,.08); background: rgba(20,14,44,.55); border-radius: 14px; padding: 10px 4px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; transition: transform .12s ease, border-color .15s ease, background .15s ease; }
.gp-tile:active { transform: scale(.93); }
.gp-ge { font-size: 30px; line-height: 1; height: 34px; display: grid; place-items: center; }
.gp-ge img { width: 34px; height: 34px; object-fit: contain; }
.gp-gn { font-size: 9.5px; color: var(--muted2); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-gc { font-size: 10px; font-weight: 800; color: #ffd75a; }
.gp-tile.rar-rare { border-color: rgba(91,139,255,.4); }
.gp-tile.rar-epic { border-color: rgba(168,85,247,.45); }
.gp-tile.rar-legendary { border-color: rgba(255,207,90,.5); }
.gp-tile.sel { border-color: var(--pink); background: linear-gradient(160deg, rgba(124,58,237,.4), rgba(232,121,249,.25)); box-shadow: 0 6px 20px rgba(232,121,249,.4); transform: translateY(-2px); }
.gp-tile.sel .gp-ge { animation: gpBob .9s ease-in-out infinite; }
@keyframes gpBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.gp-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.gp-qtys { display: flex; gap: 5px; flex: 1 1 auto; }
.gp-qty { flex: 1 1 0; min-width: 0; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: var(--muted); font-weight: 800; font-size: 12px; padding: 9px 2px; border-radius: 12px; cursor: pointer; transition: all .12s ease; }
.gp-qty.active { background: linear-gradient(135deg, var(--violet), var(--violet2)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(124,58,237,.5); }
.gp-send { flex: 0 0 auto; min-width: 108px; border: none; border-radius: 14px; padding: 11px 16px; font-weight: 800; font-size: 14px; color: #fff; cursor: pointer; background: linear-gradient(135deg, var(--violet), var(--pink)); box-shadow: 0 6px 18px rgba(232,121,249,.5); transition: transform .12s ease, opacity .15s ease; }
.gp-send:active { transform: scale(.95); }
.gp-send:disabled { opacity: .45; box-shadow: none; }

/* combo badge on the flying gift + premium full-screen burst */
.fg-combo { font-size: 20px; font-weight: 900; color: #ffd75a; text-shadow: 0 2px 8px rgba(0,0,0,.6); margin-inline-start: 4px; animation: comboPop .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes comboPop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.gift-fullscreen { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; pointer-events: none; }
.gift-fullscreen .gfx-icon { font-size: 128px; filter: drop-shadow(0 8px 30px rgba(0,0,0,.6)); animation: gfxIn 2.4s cubic-bezier(.15,.85,.3,1) forwards; }
.gift-fullscreen .gfx-combo { position: absolute; bottom: 32%; font-size: 44px; font-weight: 900; color: #ffd75a; text-shadow: 0 3px 14px rgba(0,0,0,.7); animation: comboPop .6s cubic-bezier(.2,1.6,.4,1) both; }
.gift-fullscreen .gfx-rays { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255,207,90,.5), transparent 12%, rgba(255,207,90,.5) 25%, transparent 37%, rgba(255,207,90,.5) 50%, transparent 62%, rgba(255,207,90,.5) 75%, transparent 87%, rgba(255,207,90,.5)); mask: radial-gradient(circle, transparent 44%, #000 46%); -webkit-mask: radial-gradient(circle, transparent 44%, #000 46%); animation: gfxRays 2.4s linear forwards; }
@keyframes gfxIn { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 22% { transform: scale(1.12) rotate(0); opacity: 1; } 78% { transform: scale(1) rotate(0); opacity: 1; } 100% { transform: scale(1.05); opacity: 0; } }
@keyframes gfxRays { 0% { transform: scale(.4) rotate(0); opacity: 0; } 25% { opacity: .8; } 100% { transform: scale(1.3) rotate(180deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gift-fullscreen .gfx-rays, .gp-tile.sel .gp-ge, .fg-combo { animation: none !important; } }

/* ==================== ⚔️ شاشة PK الفاخرة ==================== */
.pkbar { position: absolute; top: 56px; inset-inline: 10px; z-index: 6; background: linear-gradient(180deg, rgba(12,8,28,.72), rgba(12,8,28,.4)); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 8px 10px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.pk-vs { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.pk-side { display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; position: relative; }
.pk-side.b { flex-direction: row-reverse; text-align: end; }
.pk-side .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.pk-side.a.lead .avatar { box-shadow: 0 0 0 2px #ff8a5b, 0 0 12px rgba(255,138,91,.8); }
.pk-side.b.lead .avatar { box-shadow: 0 0 0 2px #22d3ee, 0 0 12px rgba(34,211,238,.8); }
.pk-side-meta { min-width: 0; display: flex; flex-direction: column; }
.pk-name { font-size: 10.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 84px; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.pk-score { font-size: 15px; font-weight: 900; color: #ffd75a; line-height: 1.1; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pk-crown { position: absolute; top: -14px; inset-inline-start: 6px; font-size: 15px; animation: pkCrown 1.2s ease-in-out infinite; }
.pk-side.b .pk-crown { inset-inline-start: auto; inset-inline-end: 6px; }
@keyframes pkCrown { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-3px) rotate(6deg); } }
.pk-mid { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pk-vs-badge { font-size: 15px; font-weight: 900; font-style: italic; color: #fff; background: linear-gradient(135deg, #ff5470, #7c3aed); padding: 1px 9px; border-radius: 8px; box-shadow: 0 3px 10px rgba(124,58,237,.6); }
.pk-timer { font-size: 10px; font-weight: 800; color: #fff; background: rgba(0,0,0,.5); padding: 1px 8px; border-radius: 999px; }
.pk-track { position: relative; display: flex; height: 14px; border-radius: 999px; overflow: visible; box-shadow: inset 0 1px 4px rgba(0,0,0,.5); }
.pk-track .pk-a { background: linear-gradient(90deg, #ff2b52, #ff8a5b); transition: width .6s cubic-bezier(.4,0,.2,1); border-radius: 999px 0 0 999px; }
.pk-track .pk-b { background: linear-gradient(90deg, #22d3ee, #5b8bff); transition: width .6s cubic-bezier(.4,0,.2,1); border-radius: 0 999px 999px 0; }
.pk-flame { position: absolute; top: 50%; transform: translateY(-50%); font-size: 18px; filter: drop-shadow(0 0 6px rgba(255,138,91,.9)); transition: inset-inline-start .6s cubic-bezier(.4,0,.2,1); animation: pkFlame .5s ease-in-out infinite alternate; }
@keyframes pkFlame { from { transform: translateY(-50%) scale(1); } to { transform: translateY(-58%) scale(1.18); } }

.pk-result { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.pk-result-card { text-align: center; padding: 22px 30px; border-radius: 24px; background: linear-gradient(160deg, rgba(124,58,237,.95), rgba(232,121,249,.85)); border: 1.5px solid rgba(255,255,255,.4); box-shadow: 0 18px 50px rgba(124,58,237,.7); color: #fff; animation: pkResIn .5s cubic-bezier(.2,1.4,.4,1) both; }
.pk-result.draw .pk-result-card { background: linear-gradient(160deg, rgba(90,110,140,.95), rgba(140,160,190,.85)); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.pk-result-crown { font-size: 56px; animation: pkCrown 1s ease-in-out infinite; }
.pk-result-title { font-size: 20px; font-weight: 900; margin-top: 4px; }
.pk-result-name { font-size: 16px; font-weight: 800; color: #ffe58a; margin-top: 2px; }
.pk-result-score { font-size: 13px; opacity: .9; margin-top: 6px; }
@keyframes pkResIn { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.pk-confetti { position: absolute; top: -10px; inset-inline-start: var(--x); width: 8px; height: 12px; border-radius: 2px; background: hsl(calc(var(--i) * 47), 90%, 62%); animation: pkConfetti 3.4s linear forwards; animation-delay: calc(var(--i) * 60ms); }
@keyframes pkConfetti { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(120vh) rotate(720deg); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .pk-flame, .pk-crown, .pk-confetti, .pk-result-crown { animation: none !important; } }

/* ==================== 👑 دخول VIP الملكيّ (streak + particles) ==================== */
.fs-entrance { position: relative; overflow: visible; }
.fs-entrance .fe-streak { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: 0; pointer-events: none; }
.fs-entrance .fe-streak::before { content: ''; position: absolute; top: 0; bottom: 0; width: 42%; inset-inline-start: -50%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: feStreak 1.5s ease-in-out .25s 1; }
.fs-entrance > .vipframe, .fs-entrance > .avatar, .fs-entrance .fe-txt, .fs-entrance .fe-vip { position: relative; z-index: 1; }
@keyframes feStreak { 0% { inset-inline-start: -50%; } 100% { inset-inline-start: 130%; } }
.fs-entrance.gold { box-shadow: 0 6px 26px rgba(255,157,26,.55), 0 0 0 1px rgba(255,207,90,.5) inset; }
.fs-entrance.diamond { box-shadow: 0 8px 30px rgba(124,58,237,.6), 0 0 0 1px rgba(160,240,255,.5) inset; }
.fs-entrance.vip-3 { animation: entranceSlide 4.6s ease-out forwards, feGlow 1.4s ease-in-out infinite alternate; }
@keyframes feGlow { from { filter: brightness(1); } to { filter: brightness(1.14); } }
.fe-particle { position: absolute; top: 50%; inset-inline-start: 34px; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #fff, #ffd75a); box-shadow: 0 0 8px #ffd75a; z-index: 0; pointer-events: none;
  animation: feParticle 1.5s ease-out forwards; animation-delay: calc(.2s + var(--i) * .12s); opacity: 0; }
.fs-entrance.diamond .fe-particle { background: radial-gradient(circle, #fff, #a0f0ff); box-shadow: 0 0 8px #a0f0ff; }
@keyframes feParticle {
  0% { opacity: 0; transform: translate(0, -50%) scale(.4); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(60px + var(--i) * 14px), calc(-50% + (var(--i) - 3) * 10px)) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .fe-streak::before, .fe-particle, .fs-entrance.vip-3 { animation: none !important; } }

/* ==================== 🛍️ متجر المزيّنات — لمسة فاخرة ==================== */
.store-bal { display: flex; gap: 10px; margin-bottom: 12px; }
.store-pill { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 800; padding: 10px; border-radius: 14px; }
.store-pill.coin { color: #ffd75a; background: linear-gradient(135deg, rgba(255,207,90,.16), rgba(255,157,26,.08)); border: 1px solid rgba(255,207,90,.3); }
.store-pill.dia { color: #7fe3ff; background: linear-gradient(135deg, rgba(127,227,255,.16), rgba(91,139,255,.08)); border: 1px solid rgba(127,227,255,.3); }
/* بريق متحرّك لعناصر النُدرة العالية (أسطوري/ملحمي) */
.car-store-item.rar-legendary, .car-store-item.rar-mythic { position: relative; overflow: hidden; }
.car-store-item.rar-legendary::before, .car-store-item.rar-mythic::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; inset-inline-start: -60%;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--rar) 55%, #fff), transparent);
  transform: skewX(-18deg); animation: storeShimmer 3.4s ease-in-out infinite; pointer-events: none; z-index: 1; }
.car-store-item.rar-legendary > *, .car-store-item.rar-mythic > * { position: relative; z-index: 2; }
@keyframes storeShimmer { 0% { inset-inline-start: -60%; } 45%,100% { inset-inline-start: 160%; } }
@media (prefers-reduced-motion: reduce) { .car-store-item.rar-legendary::before, .car-store-item.rar-mythic::before { animation: none !important; } }

/* ==================== 👤 البروفايل — معاملة VIP فاخرة ==================== */
.prof.vip2 .prof-av .avatar, .prof.vip2 .prof-av .decor-frame .avatar { box-shadow: 0 0 0 3px #ffb347, 0 0 22px rgba(255,180,71,.7), 0 6px 20px rgba(0,0,0,.55); }
.prof.vip3 .prof-av .avatar, .prof.vip3 .prof-av .decor-frame .avatar { box-shadow: 0 0 0 3px #a0f0ff, 0 0 26px rgba(124,58,237,.85), 0 6px 20px rgba(0,0,0,.55); }
/* بريق قطريّ متحرّك على الغلاف لأصحاب VIP */
.prof.vip2 .prof-cover, .prof.vip3 .prof-cover { overflow: hidden; }
.prof.vip2 .prof-cover::before, .prof.vip3 .prof-cover::before {
  content: ''; position: absolute; top: -60%; bottom: -60%; width: 34%; inset-inline-start: -50%; z-index: 1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); transform: skewX(-16deg);
  animation: profSheen 5s ease-in-out infinite; pointer-events: none; }
@keyframes profSheen { 0% { inset-inline-start: -50%; } 40%,100% { inset-inline-start: 150%; } }
/* اسم متوهّج لـ VIP3 (نيون ذهبيّ/ماسيّ متدرّج) */
.prof.vip3 .prof-name { background: linear-gradient(90deg, #fff, #a0f0ff, #e879f9, #ffd75a, #fff); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: profName 4s linear infinite; }
@keyframes profName { to { background-position: 220% center; } }
@media (prefers-reduced-motion: reduce) { .prof-cover::before, .prof.vip3 .prof-name { animation: none !important; } }

/* ==================== ⚡ الأداء (60 FPS على iPhone) ==================== */
/* عزل تخطيط رسائل الدردشة المتكرّرة: إلحاق رسالة جديدة لا يُعيد تخطيط البقيّة. */
.fs-live .fs-msg { contain: layout style; }
/* ترقية الطبقات المتحرّكة المؤقّتة إلى مركّب GPU مستقلّ (transform/opacity فقط) — بلا اهتزاز. */
.fs-giftfly, .gift-fullscreen, .fs-entrance, .car-entrance, .cosm-entrance,
.float-heart, .pk-result, .pk-flame, .hb-slide { will-change: transform, opacity; }
/* تمرير بقوّة دفع أصيلة على iOS لكلّ المناطق القابلة للتمرير. */
.home-scroll, .fs-live .fs-chat, .gp-grid, .sheet, .screen { -webkit-overflow-scrolling: touch; }
/* دفع الفيديو والأغلفة إلى طبقة GPU لتفادي إعادة الطلاء أثناء التمرير. */
.fs-bg #stageVideo, .lc-img, .hb-img { transform: translateZ(0); backface-visibility: hidden; }
/* تلميح المتصفّح أنّ شبكات البطاقات ستتغيّر ارتفاعاً أثناء التمرير اللا نهائيّ. */
.home-grid { contain: layout style; }

/* ==================== 🏠 الرئيسيّة — لمسات دخول فاخرة ==================== */
/* ظهور تدريجيّ ناعم للبطاقات (GPU: transform/opacity) — يعمل عند أوّل رسم وعند التمرير اللا نهائيّ. */
.home-grid .lc { animation: lcIn .42s cubic-bezier(.2,.7,.3,1) both; }
@keyframes lcIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
/* تكبير بطيء (Ken Burns) للشريحة الفعّالة في البانر — إحساس سينمائيّ. */
.hb-slide.on.ld .hb-img { animation: hbKen 8s ease-out both; }
@keyframes hbKen { from { transform: scale(1.001); } to { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .home-grid .lc, .hb-slide.on.ld .hb-img { animation: none !important; } }

/* ==================== 🎥 رأس الغرفة — لمسة Xena ==================== */
.fs-hostcard { background: linear-gradient(135deg, rgba(22,15,48,.78), rgba(22,15,48,.5)); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.fs-hostcard:active { transform: scale(.98); }
.fs-stat { background: rgba(10,6,24,.5); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.fs-stat b { color: #ffd75a; }
.fs-livetag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 900; letter-spacing: .5px; color: #fff; background: linear-gradient(135deg, #ff2b52, #ff5470); padding: 4px 9px; border-radius: 999px; box-shadow: 0 3px 12px rgba(255,43,82,.55); align-self: flex-start; }
.fs-livetag i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: liveTagPulse 1.2s ease-in-out infinite; }
@keyframes liveTagPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .fs-livetag i { animation: none !important; } }

/* ==================== 🪙 شحن الكوينز — بطاقات باقات فاخرة ==================== */
.coin-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.coin-pack { position: relative; border: 1.5px solid rgba(255,255,255,.1); background: linear-gradient(165deg, rgba(30,20,60,.8), rgba(18,12,38,.7)); border-radius: 16px; padding: 16px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; overflow: hidden; transition: transform .12s ease, border-color .15s ease; }
.coin-pack:active { transform: scale(.95); }
.coin-pack-ic { font-size: 30px; filter: drop-shadow(0 3px 6px rgba(255,180,60,.5)); }
.coin-pack-amt { font-size: 15px; font-weight: 900; color: #ffd75a; }
.coin-pack-price { font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--violet), var(--pink)); padding: 4px 14px; border-radius: 999px; margin-top: 4px; box-shadow: 0 3px 10px rgba(232,121,249,.5); }
.coin-pack.best { border-color: #ffcf5a; background: linear-gradient(165deg, rgba(60,42,20,.85), rgba(30,20,10,.75)); box-shadow: 0 8px 24px rgba(255,180,60,.35); }
.coin-pack.best::before { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; inset-inline-start: -60%; background: linear-gradient(100deg, transparent, rgba(255,223,120,.5), transparent); transform: skewX(-18deg); animation: storeShimmer 3.2s ease-in-out infinite; }
.coin-pack.best > * { position: relative; z-index: 1; }
.coin-pack-tag { position: absolute; top: 0; inset-inline-end: 0; background: linear-gradient(135deg, #ff8a1a, #ff3b6b); color: #fff; font-size: 8.5px; font-weight: 900; padding: 3px 8px; border-radius: 0 14px 0 10px; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .coin-pack.best::before { animation: none !important; } }

/* ==================== 🎙️ شبكة المقاعد — لمسة Xena ==================== */
/* المقعد الفارغ: نبض لطيف يدعو للصعود + توهّج عند اللمس. */
.fs-seat.vacant .fs-seat-slot { transition: transform .15s ease, border-color .2s ease, background .2s ease; animation: seatBreathe 2.8s ease-in-out infinite; }
.fs-seat.vacant:not(.locked):active .fs-seat-slot { transform: scale(.9); border-color: var(--violet); background: rgba(124,58,237,.2); }
@keyframes seatBreathe { 0%,100% { border-color: rgba(255,255,255,.2); } 50% { border-color: rgba(124,58,237,.55); } }
.fs-seat.vacant.locked .fs-seat-slot { animation: none; border-color: rgba(255,120,120,.35); }
/* المتحدّث: هالة خضراء نابضة حول الأفاتار (بدل الإطار الثابت). */
.fs-seat-av { border-radius: 50%; }
.fs-seat.filled.speaking .fs-seat-av::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(52,211,153,.9); z-index: 2; pointer-events: none; animation: seatSpeak 1.1s ease-out infinite; }
@keyframes seatSpeak { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
.fs-seat.filled.speaking .fs-onmic { background: linear-gradient(135deg, #34d399, #10b981); animation: seatMic .8s ease-in-out infinite; }
@keyframes seatMic { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .fs-seat.vacant .fs-seat-slot, .fs-seat.filled.speaking .fs-seat-av::before, .fs-seat.filled.speaking .fs-onmic { animation: none !important; } }

/* ==================== 🧭 الشريط السفلي — لمسة فاخرة ==================== */
.tab { transition: color .2s ease; }
.tab .tab-ic { transition: transform .18s cubic-bezier(.2,1.4,.4,1), filter .2s ease; }
.tab.active .tab-ic { transform: translateY(-1px) scale(1.14); }
/* مؤشّر متوهّج فوق التبويب النشط */
.tab.active:not(.tab-go)::before { content: ''; position: absolute; top: 0; inset-inline-start: 50%; transform: translateX(-50%); width: 22px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--violet), var(--pink)); box-shadow: 0 0 10px rgba(232,121,249,.9); }
.tab:not(.active):active .tab-ic { transform: scale(.88); }
/* زرّ البثّ المركزيّ: هالة نابضة + ضغط */
.go-plus { position: relative; transition: transform .14s ease; }
.tab-go:active .go-plus { transform: scale(.9); }
.go-plus::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(232,121,249,.55); animation: goPulse 2s ease-out infinite; pointer-events: none; }
@keyframes goPulse { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .go-plus::after { animation: none !important; } }

/* ==================== ✨ شاشة الدخول/الافتتاحية — فخامة أوّل انطباع ==================== */
.splash { position: relative; overflow: hidden; }
.splash::before, .splash::after { content: ''; position: absolute; border-radius: 50%; filter: blur(64px); opacity: .5; pointer-events: none; z-index: 0; animation: orbFloat 9s ease-in-out infinite; }
.splash::before { width: 240px; height: 240px; background: radial-gradient(circle, #7c3aed, transparent 70%); top: -50px; inset-inline-start: -70px; }
.splash::after { width: 270px; height: 270px; background: radial-gradient(circle, #e879f9, transparent 70%); bottom: -70px; inset-inline-end: -80px; animation-delay: -4.5s; }
.splash > * { position: relative; z-index: 1; }
.splash .logo { background-size: 220% auto; animation: logoShimmer 5s linear infinite, logoIn .8s cubic-bezier(.2,.8,.3,1) both; }
@keyframes logoShimmer { to { background-position: 220% center; } }
@keyframes logoIn { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
.splash .splash-sub { animation: logoIn .8s ease .1s both; }
.splash .auth-card { border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 60px rgba(124,58,237,.28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: cardIn .6s ease .18s both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes orbFloat { 0%,100% { transform: translate(0,0); } 50% { transform: translate(24px,-26px); } }
@media (prefers-reduced-motion: reduce) { .splash::before, .splash::after, .splash .logo, .splash .splash-sub, .splash .auth-card { animation: none !important; } }

/* ==================== ⌨️ لوحة مفاتيح iPhone: الإدخال + الدردشة فوقها دائماً ==================== */
/* --kb = ارتفاع لوحة المفاتيح (يُحدَّث ديناميكيّاً من VisualViewport). نرفع شريط الإدخال ومنطقة
   الدردشة فقط عبر transform (لا نُحرّك/نُقلّص الغرفة → لا فراغ أبيض ولا قفز)، بحركة ناعمة 250ms،
   محايدة للاتجاه (تدعم RTL)، وتحترم المساحة الآمنة على كل موديلات iPhone (Notch/Dynamic Island). */
.fs-live { --kb: 0px; }
.fs-live .fs-bar,
.fs-live .fs-lowerleft {
  transform: translateY(calc(-1 * var(--kb, 0px)));
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
/* عند فتح اللوحة: يلغى الحشو السفليّ للمساحة الآمنة (اللوحة تغطّي مؤشّر المنزل)، فلا فجوة زائدة. */
.fs-live.kb-open .fs-bar { padding-bottom: 9px; }
