* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #1a1a1a;
    --card: #222222;
    --border: #1c1c1c;
    --text: #ffffff;
    --muted: #8b8b8b;
    --blue: #55a0f0;
}

body {
    font-family: "IRANSANS", sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.6;
}

/* --- هدر و بخش اصلی --- */
.hero {
    padding: 80px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(circle at top, rgba(85, 160, 240, 0.08), transparent 60%), var(--bg);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: auto;
    gap: 40px;
    flex-wrap: wrap;
}

.profile-pic {
    width: 140px;
    height: 140px;
    border-radius: 358px; /* گردی تلگرامی */
    object-fit: cover;
    margin-bottom: 15px;
}

.hero-text { text-align: center; }
.hero-text h2 { font-size: 24px; margin-bottom: 5px; }
.hero-text p { color: var(--muted); margin-bottom: 15px; }

.hero-channel {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 12px;
    font-family: "IRANSANS";
    background: rgba(85, 160, 240, 0.1);
    color: var(--blue);
    text-decoration: none;
    font-size: 13px;
    transition: 0.3s;
}

/* --- پنل‌های وضعیت --- */
.hero-panel {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 20px;
    font-family: "IRANSANS";
    border-radius: 20px;
    text-align: center;
    min-width: 160px;
    transition: 0.3s;
}

.panel-title { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.panel-count { font-size: 24px; font-weight: 700; color: var(--text); }

.ads-show-btn {
    margin-top: 10px;
    background: var(--blue);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: 0.3s;
    font-family: "IRANSANS";
}
.ads-show-btn:hover { background: #448fd8; }

/* --- کانتینر اصلی و کارت‌ها --- */
.container { width: 92%; max-width: 1100px; margin: auto; padding: 50px 0; }
.section-title { font-size: 20px; margin-bottom: 25px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 4px; height: 20px; background: var(--blue); border-radius: 10px; }

.bot-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.bot-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 20px; transition: 0.3s; }
.bot-card:hover { border-color: #333; transform: translateY(-5px); }
.bot-card a { display: block; margin-top: 15px; padding: 10px; text-align: center; background: #1a1a1a; color: var(--text); text-decoration: none; border-radius: 12px; font-size: 13px; }

/* --- مودال (Telegram Glassmorphism) --- */
.modal {
    display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(54, 54, 54, 0.6); backdrop-filter: blur(15px);
}
.modal-content {
    background: #181818;
    margin: 15% auto;
    padding: 25px;
    width: 90%;
    max-width: 350px;
    border-radius: 24px;
    border: 1px solid #565656;
    text-align: center;
}
.close-btn { position: absolute; top: 15px; right: 20px; cursor: pointer; color: var(--muted); font-size: 28px; }
.ads-btn {
    display: block; width: 100%; padding: 12px; margin-top: 10px;
    background: #252525; color: white; text-decoration: none; border-radius: 12px; font-size: 14px;
}
.ads-btn:hover { background: #333; }

/* --- ریسپانسیو --- */
@media (max-width: 768px) {
    .hero-content { flex-direction: column; text-align: center; }
    .bot-list { grid-template-columns: 1fr; }
}
footer {
    text-align: center;
    padding: 30px 20px;
    font-size: .8rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    background: var(--bg); /* همرنگ پس‌زمینه */
    width: 100%;
}
footer a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}
/* --- تنظیمات منوی ناوبری مینیمال (مشکی و سفید) --- */
.top-nav {
  background: #000000; 
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #222; 
  width: 100%;
  display: flex;
  align-items: center;
}

.top-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 12px;
  margin: 0;
  padding: 5px 15px; 
  
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.top-nav ul::-webkit-scrollbar {
  display: none;
}

.top-nav ul li a {
  color: #888; /* خاکستری برای حالت غیرفعال */
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px; /* استایل مربعی‌تر و مدرن */
  transition: all 0.2s ease-in-out;
  display: inline-block;
  background: #111; /* پس‌زمینه مشکی کمی روشن‌تر */
  border: 1px solid #222;
}

/* حالت هاور و فعال (تم سفید) */
.top-nav ul li a:hover, 
.top-nav ul li a.active {
  background: #ffffff; /* پس‌زمینه سفید خالص */
  color: #000000; /* متن مشکی خالص */
  transform: translateY(0); /* حذف پرش برای استایل مینیمال */
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* --- اصلاحات موبایل --- */
@media (max-width: 768px) {
  .top-nav {
    padding: 12px 0;
  }

  .top-nav ul {
    justify-content: flex-start; 
    gap: 8px;
  }

  .top-nav ul li a {
    font-size: 12px;
    padding: 8px 15px;
  }
}
/* --- استایل‌های اصلی پنل چسبیده --- */
.alexander-sticky-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    /* افکت شیشه‌ای (Glassmorphism) */
    background: rgb(23, 23, 23,0.4);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    padding: 15px 0 10px 0;
}

/* حالت بسته شدن پنل (کشویی به پایین می‌رود) */
.alexander-sticky-panel.collapsed {
    transform: translateY(calc(100% - 30px));
}

.alexander-sticky-panel.collapsed .arrow-icon {
    transform: rotate(180deg);
}

/* دکمه باز و بسته کردن پنل */
.panel-toggle-btn {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    color: #fff;
    padding: 3px 20px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
}

.arrow-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    color: #ffffff;
}

.panel-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'IRANSANS';
}

/* چیدمان گرید برای دکمه‌ها */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

/* استایل هر دکمه داخل پنل */
.panel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.panel-icon {
    font-size: 20px;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

/* افکت هاور عمومی */
.panel-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    color: #fff;
}

.panel-item:hover .panel-icon {
    transform: scale(1.2);
}

/* رنگ‌های خاص برای هاور آیتم‌های کلیدی */
.panel-item.highlight-cyan:hover {
    border-color: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}
.panel-item.highlight-purple:hover {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* افکت تپنده (Pulse) طلایی برای اسپانسر */
.panel-item.highlight-gold {
    border-color: rgba(234, 179, 8, 0.3);
    background: rgba(234, 179, 8, 0.05);
    animation: goldGlow 2s infinite alternate;
}
.panel-item.highlight-gold:hover {
    border-color: #eab308;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.5);
}

@keyframes goldGlow {
    0% { box-shadow: 0 0 5px rgba(234, 179, 8, 0.1); }
    100% { box-shadow: 0 0 12px rgba(234, 179, 8, 0.3); }
}


/* --- بهینه‌سازی برای موبایل --- */
@media (max-width: 768px) {
    .alexander-sticky-panel {
        padding: 10px 0 5px 0;
    }
    
    .panel-grid {
        /* در موبایل به جای شلوغ شدن صفحه، آیتم‌ها در یک ردیف اسکرول‌شونده افقی قرار می‌گیرند */
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        gap: 8px;
    }
    
    .panel-grid::-webkit-scrollbar {
        height: 4px;
    }
    
    .panel-grid::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.1);
        border-radius: 10px;
    }

    .panel-item {
        flex: 0 0 110px; /* سایز دکمه‌ها در موبایل استاندارد می‌شود */
        scroll-snap-align: start;
        padding: 8px 5px;
        font-size: 10px;
    }
    
    .panel-icon {
        font-size: 16px;
    }
}
/* --- استایل پنجره کشویی مستندات (API Modal) --- */
.api-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.api-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.api-modal-container {
    width: 95%;
    max-width: 1200px;
    height: 85%;
    background: rgba(23, 23, 23, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.api-modal-overlay.active .api-modal-container {
    transform: translateY(0);
}

.api-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.api-modal-title {
    font-family: 'IRANSANS', Tahoma;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
}

.api-modal-close {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'IRANSANS';
    transition: all 0.3s ease;
}

.api-modal-close:hover {
    background: #e11d48;
    border-color: #e11d48;
}

.api-modal-body {
    flex-grow: 1;
    position: relative;
    background: transparent;
}

.api-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@media (max-width: 768px) {
    .api-modal-container {
        width: 100%;
        height: 90%;
    }
}
