/* بات‌استودیو — استایل‌های مدرن و چشم‌نواز (نسخه ۵) */
* { -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  letter-spacing: -0.015em;
  background-color: #070913;
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
}
::selection { background: rgba(59,130,246,.35); color: #fff; }

/* اسکرول‌بار ظریف */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e2640; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #33416b; }

/* کارت‌ها با استایل Glassmorphism مدرن */
.card {
  background: linear-gradient(180deg, rgba(17, 24, 43, 0.75) 0%, rgba(10, 14, 28, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.7), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  transition: border-color .2s ease;
}

.section-title {
  font-weight: 800; font-size: .95rem; color: #f1f5f9;
  display: flex; align-items: center; gap: .55rem; margin-bottom: .75rem;
}

/* ورودی‌ها و فرم‌ها */
.input {
  width: 100%; background: rgba(5, 8, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: .75rem; padding: .6rem .85rem;
  font-size: .875rem; color: #f1f5f9; outline: none;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}
.input:focus {
  border-color: #3b82f6;
  background: rgba(8, 12, 28, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.15);
}
.input::placeholder { color: #64748b; }

.lbl { display: block; font-size: .72rem; font-weight: 600; color: #94a3b8; margin-bottom: .35rem; }

/* دکمه‌های شکیل */
.btn-primary, .btn-ghost, .btn-danger, .btn-emerald {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .35rem; border-radius: .75rem; padding: .55rem 1.05rem;
  font-size: .8rem; font-weight: 700; cursor: pointer;
  transition: all .18s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 4px 18px -2px rgba(99, 102, 241, 0.45);
}
.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -3px rgba(99, 102, 241, 0.6);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 16px -2px rgba(16, 185, 129, 0.4);
}
.btn-emerald:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04); color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.08);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12); color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fee2e2;
}

/* بج‌ها */
.badge {
  font-size: .67rem; padding: .2rem .65rem; border-radius: 999px; font-weight: 700;
  display: inline-flex; align-items: center; gap: .25rem;
}
.badge.on { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge.off { background: rgba(148, 163, 184, 0.12); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }
.badge.tag { background: rgba(139, 92, 246, 0.16); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.3); }

/* تب‌ها */
.tab {
  padding: .85rem 1.15rem; font-size: .8rem; font-weight: 700;
  color: #94a3b8; white-space: nowrap; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .18s;
  display: flex; align-items: center; gap: .4rem;
}
.tab:hover { color: #f1f5f9; background: rgba(255, 255, 255, 0.02); }
.tab.active {
  color: #60a5fa;
  border-bottom-color: #3b82f6;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
}

/* کارت‌های آمار */
.stat-card {
  display: flex; align-items: center; gap: .9rem;
  background: linear-gradient(180deg, rgba(19, 26, 47, 0.8) 0%, rgba(10, 14, 28, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.1rem; padding: .95rem 1.1rem;
  transition: transform .2s ease, border-color .2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.3);
}
.stat-card i { font-size: 1.4rem; }
.stat-card b { display: block; font-size: 1.35rem; color: #fff; line-height: 1.2; font-family: monospace; }
.stat-card span { font-size: .68rem; color: #94a3b8; font-weight: 600; }

/* آیتم ربات */
.bot-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .75rem .9rem; border-radius: 1rem; cursor: pointer;
  border: 1px solid transparent; transition: all .18s;
}
.bot-item:hover { background: rgba(255, 255, 255, 0.04); }
.bot-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(99, 102, 241, 0.08) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 20px -5px rgba(59, 130, 246, 0.25);
}

/* آیتم دستور */
.cmd-item {
  background: rgba(9, 13, 27, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem; padding: .8rem 1rem;
  transition: all .2s ease;
}
.cmd-item:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(14, 20, 42, 0.75);
}
.cmd-item.inactive { opacity: .45; }

.code-area {
  background: #050814 !important;
  line-height: 1.65; tab-size: 2;
  resize: vertical;
}

.log-row {
  display: flex; gap: .6rem; align-items: baseline;
  padding: .45rem .65rem; border-radius: .6rem;
  transition: background .15s;
}
.log-row:nth-child(odd) { background: rgba(255, 255, 255, 0.02); }
.log-row:hover { background: rgba(255, 255, 255, 0.04); }
.log-in { color: #7dd3fc; font-weight: bold; }
.log-out { color: #86efac; font-weight: bold; }
.log-err { color: #fca5a5; font-size: .75rem; }

/* توست نوتیفیکیشن */
.toast {
  background: rgba(18, 25, 47, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem; padding: .8rem 1.15rem; font-size: .82rem; font-weight: 600;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  animation: toast-in .25s ease-out;
  max-width: 360px;
}
.toast.ok { border-color: rgba(16, 185, 129, 0.45); color: #a7f3d0; }
.toast.err { border-color: rgba(239, 68, 68, 0.45); color: #fecaca; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

kbd {
  background: rgba(255, 255, 255, 0.08); border-radius: .35rem;
  padding: .15rem .45rem; font-size: .68rem; font-family: monospace;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.lang-btn {
  border-radius: .75rem; padding: .55rem .9rem;
  font-size: .8rem; font-weight: 700; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08); transition: all .18s;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lang-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(124, 58, 237, 0.25));
  border-color: rgba(59, 130, 246, 0.6); color: #bfdbfe;
  box-shadow: 0 0 15px -3px rgba(59, 130, 246, 0.3);
}

/* شبیه‌ساز زنده تلگرام */
.tg-screen {
  background-color: #0e1621;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 16px 16px;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.tg-bubble-in {
  background: #182533;
  color: #f1f5f9;
  border-radius: 1rem 1rem 0 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.tg-bubble-out {
  background: #2b5278;
  color: #fff;
  border-radius: 1rem 1rem 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.tg-kb-btn {
  background: #202d3c;
  color: #70b4e8;
  border-radius: .5rem;
  padding: .45rem .8rem;
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  transition: all .15s;
  border: 1px solid rgba(255,255,255,0.04);
}
.tg-kb-btn:hover {
  background: #2b3b4e;
  color: #fff;
}
