
/* 1. الإعدادات العامة والحاوية */
.Ahmed-web-PlayerCard {
    background-color: var(--B-Color);
    color: #e6edf3;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 15px;
    direction: rtl;
    border-radius: 15px;
    margin: auto;
    width: 100%;
    margin: 20px auto;
}

/* 2. القسم العلوي: الهيدر والصورة الشخصية */
.player-top-header {
    flex-direction: row-reverse;
    background: linear-gradient(145deg, #161b22, #0d1117);
    padding: 15px;
    border-radius: 15px;
    width: 100%;
    height: 100%;
    background: url(/assets/images/card.svg) no-repeat center center #ffffff33;
    background-size: 100% 100%;
    overflow: hidden;
}


.player-headline {
    flex: 1;
    text-align: right; /* محاذاة النص لليمين */
}

.player-headline h2 {
    margin: 0;
    font-size: 22px;
    color: var(--Primary-E-Color);
    font-weight: bold;
    letter-spacing: 0.5px;
}

.player-M {
    display: flex;
    gap: 12px;
    margin: 12px 0;
    justify-content: flex-start;
}

.player-M img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.player-M img:hover {
    transform: scale(1.2);
}

.player-headline p {
    font-size: 13.5px;
    color: var(--Primary-A-Color);
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
}


.player-card-box:hover {
    border-color: #00ff88;
}


/* توافق الموبايل */
@media (max-width: 480px) {
    .player-top-header {
        padding: 12px;
        gap: 10px;
    }
    .player-headline h2 {
        font-size: 18px;
    }
    .player-card-box {
        width: 85px;
        height: 85px;
    }
    .player-headline p {
        font-size: 12px;
    }
}

/* 3. جدول المعلومات الأساسية */
.player-table {
    width: 101%;
    border-collapse: separate;
    border-spacing: 3px 6px;
    margin-top: 16px;
}

.player-table tr {
    background: #161b22;
}



.player-table th:first-child {
    color: var(--Primary-E-Color);
    width: 50%;
    -webkit-border-radius: 12px;
    -moz-border-radius: var(--Main-Border-Radius);
    border-radius: 12px;
    padding: 8px;
    font-size: 14px;
    text-align: center;
}

.player-table th:last-child {
    color: #ffffff;
    border-radius: 8px 0 0 8px;
    text-align: center;
    font-weight: bold;
}

/* 4. إحصائيات الدوائر/المربعات (القسم العلوي) */
.PlayerStats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.Stats {
    background: var(--C-Color);
    /* border: 1px solid #30363d; */
    border-radius: 12px;
    padding: 12px 5px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
}

.light-mode .Stats img {
    filter: brightness(0.8) contrast(1.2);
}

.Stats:hover {
    border-color: #00ff88;
    transform: translateY(-3px);
}

.Stats img { width: 28px; height: 28px; margin-bottom: 5px; }
.Stats span:nth-child(2) {
    font-size: 11px;
    color: var(--Primary-E-Color);
}
.Stats span:last-child {
    font-size: 15px;
    font-weight: bold;
    color: var(--Primary-E-Color);
}

table.player-table tbody tr, table.SeasonStatistics tbody tr {
    background: var(--C-Color);
}

/* 5. التبويبات (Tabs) */
.stats-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px 5px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}
.stats-tabs::-webkit-scrollbar { display: none; }

.stats-tab {
    background: var(--C-Color);
    color: var(--Primary-E-Color);
    padding: 10px 18px;
    border-radius: 20px;
    /* border: 1px solid #30363d; */
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.stats-tab.active {
    background: linear-gradient(90deg, #00ff88 0%, #00cc6a 100%);
    color: #000;
    border-color: transparent;
}

/* 6. الإحصائيات المتقدمة (كل اثنين بجانب بعض) */
.advanced-stats {
    margin-top: 15px;
}



.stat-row {
    background: #161b22; /* لون الخلفية الداكن */
    border: 1px solid #30363d;
    transition: all 0.3s ease;
}



/* تدوير الزوايا لليمين (العناوين) */


/* تدوير الزوايا لليسار (القيم) */
.stat-row td {
    color: var(--Primary-E-Color);
    width: 50%;
    -webkit-border-radius: 12px;
    -moz-border-radius: var(--Main-Border-Radius);
    border-radius: 12px;
    padding: 8px;
    font-size: 14px;
    text-align: center;
}

/* تأثير عند تمرير الماوس */
.stat-row:hover {
    background: #ffffff33;
    transform: scale(1.01);
}

.stat-row:hover td {
    color: #fff; /* تغيير اللون للأبيض عند التمرير للفخامة */
}

/* 7. قائمة الانتقالات (Timeline) */
.player-transfers {
    display: block;
    position: relative;
    /* width: 94%; */
    background: var(--C-Color);
    -webkit-border-radius: 12px;
    -moz-border-radius: var(--Main-Border-Radius);
    border-radius: 12px;
    padding: 12px;
    overflow: hidden;
}
.player-transfers li { display: flex; align-items: center; padding: 15px 0; position: relative; }
.player-transfers li::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--B-Color);
    z-index: 1;
}
.s-r { flex: 1; text-align: left; padding-left: 15px; display: flex; flex-direction: column; }
.s-s { font-weight: bold; font-size: 13px; color: #fff; }
.s-d { font-size: 11px; color: #8b949e; }
.s-p { font-size: 12px; color: #00ff88; }
.s-c { width: 30px; display: flex; justify-content: center; z-index: 2; }
.l-c { width: 10px; height: 10px; background: #0d1117; border: 2px solid #00ff88; border-radius: 50%; }
.s-l { flex: 1; padding-right: 15px; }
.s-img {
    width: 40px;
    height: 40px;
    background: #161b22;
    border-radius: 50%;
    padding: 5px;
    display: flex;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.2));
    border-radius: 50%;
    padding: 5px;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 4px rgb(255 105 0 / 0%);
}
/* 8. قسم الألقاب (Trophies) */
.player-trophies {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
}
.player-trophies li {
    background: var(--C-Color);
    /* border: 1px solid #30363d; */
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    position: relative;
}
.trophies-numbers {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--Primary-A-Color);
    color: #000;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trophie-img { width: 35px; height: 35px; margin-bottom: 5px; }
/* 8. قسم الألقاب (Trophies) */
.trophie-name {
    font-size: 11px;
    color: var(--Primary-E-Color);
    height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    margin-top: 5px;
}

body > div.container {
    width: 100%;

}

/* 9. العناوين والأزرار */
.player-h5 h4 {
    border-right: 4px solid #00ff88;
    padding: 10px 0;
    margin: 25px 0 15px;
    font-size: 18px;
    font-weight: 700;
    color: var(--Primary-E-Color);
    display: block;
    text-align: center;
    background: linear-gradient(270deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 136, 0) 50%);
    border-radius: 0 4px 4px 0;
    line-height: 1.6;
    font-family: 'Cairo', sans-serif;
}

.show-more-btn {
    width: 100%;
    max-width: 200px;
    background: var(--C-Color);
    color: var(--Primary-A-Color);
    border: 1px solid #ffffff;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin: 20px auto;
    display: block;
}

/* 10. توافق الموبايل */
@media (max-width: 480px) {
    .PlayerStats { grid-template-columns: repeat(3, 1fr); gap: 5px; }
    .Stats span:last-child { font-size: 13px; }
    .SeasonStatistics tr { flex-direction: row; } /* يبقى اثنين بجانب بعض حتى في الموبايل */
    .SeasonStatistics th { padding: 8px; }
    .player-trophies { grid-template-columns: repeat(3, 1fr); }
}



/* --- التنسيق العام (الكمبيوتر) --- */
.advanced-stats {
    margin-top: 15px;
    direction: rtl; /* لضمان الاتجاه العربي */
}

.SeasonStatistics {
    width: 100%;
    border-collapse: separate;
    border-spacing: 10px; /* المسافة بين الكروت */
    table-layout: fixed;
}

.SeasonStatistics tr {
    display: table-row;
}

.SeasonStatistics th {
    background: var(--C-Color);
    /* border: 1px solid #30363d; */
    border-radius: 12px;
    padding: 15px;
    font-weight: normal;
    display: table-cell;
    vertical-align: middle;
    transition: transform 0.2s, border-color 0.2s;
}

/* توزيع النص داخل الكرت: العنوان يمين والقيمة يسار */
.SeasonStatistics th span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-direction: column;
}

/* تنسيق مسمى الإحصائية (رمادي) */
.SeasonStatistics th span:first-child {
    color: #8b949e;
    font-size: 13px;
    text-align: right;
}

/* تنسيق الرقم/القيمة (أبيض أو أخضر نيوني) */
.SeasonStatistics th span:last-child {
    color: var(--Primary-A-Color);
    font-weight: bold;
    font-size: 15px;
    text-align: left;
}

/* تأثير عند تمرير الماوس */
.SeasonStatistics th:hover {
    border-color: #00ff88;
    background: #ffffff33;
}

/* --- تنسيق الموبايل (أقل من 768px) --- */
@media (max-width: 768px) {
    .SeasonStatistics {
        border-spacing: 0 8px; /* تقليل المسافات الجانبية وزيادة العمودية */
    }

    .SeasonStatistics tr {
        display: flex;
        flex-direction: column; /* جعل الخانتين تحت بعض في الموبايل */
        width: 100%;
    }

    .SeasonStatistics th {
        display: flex;
        width: 100% !important;
        margin-bottom: 0;
        box-sizing: border-box;
        padding: 12px 15px;
        justify-content: space-between; /* الحفاظ على العنوان يمين والرقم يسار */
    }
}


/* يعمل فقط على الموبايل (شاشات أقل من 768px) */
@media (max-width: 768px) {
    .stats-tabs {
        display: flex !important; /* وضع التبويبات في سطر واحد */
        overflow-x: auto !important; /* تفعيل الشد الأفقي */
        padding-top: 10px !important; /* المسافة التي طلبتها */
        padding-bottom: 10px;
        gap: 10px;
        white-space: nowrap !important; /* منع العناصر من النزول لسطر جديد */
        
        /* إخفاء شريط التمرير ليبقى التصميم نظيفاً */
        scrollbar-width: none; 
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch; /* سحب ناعم على الآيفون */
    }

    .stats-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .stats-tab {
        flex: 0 0 auto !important; /* ضروري جداً لكي لا تنضغط التبويبات ويظهر السحب */
        display: inline-block !important;
    }
}
















/* الحاوية الرئيسية */
.AHMED-WEB-Standings-Top {
    background-color: #1a1a1a;
    padding: 40px 20px;
    direction: rtl;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    width: 88%;
    margin: 20px auto;
}

/* تنسيق الحاوية المغلفة */
.AHMED-WEB-Standings-Top-Right-Wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
}




@media only screen and (max-width: 768px) {
    /* 1. إعدادات الجدول الأساسية */
    table.SeasonStatistics {
        display: table !important;
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 6px !important; /* المسافة بين المربعات */
        table-layout: fixed !important; /* يضمن توزيع العرض 50% بدقة */
    }

    table.SeasonStatistics tbody {
        display: table-row-group !important;
    }

    table.SeasonStatistics tr {
        display: table-row !important;
    }

    /* 2. تنسيق المربع (الخلية) */
    table.SeasonStatistics tr th {
        display: table-cell !important;
        width: 50% !important;
        background: var(--C-Color);
        border-radius: 8px !important;
        padding: 12px 4px !important;
        vertical-align: middle !important;
        text-align: center !important;
    }

    /* 3. جعل الاسم والرقم تحت بعض وفي النص */
    table.SeasonStatistics th span {
        display: block !important; /* هذا ما يضع الرقم تحت الاسم */
        margin: 0 auto !important;
        text-align: center !important;
        width: 100% !important;
    }

    /* اسم الإحصائية (العلوي) */
    table.SeasonStatistics th span:first-child {
        font-size: 10px !important; /* صغرناه قليلاً ليناسب الموبايل */
        color: #8b949e !important;
        margin-bottom: 4px !important;
        line-height: 1.2 !important;
    }

    /* الرقم (السفلي) */
    table.SeasonStatistics th span:last-child {
        font-size: 16px !important;
        color: var(--Primary-A-Color);
        font-weight: bold !important;
        line-height: 1 !important;
    }
}



/* تنسيق الموبايل فقط (شاشات أقل من 768px) */
@media screen and (max-width: 768px) {

    /* دمج الحاوية الكبيرة وكارت اللاعب في العرض والتوسيط */
    .AHMED-WEB-Standings-Toop-Right-Wrap,
    .Ahmed-web-PlayerCard {
        width: 95% !important;

    }

}






























































/* الحاوية الرئيسية */
.Ahmed-web-Teams-list {
    padding: 20px 10px;
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* توزيع الشبكة (Grid) */
.Ahmed-web-cards {
    display: grid;
    /* الافتراضي للكمبيوتر: توزيع تلقائي */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* تصميم الكارت */
.Ahmed-web-cards .card {
    border-radius: 12px; /* زوايا أنعم للموبايل */
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #222;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* تأثير عند المرور */
.Ahmed-web-cards .card:hover {
    transform: translateY(-5px);
    border-color: #58a6ff; /* لون أزرق جذاب */
    box-shadow: 0 8px 20px rgba(88, 166, 255, 0.2);
}

.Ahmed-web-cards .card a {
    text-decoration: none;
    display: block;
    text-align: center;
}

/* منطقة الصورة */
.Ahmed-web-player-thumb {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* background: linear-gradient(180deg, #1d1d1d 0%, #161616 100%); */
}

.Ahmed-web-player-thumb img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    border: 17px solid #ffffff;
    /* background: #000; */
    transition: 0.3s;
    z-index: 2;
}

/* اسم اللاعب */
.Ahmed-web-card-name {
    display: block;
    padding: 8px 2px;
    color: #e6edf3;
    font-size: 11px; /* خط صغير ليناسب 4 أعمدة */
    font-weight: 600;
    background: #1f1f1f;
    border-top: 1px solid #282828;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* نقط عند طول الاسم */
}

/* --- تعديلات الموبايل (4 لاعبين بجانب بعض) --- */
@media (max-width: 480px) {
    .Ahmed-web-cards {
        /* تقسيم الشاشة لـ 4 أعمدة متساوية بالضبط */
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important; /* مسافات صغيرة جداً لتوفير مساحة */
    }

    .Ahmed-web-player-thumb {
        height: 70px !important; /* تقليل الارتفاع جداً */
    }

    .Ahmed-web-player-thumb img {
        width: 45px !important; /* تصغير الصورة لتناسب العمود */
        height: 45px !important;
        border-width: 1.5px !important;
    }

    .Ahmed-web-card-name {
        font-size: 9px !important; /* خط صغير جداً ليظهر الاسم كاملاً قدر الإمكان */
        padding: 5px 1px !important;
    }

    .Ahmed-web-cards .card {
        border-radius: 8px !important;
    }
}