.lightbox{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.lightbox img{
    max-width: 85%;
    max-height: 85%;
    border-radius: 12px;
    box-shadow: 0 0 35px #1e6fff;
    border: 2px solid #1e6fff;
}

#lightboxClose{
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 45px;
    color: white;
    cursor: pointer;
}

.clan-profile {
margin-top: 60px;
}

.clan-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    background:  linear-gradient(90deg, rgba(0, 255, 255, 0.1) 0%, transparent 100%), rgba(15, 15, 20, 0.8);
    border: 1px solid #0ff;
    padding: 30px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.clan-header:hover {
    border-color: #1e6fff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.clan-header h1{
    transition: all 0.3s ease;
}

.clan-header:hover h1{
    color: #1e6fff;
    text-shadow: 0 0 5px #1e6fff;
}

.profile-logo {
width: 140px;
height: 140px;
border-radius: 16px;
object-fit: cover;
border: 2px solid #1e6fff;
box-shadow: 0 0 20px #1e6fff88;
}

.clan-main-info h1 {
margin: 0;
font-size: 36px;
color: white;
text-shadow: 0 0 15px #1e6fff;
}

.clan-main-info p {
    display: inline-block;
    background: rgba(30, 111, 255, 0.15);
    border: 1px solid rgba(30, 111, 255, 0.4);
    padding: 8px 15px;
    border-radius: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 15px;
    color: #a0c4ff;
    transition: all 0.3s ease;
}

.clan-main-info p:hover {
    background: rgba(30, 111, 255, 0.3);
    box-shadow: 0 0 10px rgba(30, 111, 255, 0.5);
    transform: translateY(-2px);
}


.clan-description {
    background:  linear-gradient(90deg, rgba(0, 255, 255, 0.1) 0%, transparent 100%), rgba(15, 15, 20, 0.8);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #0ff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    margin-top: 30px;
    line-height: 1.8;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.clan-description:hover {
    border-color: #1e6fff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.clan-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    border-top: 1px solid rgba(30, 111, 255, 0.2);
    padding-top: 20px;
}

.clan-link-btn {
    background: rgba(30, 111, 255, 0.15);
    border: 1px solid rgba(30, 111, 255, 0.5);
    color: #fff;
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    
    flex: 1 1 auto;
    min-width: 120px;
}

.clan-link-btn:hover {
    background: rgba(30, 111, 255, 0.4);
    box-shadow: 0 0 15px rgba(30, 111, 255, 0.7);
    transform: translateY(-2px);
}


.clan-gallery {
margin-top: 40px;
}

.gallery-grid {
display: grid;
grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
gap: 20px;
}

.gallery-grid img {
width: 100%;
border-radius: 10px;
border: 1px solid #1e6fff44;
box-shadow: 0 0 10px #1e6fff44;
transition: 0.3s;
}

.gallery-grid img:hover {
transform: scale(1.05);
box-shadow: 0 0 18px #1e6fff;
}

/* =========================================
   استایل دکمه اصلی لایک کلن در صفحه
   ========================================= */
.clan-like_btn {
    display: flex;
    justify-content: center;
    margin: 30px 0 40px 0;
}

#btnLikeClan {
    font-size: 18px;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 30px;
    background: rgba(255, 0, 60, 0.05);
    border: 2px solid #ff003c;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#btnLikeClan:hover {
    background: #ff003c;
    color: #fff;
    box-shadow: 0 0 20px #ff003c, 0 0 40px #ff003c;
    transform: translateY(-3px) scale(1.02);
}

/* =========================================
   استایل‌های پنل مودال (Modal)
   ========================================= */
.modal {
    display: none; /* توسط JS تغییر می‌کند */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 15, 0.85); /* پس‌زمینه تاریک‌تر */
    backdrop-filter: blur(8px); /* افکت تار شدن پس‌زمینه */
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, rgba(15, 15, 20, 0.95), rgba(20, 25, 30, 0.95));
    border: 1px solid #1e6fff;
    box-shadow: 0 0 30px rgba(30, 111, 255, 0.3);
    border-radius: 15px;
    padding: 35px 25px;
    
    /* تنظیمات ریسپانسیو و جلوگیری از خروج از کادر */
    box-sizing: border-box; /* محاسبه پدینگ در داخل عرض تعیین شده */
    width: 90%;
    max-width: 400px;
    max-height: 90vh; /* جلوگیری از بیرون زدن از ارتفاع صفحه */
    overflow-y: auto; /* ایجاد اسکرول داخلی در صورت باز شدن کیبورد موبایل */
    
    text-align: center;
    color: #fff;
    
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* دکمه بستن مودال */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ff003c;
    font-size: 32px;
    line-height: 1;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #fff;
    text-shadow: 0 0 15px #ff003c;
    transform: scale(1.1) rotate(90deg);
}

/* عناوین و متن داخل مودال */
.modal-content h3 {
    margin-top: 0;
    color: #1e6fff;
    font-size: 22px;
    text-shadow: 0 0 10px rgba(30, 111, 255, 0.5);
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(30, 111, 255, 0.2);
    padding-bottom: 15px;
}

.modal-content p {
    font-size: 15px;
    margin-bottom: 15px;
    color: #a0c4ff;
}

/* فیلدهای ورودی (Input) */
.modal-content input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #1e6fff;
    color: #fff;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s ease;
}

.modal-content input[type="text"]:focus {
    box-shadow: 0 0 15px rgba(30, 111, 255, 0.5);
    border-color: #0ff;
    background-color: rgba(30, 111, 255, 0.1);
}

/* جایگزین کردن استایل دکمه‌های داخل مودال */
.modal-content .btn-neon {
    width: 100%;
    background: rgba(30, 111, 255, 0.15);
    color: #fff;
    border: 1px solid #1e6fff;
    padding: 12px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.modal-content .btn-neon:hover {
    background: #1e6fff;
    color: #fff;
    box-shadow: 0 0 20px #1e6fff;
    transform: translateY(-2px);
}

/* پیام‌های خطا و موفقیت */
.modal-content .message {
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
    font-weight: bold;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    0% { opacity: 0; transform: translate(-50%, -40%) scale(0.9); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}



@media (max-width: 768px) {
    .clan-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        margin-bottom: 25px;
    }

    .profile-logo {
        width: 100px;
        height: 100px;
    }

    .clan-main-info h1 {
        font-size: 28px;
    }
    
    .clan-main-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .clan-gallery , .clan-description{
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        padding: 25px 15px; /* کاهش حاشیه‌های داخلی در موبایل */
    }

    .modal-content h3 {
        font-size: 18px; /* کوچک‌تر کردن تیتر برای جا شدن بهتر */
        margin-bottom: 15px;
    }

    .modal-content input[type="text"] {
        font-size: 16px;
        padding: 10px;
        margin-bottom: 15px;
    }

    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 28px;
    }
}