/* XD_UNIFY_V55 — توحيد الشكل داخل أزهلها */

/* 1) شريط التمرير يختفي — التمرير نفسه يبقى شغّالًا */
html,body,*{scrollbar-width:none!important;-ms-overflow-style:none!important}
html::-webkit-scrollbar,body::-webkit-scrollbar,*::-webkit-scrollbar{width:0!important;height:0!important;display:none!important}

/* 2) إطار كتلة الاسم في الشريط العلوي ينشال.
      نستهدف أصناف الماركب نفسها لا الصنف اللي يضيفه الجافاسكربت،
      عشان تنطبق من أول رسم بدون انتظار أي سكربت. */
header .brand-mini,
header .brand,
header .xd-topbar-brand,
header.xd-topbar .xd-topbar-brand{
 background:none!important;background-color:transparent!important;
 border:0!important;outline:0!important;box-shadow:none!important;
 border-radius:0!important;padding:0!important;backdrop-filter:none!important;
}

/* 3) كرتا «إنشاء سيرفر» و«دخول بكود» بشكل كلك في كل الألعاب.
      القيم منسوخة من .xd-home-card في community-game-home-unified.css */
.xd-entry-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;max-width:900px!important;margin:0 auto!important}
.xd-entry-grid .xd-room-entry-card{
 position:relative!important;overflow:hidden!important;
 min-height:260px!important;padding:28px!important;
 border:1px solid rgba(255,255,255,.08)!important;
 border-radius:22px!important;
 background:linear-gradient(180deg,rgba(28,28,28,.82),rgba(17,17,17,.88))!important;
 box-shadow:0 22px 60px rgba(0,0,0,.18)!important;
 display:flex!important;flex-direction:column!important;
 text-align:right!important;align-items:stretch!important;
}
.xd-entry-grid .xd-room-entry-card:before{
 content:''!important;position:absolute!important;inset:0!important;border-radius:inherit!important;
 pointer-events:none!important;
 background:linear-gradient(135deg,rgba(245,158,11,.055),transparent 42%)!important;
}
.xd-entry-grid .xd-room-entry-art{
 position:relative;z-index:1;
 width:52px!important;height:52px!important;min-width:0!important;
 display:grid!important;place-items:center!important;
 border-radius:15px!important;
 color:#f59e0b!important;
 background:rgba(245,158,11,.08)!important;
 border:1px solid rgba(245,158,11,.16)!important;
 font:900 1.35rem 'JetBrains Mono',monospace!important;
 margin:0!important;
}
/* community-game-unified.css يرسم مربعًا ثانيًا على الـ span الداخلي.
   هنا نخليه مجرد الرمز نفسه حتى يبقى مربع أيقونة واحد فقط. */
.xd-entry-grid .xd-room-entry-art>span{
 width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;
 display:inline!important;place-items:unset!important;
 padding:0!important;margin:0!important;
 border:0!important;border-radius:0!important;
 background:transparent!important;box-shadow:none!important;
 color:inherit!important;font:inherit!important;line-height:1!important;
}
.xd-entry-grid .xd-room-entry-card h2{position:relative;z-index:1;margin:18px 0 0!important;color:#f5f5f5!important;font:900 1rem Cairo,sans-serif!important;text-align:right!important}
.xd-entry-grid .xd-room-entry-card .xd-entry-copy{position:relative;z-index:1;margin:5px 0 0!important;color:#747474!important;font:700 .63rem/1.85 Cairo,sans-serif!important;text-align:right!important}
.xd-entry-grid .xd-room-entry-card>.primary-btn,
.xd-entry-grid .xd-room-entry-card>button,
.xd-entry-grid .xd-room-entry-card .join-row{position:relative;z-index:1;margin-top:auto!important}
.xd-entry-grid .xd-room-entry-card .primary-btn,
.xd-entry-grid .xd-room-entry-card>button{width:100%!important;min-height:46px!important;border-radius:12px!important;font-weight:900!important}

@media(max-width:720px){
 .xd-entry-grid{grid-template-columns:1fr!important;max-width:560px!important}
 .xd-entry-grid .xd-room-entry-card{min-height:230px!important;padding:22px!important}
}
@media(max-width:500px){
 .xd-entry-grid .xd-room-entry-card{border-radius:18px!important;padding:18px!important}
 .xd-entry-grid .xd-room-entry-art{width:46px!important;height:46px!important;border-radius:13px!important}
}

/* 4) أزرار «إنشاء سيرفر» و«دخول» بلون كلك في كل الألعاب.
      أزرار اختيار عام/خاص مستثناة لأنها لها حالة active وألوانها الخاصة. */
#homeScreen .primary-btn,
#homeScreen button.primary-btn,
#homeScreen .xd-home-action-btn,
.xd-entry-grid .primary-btn,
.xd-entry-grid .xd-room-entry-card button:not(.xd-server-type){
 background:linear-gradient(135deg,#F59E0B,#EA580C)!important;
 color:#15100a!important;
 box-shadow:0 9px 28px rgba(245,158,11,.12)!important;
 border:0!important;
}
#homeScreen .primary-btn:hover,
.xd-entry-grid .primary-btn:hover{filter:brightness(1.05)!important}
/* حقل الكود وتركيزه بنفس اللون */
#homeScreen input:focus,
.xd-entry-grid input:focus{
 border-color:rgba(245,158,11,.45)!important;
 box-shadow:0 0 0 3px rgba(245,158,11,.06)!important;
}

/* 5) اختيار نوع السيرفر داخل كرت الإنشاء.
      نخليه فوق أي طبقات زخرفية، قابل للضغط، وحالة الاختيار واضحة. */
.xd-entry-grid .xd-room-entry-card .xd-server-choice{
 position:relative!important;z-index:8!important;pointer-events:auto!important;
 width:100%!important;margin:12px 0 14px!important;padding:13px!important;
 border:1px solid rgba(255,255,255,.08)!important;border-radius:15px!important;
 background:rgba(255,255,255,.025)!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-choice-head{
 display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;
 margin-bottom:9px!important;pointer-events:none!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-choice-head b{
 color:#f5f5f5!important;font:900 .72rem/1.4 Cairo,sans-serif!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-choice-head small{
 color:#777!important;font:700 .52rem/1.5 Cairo,sans-serif!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-choice-buttons{
 position:relative!important;z-index:9!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;
 pointer-events:auto!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-type{
 position:relative!important;z-index:10!important;display:block!important;
 width:100%!important;min-height:72px!important;margin:0!important;padding:10px 12px!important;
 border:1px solid rgba(255,255,255,.09)!important;border-radius:12px!important;
 background:#111!important;color:#d7d7d7!important;box-shadow:none!important;
 text-align:right!important;font:900 .66rem/1.45 Cairo,sans-serif!important;
 cursor:pointer!important;pointer-events:auto!important;touch-action:manipulation!important;
 transform:none!important;filter:none!important;opacity:1!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-type:hover{
 background:#171717!important;border-color:rgba(245,158,11,.24)!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-type small{
 display:block!important;margin-top:4px!important;color:#777!important;
 font:700 .49rem/1.7 Cairo,sans-serif!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-type.public.active{
 background:rgba(34,197,94,.09)!important;border-color:rgba(34,197,94,.48)!important;color:#86efac!important;
 box-shadow:inset 0 0 0 1px rgba(34,197,94,.04)!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-type.private.active{
 background:rgba(239,68,68,.09)!important;border-color:rgba(239,68,68,.48)!important;color:#fca5a5!important;
 box-shadow:inset 0 0 0 1px rgba(239,68,68,.04)!important;
}
.xd-entry-grid .xd-room-entry-card .xd-server-type.public.active small{color:#86c995!important}
.xd-entry-grid .xd-room-entry-card .xd-server-type.private.active small{color:#d98c8c!important}
@media(max-width:580px){
 .xd-entry-grid .xd-room-entry-card .xd-server-choice-buttons{grid-template-columns:1fr!important}
 .xd-entry-grid .xd-room-entry-card .xd-server-type{min-height:64px!important}
}

/* 6) كرتا الدخول متطابقتان تمامًا: نفس الارتفاع ونفس ترتيب الأجزاء،
      والزر أو حقل الكود دائمًا في الأسفل مهما اختلف طول النص. */
.xd-entry-grid,.xd-home-grid{align-items:stretch!important}
.xd-entry-grid>*,.xd-home-grid>*{height:100%!important}
.xd-entry-grid .xd-room-entry-card,.xd-home-grid .xd-home-card{height:100%!important;width:100%!important;margin:0!important;box-sizing:border-box!important}
.xd-home-grid .xd-home-copy,.xd-entry-grid .xd-entry-copy{flex:0 0 auto}
.xd-home-grid .xd-home-slot,.xd-home-grid .xd-home-code-wrap{margin-top:auto!important}
.xd-entry-grid .xd-room-entry-card .join-row{margin-top:auto!important;display:flex!important;gap:7px!important}
/* الكرتان بنفس ارتفاع المحتوى الداخلي حتى لو واحدة فيها حقل والثانية زر */
.xd-home-grid .xd-home-card>.primary-btn,
.xd-home-grid .xd-home-card .xd-home-action-btn{margin-top:auto!important}

/* 7) حركة فتح الكرتين */
@media(prefers-reduced-motion:no-preference){
 .xd-entry-open{animation:xdEntryOpen .52s cubic-bezier(.18,.84,.28,1) both}
 .xd-entry-open:nth-of-type(2){animation-delay:.09s}
 @keyframes xdEntryOpen{
  0%  {opacity:0;transform:translateY(26px) scale(.965)}
  55% {opacity:1}
  100%{opacity:1;transform:none}
 }
 /* الأيقونة داخلها تكبر بعد ما تستقر الكرت */
 .xd-entry-open .xd-home-icon,.xd-entry-open .xd-room-entry-art{
  animation:xdEntryIcon .46s cubic-bezier(.2,1.5,.4,1) both;animation-delay:.26s
 }
 .xd-entry-open:nth-of-type(2) .xd-home-icon,
 .xd-entry-open:nth-of-type(2) .xd-room-entry-art{animation-delay:.35s}
 @keyframes xdEntryIcon{from{opacity:0;transform:scale(.5) rotate(-12deg)}to{opacity:1;transform:none}}
}

/* صانع الميم وغيره من الصفحات القديمة قد يكون عندهم .entry-icon أصلية،
   و decorateCard يضيف .xd-room-entry-art جديدة. نخفي الأصلية مباشرة
   بمجرد ما يصير الكرت موحّد، بدون الاعتماد على ترتيب العناصر. */
.xd-entry-grid .xd-room-entry-card > .entry-icon{display:none!important}
.xd-entry-grid .xd-room-entry-card .entry-copy{margin-top:0!important}
/* /XD_UNIFY_V55 */
