.leagues-single {
    width: 100%;
    overflow: hidden;
}

.leagues-single table {
    width: 100%;
}

.leagues-single table th,
.leagues-single table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.leagues-single table th {
    background: #111;
    color: #fff
}

.leagues-single table thead {
    background: initial;
    font-weight: bold;
}

.leagues-single table tbody tr:hover {
    background: initial;
}

.leagues-single .team-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* لمحاذاة العناصر على اليسار */
    gap: 10px;
    /* تباعد بين الصورة والاسم */
    white-space: nowrap;
    /* منع الاسم من الانتقال لسطر جديد */
    overflow: hidden;
    text-overflow: ellipsis;
    /* إضافة "..." إذا كان الاسم طويلًا جدًا */
}

.leagues-single .team-logo {
    width: 30px;
    height: 30px;
    /*    border-radius: 50%;*/
    flex-shrink: 0;
    /* منع الصورة من التصغير */
}

.leagues-single .team-name {
    /*    flex-grow: 2;  السماح للاسم بالتمدد داخل المساحة المتاحة */
    overflow: hidden;
    text-overflow: ellipsis;
    /* إضافة "..." إذا كان الاسم طويلًا */
}

.leagues-single table thead {
    background: initial;
    font-weight: bold;
    background: #1c1b1b;
}

.tournament-subtitle {
    margin-top: 24px;
    display: flex;
    gap: 36px;
    justify-content: flex-start;
}
.tournament-subtitle .tab-button {
    font-size: 17px;
    color: #707488;
    padding: 15px 0;
    cursor: pointer;
}
.tournament-subtitle .tab-button.active {
    color: #ff0000;
    border-bottom: 2px solid #ff0000;
    font-weight: 600;
}
.tournament-logo-wrapper img{
    width: auto;
    height: 90px;
}
.dark-mode .tournament-subtitle .tab-button.active {
    color: #00ff83;
    border-bottom: 2px solid #00ff83;
}

.leagues-single .tab-content {
    display: none;
}

.leagues-single .tab-content.active {
    display: block;
}

.leagues-single .player-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.leagues-single .team-logo {
    width: 25px;
    height: 25px;
    border-radius: 50%;
}

.leagues-single .leagues_items .box {
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    font-family: Tajawal;
    border: 1px solid #dddfe2;
    background: #f9f9f9;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    background: #fff;
    padding: 10px;
}

.leagues-single .leagues_items .box-title {
    font-size: 18px;
    height: 50px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 15px;
    background: #000000;
    border-bottom: 1px solid #dadde1;
    margin: -20px -20px 20px;
    color: #fff;
}

.leagues-single .leagues_items .box .box-title {
    margin: -10px -10px 10px;
}

.leagues-single .leagues_items .league_item {
    padding: 10px;
    background: #f5f5f5;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.leagues-single .leagues_items .league_item:last-child {
    margin-bottom: 0px;
}

.leagues-single .leagues_items .league_item a.league_inner {
    display: flex;
    align-items: center;
}

.leagues-single .leagues_items .league_item a.league_inner img {
    margin-left: 10px;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 13px !important;
}

.leagues-swiper {
    padding: 20px 30px;
}

.leagues-swiper .swiper-slide {
    height: auto;
}

.leagues-swiper .swiper-button-next, .leagues-swiper .swiper-button-prev {
    color: #000000;
    background: #e3e5f0;
    width: 30px;
    height: auto;
    margin-top: 0;
    border-radius: 3px;
    top: 0;
    bottom: 0;
}
.swiper-button-prev, .swiper-rtl .swiper-button-next {
    left: 0;
    right: auto;
}
.swiper-button-next, .swiper-rtl .swiper-button-prev {
    right: 0;
    left: auto;
}

.dark-mode .leagues-swiper .swiper-button-next, .dark-mode .leagues-swiper .swiper-button-prev {
    background: #272b3d;
}

#scorers-tab p {
    text-align: center;
    background: #f7f7f7;
    padding: 30px;
    margin-top: 30px;
    overflow: hidden;
    margin-bottom: 0
}

.player-img-name {
    display: flex;
    align-items: center;
    gap: 10px;
}
span.player-name {
    display: flex;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark-mode #scorers-tab p {
    background: #191d2d;
}

.dark-mode .leagues-single table th {
    background: #2a2d3d;
}

.dark-mode .leagues-single table th,
.dark-mode .leagues-single table td {
    border-bottom: 1px solid #2a3035;
}

.dark-mode tbody {
    background: #191d2d;
}


.play,
.win,
.draw,
.losses,
.goals_for,
.goals_against,
.points, .diff {
    text-align: center !important;
}
/* تخصيص المساحة لعمود الترتيب */
.arrangement {
    width: 5%;
    text-align: center
}
section.leagues-section {
    width: 100%;
    overflow: hidden;
    background: #fbfbfb;
    border-radius: 10px;
    border: 1px solid #ddd;
}
.dark-mode section.leagues-section {
    background: #191d2d;
    border: none;
}

/* تكيف مع الأجهزة الصغيرة */
@media (max-width: 768px) {

    .leagues-single .win,
    .leagues-single .draw,
    .leagues-single .losses,
    .leagues-single .goals_for,
    .leagues-single .goals_against, .leagues-single .diff {
        display: none !important;
    }

    .leagues-single table th,
    .leagues-single table td {
        font-family: serif;
        padding: 10px;
    }

    .player-img-name {
        min-width: 90px;
        flex-direction: column;
    }
    .player, .team, .arrangement{
        text-align: center !important;
    }

    th.arrangement,
    td.arrangement {
        width: 20% !important;
    }
    .tournament-subtitle {
        margin-top: 10px;
    }
    .tournament-logo-wrapper img{
        width: auto;
        height: 55px;
    }
    .tournament-title-section h2{
        font-size: 22px
    }
    .tournament-subtitle .tab-button {
        font-size: 14px;
    }
}
