    /* --- 1. متغيرات الألوان والإعدادات العامة --- */
:root {
    --bg-dark: #1b1b1b;
    --bg-card: #252525;
    --bg-header: #000000;
    --bg-menu: #242424;
    --primary: #ffcc00;
    --text-main: #ffffff;
    --text-white: #ffffff;
    --text-sec: #aaaaaa;
    --text-gray: #b0b0b0;
    --border: #333333;
    --border-color: #333333;
    --danger: #e74c3c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    /* السحر كله هنا.. ده اللي بيمنع السكرول بالعرض ويشغل التثبيت */
    overflow-x: clip; 
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* التمرير (Scrollbar) الملون */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* --- 2. الهيدر (Header) الثابت --- */
header {
    background-color: var(--bg-header);
    height: 60px;
    border-bottom: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    
    /* أكواد التثبيت النهائية */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    font-style: italic;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo span { color: var(--primary); }

/* القائمة العلوية */
.main-nav { display: flex; gap: 20px; }
.main-nav a {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-sec);
    display: flex;
    align-items: center;
    gap: 5px;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); }

.header-right { display: flex; align-items: center; gap: 20px; }
.header-left { display: flex; gap: 15px; align-items: center; }
.header-actions-left { display: flex; align-items: center; gap: 15px; margin-right: auto; }

/* أزرار القائمة والموبايل */
.menu-toggle { display: none; font-size: 24px; color: var(--primary); cursor: pointer; }
.menu-btn {
    background: none; border: none; cursor: pointer; display: flex;
    flex-direction: column; gap: 5px; padding: 5px;
}
.menu-btn span {
    display: block; width: 25px; height: 3px; background-color: var(--primary);
    border-radius: 2px; transition: 0.3s;
}
.menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* --- 3. أيقونات السوشيال --- */
.social-icons-mini { display: flex; gap: 8px; border-right: 1px solid #444; padding-right: 15px; }
.s-icon {
    color: #bbb; font-size: 14px; transition: 0.3s; width: 25px; height: 25px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.s-icon:hover { color: var(--primary); background: rgba(255, 204, 0, 0.2); }

.icon-circle {
    width: 28px; height: 28px; border: 1px solid #555; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; color: #aaa;
    font-size: 13px; transition: 0.3s; margin-left: 3px;
}
.icon-circle.fb:hover { background-color: #1877f2; color: white; border-color: #1877f2; }
.icon-circle.tw:hover { background-color: #1da1f2; color: white; border-color: #1da1f2; }
.icon-circle.insta:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: white; border: none; }
.icon-circle.yt:hover { background-color: #ff0000; color: white; border-color: #ff0000; }
.icon-circle.tiktok:hover { background-color: #000; color: #00f2ea; border-color: #fff; box-shadow: 2px 2px 0px #ff0050; }

/* --- 4. الأزرار والبحث --- */
.login-btn-main {
    background: var(--primary); color: #000; padding: 5px 15px; border-radius: 20px;
    font-weight: bold; text-decoration: none; font-size: 14px;
}
.login-btn-main:hover { background: #fff; }

.search-container {
    display: flex; align-items: center; background: #222; border-radius: 20px;
    padding: 2px; border: 1px solid #444;
}
#searchInput {
    background: transparent; border: none; outline: none; color: #fff;
    padding: 5px 10px; font-size: 13px; width: 0; transition: 0.4s; visibility: hidden;
}
#searchInput.active { width: 150px; visibility: visible; }
#searchBtn { background: transparent; border: none; color: var(--primary); cursor: pointer; padding: 5px 10px; font-size: 14px; }

/* --- 5. القائمة المنسدلة (Mega Menu) --- */
.mega-menu {
    position: absolute; top: 60px; left: 0; width: 100%; background-color: var(--bg-menu);
    max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out;
    z-index: 999; border-bottom: 1px solid #333; box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.mega-menu.open { max-height: 800px; overflow-y: auto; }
.menu-container {
    max-width: 1400px; margin: 0 auto; padding: 30px 20px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
}
.menu-col h3 { color: var(--text-gray); font-size: 16px; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; }
.menu-list li { margin-bottom: 10px; }
.menu-list a { color: var(--text-white); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.menu-list a:hover { color: var(--primary); padding-right: 5px; }
.league-item img { width: 25px; height: 25px; border-radius: 50%; background: #fff; padding: 2px; }

/* --- 6. شريط الأخبار (News Ticker) --- */
.news-ticker-container { display: flex; background: #000; color: #fff; border-bottom: 1px solid #333; height: 40px; overflow: hidden; }
.ticker-title { background: var(--danger); color: white; padding: 0 15px; display: flex; align-items: center; font-weight: bold; font-size: 14px; z-index: 2; }
.ticker-wrap { width: 100%; overflow: hidden; display: flex; align-items: center; background: #222; }
.ticker-move { display: inline-block; white-space: nowrap; padding-right: 100%; animation: ticker 20s linear infinite; }
.ticker-item { display: inline-block; padding: 0 20px; font-size: 14px; color: #ddd; }
@keyframes ticker { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(100%, 0, 0); } }

/* --- 7. التخطيط الرئيسي والمحتوى --- */
.container {
    max-width: 95%; margin: 30px auto; display: grid;
    grid-template-columns: 320px 1fr 300px; gap: 25px; padding: 0 20px; align-items: start;
}
.sidebar { width: 100%; display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget { background: var(--bg-card); border-radius: 8px; padding: 15px; margin-bottom: 20px; border: 1px solid var(--border); }
.widget-title { font-size: 18px; font-weight: bold; border-right: 4px solid var(--primary); padding-right: 10px; margin-bottom: 15px; color: var(--text-main); }
.leagues-list li { border-bottom: 1px solid var(--border); }
.leagues-list li:last-child { border: none; }
.leagues-list a { display: flex; align-items: center; justify-content: space-between; padding: 12px 5px; font-size: 14px; color: var(--text-sec); }
.leagues-list a:hover { color: var(--primary); padding-right: 10px; }
.leagues-list img { width: 25px; height: 25px; border-radius: 50%; background: #fff; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-title { font-size: 24px; font-weight: 900; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 40px; }
.news-item { background: var(--bg-card); border-radius: 8px; overflow: hidden; transition: transform 0.3s; border: 1px solid var(--border); }
.news-item:hover { transform: translateY(-5px); border-color: var(--primary); }
.news-img { width: 100%; height: 180px; object-fit: cover; }
.news-content { padding: 15px; }
.news-title { font-size: 16px; font-weight: bold; line-height: 1.5; margin-bottom: 10px; }
.news-meta { font-size: 12px; color: var(--text-sec); display: flex; align-items: center; gap: 5px; }
.match-card { background: var(--bg-card); min-width: 260px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); position: relative; }

/* --- 8. جدول الترتيب المصغر --- */
.standings-table { width: 100%; border-collapse: collapse; font-size: 11px; background: #222; text-align: center; }
.standings-table thead tr { background-color: var(--primary) !important; color: #000 !important; font-weight: bold; }
.standings-table th, .standings-table td { padding: 4px 2px; border-bottom: 1px solid #333; }
.team-name-cell { display: flex; align-items: center; gap: 5px; justify-content: flex-start; font-weight: bold; color: #fff; }
.team-name-cell img { width: 16px; height: 16px; }
.rank-circle { width: 18px; height: 18px; line-height: 18px; background: #333; color: #aaa; border-radius: 50%; display: inline-block; font-size: 10px; }
.rank-1 { background: #fff; color: #000; font-weight: bold; }

/* --- 9. زر المزيد --- */
.more-matches-btn {
    background: linear-gradient(45deg, var(--primary), #d4a017); color: #000; border: none;
    padding: 5px 15px; border-radius: 6px; font-size: 13px; font-weight: 900; display: inline-flex;
    align-items: center; gap: 6px; text-decoration: none; transition: all 0.3s ease; float: left;
    margin-top: 5px; box-shadow: 0 2px 5px rgba(255, 204, 0, 0.3);
}
.more-matches-btn:hover { background: linear-gradient(45deg, #d4a017, var(--primary)); transform: translateY(-2px) scale(1.05); box-shadow: 0 4px 15px rgba(255, 204, 0, 0.6); }
.more-matches-btn i { font-size: 14px; transition: 0.3s; }
.more-matches-btn:hover i { transform: translateX(-3px); }

/* --- 10. التجاوب (Mobile & Tablet) --- */
@media (max-width: 900px) {
    .container { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
    .main-content { order: 1; }
    .main-nav { display: none; }
    .menu-toggle { display: block; }
}
@media (max-width: 768px) {
    .menu-container { grid-template-columns: 1fr; }
    .header-left { display: none; }
}

/* تنسيق حاوية الهيدر لتوزيع العناصر يمين ويسار */
.header-inner {
    display: flex;
    justify-content: space-between; /* يرمي اليمين يمين واليسار يسار */
    align-items: center;
    height: 60px; /* ارتفاع الهيدر */
    padding: 0 20px;
    background: #000; /* أو اللون اللي يعجبك */
    border-bottom: 2px solid #ffcc00; /* الخط الذهبي */
}

/* تجميع اللوجو والقائمة مع بعض في اليمين */
.header-right-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    margin-left: 15px;
    font-size: 14px;
    transition: 0.3s;
}
.main-nav a:hover, .main-nav a.active { color: #ffcc00; }

/* تجميع الأدوات في اليسار */
.header-left-tools {
    display: flex;
    align-items: center;
    gap: 15px; /* مسافة بين البحث والسوشيال والدخول */
}

/* تنسيق أيقونات السوشيال */
.social-mini-group {
    display: flex;
    gap: 8px;
    padding-left: 15px;
    border-left: 1px solid #333; /* خط فاصل صغير */
}

.s-link {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #222;
    color: #ccc;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; text-decoration: none; transition: 0.3s;
}
.s-link:hover { background: #ffcc00; color: #000; transform: scale(1.1); }

/* تنسيق زر البحث */
.search-box-wrapper {
    display: flex; align-items: center;
    position: relative;
}
.icon-btn {
    background: none; border: none; color: #ffcc00;
    font-size: 16px; cursor: pointer; padding: 5px;
}
#mainSearchInput {
    background: #222; border: 1px solid #444; color: #fff;
    border-radius: 20px; padding: 5px 10px; font-size: 13px;
    width: 0; opacity: 0; visibility: hidden; transition: 0.4s;
    position: absolute; left: 30px; /* يظهر يسار الأيقونة */
}
#mainSearchInput.open {
    width: 160px; opacity: 1; visibility: visible;
}

/* تنسيق زر الدخول */
.nav-login-btn {
    background: #ffcc00; color: #000;
    padding: 6px 18px; border-radius: 20px;
    font-weight: bold; text-decoration: none; font-size: 13px;
    border: 2px solid #ffcc00; transition: 0.3s;
}
.nav-login-btn:hover { background: transparent; color: #ffcc00; }
/* 1. هذا الكود ينقل مجموعة الأدوات لأقصى اليسار */
.header-left-tools {
    margin-right: auto !important; /* السحر هنا: يدفع العنصر بعيداً عن اليمين فيذهب لليسار */
    margin-left: -20px!important;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 2. تأكد أن الشريط نفسه يأخذ عرض الشاشة بالكامل */
.header-inner {
    display: flex;
    align-items: center;
    width: 100%; /* ضروري عشان يقدر يرمي العناصر في الطرفين */
    justify-content: space-between; /* يضمن توزيع العناصر (يمين ويسار) */
    padding: 0 20px; /* مسافة أمان من الجوانب */
}