/* الديوان — أسود وذهبي، نفس هوية التطبيق. عربي RTL. */
:root {
  --bg: #000000;
  --bg2: #0a0a0a;
  --card: linear-gradient(180deg, #1b1b1b, #0a0a0a);
  --gold: #f2d97a;
  --gold2: #d4af37;
  --gold-deep: #8a6d1f;
  --text: #f6f1e4;
  --muted: #94886a;
  --line: rgba(212, 175, 55, 0.32);
  --line-hi: rgba(242, 217, 122, 0.55);
}

/* شريط الزخرفة النجدية — مثلثات ذهبية على أسود، نفس فريز التطبيق. */
.frieze {
  height: 12px;
  background-repeat: repeat-x;
  background-size: 30px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='12' viewBox='0 0 30 12'%3E%3Crect width='30' height='12' fill='%23000'/%3E%3Cpath d='M0 12 L7.5 2 L15 12 Z' fill='%23d4af37'/%3E%3Cpath d='M15 12 L22.5 2 L30 12 Z' fill='%238a6d1f'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  background-image: radial-gradient(120% 70% at 50% 0%, #16130a 0%, #000 62%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Cairo", "Sakkal Majalla", "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- الترويسة --- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 22px;
  padding: 12px 28px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .brand { font-size: 26px; font-weight: 800; color: var(--gold); }
.nav .brand:hover { text-decoration: none; }
.nav .brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.nav .links { display: flex; gap: 18px; margin-inline-start: auto; align-items: center; flex-wrap: wrap; }
.nav .links a { color: var(--muted); font-size: 15px; }
.nav .links a:hover, .nav .links a.active { color: var(--gold); text-decoration: none; }

.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold), var(--gold2));
  color: #241a08 !important;
  font-weight: 700;
  padding: 10px 26px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gold) !important;
}

/* --- البطل --- */
.hero {
  text-align: center;
  padding: 90px 24px 70px;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(201, 162, 39, 0.14), transparent),
    var(--bg);
}
.hero h1 { font-size: 64px; color: var(--gold); letter-spacing: 1px; }
.hero p { color: var(--muted); font-size: 20px; max-width: 620px; margin: 14px auto 30px; line-height: 1.8; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --- الأقسام --- */
.section { max-width: 1080px; margin: 0 auto; padding: 40px 24px; width: 100%; }
.section h2 { color: var(--gold); font-size: 28px; margin-bottom: 20px; }
.section h2::after { content: ""; display: block; width: 56px; height: 2px; background: var(--gold2); margin-top: 8px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.feature .ic { font-size: 28px; margin-bottom: 10px; }
.feature h3 { color: var(--gold); font-size: 18px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* --- بطاقات المودات --- */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mod-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.12s, border-color 0.12s;
}
.mod-card:hover { transform: translateY(-2px); border-color: var(--gold2); text-decoration: none; }
.mod-card h3 { color: var(--text); font-size: 17px; }
.mod-card .by { color: var(--muted); font-size: 13px; }
.mod-card .meta { display: flex; gap: 12px; color: var(--muted); font-size: 13px; margin-top: auto; }
.badge {
  align-self: flex-start;
  font-size: 12px;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
}

/* --- البحث والفلاتر --- */
.toolbar { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 15px;
}
.toolbar input { flex: 1; min-width: 200px; }

/* --- صفحة المود --- */
.mod-detail { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 800px) { .mod-detail { grid-template-columns: 1fr; } }
.mod-detail .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.mod-detail h1 { color: var(--gold); font-size: 30px; margin-bottom: 6px; }
.mod-detail .by { color: var(--muted); margin-bottom: 18px; }
.mod-detail .desc { color: var(--text); line-height: 1.9; white-space: pre-wrap; }
.mod-detail .dl .size { color: var(--muted); font-size: 14px; margin-top: 10px; }
.mod-detail .stats { display: flex; gap: 16px; color: var(--muted); font-size: 14px; margin: 14px 0 20px; }

/* --- الإعلان --- */
.ad-slot {
  border: 1px dashed var(--line);
  border-radius: 8px;
  min-height: 90px;
  display: grid; place-items: center;
  color: var(--muted);
  font-size: 12px;
  margin: 24px 0;
}

/* --- الأدلة --- */
.guide { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 24px; margin-bottom: 18px; }
.guide h3 { color: var(--gold); margin-bottom: 10px; }
.guide p, .guide li { color: var(--muted); line-height: 1.9; }
.guide ol { padding-inline-start: 22px; }
.guide code { background: var(--bg); padding: 2px 8px; border-radius: 4px; color: var(--gold); font-size: 13px; direction: ltr; display: inline-block; }

/* --- عام --- */
.empty { color: var(--muted); text-align: center; padding: 40px; border: 1px dashed var(--line); border-radius: 8px; }
footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 22px 28px;
  display: flex; gap: 18px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px;
}
footer .grow { flex: 1; }
main { flex: 1; width: 100%; }

/* ==========================================================================
   الفخامة — طبقة فوق الأساس: بريق ذهبي، إطارات محفورة، وحركة هادئة.
   ========================================================================== */

/* عنوان الهيرو بتدرّج ذهبي معدني بدل لون مسطح. */
.hero h1 {
  background: linear-gradient(178deg, #fffaf0 6%, var(--gold) 46%, var(--gold-deep) 98%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.85));
}

/* هالة ذهبية خفيفة خلف الهيرو تعطي عمقًا بدل خلفية مسطحة. */
.hero {
  position: relative;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -10% -20% 20%;
  z-index: -1;
  background: radial-gradient(60% 60% at 50% 30%, rgba(212, 175, 55, 0.13), transparent 70%);
  pointer-events: none;
}

/* البطاقات: خيط ذهبي + نتوءان محفوران في الزاويتين، مثل بطاقات التطبيق. */
.feature, .mod-card, .guide, .mod-detail {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(246, 241, 228, 0.05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.feature::before, .feature::after,
.mod-card::before, .mod-card::after {
  content: '';
  position: absolute;
  top: 0;
  width: 13px;
  height: 13px;
  background: var(--gold2);
  opacity: .85;
  pointer-events: none;
}
.feature::before, .mod-card::before { right: 0; clip-path: polygon(100% 0, 0 0, 100% 100%); }
.feature::after,  .mod-card::after  { left: 0;  clip-path: polygon(0 0, 100% 0, 0 100%); }

.feature:hover, .mod-card:hover, .guide:hover {
  transform: translateY(-4px);
  border-color: var(--line-hi);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(212, 175, 55, 0.3);
}

/* الأزرار: ذهب مصقول بلمعة علوية. */
.btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--gold), var(--gold2) 55%, #a8851c);
  color: #000;
  font-weight: 700;
  border: 1px solid var(--gold-deep);
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.25);
  transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}
.btn:hover {
  filter: brightness(1.09);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.38);
  text-decoration: none;
}
.btn.ghost {
  background: transparent;
  color: var(--gold);
  border-color: var(--line);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(212, 175, 55, 0.1); box-shadow: none; }

/* عناوين الأقسام بخيط ذهبي متلاشٍ تحتها. */
.section > h2 {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 22px;
}
.section > h2::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold2), transparent);
}

/* الأيقونات في «ليش الديوان» داخل قرص ذهبي خافت. */
.feature .ic {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(212, 175, 55, 0.28), rgba(212, 175, 55, 0.05));
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

/* شارة النوع على بطاقة المود. */
.mod-card .badge {
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid var(--line);
  color: var(--gold);
}

.nav .brand { text-shadow: 0 0 18px rgba(212, 175, 55, 0.35); }
.nav .links a.active { color: var(--gold); }

footer { border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  .feature, .mod-card, .guide, .btn { transition: none; }
  .feature:hover, .mod-card:hover, .guide:hover, .btn:hover { transform: none; }
}
