/* ======================================================
   تنسيقات الصفحات القانونية (Full Screen - No Scrollbar Fix)
   ====================================================== */

.legal-page-container {
    /* ✅ الإصلاح الجذري للشريط السفلي */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box; /* يجعل الحشوة جزءاً من العرض */
    
    min-height: 85vh;
    margin: 0;
    
    background-color: #030f17;
    
    /* تقليل الحشوة الجانبية واستخدام max-width للمحتوى الداخلي */
    padding: 60px 20px; 
    
    color: #a7a7a7;
    line-height: 1.9;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: hidden; /* ضمان عدم ظهور الشريط */
}

/* شريط علوي جمالي */
.legal-page-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #bb86fc, #030f17, #00bcd4);
    z-index: 2;
}

/* حاوية مركزية للمحتوى (للقراءة المريحة) */
.legal-content-wrapper {
    max-width: 1000px; /* عرض مثالي للقراءة */
    margin: 0 auto;
}

.legal-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-header h1 {
    font-size: clamp(2em, 5vw, 3.5em); /* خط يتغير حجمه حسب الشاشة */
    color: #fff;
    margin-bottom: 15px;
    font-weight: 800;
}

.legal-header .last-updated {
    font-size: 0.9em;
    color: #666;
    background: rgba(0,0,0,0.3);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    display: inline-block;
}

.legal-content h2 {
    color: #e0e0e0;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding-bottom: 10px;
}

.legal-content h2::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #bb86fc;
    border-radius: 50%;
    box-shadow: 0 0 10px #bb86fc;
    flex-shrink: 0;
}

.legal-content p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #b0b0b0;
}

.legal-content ul {
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.legal-content li {
    margin-bottom: 12px;
    color: #ccc;
    font-size: 1.05em;
    list-style-position: inside; /* لإبقاء النقاط داخل الصندوق */
}

.legal-content strong {
    color: #fff;
    font-weight: 700;
}

/* الوضع المضيء */
body.light-theme .legal-page-container {
    background-color: #f4f6f8;
    color: #444;
}
body.light-theme .legal-header h1 { color: #1a1a1a; }
body.light-theme .legal-content h2 { color: #222; border-bottom-color: rgba(0,0,0,0.05); }
body.light-theme .legal-content p, 
body.light-theme .legal-content li { color: #555; }
body.light-theme .legal-content ul { background: #fff; border-color: #e0e0e0; }

/* Media Queries للشاشات الصغيرة */
@media (max-width: 768px) {
    .legal-page-container {
        padding: 40px 15px;
    }
    .legal-header h1 {
        font-size: 2.2em;
    }
}

body:not(.light-theme)[class*="season-"] .legal-page-container {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
}
body.light-theme[class*="season-"] .legal-page-container {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: none !important;
}
body.light-theme[class*="season-"] .legal-header h1 {
    color: #111 !important;
    text-shadow: none !important;
}
body.light-theme[class*="season-"] .legal-content h2 {
    color: #111 !important;
}
body.light-theme[class*="season-"] .legal-header p {
    color: #333 !important;
}
body.light-theme[class*="season-"] .legal-content p {
    color: #333 !important;
}
body.light-theme[class*="season-"] .legal-content li {
    color: #333 !important;
}
body.light-theme[class*="season-"] .legal-content strong {
    color: #111 !important;
}
body.light-theme[class*="season-"] .legal-content b {
    color: #111 !important;
}
body.light-theme[class*="season-"] .legal-content a {
    color: #0084ff !important;
}
body.light-theme[class*="season-"] .legal-content a:hover {
    color: #0056b3 !important;
}