/* =========================================
   Qigong KalOnline - Ultimate List Edition 
   (Matched to Reference Image)
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&display=swap');

.ranking-container {
    width: 100%;
    max-width: 950px; /* عرض مثالي للقوائم */
    margin: 0 auto;
    font-family: 'Cinzel', serif; /* الخط الافتراضي للعناوين والأرقام */
    background: transparent;
}

/* --- عنوان الرانك وشريط البحث --- */
.ranking-header {
    text-align: center;
    margin-bottom: 20px;
}

.ranking-title {
    color: #d3a168;
    font-size: 18px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(211, 161, 104, 0.2);
    border-radius: 4px;
    color: #d3a168;
    padding: 10px 20px;
    width: 300px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}
.search-input:focus { border-color: #d3a168; background: rgba(0, 0, 0, 0.7); }

/* --- حاوية السكرول (مخفي وأنيق) --- */
.list-scroll-wrapper {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    
    /* السطر الجديد لضبط السكرول */
    overscroll-behavior: contain; 
    
    scrollbar-width: thin;
    scrollbar-color: rgba(211, 161, 104, 0.3) transparent;
}

/* سكرول كروم/إيدج */
.list-scroll-wrapper::-webkit-scrollbar { width: 3px; }
.list-scroll-wrapper::-webkit-scrollbar-track { background: transparent; }
.list-scroll-wrapper::-webkit-scrollbar-thumb { background: rgba(211, 161, 104, 0.3); border-radius: 5px; }

/* =========================================
   تصميم الصفوف (نفس الصورة بالضبط)
========================================= */
.qigong-row {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    background: rgba(15, 12, 10, 0.6); /* لون خلفية غامق وشفاف */
    border-bottom: 1px solid rgba(255, 255, 255, 0.03); /* فاصل خفيف */
    transition: background 0.2s ease, transform 0.2s ease;
    margin-bottom: 4px;
    border-radius: 4px;
}

/* تأثير الماوس */
.qigong-row:hover {
    background: rgba(211, 161, 104, 0.08);
    transform: translateX(3px); /* حركة خفيفة لليمين */
}

/* تمييز المركز الأول (الخط الذهبي على الشمال) */
.qigong-row.top-1 {
    border-left: 4px solid #ffd700; /* خط ذهبي متوهج */
    background: linear-gradient(90deg, rgba(255,215,0,0.05) 0%, rgba(15,12,10,0.6) 30%);
}

/* تمييز المركز الثاني والثالث بخطوط هادئة */
.qigong-row.top-2 { border-left: 4px solid #c0c0c0; background: linear-gradient(90deg, rgba(192,192,192,0.03) 0%, rgba(15,12,10,0.6) 30%); }
.qigong-row.top-3 { border-left: 4px solid #cd7f32; background: linear-gradient(90deg, rgba(205,127,50,0.03) 0%, rgba(15,12,10,0.6) 30%); }

/* --- تقسيمات الأعمدة داخل الصف --- */
.col-rank {
    width: 40px;
    color: #c2954a;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    justify-content: center;
}

/* تأثيرات التاج للمراكز الأولى */
.animated-crown { width: 30px; height: 30px; animation: floatCrown 2.5s ease-in-out infinite; }
.glow-gold { filter: drop-shadow(0 0 10px #ffd700); }
.glow-silver { filter: drop-shadow(0 0 8px #c0c0c0); }
.glow-bronze { filter: drop-shadow(0 0 6px #cd7f32); }

@keyframes floatCrown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* الرينج الأنيق حول الصورة */
.col-icon {
    position: relative;
    width: 40px;
    height: 40px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.magic-ring {
    position: absolute;
    width: 100%; height: 100%;
    border: 1px solid transparent;
    border-top: 1px solid rgba(211, 161, 104, 0.7);
    border-bottom: 1px solid rgba(211, 161, 104, 0.7);
    border-radius: 50%;
    animation: spinRing 4s linear infinite; /* الدوران المستمر */
}
.magic-glow {
    position: absolute; width: 80%; height: 80%; background: rgba(211, 161, 104, 0.15);
    border-radius: 50%; animation: pulseGlow 2s ease-in-out infinite;
}
.class-img { width: 24px; height: 24px; position: relative; z-index: 2; filter: drop-shadow(0 0 2px #000); }

@keyframes spinRing { 100% { transform: rotate(360deg); } }
@keyframes pulseGlow { 0%, 100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.2); opacity: 0.6; } }

/* دمج الاسم والتخصص فوق بعض */
.col-name-spec {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* الحل السحري لمشكلة الأسماء - خط يدعم الحروف الصغيرة */
.p-name { 
    color: #fff;  
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important; 
    font-weight: bold;
    font-size: 15px; 
    letter-spacing: 0.5px; 
    text-transform: none !important; 
}

.p-spec { color: #777; font-size: 11px; letter-spacing: 1px; margin-top: 2px; }

/* دمج الكلمة الصغيرة فوق الرقم */
.col-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    width: 100px;
}
.stat-label { color: #666; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }
.stat-val { color: #d3a168; font-weight: bold; font-size: 16px; }

/* تصميم الجيلد المنفصل كـ Badge - تم تعديل الخط هنا أيضاً */
.col-guild { width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.guild-badge { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important; /* خط يدعم الحروف الصغيرة */
    text-transform: none !important; /* إلغاء التكبير الإجباري */
    background: rgba(0, 0, 0, 0.5); 
    border: 1px solid rgba(166, 124, 82, 0.3); 
    color: #a67c52; 
    padding: 3px 10px; 
    border-radius: 12px; 
    font-size: 11px; /* تم التكبير قليلاً لتناسب الخط الجديد */
    font-weight: bold; 
    letter-spacing: 1px; 
}
.guild-none { color: #444; border-color: rgba(255,255,255,0.05); }

/* --- نظام الخبرة المربعات --- */
.col-exp { width: 160px; display: flex; flex-direction: column; align-items: center; }
.exp-text { color: #d3a168; font-size: 9px; font-weight: bold; margin-bottom: 3px; }
.exp-boxes { display: flex; gap: 3px; }
.exp-box { width: 10px; height: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 1px; }
.exp-box.filled { background: #c2954a; border-color: #e0b47b; }
.exp-box.charging { background: rgba(194, 149, 74, 0.3); border-color: #c2954a; animation: pulse 1.5s infinite; }

/* --- نقطة الحالة (Status) --- */
.col-status { width: 60px; display: flex; align-items: center; justify-content: flex-end; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-online { background: #2ecc71; box-shadow: 0 0 5px #2ecc71; animation: statusGlow 2s infinite alternate; }
.status-offline { background: #2ecc71; opacity: 0.4; } 

@keyframes pulse { 0% { opacity: 0.5; } 100% { opacity: 1; } }
@keyframes statusGlow { from { box-shadow: 0 0 2px #2ecc71; } to { box-shadow: 0 0 8px #2ecc71; } }

/* =========================================
   Top 4 Classes Cards (Ultra-Thin Live Edition)
========================================= */
.top-classes-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 25px;
    width: 100%;
}

.top-card {
    flex: 1;
    background: rgba(15, 12, 10, 0.65); 
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: floatCrown 2.5s ease-in-out infinite; 
}

.top-card:hover {
    background: rgba(211, 161, 104, 0.08);
    border-color: rgba(211, 161, 104, 0.1);
}

.tc-knight { border-left: 3px solid #ffd700; box-shadow: 0 0 15px rgba(255,215,0,0.15); }
.tc-archer { border-left: 3px solid #c0c0c0; box-shadow: 0 0 12px rgba(192,192,192,0.1); }
.tc-mage   { border-left: 3px solid #cd7f32; box-shadow: 0 0 10px rgba(205,127,50,0.1); }
.tc-thief  { border-left: 3px solid #999;     box-shadow: 0 0 8px rgba(153,153,153,0.1); }

/* --- تنسيق صورة الشخصية --- */
.tc-img-container {
    width: 55px; 
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.tc-char-img {
    height: 100%; 
    object-fit: contain;
    filter: drop-shadow(0 2px 5px #000); 
}

.tc-crown {
    position: absolute;
    width: 20px;
    height: 20px;
    top: -5px; 
    z-index: 3;
    animation: floatCrown 2.5s ease-in-out infinite;
}

/* --- تنسيق النصوص في الكروت العلوية --- */
.tc-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    gap: 3px;
}

.tc-title {
    color: #d3a168;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(211, 161, 104, 0.3);
    padding-bottom: 2px;
    margin-bottom: 2px;
    width: 100%;
    text-align: right;
}

.tc-detail {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    width: 100%;
}

.tc-label { color: #888; font-size: 9px; text-transform: uppercase; }

/* تغيير الخط لأسماء اللاعبين في الكروت العلوية أيضاً لتجنب الكابتل الإجباري */
.tc-val { 
    color: #fff; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-weight: bold; 
    letter-spacing: 0.5px; 
    text-transform: none !important;
}

.tc-val-lvl { color: #c2954a; font-weight: bold; font-family: 'Cinzel', serif; }