
/* ============================================================
   1) إعدادات أساسية للصفحة
   ============================================================ */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ============================================================
   2) جعل الهيدر + المحتوى + الفوتر كتلة واحدة في منتصف الشاشة
   ============================================================ */
body {
    height: 100%; 
    margin: 0; 
    padding: 0;    
    background: #070112;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 16px;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
    overflow-y: auto;
}


hr {
    border: none;
    height: 1px;
    background: linear-gradient(
        to right,
        rgba(120, 0, 0, 0.2) 0%,
        rgba(150, 0, 0, 0.8) 40%,
        rgba(150, 0, 0, 0.8) 60%,
        rgba(120, 0, 0, 0.2) 100%
    );
    margin: 10px 0;
    border-radius: 2px;
}

.title-hr {
    border: none;
    height: 1px;

    background: linear-gradient(
        to right,
        rgba(150, 0, 0, 1) 0%,
        rgba(150, 0, 0, 0.8) 40%,
        rgba(150, 0, 0, 0.4) 70%,
        rgba(150, 0, 0, 0.0) 100%
    );

    margin: 5px 0;
    border-radius: 1px;
}

/* دعم RTL */
:dir(rtl) .title-hr {
    background: linear-gradient(
        to left,
        rgba(150, 0, 0, 1) 0%,
        rgba(150, 0, 0, 0.8) 40%,
        rgba(150, 0, 0, 0.4) 70%,
        rgba(150, 0, 0, 0.0) 100%
    );
}


a {
    cursor: pointer;
    color: #ffcc00;
    text-decoration: none;
}

a:hover {
    color: #f8db5c;
}


/* ============================================================
   3) الحاوية الرئيسية التي تحتوي كل شيء
   - يمكنك تغيير min-height إلى 60vh أو 80vh
   ============================================================ */
.page-center {
    width: 98%;
    min-height: 97vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============================================================
   4) الهيدر — مهم جداً أن يبقى صف واحد
   ============================================================ */
.header-container {
    width: 98%;
    margin: auto;
    display: flex;
    flex-direction: row;      /* يجعل العناصر جنب بعض */
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* دعم RTL */
html[dir="rtl"] .header-container {
    flex-direction: row-reverse;
}



/* ============================================================
   5) الصفحة الداخلية (page-wrapper)
   ============================================================ */
.page-wrapper {
    width: 98%;
    flex: 1;
    margin: auto;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   6) صفوف الصفحة
   ============================================================ */
.page-row {
    display: flex;
    width: 100%;
    margin-bottom: 10px;
}

/* ============================================================
   7) الأعمدة
   ============================================================ */
.col-30 {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.col-70 {
    width: 70%;
}

/* دعم RTL */
html[dir="rtl"] .page-row {
    flex-direction: row-reverse;
}

/* ============================================================
   8) scroll-box ديناميكي
   - max-height: 55vh = 55% من ارتفاع الشاشة
   - يتمدد وينكمش حسب الجهاز
   ============================================================ */
.scroll-box {
    width: 99%;
    flex: 1;
    max-height: 60vh;   
    overflow-y: auto;
    padding: 5px;
    margin: 0 auto;
    border-radius: 5px;
}

/* Scrollbar – 3D Dark Red Premium */
.scroll-box::-webkit-scrollbar {
    width: 13px;
}

.scroll-box::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow:
        inset 0 0 6px rgba(0,0,0,0.8),
        inset 0 0 3px rgba(80,0,0,0.4);
}

.scroll-box::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        #5a0000,   /* أعلى – أحمر غامق */
        #9a0000,   /* وسط – أحمر قوي */
        #5a0000    /* أسفل – يرجع غامق لعمل عمق */
    );
    border-radius: 10px;
    border: 1px solid #000;

    /* تأثير 3D */
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.15), /* لمعان خفيف */
        inset 0 -2px 4px rgba(0,0,0,0.6),       /* ظل داخلي */
        0 0 6px rgba(150,0,0,0.6);              /* توهج خارجي */
}

.scroll-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        #7a0000,
        #c00000,
        #7a0000
    );
    box-shadow:
        inset 0 2px 5px rgba(255,255,255,0.25),
        inset 0 -2px 5px rgba(0,0,0,0.7),
        0 0 10px rgba(200,0,0,0.9);
}

/* Firefox */
.scroll-box {
    scrollbar-width: thin;
    scrollbar-color: #9a0000 #1a1a1a;
}


/* ============================================================
   9) شريط تمرير AAA متوهّج
   ============================================================ */
/* Scrollbar – Dark Red (Matching HR) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a; /* نفس خلفية الواجهة */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        #4a0000,   /* أحمر غامق – نفس لون الـ HR */
        #7a0000    /* أفتح قليلاً لإعطاء عمق */
    );
    border-radius: 10px;
    border: 1px solid #000;
    box-shadow: 0 0 6px rgba(120,0,0,0.6); /* توهج خفيف */
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        #6a0000,
        #a00000
    );
    box-shadow: 0 0 10px rgba(150,0,0,0.8);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #7a0000 #1a1a1a;
}


/* ============================================================
   10) الأزرار الأساسية
   ============================================================ */
.game-button,
.exit-button,
.Unactive-button {
    width: 260px;
    height: 50px;
    margin-bottom: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: normal;
}

/* زر رئيسي */
.game-button {
    display: inline-block;
    padding: 14px 28px;
    font-size: 18px;
    font-weight: bold;

    background: linear-gradient(180deg, #4a4a4a, #1f1f1f);
    color: #f0f0f0;
    border-radius: 8px;

    border: 1px solid rgba(255,255,255,0.18);

    box-shadow:
        0 6px 14px rgba(0,0,0,0.75),          /* ظل خارجي قوي */
        inset 0 3px 6px rgba(255,255,255,0.12), /* لمعان علوي */
        inset 0 -3px 6px rgba(0,0,0,0.8);       /* عمق سفلي */

    cursor: pointer;
    user-select: none;
    transition: 0.18s ease;
}

.game-button:hover {
    background: linear-gradient(180deg, #555, #222);
    box-shadow:
        0 8px 18px rgba(0,0,0,0.8),
        inset 0 4px 7px rgba(255,255,255,0.15),
        inset 0 -4px 7px rgba(0,0,0,0.85);
}

.game-button:active {
    transform: translateY(2px);
    background: linear-gradient(180deg, #333, #151515);
    box-shadow:
        0 3px 8px rgba(0,0,0,0.7),
        inset 0 5px 10px rgba(0,0,0,0.9);
}

/* زر الخروج */
.exit-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;

    background: linear-gradient(180deg, #660000, #2a0000);
    color: #ffdddd;
    border-radius: 8px;

    border: 1px solid rgba(255,0,0,0.25);

    box-shadow:
        0 6px 14px rgba(0,0,0,0.75),
        inset 0 3px 6px rgba(255,255,255,0.10),
        inset 0 -3px 6px rgba(0,0,0,0.8);

    cursor: pointer;
    user-select: none;
    transition: 0.18s ease;
}

.exit-button:hover {
    background: linear-gradient(180deg, #880000, #330000);
    box-shadow:
        0 8px 18px rgba(0,0,0,0.8),
        inset 0 4px 7px rgba(255,255,255,0.15),
        inset 0 -4px 7px rgba(0,0,0,0.85);
}

.exit-button:active {
    transform: translateY(2px);
    background: linear-gradient(180deg, #550000, #1a0000);
    box-shadow:
        0 3px 8px rgba(0,0,0,0.7),
        inset 0 5px 10px rgba(0,0,0,0.9);
}


/* زر صغير */
.subg-button {
    width: 180px;
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 5px;

    background: linear-gradient(180deg, #3a3a3a, #1f1f1f); /* تدرج 3D */
    color: #e6e6e6;
    border: 1px solid rgba(255,255,255,0.15);

    cursor: pointer;
    user-select: none;

    /* عمق + بروز */
    box-shadow:
        0 3px 6px rgba(0,0,0,0.7),          /* ظل خارجي */
        inset 0 2px 4px rgba(255,255,255,0.10), /* لمعان داخلي علوي */
        inset 0 -2px 4px rgba(0,0,0,0.7);       /* عمق داخلي سفلي */

    transition: 0.15s ease;
}

.subg-button:hover {
    background: linear-gradient(180deg, #444, #222);
    box-shadow:
        0 4px 8px rgba(0,0,0,0.75),
        inset 0 2px 5px rgba(255,255,255,0.15),
        inset 0 -2px 5px rgba(0,0,0,0.75);
}

.subg-button:active {
    background: linear-gradient(180deg, #2a2a2a, #151515);
    transform: translateY(1px);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.7),
        inset 0 3px 6px rgba(0,0,0,0.8);
}


/* زر غير مفعل */
.Unactive-button {

    background: linear-gradient(
        to right,
        rgba(58, 58, 58, 1) 0%,
        rgba(58, 58, 58, 0.9) 40%,
        rgba(58, 58, 58, 0.8) 60%,
        rgba(58, 58, 58, 0.0) 100%   /* ← الجهة الشفافة */
    );

    color: #e6e6e6;
    font-size: 20px;
    font-weight: bold;

    border-radius: 6px;

    /* ✔ بوردَر من كل الجهات ماعدا اليمين */
    border-left:   1px solid rgba(255,255,255,0.18);
    border-top:    1px solid rgba(255,255,255,0.18);
    border-bottom: 1px solid rgba(255,255,255,0.18);
    border-right:  none; /* ← الجهة الشفافة بدون بوردَر */

    margin: 2px 0;
    cursor: default;

    box-shadow: 0 0 10px #0008;
}


/* ============================================================
   11) الأخبار والعناوين
   ============================================================ */
.news-title {
    font-size: 20px;
    color: #ffd700;
    font-weight: bold;
}
.news-date {
    color: #71716f;
    font-size: 10px;
}
.news-body {
    margin-top: 16px;
    line-height: 1.6;
}
.news-note {
    font-size: 12px;
    font-style: italic;
}

/* صندوق الأخبار */
.news-box {
    background: #333; /* نفس لون التلميحات */
    width: 95%;
    padding: 18px 20px;
    border-radius: 6px;
    margin: 15px 0;

    border: 1px solid rgba(255,255,255,0.10);

    /* ظل يمين + ظل تحت فقط */
    box-shadow:
        6px 6px 14px rgba(255,255,255,0.10),  /* ظل يمين */
        0 8px 14px rgba(255,255,255,0.12),    /* ظل تحت */
        inset 0 0 10px rgba(0,0,0,0.45);      /* عمق داخلي */

    color: #e6e6e6;
    line-height: 1.7;
}

/* في حال قلب الصفحة rtl */
:dir(rtl) .news-box {
    box-shadow:
        -6px 6px 14px rgba(255,255,255,0.10), /* ظل يسار */
        0 8px 14px rgba(255,255,255,0.12),    /* ظل تحت */
        inset 0 0 10px rgba(0,0,0,0.45);
}


/* ============================================================
   12) التولتيب
   ============================================================ */
.tooltip {
    position: absolute;
    top: 100%;
    right: 50%;
    background: #1c1c1c;
    margin-top: -3px;
    box-shadow: 0 0 16px #0008 inset;

    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;

    opacity: 0;
    visibility: hidden;
    min-width: 250px;
    max-width: 500px;
    width: max-content;
    white-space: initial;
    word-break: break-word;
    box-sizing: border-box;

    /* تأثير ثلاثي الأبعاد */ 
    box-shadow: 0 3px 6px rgba(0,0,0,0.6), /* ظل خارجي ناعم */ 
    inset 0 0 8px rgba(255,255,255,0.08), /* لمعان داخلي خفيف */ 
    inset 0 0 3px rgba(0,0,0,0.6); /* عمق داخلي */ 
    border: 1px solid rgba(255,255,255,0.12); /* إطار خفيف يعطي بروز */
}
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}
.tooltip-wrapper:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   13) سويتش تشغيل/إيقاف
   ============================================================ */
.aaa-switch {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 28px;
}

.aaa-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.aaa-switch .aaa-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;

  background: linear-gradient(180deg, #3a3a3a, #1f1f1f); /* OFF */
  border-radius: 30px;

  box-shadow:
    0 3px 6px rgba(0,0,0,0.7),
    inset 0 2px 4px rgba(255,255,255,0.10),
    inset 0 -2px 4px rgba(0,0,0,0.7);

  transition: 0.3s;
}

.aaa-switch .aaa-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 2px;

  background: radial-gradient(circle, #dcdcdc, #999);
  border-radius: 50%;

  box-shadow:
    0 2px 4px rgba(0,0,0,0.6),
    inset 0 1px 2px rgba(255,255,255,0.4);

  transition: 0.3s;
}

.aaa-switch input:checked + .aaa-slider {
  background: linear-gradient(180deg, #5b5a5a, #4d4343); /* ON */
  box-shadow:
    0 4px 8px rgba(0,0,0,0.75),
    inset 0 2px 5px rgba(255,255,255,0.15),
    inset 0 -2px 5px rgba(0,0,0,0.75);
}

.aaa-switch input:checked + .aaa-slider::before {
  transform: translateX(42px);
}

/* ============================
   سلايدر صوت 3D متناسق
   ============================ */
.aaa-range {
  -webkit-appearance: none;
  width: 320px;
  height: 18px;

  background: linear-gradient(180deg, #5b5a5a, #1f1f1f); /* OFF */
  border-radius: 10px;
  outline: none;

  box-shadow:
    0 3px 6px rgba(0,0,0,0.7),
    inset 0 2px 4px rgba(255,255,255,0.10),
    inset 0 -2px 4px rgba(0,0,0,0.7);
}

.aaa-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -2.5px;
  background: radial-gradient(circle, #dcdcdc, #999);
  border-radius: 50%;

  box-shadow:
    0 2px 4px rgba(0,0,0,0.6),
    inset 0 1px 2px rgba(255,255,255,0.4);

  cursor: pointer;
}

/* ✅ الجزء الفعّال من السلايدر – نفس لون السويتش ON */
.aaa-range::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #1f1f1f, #5b5a5a); /* أخضر داكن */
  height: 18px;
  border-radius: 10px;
}
