:root {
    --primary-color: #0e4c92;
    --secondary-color: #1e7145;
    --accent-color: #e31b23;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background-color: var(--light-bg);
}

.navbar {
    background-color: var(--primary-color);
}

.card {
    transition: transform 0.3s;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    cursor: pointer;
    transition: transform 0.3s;
}

.card-img-top:hover {
    transform: scale(1.05);
}

.flag-img, .club-logo {
    width: 35px;
    height: 25px;
    object-fit: contain;
    margin-left: 5px;
}

.modal-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.section-title {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.previous-clubs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

#adminPanelContent {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.player-card {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.player-info {
    padding: 15px;
}

.player-name {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.player-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.detail-item strong, .nationality strong {
    margin-left: 5px;
    font-size: 0.9rem;
    color: #666;
}

.nationality {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.club-history {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.club-badge {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.achievement-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
    font-size: 0.8rem;
}

.guess-controls {
    margin-top: 15px;
    text-align: center;
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

/* For the image preview in player cards */
.player-image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-bottom: 100%; /* جعل الحاوية مربعة */
    cursor: pointer;
    background-color: #f0f0f0;
}

.player-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.player-image-container:hover .player-image-overlay {
    opacity: 1;
}

.zoom-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* تعديلات إضافية لضمان توحيد حجم صور اللاعبين في مختلف أجزاء التطبيق */
.img-fluid.rounded.mb-2 {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center top;
}

.player-full-image {
    width: 100%;
    height: 350px; /* حدد ارتفاع ثابت */
    object-fit: cover;
    object-position: center top; /* يركز على الجزء العلوي من الصورة */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-img-top {
        height: 160px;
        position: relative;
    }
}

/* تحسينات التجاوب للهواتف المحمولة */
@media (max-width: 576px) {
    /* تنسيقات عامة */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* تصغير العناوين */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    /* تعديل بطاقات اللاعبين */
    .col-md-4.col-lg-3.col-6 {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .player-card {
        margin-bottom: 15px;
    }
    
    .player-name {
        font-size: 0.95rem;
        margin-bottom: 5px;
        height: auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .player-details {
        font-size: 0.8rem;
    }

    .player-info {
        padding: 10px;
    }
    
    .detail-item {
        margin-bottom: 4px;
    }
    
    .detail-item strong, .nationality strong {
        font-size: 0.75rem;
        margin-left: 3px;
    }
    
    /* تعديلات جديدة لتكبير الأعلام والشعارات */
    .flag-img, .club-logo {
        width: 30px;
        height: 20px;
        margin-left: 3px;
    }
    
    /* تعديل لمظهر البطاقات */
    .player-image-container {
        border-bottom: 1px solid rgba(0,0,0,0.1);
        height: 150px; /* تحديد ارتفاع ثابت للصورة */
    }
    
    .card-img-top {
        position: absolute;
        height: 100%;
        object-fit: cover;
    }
    
    /* تعديل أزرار العرض */
    .btn-primary.w-100.mt-3 {
        margin-top: 10px !important;
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* تعديل مودال التفاصيل */
    .modal-dialog.modal-xl {
        margin: 10px;
    }
    
    .detail-label {
        min-width: 80px;
        font-size: 0.9rem;
    }
    
    /* تعديل قسم النوادي والإنجازات */
    .club-badge, .achievement-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    /* تعديل صفحة الإدارة */
    .table {
        font-size: 0.9rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
        width: 100%;
    }
    
    /* تعديل نموذج البحث */
    #playerSearchInput {
        font-size: 0.9rem;
    }
    
    /* تعديل مودال عرض الصور */
    .modal-img {
        max-height: 70vh;
    }
    
    /* تعديل تفاصيل اللاعب */
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-value {
        margin-top: 5px;
    }
    
    /* تعديل التاب (Tab) */
    .nav-pills .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .nav-item.mx-2 {
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
    }
    
    /* تحسين بطاقات نتائج البحث */
    .search-card {
        height: auto;
    }
    
    /* تعديلات على قسم البحث */
    #searchResultsContainer .col-md-4 {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* إضافات إضافية للشاشات المتوسطة */
@media (min-width: 577px) and (max-width: 991px) {
    .player-details-info {
        margin-top: 20px;
    }
    
    .club-history {
        justify-content: center;
    }
    
    /* تكبير أعلام المنتخبات وشعارات الأندية */
    .flag-img, .club-logo {
        width: 35px;
        height: 25px;
    }
    
    .player-image-container {
        height: 180px;
    }
}

/* Add font for Arabic text */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&family=Tajawal:wght@400;700&display=swap');

/* تنسيقات صفحة تفاصيل اللاعب */
.player-image-details {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-details-info {
    padding: 15px;
}

.details-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-row {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
}

.detail-label {
    min-width: 100px;
    font-weight: bold;
    color: var(--primary-color);
}

.detail-value {
    display: flex;
    align-items: center;
}

.details-subtitle {
    color: var(--primary-color);
    border-right: 3px solid var(--accent-color);
    padding-right: 10px;
    margin-bottom: 15px;
}

/* تحسين مظهر معلومات النوادي والإنجازات */
.club-history {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.club-badge {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.club-badge:hover {
    transform: translateY(-2px);
}

.achievement-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* تحديد حجم صورة اللاعب في نافذة التفاصيل */
.player-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.player-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* تنسيق أقسام التفاصيل */
.player-details {
    margin: 0;
}

.player-info {
    background-color: #f8f9fa;
    border-radius: 8px;
    height: 100%;
}

/* تحسين عرض البيانات التفصيلية */
.detail-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.detail-label {
    font-weight: bold;
    margin-left: 10px;
    min-width: 120px;
    color: var(--primary-color);
}

.detail-value {
    display: flex;
    align-items: center;
}

.flag-icon, .club-icon {
    width: 24px;
    height: 24px;
    margin-left: 8px;
    object-fit: contain;
}

/* تحسينات لعرض صورة اللاعب في تفاصيل اللاعب */
.player-image {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.player-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: white;
    border-radius: 8px;
    height: 100%;
}

/* تعديلات للشاشات الصغيرة */
@media (max-width: 768px) {
    .detail-item {
        margin-bottom: 10px;
    }
    
    .detail-label {
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    .player-image {
        max-height: 250px;
    }
}

/* تنسيقات جديدة لصفحة التفاصيل - مخصصة فقط للمودال */
#playerDetailsModal .player-details-container {
    display: flex;
    min-height: 400px;
    flex-direction: row-reverse;
}

#playerDetailsModal .details-right-section {
    flex: 0 0 40%;
    position: relative;
    height: 400px;
    overflow: hidden;
    background-color: #f8f9fa;
}

#playerDetailsModal .details-left-section {
    flex: 1;
    padding: 20px;
    position: relative;
}

#playerDetailsModal .player-big-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

#playerDetailsModal .player-name-header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: right;
}

#playerDetailsModal .info-section {
    margin-bottom: 30px;
}

#playerDetailsModal .section-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: flex-end;
}

#playerDetailsModal .section-title-text {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
    margin-right: 10px;
}

#playerDetailsModal .section-line {
    width: 5px;
    height: 25px;
    background-color: var(--accent-color);
    display: inline-block;
}

#playerDetailsModal .info-table {
    width: 100%;
}

#playerDetailsModal .info-table tr {
    height: 40px;
}

#playerDetailsModal .info-table td {
    padding: 5px 0;
}

#playerDetailsModal .info-label {
    text-align: left;
    font-weight: normal;
    color: #666;
    width: 120px;
}

#playerDetailsModal .info-value {
    text-align: right;
    font-weight: bold;
}

#playerDetailsModal .info-value img {
    width: 25px;
    height: 20px;
    object-fit: contain;
    margin-left: 5px;
    vertical-align: middle;
}

#playerDetailsModal .close-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#playerDetailsModal .close-btn:hover {
    background-color: #5a6268;
}

#playerDetailsModal .modal-footer {
    justify-content: flex-start !important;
    padding: 15px 20px;
}

/* تعديل لمظهر المودال */
#playerDetailsModal .modal-content {
    border-radius: 0;
    border: none;
}

#playerDetailsModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

#playerDetailsContent {
    padding: 0 !important;
}

/* تنسيقات خاصة بالأندية السابقة في التفاصيل */
#playerDetailsModal .previous-clubs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#playerDetailsModal .club-badge {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#playerDetailsModal .club-badge img {
    width: 30px;
    height: 25px;
    object-fit: contain;
    margin-left: 10px;
}

/* تنسيقات خاصة بالإنجازات */
#playerDetailsModal .achievements-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* تنسيقات جديدة للتصميم الجديد */
.player-details-new {
    min-height: 400px;
    direction: rtl;
}

.player-image-section {
    padding: 0;
    height: 400px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.player-info-section {
    padding: 20px;
    background-color: #fff;
}

.player-big-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

#playerDetailsModal .player-name-header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: right;
}

#playerDetailsModal .info-section {
    margin-bottom: 30px;
}

#playerDetailsModal .section-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: flex-end;
}

#playerDetailsModal .section-title-text {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
    margin-right: 10px;
}

#playerDetailsModal .section-line {
    width: 5px;
    height: 25px;
    background-color: var(--accent-color);
    display: inline-block;
}

#playerDetailsModal .modal-content {
    border-radius: 0;
    border: none;
}

#playerDetailsModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

#playerDetailsContent {
    padding: 0 !important;
}

/* تنسيقات الجدول والبيانات */
#playerDetailsModal .info-table {
    width: 100%;
}

#playerDetailsModal .info-table tr {
    height: 40px;
}

#playerDetailsModal .info-table td {
    padding: 5px 0;
}

#playerDetailsModal .info-label {
    text-align: left;
    font-weight: normal;
    color: #666;
    width: 120px;
}

#playerDetailsModal .info-value {
    text-align: right;
    font-weight: bold;
}

#playerDetailsModal .info-value img {
    width: 25px;
    height: 20px;
    object-fit: contain;
    margin-left: 5px;
    vertical-align: middle;
}

#playerDetailsModal .close-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#playerDetailsModal .close-btn:hover {
    background-color: #5a6268;
}

#playerDetailsModal .modal-footer {
    justify-content: flex-start !important;
    padding: 15px 20px;
}

/* تنسيقات خاصة بالأندية السابقة في التفاصيل */
#playerDetailsModal .previous-clubs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#playerDetailsModal .club-badge {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#playerDetailsModal .club-badge img {
    width: 30px;
    height: 25px;
    object-fit: contain;
    margin-left: 10px;
}

/* تنسيقات خاصة بالإنجازات */
#playerDetailsModal .achievements-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-content {
    border-radius: 15px;
    border: none;
}

.instructions-content {
    padding: 20px;
}

.instructions-content h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.instructions-content h5 {
    color: var(--primary-color);
    margin: 25px 0 15px;
    font-weight: bold;
}

.instructions-content .list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 12px 20px;
    margin-bottom: 1px;
    background-color: var(--light-bg);
}

.instructions-content .list-group-numbered {
    counter-reset: section;
}

.instructions-content .list-group-numbered > .list-group-item {
    display: flex;
    align-items: center;
}

.instructions-content .list-group-numbered > .list-group-item::before {
    content: counter(section);
    counter-increment: section;
    background-color: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    font-size: 0.9rem;
}

#instructionsModal .modal-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    border-radius: 15px 15px 0 0;
}

#instructionsModal .modal-footer {
    border-top: none;
    padding: 1rem;
}

#instructionsModal .btn-secondary {
    background-color: var(--primary-color);
    border: none;
    padding: 8px 25px;
    border-radius: 20px;
}

#instructionsModal .btn-secondary:hover {
    background-color: darken(var(--primary-color), 10%);
} 