/* ===== بنر الشعار في الصفحة الرئيسية ===== */
.home-banner {
  display: block; width: 100%; height: 300px; object-fit: cover; object-position: center 40%;
  border-radius: var(--radius-xl); border: 1px solid rgba(96, 165, 250, .25);
  box-shadow: 0 30px 70px -30px rgba(59, 130, 246, .6); margin-bottom: 18px;
}
@media (max-width: 800px) { .home-banner { height: 200px; } }

/* عناوين فضية معدنية */
h1, .home-hero h1 {
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 55%, #64748b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-text { background: linear-gradient(90deg, #60a5fa, #e2e8f0 50%, #3b82f6) !important; -webkit-background-clip: text; background-clip: text; color: transparent; }
.card { border-color: rgba(96, 165, 250, .18); }
.card:hover { box-shadow: 0 30px 60px -28px rgba(59, 130, 246, .55), var(--shadow); }
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(147, 197, 253, .7), transparent); pointer-events: none;
}

/* خلفية شبكية تقنية */
body {
  background-image: none;
}

/* أزرار بتدرج أزرق فضي */
.btn.primary, .tabs a.on, .tab-groups a.on, .toggle input:checked + .switch {
  background: linear-gradient(135deg, #e2e8f0, #3b82f6 55%, #1e3a8a) !important;
  color: #04060c !important;
}
.btn.primary { box-shadow: 0 12px 28px -12px rgba(59, 130, 246, .85); }
.stat b, .stat-big b, .score .pct { background: linear-gradient(90deg, #e2e8f0, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== الشريط الجانبي: أقسام واضحة، والرئيسية وتسجيل الخروج في الأسفل =====
.side { display: flex; flex-direction: column; gap: 2px; }
.side-server h3:first-child { margin-top: 0; }
.side a .ic {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  background: rgba(255, 255, 255, .04); font-size: 15px; flex-shrink: 0; margin-inline-end: 10px;
}
.side a { justify-content: flex-start; }
.side a.on { font-weight: 800; color: #eff6ff; }
.side a.on .ic { background: rgba(59, 130, 246, .25); }
.side a.on::before { content: ""; position: absolute; }
.side a { position: relative; }
.side a.on { box-shadow: inset 3px 0 0 #3b82f6, 0 0 0 1px rgba(59, 130, 246, .35); }
.side-foot {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.side a.logout { color: #fb7185; }
.side a.logout .ic { background: rgba(251, 113, 133, .1); }

/* ===== تنظيم التنقل داخل السيرفر: مجموعات واضحة بدل شريط تبويبات واحد ===== */
.tab-groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px;
  margin-bottom: 20px;
}
.tab-group {
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
}
.tab-group-title {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: #94a3b8;
  padding: 2px 8px 10px; text-transform: uppercase;
}
.tab-group-items { display: flex; flex-direction: column; gap: 4px; }
.tab-groups a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px;
  color: var(--muted); text-decoration: none; font-size: 14px; transition: .2s;
  border: 1px solid transparent;
}
.tab-groups a:hover { color: var(--text); background: var(--hover); transform: translateX(-2px); }
.tab-groups a.on {
  color: #04060c; font-weight: 800;
  background: linear-gradient(135deg, #bfdbfe, #3b82f6 55%, #1e3a8a);
  box-shadow: 0 10px 24px -12px rgba(59, 130, 246, .8);
}
.tab-groups .ico {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px;
  background: rgba(255, 255, 255, .04); font-size: 14px; flex-shrink: 0;
}
.tab-groups a.on .ico { background: rgba(0, 0, 0, .15); }

/* لمسات أحسن: تأثير ضوء عند المرور، ووضوح للتركيز بالكيبورد */
.tab-group { transition: border-color .25s, box-shadow .3s; }
.tab-group:hover { border-color: rgba(59, 130, 246, .35); box-shadow: 0 16px 40px -24px rgba(59, 130, 246, .5); }
.tab-groups a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, .45); }
.tab-groups a:not(.on):hover .ico { background: rgba(59, 130, 246, .15); }

@media (prefers-reduced-motion: reduce) {
  .tab-groups a, .tab-group, .tab-groups .ico { transition: none; }
}

@media (max-width: 800px) {
  .tab-groups { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tab-group { padding: 10px; }
}
@media (max-width: 480px) {
  .tab-groups { grid-template-columns: 1fr; }
}

/* ===== منع تجاوز المحتوى على اليمين وكسر الشبكة ===== */
.layout { grid-template-columns: 270px minmax(0, 1fr) !important; }
.main { min-width: 0; overflow-x: hidden; }
.card, .hero { max-width: 100%; }
img, table, pre { max-width: 100%; }

/* ===== تصنيف الكلمات حسب الخطورة ===== */
.wf-class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 8px; }
.wf-class-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(255, 255, 255, .025);
  display: flex; flex-direction: column; gap: 8px;
}
.wf-class-card:hover { border-color: rgba(96, 165, 250, .35); }
.wf-class-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wf-class-head b { font-size: 14px; }
.wf-class-card .wf-words { padding: 0; }

/* ===== واجهة حيّة: عناوين متحركة، توهجات، ومحيط ضوئي ===== */
body::before { opacity: .22; }
.top {
  background: rgba(5, 7, 13, .72) !important;
  box-shadow: 0 10px 40px -20px rgba(59, 130, 246, .6);
}
.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, #60a5fa, #e2e8f0, #60a5fa, transparent);
  background-size: 200% 100%; animation: sweep 6s linear infinite;
}
@keyframes sweep { to { background-position: 200% 0; } }

.home-hero { position: relative; padding-top: 20px; }
.home-hero::before {
  content: ""; position: absolute; inset: -40px -10% auto; height: 380px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, .35), transparent 65%);
  filter: blur(30px);
}
.pill-new {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 8px;
  background: rgba(10, 16, 30, .7); border: 1px solid rgba(96, 165, 250, .35);
  color: #cbd5e1; font-size: 13px; box-shadow: 0 0 24px -6px rgba(59, 130, 246, .6);
}
.pill-new b {
  background: #e2e8f0; color: #04060c; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 900;
}
.hero-title {
  font-size: clamp(30px, 4.6vw, 52px) !important; font-weight: 900 !important; line-height: 1.25 !important;
  margin: 18px 0 10px !important; letter-spacing: -.5px;
}
.hero-title .grad-text {
  background: linear-gradient(90deg, #60a5fa, #e2e8f0, #3b82f6, #60a5fa) !important;
  background-size: 300% 100% !important; -webkit-background-clip: text !important; background-clip: text !important;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }
.hero-sub { font-size: 16px !important; color: #94a3b8 !important; max-width: 640px; margin: 0 auto 22px !important; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.hero-cta .btn { padding: 12px 22px; border-radius: 14px; font-weight: 800; }

/* بطاقات الإحصاء: توهج يتبع الماوس بشكل ناعم */
.stat-big, .card, .srv {
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.stat-big:hover, .srv:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -22px rgba(59, 130, 246, .6); }
.stat-big .stat-ico { box-shadow: 0 0 22px -4px rgba(59, 130, 246, .6); }

/* أزرار بتوهج */
.btn { transition: transform .2s, box-shadow .25s, filter .2s; }
.btn:hover { box-shadow: 0 0 26px -4px rgba(96, 165, 250, .7); }

/* النظام يحترم تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .hero-title .grad-text, .top::after { animation: none; }
}

/* ===== الشريط الجانبي يبقى ثابتاً ويتمرر داخلياً ===== */
.layout { align-items: start; }
.side {
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(96, 165, 250, .35) transparent;
}
@media (max-width: 800px) {
  .side { position: static; height: auto; overflow: visible; }
}
