/* styles.css */
:root {
    /* تم روشن */
    --bg-primary: #f8fafc; /* رنگ پس‌زمینه اصلی */
    --bg-secondary: #ffffff; /* رنگ پس‌زمینه ثانویه (برای دکمه‌ها و فیلدها) */
    --bg-card: #ffffff; /* رنگ پس‌زمینه کارت‌ها */
    --text-primary: #0f172a; /* رنگ متن اصلی */
    --text-secondary: #64748b; /* رنگ متن ثانویه */
    --border-color: #e2e8f0; /* رنگ حاشیه */
    --shadow: rgba(0, 0, 0, 0.08); /* رنگ سایه */
    --accent-primary: #6366f1; /* رنگ برجسته اصلی (بنفش) */
    --accent-secondary: #818cf8; /* رنگ برجسته ثانویه (بنفش روشن) */
    --success: #10b981; /* رنگ موفقیت (سبز) */
    --success-dark: #059669; /* رنگ موفقیت تیره */
    --pattern-color: rgba(99, 102, 241, 0.05); /* رنگ برای الگوی پس‌زمینه (حفظ شده برای استفاده احتمالی) */

    /* تعداد پیش‌فرض ستون‌های گرید برای دسکتاپ (این مقدار توسط JS در زمان بارگذاری اولیه تنظیم می‌شود) */
    --grid-columns: 3;
    /* اندازه فونت پیش‌فرض برای آیتم‌ها (این مقدار توسط JS تنظیم می‌شود) */
    --item-font-size: 1.0rem;
}

[data-theme="dark"] {
    /* تم تیره */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --accent-primary: #818cf8;
    --accent-secondary: #6366f1;
    --success: #10b981;
    --success-dark: #059669;
    --pattern-color: rgba(129, 140, 248, 0.05);
}

/* تنظیمات کلی برای همه عناصر */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* اضافه کردن فونت‌های اموجی سیستمی برای اطمینان از نمایش صحیح */
    font-family: 'Vazirmatn', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    /* پس‌زمینه تصویری جدید - URL توسط جاوااسکریپت تنظیم می‌شود */
    background-size: cover; /* پوشش کامل پس‌زمینه */
    background-position: center center; /* وسط چین کردن تصویر */
    background-attachment: fixed; /* ثابت نگه داشتن تصویر هنگام اسکرول */
    background-repeat: no-repeat; /* عدم تکرار تصویر */
    color: var(--text-primary); /* رنگ متن اصلی */
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden; /* جلوگیری از اسکرول افقی */
    /* اضافه کردن transition برای تغییر نرم پس‌زمینه */
    transition: background-image 1s ease-in-out, background-color 0.3s ease, color 0.3s ease;
}

/* .background-pattern div دیگر وجود ندارد */


/* کانتینر اصلی محتوا */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1; /* اطمینان از اینکه محتوا روی پس‌زمینه نمایش داده شود */
}

/* هدر صفحه */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 20px;
    box-shadow: 0 10px 25px var(--shadow);
    position: relative;
    overflow: hidden;
    color: white;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* افکت درخشش در هدر */
header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(30deg);
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
}

/* کانتینر دکمه تغییر تم */
.theme-toggle-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* برای سافاری */
    position: relative; /* برای موقعیت‌دهی آیکون‌ها */
}

/* آیکون‌های داخل دکمه تغییر تم */
.theme-toggle .icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* نمایش آیکون‌ها بر اساس تم */
[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: scale(0);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: scale(1);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: scale(1);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: scale(0);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(15deg);
}

/* استایل برای بخش اصلی فیلترها (انتخاب دسته و تعداد سطر) */
.main-filters-section {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 35px;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow);
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* استایل‌های عمومی برای filter-group در هر دو بخش */
.filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    display: block; /* برای اینکه label بالای select قرار بگیرد */
    font-weight: 600;
    font-size: 1.3rem; /* اندازه فونت بزرگتر برای label */
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.filter-group select {
    padding: 15px 25px; /* پدینگ بیشتر برای select */
    font-family: 'Vazirmatn', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    font-size: 1.1rem; /* اندازه فونت بزرگتر برای select */
    border: 2px solid var(--border-color);
    border-radius: 16px; /* گوشه‌های گردتر */
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 300px; /* حداقل عرض برای selectها در دسکتاپ */
    box-shadow: 0 4px 15px var(--shadow);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}


/* کانتینر آیتم‌ها */
.items-container {
    margin-bottom: 35px;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow);
    padding: 25px;
    min-height: 150px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.placeholder-text {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px;
    font-size: 1.1rem;
}

/* لیست آیتم‌ها (گرید) */
.items-list {
    display: grid;
    /* استفاده از متغیر CSS برای تعداد ستون‌ها */
    grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
    gap: 20px;
}

/* دکمه‌های آیتم */
.item-button {
    background: var(--bg-secondary); /* استفاده از رنگ ثانویه برای دکمه‌ها */
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    /* استفاده از متغیر CSS برای اندازه فونت */
    font-size: var(--item-font-size);
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex; /* برای چیدمان پرچم و متن */
    align-items: center;
    justify-content: center;
}

/* استایل جدید برای آیکون پرچم داخل دکمه آیتم */
.item-flag-icon {
    width: 24px; /* اندازه پرچم */
    height: 18px; /* نسبت ابعاد استاندارد پرچم */
    margin-left: 8px; /* فاصله از متن (چون rtl است) */
    border: 1px solid rgba(0,0,0,0.1); /* حاشیه ظریف برای پرچم */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 3px;
    object-fit: cover;
}

/* استایل جدید برای آیکون Cloudflare */
.item-cloudflare-icon {
    width: 20px; /* اندازه آیکون Cloudflare */
    height: 20px;
    margin-left: 8px; /* فاصله از متن یا پرچم */
    object-fit: contain;
}


/* افکت درخشش روی دکمه‌های آیتم */
.item-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.item-button:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.item-button:hover::before {
    left: 100%;
}

/* نمایش لینک */
.link-display {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
    animation: slideUp 0.5s ease; /* انیمیشن ورود */
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* انیمیشن slideUp */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-display.hidden {
    display: none;
}

.link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.link-header h3 {
    font-size: 1.4rem;
    color: var(--text-secondary);
}

/* دکمه کپی */
.copy-button {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.copy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.copy-button:active {
    transform: scale(0.98);
}

.link-wrapper {
    background: rgba(0, 0, 0, 0.03);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* استایل link-wrapper در تم تیره */
[data-theme="dark"] .link-wrapper {
    background: rgba(255, 255, 255, 0.05);
}

.link-text {
    font-family: 'Vazirmatn', monospace; /* استفاده از فونت monospace برای لینک */
    color: var(--text-secondary);
    word-break: break-all; /* شکستن کلمات طولانی */
    direction: ltr; /* جهت متن از چپ به راست برای لینک */
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* دکمه‌های اسکرول */
.scroll-buttons {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.scroll-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.scroll-button:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

/* نوتیفیکیشن کپی */
.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
    padding: 20px 30px;
    border-radius: 16px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    transform: translateX(200%); /* مخفی کردن اولیه */
    transition: transform 0.4s ease;
    z-index: 1000;
    border: none;
    font-size: 1.1rem;
}

.notification.show {
    transform: translateX(0); /* نمایش نوتیفیکیشن */
}

/* استایل‌های جدید برای بخش کلاینت‌ها */
.clients-section {
    margin-top: 40px;
    margin-bottom: 40px;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow);
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.clients-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--accent-primary);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* فیلترهای کلاینت (درون clients-section) */
.client-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* برای ریسپانسیو بودن */
    /* background و border و shadow از clients-section به ارث برده می‌شود */
    /* padding و border-radius نیز از clients-section به ارث برده می‌شود */
}

/* .client-filters label از filter-group label استفاده می‌کند */
/* .client-filters select از filter-group select استفاده می‌کند */


.clients-container {
    display: grid;
    /* استفاده از متغیر CSS برای تعداد ستون‌ها */
    grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
    gap: 30px;
    justify-content: center;
}

.client-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 6px 20px var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.client-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
    border-color: var(--accent-primary);
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px; /* خط رنگی بالا */
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: all 0.3s ease;
}

.client-card:hover::before {
    height: 10px; /* پهن شدن خط هنگام هاور */
}

.client-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    gap: 10px;
}

.client-header .core-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    background-color: rgba(0,0,0,0.05);
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.client-header h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin: 0;
}

.client-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1; /* برای اینکه توضیحات فضای موجود را اشغال کند */
}

.os-icons-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* برای شکستن آیکون‌ها به خط بعدی در صورت نیاز */
}

.os-icons-container img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.os-icons-container img:hover {
    transform: scale(1.15);
}

.download-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

.download-links a {
    background: var(--accent-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: block; /* برای گرفتن عرض کامل */
}

.download-links a:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* استایل‌های جدید برای مبدل‌های لینک اشتراک */
.converters-section {
    margin-top: 40px;
    margin-bottom: 40px;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow);
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.converters-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--accent-primary);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.converters-container {
    display: grid;
    /* استفاده از متغیر CSS برای تعداد ستون‌ها */
    grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
    gap: 30px;
    justify-content: center;
}

.converter-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 6px 20px var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.converter-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
    border-color: var(--accent-primary);
}

.converter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px; /* خط رنگی بالا */
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: all 0.3s ease;
}

.converter-card:hover::before {
    height: 10px; /* پهن شدن خط هنگام هاور */
}

.converter-card h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.converter-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.converter-card a.button {
    background: var(--accent-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: block; /* برای گرفتن عرض کامل */
    width: 100%;
}

.converter-card a.button:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* استایل‌های جدید برای بخش ابزارهای دیگر */
.tools-section {
    margin-top: 40px;
    margin-bottom: 40px;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow);
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tools-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--accent-primary);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tools-container {
    display: grid;
    /* استفاده از متغیر CSS برای تعداد ستون‌ها */
    grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
    gap: 30px;
    justify-content: center;
}

.tool-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 6px 20px var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
    border-color: var(--accent-primary);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px; /* خط رنگی بالا */
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: all 0.3s ease;
}

.tool-card:hover::before {
    height: 10px; /* پهن شدن خط هنگام هاور */
}

.tool-card h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.tool-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 15px; /* کاهش فاصله برای sub-descriptions */
    flex-grow: 1;
}

.tool-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    text-align: right; /* برای راست چین کردن لیست */
    width: 100%;
}

.tool-card ul li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    direction: rtl; /* برای اطمینان از راست چین بودن متن */
    text-align: right;
}

/* استایل جدید برای لینک‌ها در لیست توضیحات فرعی ابزارها */
.tool-card ul li a {
    color: var(--accent-primary); /* رنگ برجسته برای لینک‌ها */
    text-decoration: underline; /* زیرخط برای تشخیص بهتر لینک */
    transition: color 0.3s ease;
}

.tool-card ul li a:hover {
    color: var(--accent-secondary); /* تغییر رنگ هنگام هاور */
}


.tool-card a.button {
    background: var(--accent-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: block;
    width: 100%;
}

.tool-card a.button:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}


/* استایل‌های جدید برای فوتر و لینک‌های شبکه‌های اجتماعی */
.social-links-footer {
    margin-top: 60px; /* فاصله از محتوای بالا */
    padding: 30px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-radius: 20px; /* گوشه‌های گرد برای فوتر */
    box-shadow: 0 -8px 25px var(--shadow); /* سایه به سمت بالا */
    text-align: center;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.social-links-container {
    display: flex;
    justify-content: center; /* وسط چین کردن لینک‌ها */
    flex-wrap: wrap; /* برای ریسپانسیو بودن و شکستن به خط بعدی */
    gap: 25px; /* فاصله بین آیتم‌ها */
    max-width: 600px; /* حداکثر عرض برای کانتینر لینک‌ها */
    margin: 0 auto; /* وسط چین کردن کانتینر در فوتر */
}

.social-links-container a {
    display: block; /* برای اینکه لینک‌ها بلاک باشند و بتوانند عرض و ارتفاع بگیرند */
    transition: transform 0.3s ease; /* انیمیشن هنگام هاور */
}

.social-links-container a:hover {
    transform: translateY(-5px) scale(1.05); /* کمی بالا رفتن و بزرگ شدن هنگام هاور */
}

.social-links-container img {
    width: 80px; /* اندازه پیش‌فرض تصاویر */
    height: 80px;
    border-radius: 50%; /* گرد کردن تصاویر */
    object-fit: cover; /* اطمینان از پوشش کامل تصویر */
    border: 3px solid var(--accent-primary); /* حاشیه رنگی */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* سایه برای تصاویر */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .social-links-container img {
    border-color: var(--accent-secondary); /* تغییر رنگ حاشیه در تم تیره */
}


/* Media Queries برای ریسپانسیو بودن */
@media (max-width: 768px) {
    /* در موبایل، تعداد ستون‌ها و اندازه فونت توسط جاوااسکریپت تنظیم می‌شود */
    /* نیازی به override ثابت در اینجا نیست */

    .container {
        padding: 15px;
    }

    header {
        padding: 20px;
        margin-bottom: 30px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    /* تنظیمات نمایش (تعداد سطر و فیلترها) در موبایل */
    .main-filters-section {
        flex-direction: column; /* در موبایل به صورت ستونی نمایش داده شوند */
        gap: 15px; /* کاهش فاصله */
    }

    .filter-group select { /* برای selectهای داخل filter-group */
        min-width: unset;
        width: 100%;
        max-width: 250px;
    }

    /* .items-list, .clients-container, .converters-container, .tools-container
        حالا از --grid-columns استفاده می‌کنند که توسط JS تنظیم می‌شود. */

    .link-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .link-display {
        padding: 20px;
    }

    .notification {
        top: 20px;
        right: 20px;
        padding: 15px 25px;
        font-size: 1rem;
    }

    .scroll-buttons {
        left: 10px;
    }

    .scroll-button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .theme-toggle-container {
        top: 10px;
        left: 10px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* ریسپانسیو کردن لینک‌های اجتماعی در موبایل */
    .social-links-container {
        gap: 15px; /* کاهش فاصله بین آیتم‌ها در موبایل */
    }

    .social-links-container img {
        width: 60px; /* کوچک‌تر کردن تصاویر در موبایل */
        height: 60px;
    }

    /* ریسپانسیو کردن بخش کلاینت‌ها، مبدل‌ها و ابزارها */
    .clients-container, .converters-container, .tools-container {
        /* اینها نیز از --grid-columns استفاده می‌کنند */
        grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
    }

    .client-card, .converter-card, .tool-card {
        padding: 20px;
    }

    .client-header .core-icon {
        width: 30px;
        height: 30px;
    }

    .client-header h3 {
        font-size: 1.4rem;
    }

    .os-icons-container img {
        width: 30px;
        height: 30px;
    }

    .client-filters { /* این هم از display-settings استفاده می‌کند */
        flex-direction: column;
        gap: 15px;
    }

    .client-filters select {
        min-width: unset;
        width: 100%;
        max-width: 250px;
    }
}
