/* =========================
   THEME & TOKENS  (Horror Grey)
========================= */
:root{
  /* رماديات داكنة */
  --bg:#0a0a0a;
  --panel:#0f1012;
  --card:#111214;
  --line:#1c1d20;

  --text:#e5e5e5;         /* نص فاتح واضح */
  --muted:#9a9a9a;

  /* إلغاء ألوان السيان/البنفسجي وتعويضها بتونات رمادية */
  --brand:#bdbdbd;        /* بديل محايد */
  --brand-2:#8e8e8e;
  --brand-3:#6f6f6f;

  --ok:#22c55e;           /* نبقي ألوان الحالة كما هي عند الحاجة فقط */
  --warn:#f59e0b;
  --danger:#ef4444;

  /* ظلال أثقل تناسب طابع الرعب */
  --shadow-lg: 0 18px 40px rgba(0,0,0,.55);
  --shadow-md: 0 10px 26px rgba(0,0,0,.5);
}

/* =========================
   BASE
========================= */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font-family:'Cairo',system-ui,Segoe UI,Roboto,Arial;
  /* خلفية فيلمية قاتمة بدون ألوان */
  background:
    radial-gradient(1400px 800px at 80% -120px, rgba(255,255,255,.03), transparent 60%),
    radial-gradient(1000px 600px at 10% 120%, rgba(255,255,255,.02), transparent 60%),
    linear-gradient(180deg,#0a0a0a 0%,#0b0b0b 60%,#0a0a0a 100%);
}

/* =========================
   TYPOGRAPHY
========================= */
h1, h2, h3 {
  font-family: 'Cinzel Decorative','Cairo',serif;
  letter-spacing: 1px;
}

/* حاوية المحتوى الرئيسية + دفع الفوتر للأسفل */
.wrap{max-width:1200px;margin:0 auto;padding:16px}
main.wrap{min-height:calc(100vh - 160px)} /* يضمن استغلال المساحة السفلية */

/* =========================
   TOP BAR
========================= */
.topbar{
  position:sticky;top:0;z-index:10;
  background:rgba(10,10,10,.8);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav{display:flex;align-items:center;justify-content:space-between;padding:12px 0}

/* ===== الشعار النصي أعلى اليمين ===== */
.brand{
  position:relative;
  margin:0;
  inline-size:240px;
  block-size:64px;
  background-image:url('/images/WiseGroup-horror.png'); /* <-- عدّل المسار */
  background-repeat:no-repeat;
  background-position:right center;
  background-size:contain;
  color:transparent;
  text-indent:-9999px;
  overflow:hidden;
}
.logoPulse{
  width:10px;height:10px;border-radius:50%;
  background:#4d4d4d;
  box-shadow:0 0 0 0 rgba(255,255,255,.08);
  animation:pulse 2s infinite;
}
@keyframes pulse{to{box-shadow:0 0 0 18px rgba(255,255,255,0)}}

/* =========================
   LAYOUT PRIMITIVES
========================= */
.row{display:flex;align-items:center}
.ai{align-items:center}
.sb{justify-content:space-between}
.gap6{gap:6px} .gap8{gap:8px} .gap12{gap:12px}
.mt8{margin-top:8px} .mt12{margin-top:12px}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.grid3{display:grid;grid-template-columns:300px 1fr 320px;gap:12px}

.col{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:12px;box-shadow:var(--shadow-lg)}
.stack{display:flex;flex-direction:column;gap:12px}
.center{max-width:680px;margin:24px auto}
.m0{margin:0}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  box-shadow:var(--shadow-lg);
}
.h3,h3{margin:0 0 8px 0}
.hr{height:1px;background:var(--line);margin:12px 0}
.list{list-style:none;padding:0;margin:0}

/* =========================
   BUTTONS
========================= */
.btn{
  background:linear-gradient(180deg,#161719,#101113);
  border:1px solid #2a2b2e;
  color:var(--text);
  padding:10px 14px;border-radius:12px;cursor:pointer;
  transition:.2s transform,.2s opacity,.2s box-shadow,.2s border-color,.2s background;
}
.btn:hover{transform:translateY(-1px);box-shadow:var(--shadow-md)}
.btn.small{padding:6px 10px;border-radius:10px;font-size:12px}
.btn.ghost{background:transparent;border-color:#2a2b2e;color:#d0d0d0}
.btn.brand{
  background:linear-gradient(180deg,#1b1c1e,#141518);
  border-color:#3a3b3f;
  box-shadow:0 8px 24px rgba(0,0,0,.45);
}
.btn.brand:hover{border-color:#555}

/* زر رجوع عائم عام */
.back-floating{
  position:fixed;inset-inline-start:16px;inset-block-start:72px;
  z-index:11;border-radius:999px;padding:8px 14px;font-size:13px;
  background:linear-gradient(180deg,#181a1d,#121315);
  border:1px solid #2f3135;color:var(--text);
  box-shadow:var(--shadow-md);
}

/* =========================
   FORM CONTROLS
========================= */
input,textarea{
  width:100%;background:#0f1012;border:1px solid #2a2b2e;
  color:var(--text);padding:10px 12px;border-radius:12px;outline:none;transition:.2s;
}
input:focus,textarea:focus{border-color:#555;box-shadow:0 0 0 2px rgba(255,255,255,.06)}
textarea{min-height:80px;resize:vertical}

/* =========================
   AVATARS & BADGES
========================= */
.avatar{width:42px;height:42px;border-radius:50%;border:1px solid #2a2b2e;object-fit:cover;background:#121316}
.avatar.lg{width:72px;height:72px}

.badge{
  padding:2px 8px;border-radius:999px;border:1px solid #3a3b3f;
  background:linear-gradient(180deg,#141518,#121316);
  color:#d6d6d6;font-size:11px
}
.badge.owner{
  border-color:#4a4a4a;
  background:linear-gradient(180deg,#17181c,#131419);
  color:#e2e2e2;
}

/* تمييز المنشن */
.mention{
  color:#d8d8d8;
  background:rgba(255,255,255,.06);
  padding:0 6px;border-radius:999px;border:1px dashed #3e3e3e;
}

/* =========================
   EFFECTS
========================= */
.fade{animation:fade .25s ease}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}

/* =========================
   POSTS
========================= */
.post{border:1px solid var(--line);border-radius:16px;padding:12px;background:var(--card)}
.post header{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.post .owner-chip{margin-inline-start:6px}
.post img,.post video{max-width:100%;border-radius:12px;border:1px solid #2a2b2e}
.post .actions{display:flex;gap:10px;margin-top:8px}
.post .actions .btn{padding:6px 10px;font-size:12px}

.progress{
  height:10px;background:#0f1012;border:1px solid #2a2b2e;
  border-radius:999px;display:flex;align-items:center;justify-content:center;
  font-size:11px;color:#c9c9c9
}

/* =========================
   COVER & STICKERS
========================= */
.cover{
  height:160px;border-radius:16px;
  background:linear-gradient(120deg,rgba(255,255,255,.05),rgba(255,255,255,.03)), url('') center/cover;
  border:1px solid var(--line)
}
.stickers{display:flex;flex-wrap:wrap;gap:6px}
.stickers img{width:56px;height:56px;border-radius:10px;border:1px solid #2a2b2e;background:#121316;cursor:pointer}

/* =========================
   LIVE / WEEKLY BOARDS
========================= */
#liveBoard li, #weeklyBoard li{
  display:flex;align-items:center;justify-content:space-between;
  gap:8px;padding:8px 10px;border-bottom:1px solid rgba(255,255,255,.04)
}
#liveBoard li:last-child, #weeklyBoard li:last-child{border-bottom:0}

#weeklyBoard h3{display:flex;align-items:center;gap:8px}
#weeklyBoard .rank{
  width:26px;height:26px;border-radius:8px;display:inline-grid;place-items:center;
  color:#0e0e0e;font-weight:700;
  background:linear-gradient(180deg,#bfbfbf,#787878);
  border:1px solid #555;box-shadow:0 6px 16px rgba(0,0,0,.35)
}
#weeklyBoard .score{color:#e0e0e0;font-weight:700}

.owner-chip{
  font-size:10px;padding:2px 6px;border-radius:999px;
  border:1px solid #4a4a4a;
  background:linear-gradient(180deg,#17181c,#131419);
  color:#e2e2e2
}

/* =========================
   TOAST
========================= */
.toast{
  position:fixed;bottom:16px;right:16px;
  background:#121316;border:1px solid #2a2b2e;color:var(--text);
  padding:10px 14px;border-radius:12px;box-shadow:0 8px 26px rgba(0,0,0,.6);opacity:.98
}
.hidden{display:none}

/* =========================
   FOOTER
========================= */
.footer{
  border-top:1px solid var(--line);
  background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.02));
}
.footer p{
  margin:0;padding:18px;text-align:center;color:#c9c9c9;
  letter-spacing:.3px
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px){
  .grid3{grid-template-columns:1fr;gap:12px}
  .wrap{padding:12px}
  .back-floating{inset-inline-start:12px;inset-block-start:64px}
  .brand{inline-size:200px;block-size:56px}
}

/* =========================
   UTILS
========================= */
.muted{color:var(--muted)}
.tag{
  display:inline-flex;align-items:center;gap:6px;
  padding:4px 10px;border-radius:999px;font-size:12px;
  background:rgba(255,255,255,.06);border:1px solid #3e3e3e;color:#dcdcdc
}
.badge.blue{background:rgba(255,255,255,.06);border:1px solid #4a4a4a;color:#e3e3e3}

.link{color:#cfcfcf;text-decoration:none}
.link:hover{text-decoration:underline}


/* حصر ستايل الشعار داخل التوب بار فقط */
.topbar .brand{
  position:relative;
  margin:0;
  inline-size:240px;
  block-size:64px;
  background-image:url('/images/WiseGroup-horror.png'); /* <-- مسار الشعار */
  background-repeat:no-repeat;
  background-position:right center;
  background-size:contain;
  color:transparent;
  text-indent:-9999px;
  overflow:hidden;
}

/* إعادة نص الأزرار اللي كلاسها brand */
.btn.brand{
  text-indent:0;
  color:var(--text);
  background-image:none;
  background-position:initial;
  background-size:initial;
}

