/* ==========================================================================
   EGAME.AZ - ULTIMATE CLAN SYSTEM (DARK & GOLD PREMIUM UI)
   ========================================================================== */

/* --- 1. BOŞ VƏZİYYƏT VƏ YARADILIŞ FORMASI --- */
.eg-clan-empty {
    padding: 80px 40px;
    background: rgba(255,255,255,0.01);
    border: 2px dashed rgba(255,255,255,0.05);
    border-radius: 30px;
    text-align: center;
}

.eg-clan-form {
    background: rgba(15, 15, 20, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 204, 0, 0.15);
    border-radius: 24px;
    padding: 40px;
    max-width: 450px;
    margin: 40px auto;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    animation: fadeIn 0.4s ease;
}

.eg-clan-input-group {
    margin-bottom: 20px;
    text-align: left;
}

.eg-clan-input-group label {
    display: block;
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-weight: 800;
}

.eg-clan-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: border-color 0.2s;
}

.eg-clan-input:focus {
    border-color: var(--accent);
    background: rgba(255, 204, 0, 0.02);
}


/* --- 2. KLAN MASTER DASHBOARD (İDARƏ PANELI) --- */
.eg-clan-layout {
    display: flex;
    gap: 25px;
    height: 550px; /* Sənin Launcher hündürlüyünə uyğun */
    animation: fadeIn 0.4s ease;
}

/* Sol Panel (Sidebar) */
.eg-clan-sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(15,15,20,0.8) 0%, rgba(5,5,8,0.9) 100%);
    border: 1px solid rgba(255, 204, 0, 0.1);
    border-radius: 20px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.eg-clan-sidebar-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 20px;
}

.eg-clan-big-logo {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.15);
    margin-bottom: 15px;
    object-fit: cover;
}

.eg-clan-title { 
    font-size: 20px; 
    font-weight: 900; 
    color: #fff; 
    margin: 0; 
    letter-spacing: 0.5px;
}

.eg-clan-tag { color: var(--accent); }

.eg-clan-role-badge {
    display: inline-block; 
    margin-top: 8px; 
    font-size: 10px;
    background: rgba(255,204,0,0.1); 
    color: var(--accent);
    padding: 4px 10px; 
    border-radius: 6px; 
    font-weight: 800; 
    text-transform: uppercase;
}

/* Sol Menyu Düymələri */
.eg-clan-nav { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    flex: 1; 
}

.eg-clan-nav-btn {
    background: transparent; 
    border: 1px solid transparent; 
    color: var(--text-muted);
    padding: 14px 16px; 
    border-radius: 12px; 
    cursor: pointer; 
    text-align: left;
    font-weight: 700; 
    font-size: 13px; 
    display: flex; 
    align-items: center; 
    gap: 12px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.eg-clan-nav-btn .material-icons { font-size: 18px; }

.eg-clan-nav-btn:hover { 
    background: rgba(255,255,255,0.03); 
    color: #fff; 
}

.eg-clan-nav-btn.active {
    background: rgba(255, 204, 0, 0.08); 
    border: 1px solid rgba(255, 204, 0, 0.2);
    color: var(--accent);
}

/* Sağ Panel (Dinamik Məzmun) */
.eg-clan-content {
    flex: 1;
    background: rgba(10, 10, 14, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 25px;
    overflow-y: auto;
    position: relative;
}

.eg-clan-content::-webkit-scrollbar { width: 4px; }
.eg-clan-content::-webkit-scrollbar-thumb { background: rgba(255,204,0,0.3); border-radius: 10px; }
.eg-clan-content::-webkit-scrollbar-thumb:hover { background: var(--accent); }


/* --- 3. ÜZVLƏR SİYAHISI (MEMBERS TAB) --- */
.eg-clan-member-item {
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding: 12px 20px;
    background: rgba(255,255,255,0.02); 
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 12px; 
    margin-bottom: 8px; 
    transition: background 0.2s, border-color 0.2s;
}

.eg-clan-member-item:hover { 
    background: rgba(255,255,255,0.05); 
    border-color: rgba(255,204,0,0.2); 
}


/* --- 4. KLAN ÇATI (CHAT TAB) --- */
.eg-clan-chat-box { 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}

.eg-clan-messages { 
    flex: 1; 
    overflow-y: auto; 
    padding-right: 10px; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    margin-bottom: 15px; 
}

.eg-msg-item { display: flex; gap: 12px; }
.eg-msg-item img { width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); }
.eg-msg-body { background: rgba(255,255,255,0.03); padding: 12px 16px; border-radius: 0 15px 15px 15px; border: 1px solid rgba(255,255,255,0.05); }
.eg-msg-author { font-size: 12px; font-weight: 800; color: var(--accent); margin-bottom: 4px; display: block; }
.eg-msg-text { font-size: 13px; color: #ddd; line-height: 1.4; }

.eg-chat-input-area { display: flex; gap: 10px; }
.eg-chat-input { flex: 1; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); padding: 15px; border-radius: 12px; color: #fff; font-size: 14px; transition: 0.2s; }
.eg-chat-input:focus { border-color: var(--accent); }
.eg-chat-send { background: var(--accent); border: none; width: 50px; border-radius: 12px; cursor: pointer; color: #000; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.eg-chat-send:hover { background: #fff; box-shadow: 0 0 15px rgba(255,255,255,0.3); }


/* --- 5. ÜMUMİ DÜYMƏLƏR (PRIMARY & SECONDARY) --- */
.primary-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
}

.primary-btn:hover {
    background: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.secondary-btn {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-transform: uppercase;
}

.secondary-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}















/* --- WHATSAPP STİLİ KLAN ÇATI --- */
.eg-clan-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 10px;
}

/* Tarix Ayırıcısı (Məs: Bugün, Dünən) */
.eg-chat-date-separator {
    text-align: center;
    margin: 15px 0 5px 0;
}
.eg-chat-date-separator span {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mesaj Sətiri */
.eg-msg-row {
    display: flex;
    width: 100%;
    margin-bottom: 5px;
    position: relative;
}

/* Digərlərinin Mesajı (SOLDA) */
.eg-msg-row.other { justify-content: flex-start; }
.eg-msg-row.other .eg-msg-bubble {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0 15px 15px 15px;
}

/* Mənim Mesajım (SAĞDA) */
.eg-msg-row.me { justify-content: flex-end; }
.eg-msg-row.me .eg-msg-bubble {
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid rgba(255, 204, 0, 0.2);
    border-radius: 15px 0 15px 15px;
}
.eg-msg-row.me .eg-msg-author { display: none; /* Öz adım görünməsin */ }
.eg-msg-row.me img { display: none; /* Öz avatarım görünməsin */ }

/* Baloncuk və İçərisi */
.eg-msg-bubble {
    padding: 10px 14px;
    max-width: 75%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.eg-msg-row img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    margin-right: 10px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}

.eg-msg-author {
    font-size: 11px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 4px;
}

.eg-msg-text {
    font-size: 13px;
    color: #eee;
    line-height: 1.5;
    word-break: break-word;
}

.eg-msg-time {
    font-size: 9px;
    color: rgba(255,255,255,0.3);
    align-self: flex-end;
    margin-top: 4px;
    font-weight: 600;
}

/* Silmə Düyməsi (Hover olanda çıxır) */
.eg-msg-delete {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
    border: 1px solid rgba(255, 77, 77, 0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: 0.2s;
}
.eg-msg-row:hover .eg-msg-delete { opacity: 1; }
.eg-msg-row.me .eg-msg-delete { left: -35px; } /* Mənim mesajımdırsa solda çıxsın */
.eg-msg-row.other .eg-msg-delete { right: -35px; } /* Başqasınınsa sağda çıxsın */
.eg-msg-delete:hover { background: #ff4d4d; color: #fff; }



















/* ==========================================================================
   EGAME.AZ - ISOLATED CLAN REQUESTS MODULE
   ========================================================================== */

.egame-clanreq-wrapper { 
    animation: fadeIn 0.3s ease; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

/* Boş Ekran (Empty State) */
.egame-clanreq-empty {
    text-align: center; 
    padding: 60px 20px; 
    background: rgba(0,0,0,0.3); 
    border-radius: 24px; 
    border: 1px dashed rgba(255,255,255,0.1); 
    box-shadow: inset 0 10px 30px rgba(0,0,0,0.5);
}

/* Üst Başlıq */
.egame-clanreq-header {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 5px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.egame-clanreq-title { 
    margin: 0; 
    color: #fff; 
    font-size: 16px; 
    font-weight: 900; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.egame-clanreq-badge {
    font-size: 11px; 
    background: rgba(255,204,0,0.1); 
    color: var(--accent); 
    padding: 6px 12px; 
    border-radius: 8px; 
    font-weight: 900; 
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,204,0,0.2);
}

/* Siyahı və Kartlar */
.egame-clanreq-list { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.egame-clanreq-item {
    display: flex; 
    align-items: center; 
    gap: 15px; 
    padding: 15px 20px; 
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%); 
    border: 1px solid rgba(255,255,255,0.04); 
    border-radius: 16px; 
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.egame-clanreq-item:hover {
    background: rgba(255,255,255,0.04); 
    border-color: rgba(255,204,0,0.2); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.4); 
    transform: translateY(-2px);
}

.egame-clanreq-avatar {
    width: 50px; 
    height: 50px; 
    border-radius: 14px; 
    border: 2px solid rgba(255,255,255,0.1); 
    object-fit: cover; 
    cursor: pointer; 
    transition: 0.2s;
}

.egame-clanreq-avatar:hover { 
    border-color: var(--accent); 
}

.egame-clanreq-info { flex: 1; }

.egame-clanreq-name { 
    font-weight: 900; 
    font-size: 16px; 
    color: #fff; 
    display: block; 
    margin-bottom: 4px; 
}

.egame-clanreq-desc { 
    font-size: 11px; 
    color: var(--text-muted); 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 4px;
}

/* Əməliyyat Düymələri (Qəbul / Rədd) */
.egame-clanreq-actions { 
    display: flex; 
    gap: 10px; 
}

.egame-clanreq-btn-reject {
    background: rgba(255,77,77,0.1); 
    color: #ff4d4d; 
    border: 1px solid rgba(255,77,77,0.3);
    width: 42px; 
    height: 42px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    transition: 0.2s;
}

.egame-clanreq-btn-reject:hover { 
    background: #ff4d4d; 
    color: #fff; 
    box-shadow: 0 0 15px rgba(255,77,77,0.4); 
    transform: scale(1.05);
}

.egame-clanreq-btn-accept {
    background: rgba(0,255,136,0.1); 
    color: #00ff88; 
    border: 1px solid rgba(0,255,136,0.3);
    width: 42px; 
    height: 42px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    transition: 0.2s;
}

.egame-clanreq-btn-accept:hover { 
    background: #00ff88; 
    color: #000; 
    box-shadow: 0 0 15px rgba(0,255,136,0.4); 
    transform: scale(1.05);
}











/* ==========================================================================
   EGAME.AZ - ISOLATED CLAN EVENTS/QUESTS MODULE
   ========================================================================== */

.egame-clanevent-wrapper { animation: fadeIn 0.3s ease; display: flex; flex-direction: column; gap: 15px; }

.egame-clanevent-header {
    display: flex; justify-content: space-between; align-items: center; 
    padding: 20px; background: linear-gradient(90deg, rgba(255,204,0,0.1) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,204,0,0.2); border-radius: 16px; margin-bottom: 10px;
}

.egame-clanevent-coin-box {
    display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.5);
    padding: 8px 15px; border-radius: 12px; border: 1px solid rgba(255,204,0,0.3);
}

/* Görev Kartı */
.egame-clanevent-card {
    background: rgba(20,20,25,0.8); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 20px;
    transition: 0.3s; position: relative; overflow: hidden;
}
.egame-clanevent-card:hover { border-color: rgba(255,204,0,0.2); background: rgba(30,30,35,0.9); transform: translateY(-2px); }

.egame-clanevent-icon {
    width: 60px; height: 60px; background: rgba(255,255,255,0.03); border-radius: 16px;
    display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.08);
}

.egame-clanevent-info { flex: 1; }
.egame-clanevent-title { font-size: 16px; font-weight: 900; color: #fff; margin-bottom: 6px; }
.egame-clanevent-desc { font-size: 12px; color: #888; line-height: 1.4; margin-bottom: 12px; }

/* Progress Bar */
.egame-clanevent-progress-bg {
    width: 100%; height: 8px; background: rgba(0,0,0,0.5); border-radius: 10px; overflow: hidden;
}
.egame-clanevent-progress-fill {
    height: 100%; background: linear-gradient(90deg, #3498db, #2ecc71); transition: 1s ease;
}

.egame-clanevent-progress-text { font-size: 10px; font-weight: 800; color: #aaa; margin-top: 6px; text-align: right; }

/* Mükafatlar */
.egame-clanevent-rewards { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.egame-clanevent-badge {
    display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 900;
    padding: 6px 12px; border-radius: 8px;
}
.egame-clanevent-badge.xp { background: rgba(0,255,136,0.1); color: #00ff88; border: 1px solid rgba(0,255,136,0.2); }
.egame-clanevent-badge.coin { background: rgba(255,204,0,0.1); color: var(--accent); border: 1px solid rgba(255,204,0,0.2); }

/* Tamamlanmış Görev State */
.egame-clanevent-card.completed { border-color: rgba(0,255,136,0.3); opacity: 0.8; }
.egame-clanevent-card.completed .egame-clanevent-progress-fill { background: #00ff88; }
.egame-clanevent-card.completed .egame-clanevent-icon { color: #00ff88; border-color: rgba(0,255,136,0.3); }










/* ==========================================================================
   EGAME.AZ - ISOLATED CLAN DISCOVERY WIDGET (RIGHT SIDEBAR)
   ========================================================================== */

.egame-clanwidget-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 12px; margin-bottom: 15px;
}

.egame-clanwidget-tabs {
    display: flex; gap: 5px; background: rgba(0,0,0,0.4); 
    padding: 4px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.03);
}

.egame-clanwidget-tab {
    background: transparent; border: none; color: #666; padding: 4px 8px;
    border-radius: 8px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center;
}
.egame-clanwidget-tab .material-icons { font-size: 16px; }
.egame-clanwidget-tab:hover { color: #fff; background: rgba(255,255,255,0.05); }
.egame-clanwidget-tab.active { background: rgba(255, 204, 0, 0.15); color: var(--accent); }

.egame-clanwidget-list {
    display: flex; flex-direction: column; gap: 10px;
}

/* Klan Kartları */
.egame-clanwidget-item {
    display: flex; align-items: center; gap: 12px; padding: 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, transparent 100%);
    border: 1px solid rgba(255, 255, 255, 0.03); border-radius: 14px; transition: 0.3s;
}
.egame-clanwidget-item:hover {
    background: rgba(255,255,255,0.05); border-color: rgba(255, 204, 0, 0.2);
    transform: translateX(3px); box-shadow: -3px 5px 15px rgba(0,0,0,0.2);
}

.egame-clanwidget-avatar {
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1); object-fit: cover;
}

.egame-clanwidget-info { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.egame-clanwidget-name {
    font-size: 13px; font-weight: 900; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
}
.egame-clanwidget-meta {
    font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase;
}

/* Qoşul Düyməsi */
.egame-clanwidget-apply-btn {
    background: rgba(255, 204, 0, 0.1); border: 1px solid rgba(255,204,0,0.3); color: var(--accent);
    padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 900;
    cursor: pointer; transition: 0.2s; text-transform: uppercase;
}
.egame-clanwidget-apply-btn:hover { background: var(--accent); color: #000; box-shadow: 0 0 10px rgba(255,204,0,0.4); }

.egame-clanwidget-status-text {
    font-size: 10px; font-weight: 900; text-transform: uppercase; background: rgba(255,255,255,0.05);
    padding: 4px 8px; border-radius: 6px; letter-spacing: 0.5px;
}
















/* --- WIDGET AXTARIŞ ÇUBUĞU --- */
.egame-clanwidget-search {
    display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.05); padding: 8px 12px; border-radius: 12px;
    margin-bottom: 15px; transition: 0.2s;
}
.egame-clanwidget-search:focus-within { border-color: var(--accent); background: rgba(0,0,0,0.6); box-shadow: 0 0 10px rgba(255,204,0,0.1); }
.egame-clanwidget-search .material-icons { font-size: 16px; color: #888; }
.egame-clanwidget-search input {
    flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 12px;
}
.egame-clanwidget-search input::placeholder { color: #555; }

/* Klan info kliklənə biləndir */
.egame-clanwidget-clickable { cursor: pointer; transition: 0.2s; }
.egame-clanwidget-clickable:hover .egame-clanwidget-name { color: var(--accent); }

/* --- İCTİMAİ KLAN PROFİLİ MODALI --- */
.egame-clanpublic-modal {
    width: 450px; background: #111; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8); overflow: hidden; animation: zoomIn 0.2s ease;
    text-align: center; position: relative;
}
.egame-clanpublic-cover {
    width: 100%; height: 140px; background-size: cover; background-position: center; position: relative;
}
.egame-clanpublic-cover::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 60px;
    background: linear-gradient(to top, #111, transparent);
}
.egame-clanpublic-avatar {
    width: 80px; height: 80px; border-radius: 16px; border: 3px solid #111;
    margin: -40px auto 10px auto; position: relative; z-index: 2; object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.egame-clanpublic-close {
    position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.5); color: #fff;
    border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; z-index: 3;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.egame-clanpublic-close:hover { background: #ff4d4d; }
.egame-clanpublic-stats {
    display: flex; justify-content: center; gap: 30px; margin: 20px 0; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); padding: 15px 0;
}
.egame-clanpublic-stat-box { display: flex; flex-direction: column; gap: 4px; }
.egame-clanpublic-stat-val { font-size: 16px; font-weight: 900; color: #fff; }
.egame-clanpublic-stat-lbl { font-size: 10px; color: #888; text-transform: uppercase; font-weight: 800; }






/* ==========================================================================
   EGAME.AZ - KLANLAR (CLANS) KƏSİN VƏ SON MOBİL UYĞUNLAŞDIRMASI
   ========================================================================== */

@media screen and (max-width: 768px) {
    
    /* 1. Başlığı gizlədirik */
    #page-clans .content-header {
        display: none !important;
    }

    /* 2. Səhifəni ekrana kilitləyirik (JS flexi bərpa edəcək) */
    #page-clans {
        height: calc(100dvh - 80px) !important;
        overflow: hidden !important;
        padding-bottom: 0 !important;
        width: 100% !important;
    }

    #page-clans[style*="display: block"],
    #page-clans[style*="display: flex"] {
        display: flex !important;
        flex-direction: column !important;
    }

    #clan-page-container {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    /* 3. İdarə Paneli Ana Qutusu */
    .eg-clan-layout {
        flex: 1 !important;
        flex-direction: column !important;
        height: 100% !important; 
        min-height: 0 !important;
        overflow: hidden !important; 
        margin: 0 !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 4. YAN MENYU (Sidebar) - Qoruma Altında! */
    .eg-clan-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important; /* Flexbox partlamasını əngəlləyir */
        overflow: hidden !important; 
        padding: 15px !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
        border-radius: 16px !important;
    }

    .eg-clan-big-logo { 
        width: 70px !important; 
        height: 70px !important; 
        margin-bottom: 10px !important; 
    }
    
    .eg-clan-title { font-size: 18px !important; }

    /* 5. SÜRÜŞƏN MENYU (Düymələr qətiyyən əzilməz) */
/* 5. SÜRÜŞƏN MENYU (Düymələr qətiyyən əzilməz və ALTINDA XƏTT OLACAQ) */
    .eg-clan-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; /* Alt-alta düşməni qadağan edir */
        overflow-x: auto !important; /* Sürüşməyə icazə */
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important; 
        touch-action: pan-x !important; /* Telefonu zorla sağa-sola sürüşməyə məcbur edir */
        width: 100% !important; 
        max-width: 100% !important; 
        padding-bottom: 12px !important; /* Altındakı xətt üçün yer açırıq */
        gap: 10px !important;
        box-sizing: border-box !important;
        
        /* Firefox brauzerləri üçün xətt ayarı */
        scrollbar-width: thin !important; 
        scrollbar-color: var(--accent) rgba(255,255,255,0.05) !important;
    }
/* Düymələrin sıxışmasının qarşısını alır */
    .eg-clan-nav-btn {
        white-space: nowrap !important; 
        padding: 10px 16px !important;
        flex: 0 0 auto !important; /* DÜYMƏLƏR QƏTİYYƏN ƏZİLMƏZ */
        background: rgba(255,255,255,0.03) !important;
    }

    /* --- SƏN İSTƏYƏN O ZƏRİF SÜRÜŞDÜRMƏ XƏTTİ (SCROLLBAR) --- */
    .eg-clan-nav::-webkit-scrollbar { 
        display: block !important; /* Xətti görünür edirik */
        height: 4px !important; /* Çox zərif, incə bir xətt */
    }
.eg-clan-nav::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05) !important; /* Xəttin arxa planı (yol) */
        border-radius: 10px !important;
    }

    .eg-clan-nav::-webkit-scrollbar-thumb {
        background: var(--accent) !important; /* Sənin qızılı/yaşıl rənginlə dolacaq */
        border-radius: 10px !important;
    }
    /* 6. MƏZMUN VƏ ÇAT BAŞLIĞI HİSSƏSİ (Sən sildiyin kodları bərpa etdim) */
    .eg-clan-content {
        flex: 1 !important; /* VACİB: Səhifəni tam doldurması üçün */
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: auto !important; /* Tab içərisi sürüşsün */
        min-height: 0 !important; /* Çat inputu üçün kilid */
        padding: 15px !important;
        border-radius: 16px !important;
    }

    /* 7. KLAN ÇATI - İNPUT VƏ SCROLL KİLİDİ */
    .eg-clan-chat-box {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 0 !important;
        width: 100% !important;
    }

    .egame-clanchat-messages {
        flex: 1 !important;
        overflow-y: auto !important;
        padding-right: 5px !important;
        margin-bottom: 10px !important;
    }

    .egame-clanchat-input-bar {
        flex-shrink: 0 !important; /* İNPUT ƏSLA AŞAĞI QAÇA BİLMƏZ */
        margin-top: auto !important; 
        margin-bottom: 10px !important; 
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .eg-msg-bubble { max-width: 90% !important; } 

    /* 8. Digər Kartlar (İstəklər, Görevlər, Form) */
    .eg-clan-empty { padding: 40px 20px !important; }
    .eg-clan-form { padding: 25px 20px !important; margin: 20px auto !important; width: 100% !important; box-sizing: border-box !important; }

    .egame-clanreq-item, .egame-clanevent-card {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
        padding: 20px 15px !important;
    }
    
    .egame-clanreq-actions { width: 100% !important; justify-content: center !important; margin-top: 10px !important; }
    .egame-clanreq-btn-accept, .egame-clanreq-btn-reject { flex: 1 !important; max-width: 140px !important; }

    .egame-clanevent-rewards { flex-direction: row !important; width: 100% !important; justify-content: center !important; flex-wrap: wrap !important; margin-top: 5px !important; }
    .egame-clanevent-progress-text { text-align: center !important; }

    /* 9. İctimai Klan Profili Modal */
    .egame-clanpublic-modal { width: 90% !important; max-width: 360px !important; }
    .egame-clanpublic-stats { gap: 15px !important; flex-wrap: wrap !important; justify-content: space-evenly !important; }
}