/* narrate — واجهة العرض العامة. داكنة لأن المحتوى فيديو: الإطار الفاتح حول
   مقطعٍ ساطع يُتعب العين، والداكن يُبقي الانتباه على المشغّل. */

:root {
  --bg: #0b1220;
  --bg-2: #111c31;
  --card: #16243c;
  --line: #22334f;
  --ink: #eef4ff;
  --muted: #8fa3c4;
  --brand: #38bdf8;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(900px 460px at 85% -8%, rgba(56, 189, 248, .16), transparent 62%),
    radial-gradient(760px 420px at 8% 0%, rgba(139, 92, 246, .14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 15.5px/1.85 system-ui, "Segoe UI", Tahoma, sans-serif;
  direction: rtl;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

/* ── الترويسة ───────────────────────────────────────────── */
.nav { border-bottom: 1px solid var(--line); background: rgba(11, 18, 32, .82);
  backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 30; }
.nav .wrap { display: flex; align-items: center; gap: 14px; height: 68px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17px; }
.logo .mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6); color: #06121f; font-size: 15px; }
.nav .sp { margin-inline-start: auto; }
.nav a.q { color: var(--muted); font-size: 14px; font-weight: 700; }
.nav a.q:hover { color: var(--ink); }

/* ── الواجهة ────────────────────────────────────────────── */
.hero { padding: 66px 0 40px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 46px); line-height: 1.25; margin: 0 0 14px; font-weight: 800;
  letter-spacing: -.5px; }
.hero p { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0; }
.grad { background: linear-gradient(120deg, #38bdf8, #a78bfa 60%, #f0abfc);
  -webkit-background-clip: text; background-clip: text; color: transparent; }

.crumb { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.crumb a:hover { color: var(--brand); }

/* ── الشبكة والبطاقات ───────────────────────────────────── */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.sys {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.sys:hover { transform: translateY(-3px); border-color: #35507a;
  box-shadow: 0 20px 42px -22px rgba(0, 0, 0, .85); }
.sys .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; }
.sys h3 { margin: 0; font-size: 19px; font-weight: 800; }
.sys p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.sys .meta { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; gap: 14px; color: var(--muted); font-size: 13px; font-weight: 700; }

.c-sky     { background: rgba(56,189,248,.16); color: #7dd3fc; }
.c-violet  { background: rgba(167,139,250,.16); color: #c4b5fd; }
.c-emerald { background: rgba(52,211,153,.16); color: #6ee7b7; }
.c-amber   { background: rgba(251,191,36,.16); color: #fcd34d; }
.c-rose    { background: rgba(251,113,133,.16); color: #fda4af; }
.c-slate   { background: rgba(148,163,184,.16); color: #cbd5e1; }

/* ── بطاقة الدرس ────────────────────────────────────────── */
.lesson { display: flex; gap: 18px; padding: 16px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--card); align-items: center;
  transition: border-color .18s, background .18s; }
.lesson:hover { border-color: #35507a; background: #1a2a45; }
.lesson .thumb { width: 190px; aspect-ratio: 16/9; border-radius: 10px; object-fit: cover;
  background: #0b1220; flex-shrink: 0; }
.lesson .no { width: 32px; height: 32px; border-radius: 9px; background: rgba(56,189,248,.14);
  color: #7dd3fc; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  flex-shrink: 0; }
.lesson h3 { margin: 0 0 5px; font-size: 16.5px; font-weight: 800; }
.lesson p { margin: 0; color: var(--muted); font-size: 13.5px; }
.lesson .dur { margin-inline-start: auto; color: var(--muted); font-size: 13px;
  font-weight: 700; flex-shrink: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ── المشغّل ────────────────────────────────────────────── */
.player { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: #000; }
.player video { width: 100%; display: block; aspect-ratio: 16/9; }

.split { display: grid; grid-template-columns: 1fr 330px; gap: 26px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.panel h4 { margin: 0 0 14px; font-size: 14px; font-weight: 800; color: var(--muted);
  letter-spacing: .3px; }
.side-item { display: flex; gap: 11px; padding: 10px; border-radius: 10px; align-items: center; }
.side-item:hover { background: #1a2a45; }
.side-item.on { background: rgba(56,189,248,.13); }
.side-item .n { width: 26px; height: 26px; border-radius: 8px; background: #0b1220; color: var(--muted);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 800; flex-shrink: 0; }
.side-item.on .n { background: var(--brand); color: #06121f; }
.side-item span.t { font-size: 13.5px; font-weight: 700; line-height: 1.5; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.btn:hover { background: #1a2a45; }
.btn.primary { background: linear-gradient(135deg, #38bdf8, #6366f1); border: 0; color: #06121f; }
.btn.primary:hover { filter: brightness(1.08); }

.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.foot { margin-top: 70px; padding: 26px 0; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .lesson .thumb { width: 128px; }
}
@media (max-width: 560px) {
  .lesson { flex-wrap: wrap; }
  .lesson .thumb { width: 100%; }
}
