/* ════════════════════════════════════════════════════════════════════
   الهوية البصرية الموحّدة لجميع ألعاب المنصة
   نفس منهجية بارشيسي وضاما: خشب بني دافئ + إطار ذهبي بزوايا قائمة.
   القاعدة: الطَّرْح هنا مقيّد بصفحة اللعبة (#gamePageBody / #pg-game.active)
   حتى لا يتأثر أي قسم آخر من المنصة (اللوبي، المحفظة، الملف الشخصي…).
   مراعاة خصوصية كل لعبة: مكوّناتها الداخلية (أوراق، بكرات، شبكات…) تحتفظ
   بألوانها الوظيفية — ما يوحَّد هو المسرح والإطار والعناصر المشتركة.
   ════════════════════════════════════════════════════════════════════ */

/* ── 1) خلفية جسم صفحة اللعبة: خشب دافئ (توحيد أي فراغ حول المسارح) ── */
#pg-game.active #gamePageBody {
  background:
    radial-gradient(140% 90% at 50% 0%, rgba(97, 62, 33, 0.55) 0%, rgba(31, 17, 7, 0.75) 70%),
    linear-gradient(180deg, #2a1a0c, #170b03);
}

/* ── 2) مسرح أي لعبة (.stage عبر gFrame): إطار ذهبي قائم على خشب ── */
#gamePageBody .stage {
  background: linear-gradient(180deg, #3f2814, #211008);
  border: 3px solid #d9a94e;
  border-radius: 0;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 227, 150, 0.22),
    0 0 26px rgba(217, 169, 78, 0.16);
}
#gamePageBody .stage .gstage-bg { opacity: 0.14; }

/* ── 3) صندوق القواعد المنسدل داخل المسرح ── */
#gamePageBody .rulesBox {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(217, 169, 78, 0.42);
  border-radius: 0;
  color: #efe2c2;
}
#gamePageBody .rulesBox .rline b { color: #ffd75e; }

/* ── 4) العناصر المشتركة داخل صفحة اللعبة: صف الرهان والنصوص ── */
#gamePageBody .bets {
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(217, 169, 78, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 10px 0;
}
#gamePageBody .bamt {
  background: rgba(30, 16, 6, 0.85);
  border-color: rgba(217, 169, 78, 0.45);
  color: #ffedbe;
}
#gamePageBody .ctext { color: #efe2c2; }
#gamePageBody .ctitle {
  color: #ffe08a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
#gamePageBody .res { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }

/* ── 5) سجل الجولات (.ghist): بطاقة بنية بحواف ذهبية ── */
#pg-game.active .ghist {
  background: linear-gradient(180deg, #2c1a0a, #190c03);
  border: 2px solid #b98f3e;
  border-radius: 0;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 227, 150, 0.14);
}
#pg-game.active .ghist-head {
  border-bottom: 1px solid rgba(217, 169, 78, 0.4);
  background: linear-gradient(135deg, rgba(217, 169, 78, 0.14), transparent);
}
#pg-game.active .ghist-title { color: #ffe08a; }
#pg-game.active .ghist-title i { color: #d9a94e; }
#pg-game.active .ghist-t th {
  color: #cdb684;
  border-bottom-color: rgba(217, 169, 78, 0.4);
}
#pg-game.active .ghist-t td { border-bottom-color: rgba(217, 169, 78, 0.22); color: #efe2c2; }
#pg-game.active .ghist-t tr:hover td { background: rgba(217, 169, 78, 0.08); }
#pg-game.active .ght-empty { color: #cdb684; }
#pg-game.active .ght-ticket {
  background: linear-gradient(135deg, rgba(217, 169, 78, 0.07), rgba(255, 255, 255, 0.012));
  border-color: rgba(217, 169, 78, 0.3);
  border-left-color: rgba(217, 169, 78, 0.55);
}
#pg-game.active .ght-who { color: #f4e8c8; }
#pg-game.active .ght-name { color: #cdb684; }
#pg-game.active .ght-ticket.is-win { border-left-color: var(--green2, #10b981); }
#pg-game.active .ght-ticket.is-lose { border-left-color: #ef4444; }

/* ── 5-ب) ترويسة صفحة اللعبة (تظهر بعد الخروج من ملء الشاشة): بنية/ذهبية ── */
#pg-game.active .gp-head {
  background: linear-gradient(180deg, #31200e, #1c0e04);
  border-bottom: 2px solid rgba(217, 169, 78, 0.55);
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 0;
}
#pg-game.active .gp-head .ptitle,
#pg-game.active .gp-head .ptitle #gamePageName {
  color: #ffe08a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
#pg-game.active .gp-head .ptitle #gamePageIcon {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* ── 6) تلميح تدوير الهاتف: بالهوية نفسها ── */
.rotate-hint {
  background: rgba(26, 14, 5, 0.97);
  color: #ffe9a8;
}
.rotate-hint i { color: #ffd75e; }
.rotate-hint b { color: #ffe08a; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }

/* ── 7) وضع الشاشة الممتلئة: لا خلفية باردة خلف الألعاب ذات الحاويات ── */
#pg-game.app-fs #gamePageBody {
  background:
    radial-gradient(140% 90% at 50% 0%, rgba(97, 62, 33, 0.5) 0%, rgba(31, 17, 7, 0.72) 70%),
    linear-gradient(180deg, #2a1a0c, #170b03);
}

/* الألعاب ذات الحاويات الخاصة (رندا/رامي) تحتفظ بمعالجتها الخاصة —
   لا نلمسها هنا احتراماً لخصوصية تخطيطها (انظر 05-ronda.css و08-rami.css). */
