/* ===== الصفحة ===== */
.cpl-players-page {
    padding: 20px;
    position: relative;
}

/* ===== عنوان الفريق ===== */
.cpl-players-page h2 {
    font-weight: 800;
    color: #e63946; /* أحمر */
    margin-bottom: 5px;
}

.cpl-players-page p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* ===== الجريد ===== */
.cpl-players-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 35px;
}

/* ===== الكارت ===== */
.cpl-player-card {
    background: linear-gradient(135deg, #0b1020, #111a35);
    border: 2px solid #ffd800;
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    transition: 0.3s;
}

.cpl-player-card:hover {
    transform: translateY(-5px);
    border-color: #ffffff;
}

/* ===== Avatar ===== */
.cpl-player-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #ffd800;
    color: #000;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

/* ===== اسم اللاعب ===== */
.cpl-player-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== البيانات ===== */
.cpl-player-card p {
    font-size: 13px;
    margin: 4px 0;
    line-height: 1.3;
}

/* ===== القيمة السوقية ===== */
.player-value {
    color: #ffd800;
    font-weight: bold;
    margin-top: 6px;
}
/* ===== Team Header ===== */
.cpl-team-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.cpl-team-flag {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
}

.cpl-team-header h2 {
    font-weight: 800;
    color: #e63946;
    margin: 0;
}
/* ===== دعم لون الفريق ===== */
.cpl-team-section {
    /* لو فيه اللون متحدد من PHP */
}

/* ===== border حسب الفريق ===== */
.cpl-team-section .cpl-player-card {
    border-color: var(--team-color, #ffd800);
}

/* ===== hover حسب الفريق ===== */
.cpl-team-section .cpl-player-card:hover {
    box-shadow: 0 0 0 2px var(--team-color, #ffd800);
}

/* ===== avatar حسب الفريق ===== */
.cpl-team-section .cpl-player-avatar {
    background: var(--team-color, #ffd800);
}
.cpl-player-avatar {
    position: relative;
    overflow: hidden;
}

/* الصورة */
.cpl-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* fallback */
.cpl-avatar-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: bold;
}
.cpl-back-link {
    
    position: absolute;
    right: 100px;
    top: 120px;

    margin-bottom: 15px;
}

.cpl-back-link a {
    display: inline-block;
    color: #ffd800;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

.cpl-back-link a:hover {
    text-decoration: underline;
}

.cpl-players-wrapper {
    transition: all 0.3s ease;
}

.cpl-players-wrapper.cpl-collapsed {
    display: none;
}

.cpl-team-header {
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 6px;
    padding: 6px 8px;
}
.cpl-team-header:hover {
    background: rgba(255, 216, 0, 0.08);
    transform: translateY(-1px);
}
.cpl-team-header:active {
    transform: scale(0.98);
}
.cpl-team-header h2 {
    transition: color 0.2s ease;
}

.cpl-team-header:hover h2 {
    color: #ffd800;
}

cpl-team-header::after {
    content: "▼";
    margin-left: auto;
    font-size: 12px;
    color: #aaa;
    transition: transform 0.3s;
}

.cpl-team-header:hover::after {
    color: #ffd800;
}


