/* ==========================================================================
   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; 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: absolute; top: 0; inset-inline: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 0; }
.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; 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)); }

.fs-chat { position: absolute; bottom: 66px; inset-inline-start: 10px; width: 72%; max-width: 340px; max-height: 40%; z-index: 4; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 6px; -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%); mask-image: linear-gradient(180deg, transparent, #000 18%); }
.fs-chat::-webkit-scrollbar { width: 0; }
.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: absolute; bottom: 0; inset-inline: 0; z-index: 6; }

.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; }
}
