/* ============================================================
   Power Bot — الثيم الملكي (أسود × ذهبي)
   ============================================================ */

:root {
  --bg: #05060b;
  --bg2: #0a0c14;
  --card: #10121c;
  --card-hover: #141726;
  --gold: #8f6fff;
  --gold-light: #b8a4ff;
  --gold-dark: #5b3fd6;
  --gold-glow: rgba(143,111,255, 0.25);
  --primary: #8f6fff;
  --primary-hover: #a58fff;
  --accent: #b8a4ff;
  --text: #f1f2fc;
  --text-muted: #9aa1bb;
  --success: #8f6fff;
  --danger: #b3453f;
  --radius: 16px;
  --border: 1px solid rgba(143,111,255, 0.14);
  --border-strong: 1px solid rgba(143,111,255, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  background:
    radial-gradient(ellipse 70% 40% at 50% -5%, rgba(143,111,255,0.07), transparent),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

h1, h2, h3, .logo, .dash-title, .page-head h2 {
  font-family: 'Alexandria', 'Readex Pro', sans-serif;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: #000; }

/* سكرول بار ذهبي */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold-dark), var(--gold));
  border-radius: 999px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* نص ذهبي متدرج */
.gradient, .gold-text {
  background: linear-gradient(100deg, #d6ccff 0%, var(--gold) 35%, #55427c 55%, var(--gold) 75%, #d6ccff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer {
  to { background-position: 200% center; }
}

/* ===== Navbar ===== */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 7, 8, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.4rem; font-weight: 800; letter-spacing: .5px;
}
.logo .logo-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #d6ccff, var(--gold) 45%, #4a3a70);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 0 18px var(--gold-glow), inset 0 0 6px rgba(255,255,255,0.35);
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: var(--text-muted); font-weight: 600; transition: all .25s;
  position: relative;
}
.nav-links a:hover { color: var(--gold-light); }

/* ===== الأزرار ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: 999px;
  font-weight: 800; font-size: 1rem; cursor: pointer;
  border: none; transition: all .25s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(120deg, #b8a4ff, var(--gold) 40%, #6b539e);
  color: #141002;
  box-shadow: 0 4px 22px var(--gold-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(143,111,255,0.45);
  filter: brightness(1.08);
}
.btn-outline {
  background: transparent; color: var(--gold-light);
  border: 1px solid rgba(143,111,255,0.45);
}
.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(143,111,255,0.08);
  box-shadow: 0 0 16px var(--gold-glow);
}
.btn-sm { padding: 8px 20px; font-size: .9rem; }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 100px 20px 70px;
  position: relative;
  background:
    radial-gradient(ellipse 55% 45% at 50% -8%, rgba(143,111,255,0.16), transparent),
    radial-gradient(ellipse 35% 35% at 85% 15%, rgba(143,111,255,0.06), transparent),
    radial-gradient(ellipse 35% 35% at 15% 15%, rgba(143,111,255,0.06), transparent);
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 800; line-height: 1.3;
  margin-bottom: 20px;
}
.hero p {
  color: var(--text-muted); font-size: 1.18rem;
  max-width: 640px; margin: 0 auto 36px; line-height: 1.9;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* خط ذهبي فاصل */
.section-title::after {
  content: "";
  display: block;
  width: 90px; height: 2px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ===== الإحصائيات ===== */
.stats {
  display: flex; justify-content: center; gap: 20px;
  flex-wrap: wrap; padding: 30px 20px 70px;
}
.stat-card {
  background: linear-gradient(160deg, #16161b, #0e0e11);
  border-radius: var(--radius);
  padding: 28px 46px; text-align: center; min-width: 195px;
  border: var(--border);
  position: relative; overflow: hidden;
  transition: all .3s;
}
.stat-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .6;
}
.stat-card:hover {
  border-color: rgba(143,111,255,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 34px rgba(0,0,0,0.5), 0 0 24px rgba(143,111,255,0.08);
}
.stat-card .num {
  font-size: 2.2rem; font-weight: 900; color: var(--gold);
  text-shadow: 0 0 22px var(--gold-glow);
  font-family: 'Alexandria', sans-serif;
}
.stat-card .label { color: var(--text-muted); font-weight: 600; margin-top: 5px; }

/* ===== المميزات ===== */
.section-title {
  text-align: center; font-size: 2.2rem; font-weight: 800; margin-bottom: 10px;
}
.section-sub { text-align: center; color: var(--text-muted); margin: 18px 0 48px; font-size: 1.05rem; }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px; padding-bottom: 90px;
}
.feature {
  background: linear-gradient(165deg, #15151a, #0a0c14);
  border-radius: var(--radius);
  padding: 32px; border: var(--border);
  transition: all .3s;
  position: relative; overflow: hidden;
}
.feature::after {
  content: "";
  position: absolute; top: -60%; right: -60%;
  width: 120%; height: 120%;
  background: radial-gradient(circle, rgba(143,111,255,0.06), transparent 60%);
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.feature:hover { transform: translateY(-6px); border-color: rgba(143,111,255,0.45); }
.feature:hover::after { opacity: 1; }
.feature .icon {
  width: 56px; height: 56px; border-radius: 15px;
  background: linear-gradient(135deg, rgba(143,111,255,0.2), rgba(143,111,255,0.05));
  border: 1px solid rgba(143,111,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 20px;
}
.feature h3 { font-size: 1.28rem; margin-bottom: 10px; color: var(--gold-light); }
.feature p { color: var(--text-muted); line-height: 1.9; }

/* ===== عرض الأوامر ===== */
.commands-preview {
  background: linear-gradient(var(--bg2), var(--bg));
  padding: 75px 0 95px;
  border-top: var(--border);
  border-bottom: var(--border);
}
.cmd-table {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; border: var(--border);
}
.cmd-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 17px 26px; border-bottom: 1px solid rgba(143,111,255,0.07);
  transition: background .2s;
}
.cmd-row:hover { background: rgba(143,111,255,0.04); }
.cmd-row:last-child { border-bottom: none; }
.cmd-row code {
  background: rgba(143,111,255,0.1); color: var(--gold-light);
  padding: 6px 14px; border-radius: 8px; font-size: .95rem;
  font-family: 'Consolas', monospace;
  border: 1px solid rgba(143,111,255,0.18);
}
.cmd-row span { color: var(--text-muted); }

/* ===== CTA ===== */
.cta {
  text-align: center; padding: 100px 20px;
  background: radial-gradient(ellipse 50% 65% at 50% 110%, rgba(143,111,255,0.14), transparent);
}
.cta h2 { font-size: 2.3rem; font-weight: 800; margin-bottom: 16px; }
.cta p { color: var(--text-muted); margin-bottom: 32px; font-size: 1.1rem; }

footer {
  border-top: var(--border);
  padding: 36px 20px; text-align: center; color: var(--text-muted);
}

/* ===== الداشبورد: قائمة السيرفرات ===== */
.dash-wrap { max-width: 1100px; margin: 44px auto; padding: 0 20px; }
.dash-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 26px; }

.guild-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 18px;
}
.guild-card {
  background: linear-gradient(160deg, #15151a, #0e0e11);
  border-radius: var(--radius);
  padding: 22px; display: flex; align-items: center; gap: 15px;
  border: var(--border);
  cursor: pointer; transition: all .25s;
}
.guild-card:hover {
  border-color: rgba(143,111,255,0.5);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.55), 0 0 20px rgba(143,111,255,0.07);
}
.guild-card img, .guild-card .guild-placeholder {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #4a3a70);
  color: #141002;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.25rem;
  border: 2px solid rgba(143,111,255,0.4);
}
.guild-card .info { overflow: hidden; }
.guild-card .name {
  font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.guild-card .status { font-size: .85rem; color: var(--text-muted); }
.guild-card .status.in { color: var(--gold); }

/* ===== اللوحات والحقول ===== */
.panel {
  background: linear-gradient(165deg, #141419, #0e0e11);
  border-radius: var(--radius);
  padding: 30px; border: var(--border);
  margin-bottom: 20px;
  position: relative;
}
.panel h3 {
  margin-bottom: 20px; font-size: 1.22rem; color: var(--gold-light);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(143,111,255,0.12);
}

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; font-size: .95rem; }
.field .hint { color: var(--text-muted); font-size: .82rem; margin-top: 6px; }
.field .hint code {
  background: rgba(143,111,255,0.1); color: var(--gold-light);
  padding: 1px 7px; border-radius: 5px;
}
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  width: 100%; padding: 12px 15px; border-radius: 11px;
  background: #080911; color: var(--text);
  border: 1px solid rgba(143,111,255,0.16);
  font-family: inherit; font-size: .95rem;
  transition: all .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(143,111,255,0.12);
}
.field select option { background: #0e0e11; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid rgba(143,111,255,0.07);
}
.switch-row:last-child { border-bottom: none; }
.switch-row .sw-label { font-weight: 700; }
.switch-row .sw-desc { color: var(--text-muted); font-size: .85rem; margin-top: 3px; }

/* السويتشات الذهبية */
.switch { position: relative; width: 50px; height: 27px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #26262e; border-radius: 999px; transition: .3s;
  border: 1px solid rgba(143,111,255,0.15);
}
.slider:before {
  content: ""; position: absolute;
  width: 19px; height: 19px; border-radius: 50%;
  background: #6d675a; top: 3px; right: 4px; transition: .3s;
}
.switch input:checked + .slider {
  background: linear-gradient(120deg, #caa62f, #8f701d);
  box-shadow: 0 0 14px var(--gold-glow);
}
.switch input:checked + .slider:before {
  transform: translateX(-22px);
  background: #fff7dd;
}

.save-bar {
  position: sticky; bottom: 18px;
  display: flex; justify-content: center; margin-top: 12px;
  z-index: 10;
}
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(120deg, #b8a4ff, var(--gold));
  color: #141002;
  padding: 13px 30px; border-radius: 999px; font-weight: 800;
  opacity: 0; pointer-events: none; transition: opacity .3s;
  z-index: 200;
  box-shadow: 0 8px 30px rgba(143,111,255,0.35);
}
.toast.show { opacity: 1; }
.toast.error { background: var(--danger); color: #fff; box-shadow: 0 8px 30px rgba(179,69,63,0.35); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 999px; padding: 6px 16px 6px 6px;
  border: var(--border);
}
.user-chip img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(143,111,255,0.4); }

.loading { text-align: center; color: var(--text-muted); padding: 70px 0; font-size: 1.1rem; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 60px 16px 40px; }
}

/* ============================================================
   تخطيط الداشبورد (سايدبار)
   ============================================================ */

.dash-layout {
  display: flex; min-height: calc(100vh - 72px);
}

.sidebar {
  width: 270px; flex-shrink: 0;
  background: linear-gradient(180deg, #0c0c0f, #08080a);
  border-left: var(--border);
  padding: 22px 14px;
  position: sticky; top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}
.sidebar .server-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 20px;
  border-bottom: 1px solid rgba(143,111,255,0.12);
  margin-bottom: 14px;
}
.sidebar .server-head img, .sidebar .server-head .ph {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #4a3a70);
  color: #141002;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
  border: 2px solid rgba(143,111,255,0.45);
  box-shadow: 0 0 14px var(--gold-glow);
}
.sidebar .server-head .sname {
  font-weight: 800; font-size: 1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar .server-head .smem { color: var(--gold); font-size: .8rem; }

.side-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 11px;
  color: var(--text-muted); font-weight: 700; font-size: .95rem;
  cursor: pointer; transition: all .18s; margin-bottom: 3px;
  border: 1px solid transparent; background: none; width: 100%; text-align: right;
  font-family: inherit;
}
.side-item:hover {
  background: rgba(143,111,255,0.06); color: var(--gold-light);
  border-color: rgba(143,111,255,0.12);
}
.side-item.active {
  background: linear-gradient(90deg, rgba(143,111,255,0.18), rgba(143,111,255,0.04));
  color: var(--gold-light);
  border-color: rgba(143,111,255,0.3);
  box-shadow: inset 3px 0 0 var(--gold);
}
.side-item .si-icon { font-size: 1.15rem; width: 24px; text-align: center; }
.side-item .si-badge {
  margin-right: auto; font-size: .66rem; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
}
.si-badge.on {
  background: rgba(143,111,255,0.15); color: var(--gold-light);
  border: 1px solid rgba(143,111,255,0.35);
}
.si-badge.off {
  background: rgba(255,255,255,0.04); color: #6d675a;
  border: 1px solid rgba(255,255,255,0.08);
}

.side-sep {
  margin: 16px 12px 10px; font-size: .7rem; font-weight: 800;
  color: var(--gold-dark); letter-spacing: 2px;
}

.dash-main {
  flex: 1; padding: 32px 36px; min-width: 0;
  max-width: 960px;
}
.page-head { margin-bottom: 26px; }
.page-head h2 {
  font-size: 1.6rem; font-weight: 800;
  display: inline-block;
}
.page-head h2::after {
  content: "";
  display: block; height: 2px; margin-top: 8px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.page-head p { color: var(--text-muted); margin-top: 8px; }

/* بطاقات النظرة العامة */
.ov-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.ov-card {
  background: linear-gradient(160deg, #15151a, #0e0e11);
  border-radius: var(--radius);
  padding: 20px; border: var(--border);
  display: flex; align-items: center; gap: 14px;
  transition: all .25s;
}
.ov-card:hover { border-color: rgba(143,111,255,0.4); transform: translateY(-3px); }
.ov-card .ov-icon {
  width: 48px; height: 48px; border-radius: 13px; font-size: 1.3rem;
  background: linear-gradient(135deg, rgba(143,111,255,0.18), rgba(143,111,255,0.04));
  border: 1px solid rgba(143,111,255,0.25);
  display: flex; align-items: center; justify-content: center;
}
.ov-card .ov-num {
  font-size: 1.4rem; font-weight: 900; color: var(--gold);
  font-family: 'Alexandria', sans-serif;
}
.ov-card .ov-label { color: var(--text-muted); font-size: .82rem; font-weight: 600; }

/* شبكة الوحدات */
.mod-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
}
.mod-card {
  background: linear-gradient(160deg, #15151a, #0e0e11);
  border-radius: var(--radius);
  padding: 19px; border: var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; transition: all .2s;
}
.mod-card:hover {
  border-color: rgba(143,111,255,0.5);
  box-shadow: 0 0 18px rgba(143,111,255,0.07);
}
.mod-card .m-title { font-weight: 800; }
.mod-card .m-icon { font-size: 1.3rem; margin-left: 8px; }

/* إدارة الأوامر */
.cmd-filter {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.cmd-filter button {
  background: var(--card); color: var(--text-muted);
  border: 1px solid rgba(143,111,255,0.15); border-radius: 999px;
  padding: 8px 18px; font-weight: 700; font-size: .85rem;
  cursor: pointer; font-family: inherit; transition: all .2s;
}
.cmd-filter button:hover { color: var(--gold-light); border-color: rgba(143,111,255,0.4); }
.cmd-filter button.active {
  background: linear-gradient(120deg, #b8a4ff, var(--gold));
  color: #141002; border-color: var(--gold);
}
.cmd-search {
  width: 100%; padding: 13px 18px; border-radius: 12px;
  background: #080911; color: var(--text);
  border: 1px solid rgba(143,111,255,0.18);
  font-family: inherit; font-size: .95rem; margin-bottom: 14px;
  transition: all .2s;
}
.cmd-search:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(143,111,255,0.1);
}
.cmd-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border-radius: 13px;
  padding: 15px 19px; margin-bottom: 8px;
  border: var(--border);
  transition: all .2s;
}
.cmd-item:hover { border-color: rgba(143,111,255,0.35); }
.cmd-item .c-name { font-weight: 800; font-family: 'Consolas', monospace; color: var(--gold-light); }
.cmd-item .c-desc { color: var(--text-muted); font-size: .85rem; margin-top: 2px; }
.cmd-item.disabled { opacity: .45; }

/* معاينة الترحيب */
.welcome-preview {
  background: #050506; border-radius: var(--radius);
  padding: 20px; margin-top: 16px;
  border: 1px dashed rgba(143,111,255,0.3);
}
.wp-canvas {
  width: 100%; max-width: 512px; border-radius: 10px; display: block;
  margin-top: 12px;
  border: 1px solid rgba(143,111,255,0.2);
}
.wp-msg { color: var(--text); font-size: .95rem; }
.wp-msg .mention {
  background: rgba(143,111,255,0.18); color: var(--gold-light);
  border-radius: 4px; padding: 0 5px;
}

/* معاينة الإمبيد */
.embed-preview {
  background: #1a1a1e; border-radius: 8px;
  padding: 15px 17px; border-right: 4px solid var(--gold);
  max-width: 520px; font-size: .92rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.embed-preview .ep-title { font-weight: 800; margin-bottom: 6px; }
.embed-preview .ep-desc { color: #d8d4c8; white-space: pre-wrap; line-height: 1.7; }
.embed-preview .ep-img { max-width: 100%; border-radius: 6px; margin-top: 10px; }
.embed-preview .ep-footer { color: #8a857a; font-size: .75rem; margin-top: 10px; }
.embed-flex { display: flex; gap: 24px; flex-wrap: wrap; }
.embed-flex > div { flex: 1; min-width: 300px; }

/* صفوف ديناميكية */
.dyn-row {
  display: flex; gap: 10px; align-items: center; margin-bottom: 10px;
}
.dyn-row select, .dyn-row input { flex: 1; }
.dyn-row .del-btn {
  background: rgba(179,69,63,0.14); color: #d98781;
  border: 1px solid rgba(179,69,63,0.25); border-radius: 9px;
  width: 40px; height: 40px;
  cursor: pointer; font-size: 1rem; flex-shrink: 0;
  transition: all .2s;
}
.dyn-row .del-btn:hover { background: rgba(179,69,63,0.3); color: #fff; }

/* جداول الليدربورد */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
  text-align: right; color: var(--gold-dark); font-size: .8rem;
  padding: 10px 14px; border-bottom: 1px solid rgba(143,111,255,0.2);
  letter-spacing: 1px;
}
.lb-table td { padding: 13px 14px; border-bottom: 1px solid rgba(143,111,255,0.06); }
.lb-table tr:hover td { background: rgba(143,111,255,0.03); }
.lb-table .lb-user { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.lb-table .lb-user img {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(143,111,255,0.35);
}
.lb-rank {
  font-weight: 900; color: var(--gold); width: 48px;
  font-family: 'Alexandria', sans-serif;
}

/* موبايل */
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .dash-layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    display: flex; gap: 6px; overflow-x: auto; padding: 12px;
  }
  .sidebar .server-head, .side-sep { display: none; }
  .side-item { width: auto; white-space: nowrap; }
  .dash-main { padding: 20px 16px; }
}

/* ============================================================
   صفحة النظرة العامة v2 — انميشن وبطاقات ورسوم
   ============================================================ */

@keyframes ovIn {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.ov-card, .chart-panel, .mod-card {
  animation: ovIn .55s cubic-bezier(.2,.7,.3,1) backwards;
}
.ov-grid .ov-card:nth-child(1) { animation-delay: .03s; }
.ov-grid .ov-card:nth-child(2) { animation-delay: .09s; }
.ov-grid .ov-card:nth-child(3) { animation-delay: .15s; }
.ov-grid .ov-card:nth-child(4) { animation-delay: .21s; }
.mod-grid .mod-card:nth-child(1) { animation-delay: .05s; }
.mod-grid .mod-card:nth-child(2) { animation-delay: .1s; }
.mod-grid .mod-card:nth-child(3) { animation-delay: .15s; }
.mod-grid .mod-card:nth-child(4) { animation-delay: .2s; }
.mod-grid .mod-card:nth-child(5) { animation-delay: .25s; }
.mod-grid .mod-card:nth-child(6) { animation-delay: .3s; }

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(143,111,255,0.25); }
  50% { box-shadow: 0 0 18px 4px rgba(143,111,255,0.18); }
}
.ov-card .ov-icon { animation: iconPulse 3s ease-in-out infinite; }
.ov-card:nth-child(2) .ov-icon { animation-delay: .7s; }
.ov-card:nth-child(3) .ov-icon { animation-delay: 1.4s; }
.ov-card:nth-child(4) .ov-icon { animation-delay: 2.1s; }

.ov-card .ov-sub { font-size: .72rem; color: var(--gold-dark); font-weight: 700; margin-top: 2px; }
.ov-split { display: flex; gap: 10px; align-items: baseline; }
.ov-split .up { color: #9dc88f; }
.ov-split .down { color: #d98781; }

/* لوحات الرسوم */
.chart-panel {
  background: linear-gradient(165deg, #141419, #0e0e11);
  border: var(--border); border-radius: var(--radius);
  padding: 22px 22px 14px; margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.chart-panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(143,111,255,.5), transparent);
}
.chart-panel h4 {
  color: var(--gold-light); font-size: .98rem; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.chart-panel .ch-wrap { position: relative; height: 230px; }
.charts-2col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
@media (max-width: 900px) { .charts-2col { grid-template-columns: 1fr; } }

.ov-period {
  display: flex; gap: 8px; margin: 4px 0 18px; flex-wrap: wrap;
}
.ov-period button {
  background: var(--card); color: var(--text-muted);
  border: 1px solid rgba(143,111,255,0.15); border-radius: 999px;
  padding: 8px 20px; font-weight: 700; font-size: .85rem;
  cursor: pointer; font-family: inherit; transition: all .2s;
}
.ov-period button:hover { color: var(--gold-light); border-color: rgba(143,111,255,0.4); }
.ov-period button.active {
  background: linear-gradient(120deg, #b8a4ff, var(--gold));
  color: #141002; border-color: var(--gold);
  box-shadow: 0 0 14px rgba(143,111,255,0.25);
}

/* ============================================================
   مكونات مشتركة إضافية (شارات، تلميحات، تنبيهات، أزرار لوحية)
   ============================================================ */

/* شارة ذهبية عامة */
.badge-gold {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(143,111,255,0.1); color: var(--gold-light);
  border: 1px solid rgba(143,111,255,0.3);
  padding: 4px 14px; border-radius: 999px;
  font-size: .78rem; font-weight: 800;
}
.badge-muted {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04); color: #6d675a;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px 14px; border-radius: 999px;
  font-size: .78rem; font-weight: 800;
}

/* زر لوحة مفاتيح */
kbd {
  background: #080911; color: var(--gold-light);
  border: 1px solid rgba(143,111,255,0.25);
  border-bottom-width: 3px;
  padding: 2px 10px; border-radius: 7px;
  font-family: 'Consolas', monospace; font-size: .85em;
}

/* تلميح عائم */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); right: 50%;
  transform: translateX(50%);
  background: #080911; color: var(--gold-light);
  border: 1px solid rgba(143,111,255,0.4);
  padding: 6px 14px; border-radius: 8px;
  font-size: .78rem; font-weight: 700; white-space: nowrap;
  z-index: 50; pointer-events: none;
  box-shadow: 0 8px 22px rgba(0,0,0,.5);
  animation: tipIn .2s ease;
}
@keyframes tipIn { from { opacity: 0; transform: translateX(50%) translateY(4px); } }

/* تنبيهات صفحات */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: 14px; padding: 16px 20px; margin: 14px 0;
  line-height: 1.9; font-size: .95rem;
}
.alert.gold {
  background: rgba(143,111,255,0.07); color: var(--text-muted);
  border: 1px solid rgba(143,111,255,0.25);
}
.alert.red {
  background: rgba(179,69,63,0.08); color: var(--text-muted);
  border: 1px solid rgba(179,69,63,0.3);
}
.alert b { color: var(--gold-light); }
.alert.red b { color: #d98781; }

/* هيكل تحميل لامع (skeleton) */
.skeleton {
  background: linear-gradient(90deg, #15151a 25%, #1d1d24 50%, #15151a 75%);
  background-size: 200% 100%;
  animation: skel 1.3s infinite;
  border-radius: 10px; min-height: 16px;
}
@keyframes skel { to { background-position: -200% 0; } }

/* فاصل ذهبي أفقي */
.hr-gold {
  border: none; height: 1px; margin: 26px 0;
  background: linear-gradient(90deg, transparent, rgba(143,111,255,0.4), transparent);
}

/* حركة نبض للعناصر المهمة */
.pulse-gold { animation: pulseGold 2.5s ease-in-out infinite; }
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(143,111,255,0.3); }
  50% { box-shadow: 0 0 22px 5px rgba(143,111,255,0.15); }
}

/* حالة فارغة */
.empty-state {
  text-align: center; padding: 50px 20px; color: var(--text-muted);
}
.empty-state .es-icon {
  font-size: 3rem; display: block; margin-bottom: 12px;
  filter: grayscale(.4) drop-shadow(0 6px 18px rgba(143,111,255,0.2));
}

/* طباعة */
@media print {
  nav, footer, #pp-totop, #pp-particles, .docs-side, .sidebar { display: none !important; }
  body { background: #fff; color: #000; }
  .doc-section h2, .doc-section h3 { color: #000; }
  .doc-section p, .doc-section li, .doc-table td { color: #222; }
}

/* ============================================================
   الوصول (Accessibility) والاستجابة الدقيقة
   ============================================================ */

/* تركيز لوحة المفاتيح — حلقة ذهبية واضحة */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* احترام تقليل الحركة على مستوى النظام */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* نص مخفي لقارئات الشاشة */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* تحسين اللمس — أهداف أكبر على الشاشات الصغيرة */
@media (pointer: coarse) {
  .btn-sm { padding: 11px 22px; }
  .side-item { padding: 14px; }
  .switch { transform: scale(1.1); }
  .faq-q { padding: 22px 20px; }
}

/* شاشات ضيقة جداً */
@media (max-width: 400px) {
  .hero h1 { font-size: 1.8rem; }
  .section-title { font-size: 1.5rem; }
  .stat-card { min-width: 140px; padding: 20px 24px; }
  .panel { padding: 20px 16px; }
  .dash-main { padding: 16px 12px; }
  .ov-grid { grid-template-columns: 1fr 1fr; }
}

/* شاشات عريضة جداً — حجم مريح */
@media (min-width: 1800px) {
  html { font-size: 17px; }
}

/* تحسين التباين للجداول الطويلة */
.doc-table tr:nth-child(even) td,
.lb-table tr:nth-child(even) td {
  background: rgba(255,255,255,0.012);
}

/* حالة عدم توفر JS */
noscript .noscript-warn {
  display: block; text-align: center;
  background: rgba(179,69,63,0.12); color: #d98781;
  border: 1px solid rgba(179,69,63,0.3);
  padding: 14px; font-weight: 700;
}

/* ============================================================
   Power Bot — طبقة الصقل v4 (تحديث UI شامل للموقع)
   زجاجية، عمق، حركة أنعم، ذهب مضبوط
   ============================================================ */

/* — أساس أنعم — */
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(143,111,255,0.06), transparent 60%),
    radial-gradient(900px 450px at 0% 110%, rgba(143,111,255,0.045), transparent 55%),
    #08080a;
  -webkit-font-smoothing: antialiased;
}

/* — سكرول بار ملكي — */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #080911; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3a3223, #1c1a14);
  border-radius: 99px;
  border: 2px solid #080911;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #8f6fff, #4a3a70); }

/* — نافبار زجاجي — */
nav {
  background: rgba(8, 8, 11, 0.72) !important;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid rgba(143,111,255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}
.nav-links a {
  position: relative;
  transition: color .2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px; right: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: width .25s ease;
}
.nav-links a:hover::after { width: 100%; }

/* — أزرار بعمق وحركة — */
.btn {
  border-radius: 12px;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, background .18s, border-color .18s;
  will-change: transform;
}
.btn:active { transform: scale(.96); }
.btn-primary {
  background: linear-gradient(135deg, #b8a4ff 0%, #8f6fff 45%, #6b539e 100%);
  box-shadow: 0 4px 18px rgba(143,111,255, 0.28), inset 0 1px 0 rgba(255,255,255,.35);
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(143,111,255, 0.42), inset 0 1px 0 rgba(255,255,255,.4);
  filter: brightness(1.06);
}
.btn-outline {
  border: 1px solid rgba(143,111,255, 0.35);
  background: rgba(143,111,255, 0.04);
}
.btn-outline:hover {
  transform: translateY(-2px);
  background: rgba(143,111,255, 0.1);
  border-color: rgba(143,111,255, 0.6);
  box-shadow: 0 6px 20px rgba(143,111,255, 0.15);
}

/* — البطاقات: زجاج + خط ذهبي علوي عند الهوفر — */
.feature-card, .stat-card, .cmd-card, .panel, .plan-card, .doc-card, .guide-card, .faq-item {
  position: relative;
  background: linear-gradient(170deg, rgba(255,255,255,0.025), rgba(255,255,255,0.008)), #101014;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
.feature-card::before, .plan-card::before {
  content: '';
  position: absolute;
  top: 0; right: 10%; left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143,111,255,.5), transparent);
  opacity: 0;
  transition: opacity .25s;
}
.feature-card:hover, .plan-card:hover, .guide-card:hover, .doc-card:hover {
  transform: translateY(-5px);
  border-color: rgba(143,111,255, 0.32);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(143,111,255,0.08);
}
.feature-card:hover::before, .plan-card:hover::before { opacity: 1; }

/* — العناوين: تدرج فاخر — */
h1 { letter-spacing: -0.5px; }
.gold-text {
  background: linear-gradient(100deg, #d6ccff 0%, var(--gold) 30%, #b8a4ff 50%, #6b539e 70%, #d6ccff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: goldShift 6s linear infinite;
}
@keyframes goldShift { to { background-position: 200% center; } }

/* — الحقول — */
input[type="text"], input[type="email"], input[type="number"], textarea {
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus {
  border-color: rgba(143,111,255, 0.5) !important;
  box-shadow: 0 0 0 4px rgba(143,111,255, 0.08) !important;
  outline: none;
}

/* — الجداول — */
table tr { transition: background .15s; }
table tbody tr:hover, .lb-table tr:hover td { background: rgba(143,111,255, 0.035); }

/* — الفوتر — */
footer {
  border-top: 1px solid rgba(143,111,255, 0.1);
  background:
    radial-gradient(600px 200px at 50% 120%, rgba(143,111,255,0.05), transparent),
    #070709;
}

/* — ظهور ناعم للعناصر — */
.reveal {
  animation-duration: .7s;
  animation-timing-function: cubic-bezier(.16,1,.3,1);
}

/* — تحديد النص — */
::selection { background: rgba(143,111,255, 0.85); color: #0a0a0c; }

/* — فوكس كيبورد واضح — */
a:focus-visible, button:focus-visible {
  outline: 2px solid rgba(143,111,255, 0.7);
  outline-offset: 3px;
  border-radius: 6px;
}

/* — موبايل أنظف — */
@media (max-width: 640px) {
  .btn { padding: 10px 18px; }
  h1 { font-size: 1.7rem !important; }
}

/* ============================================================
   v5 — تحسينات مشتركة لكل الصفحات الداخلية
   ============================================================ */

/* إيقاع أوسع للمحتوى */
.container { padding-left: 22px; padding-right: 22px; }

/* هيرو الصفحات الداخلية أفخم */
.page-hero h1, .rm-hero h1, .docs-hero h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); letter-spacing: -0.5px; }

/* روابط داخل النصوص */
p a, li a { text-underline-offset: 4px; }
p a:hover, li a:hover { text-decoration: underline; }

/* كود أنيق */
code {
  background: rgba(143,111,255, 0.08);
  border: 1px solid rgba(143,111,255, 0.18);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 0.92em;
  color: var(--gold-light);
}

/* شارة ذهبية عامة */
.badge-gold {
  background: rgba(143,111,255, 0.1);
  border: 1px solid rgba(143,111,255, 0.35);
  color: var(--gold-light);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.72rem;
  font-weight: 800;
}

/* صور وأطر داخل المحتوى */
.content img, article img { border-radius: 14px; border: 1px solid rgba(255,255,255,.08); }

/* تباعد أقسام أهدأ */
section { scroll-margin-top: 90px; }

/* خط فاصل ذهبي أنيق */
hr {
  border: none; height: 1px; margin: 34px 0;
  background: linear-gradient(90deg, transparent, rgba(143,111,255,.35), transparent);
}
