:root {
  --bg: #0e0f12;
  --bg-raised: #17191f;
  --amber: #e8a33d;
  --teal: #2bc8b0;
  --ivory: #f2f0ea;
  --muted: #9a9aa2;
  --line: #2a2c33;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font-family: 'Tajawal', sans-serif;
  line-height: 1.6;
}

h1, h2, .eyebrow {
  font-family: 'Cairo', sans-serif;
}

/* ===== شريط الفيلم — العنصر المميز ===== */
.filmstrip {
  height: 22px;
  background: repeating-linear-gradient(
    90deg,
    #000 0 14px,
    var(--bg) 14px 22px
  );
  position: relative;
}
.filmstrip::before, .filmstrip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 6px, #000 6px 8px);
  opacity: 0.4;
}
.filmstrip-inline { margin: 0 0 24px 0; border-radius: 4px; overflow: hidden; }

/* ===== الهيدر ===== */
.hero {
  padding: 64px 24px 48px;
  text-align: center;
  background: radial-gradient(ellipse at top, #1c1e25 0%, var(--bg) 70%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.eyebrow {
  color: var(--amber);
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.85rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin: 12px 0;
  color: var(--ivory);
}
.hero-sub { color: var(--muted); font-size: 1.05rem; }

/* ===== هيرو الصفحة التعريفية بس — عنوان أكبر وأقوى + أزرار CTA مزدوجة =====
   ⚠️ مقصود إنه أكبر من .hero h1 العادي (يلي بيستخدمه appRoot بعد تسجيل
   الدخول كمان) — الصفحة التعريفية هي أول انطباع لزائر جديد فبتستاهل
   حجم أوضح، بعكس هيدر الأداة الداخلية يلي المستخدم مسجل دخول فيها أصلاً. */
.landing-page .hero h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  letter-spacing: -0.01em;
}
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.landing-page .btn-large { margin-top: 0; }
.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border: 1px solid var(--line);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
/* توهج نابض خفيف على زر CTA الأساسي بالهيرو — يلفت الانتباه بدون ما يصير مزعج */
.btn-glow { position: relative; box-shadow: 0 0 0 0 rgba(232, 163, 61, 0.5); animation: btn-pulse 2.6s ease-in-out infinite; }
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 163, 61, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(232, 163, 61, 0); }
}
/* شبكة/حبيبات خفيفة متحركة بالخلفية — بديل سينمائي بـ CSS بدل فيديو خلفية حقيقي غير متوفر */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  animation: grain-drift 18s linear infinite;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 75%);
}
@keyframes grain-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 84px 84px, 84px 84px; }
}

/* ===== المسرح الرئيسي ===== */
.stage {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.reel {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.reel-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
/* ⚠️ إصلاح: هاد الستايل (شارة دائرية صغيرة 30×30) كان مطبّق على كل <span>
   جوا .reel-label بدون تمييز — بس كل عنوان قسم (01 الفكرة، 02 توليد الفيديو،
   باقتي والاشتراك...) هو أصلاً بالضبط span أول (الرقم/الأيقونة) + span ثاني
   (نص العنوان الطويل). النتيجة: نص العنوان نفسه كان ينحشر جوا صندوق 30×30
   بكسل صغير ويتراكب/ينقص — بالضبط الخلل يلي شفناه بلقطات الشاشة (نص العنوان
   يطلع مقطوع ومتراكب فوق دائرة عنبرية). الحل: الستايل الدائري بس لأول span
   (الرقم/الأيقونة)، مش لكل الـ spans. */
.reel-label span:first-child {
  color: var(--bg);
  background: var(--amber);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.reel-body { padding: 22px; }

.hint { color: var(--muted); font-size: 0.92rem; margin: 0 0 16px; }

textarea, input[type="text"], input[type="number"], select {
  background: #0b0c0f;
  border: 1px solid var(--line);
  color: var(--ivory);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
}
textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
}
textarea:focus, input:focus, select:focus, button:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.row label { color: var(--muted); font-size: 0.9rem; }
.row input[type="number"] { width: 70px; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ivory) !important;
  cursor: pointer;
  font-size: 0.92rem;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
  cursor: pointer;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--amber); color: #201400; }
.btn-secondary { background: var(--teal); color: #00201b; }
.btn-large { padding: 14px 28px; font-size: 1rem; }

/* ===== قائمة المشاهد ===== */
.scenes-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.scene-card {
  background: #0b0c0f;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scene-card .scene-num {
  color: var(--amber);
  font-weight: 700;
  font-size: 0.85rem;
}
.scene-card textarea { min-height: 50px; font-size: 0.88rem; }

/* ===== شبكة المقاطع ===== */
.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.clip-card {
  background: #0b0c0f;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.clip-card video { width: 100%; border-radius: 6px; background: #000; }
.status-badge {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
}
.status-pending { background: #2a2c33; color: var(--muted); }
.status-processing { background: #3a2e12; color: var(--amber); }
.status-done { background: #123a2e; color: var(--teal); }
.status-failed { background: #3a1212; color: #ff8080; }

/* ===== التايم لاين ===== */
.timeline {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
}
.timeline-item {
  min-width: 140px;
  background: #0b0c0f;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.timeline-item video { width: 100%; border-radius: 4px; }
.timeline-item .order-btns { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.timeline-item .order-btns button {
  padding: 4px 8px;
  font-size: 0.8rem;
  background: var(--line);
  color: var(--ivory);
}

.edit-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.edit-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.edit-group label { color: var(--muted); font-size: 0.88rem; }

.merged-preview, .final-result { margin-top: 18px; }
.merged-preview video, .final-result video, .img2vid-panel video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.img2vid-panel { flex-direction: column; align-items: stretch; }
.img2vid-panel #img2vidResult:empty { display: none; }
.final-result a.download {
  display: inline-block;
  margin-top: 12px;
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 24px;
}

@media (max-width: 600px) {
  .hero { padding: 48px 16px 36px; }
  .reel-body { padding: 16px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .sticky-cta-text { display: none; }
  .sticky-cta-inner { justify-content: center; }
  .sticky-cta #stickyCtaBtn { width: 100%; }
  .landing-trustbar { padding-inline: 12px; }
  .trust-badge { font-size: 0.8rem; padding: 8px 14px; }
  .landing-showcase, .landing-steps, .landing-benefits, .landing-audience, .landing-faq {
    padding-inline: 16px;
  }
}

/* ===== بوابة تسجيل الدخول ===== */
.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at top, #1c1e25 0%, var(--bg) 70%);
  padding: 24px;
}
.auth-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.auth-card h2 {
  font-family: 'Cairo', sans-serif;
  margin: 10px 0 22px;
  font-size: 1.4rem;
}
.auth-card form { text-align: right; }
.auth-card input { width: 100%; }
.auth-card .btn-large { width: 100%; margin-top: 6px; }

/* خانة كلمة السر مع زر إظهار/إخفاء (أيقونة العين) */
.password-field { position: relative; }
.password-field input { padding-inline-end: 42px; }
.password-toggle-btn {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 6px;
  opacity: 0.75;
  border-radius: 6px;
}
.password-toggle-btn:hover { opacity: 1; background: rgba(255,255,255,0.06); }
.password-toggle-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.auth-error {
  color: #ff8080;
  font-size: 0.85rem;
  min-height: 18px;
  margin: 6px 0;
}
.auth-toggle {
  background: none;
  border: none;
  color: var(--teal);
  margin-top: 16px;
  font-weight: 600;
  text-decoration: underline;
}

/* ===== شريط علوي بعد الدخول ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
}
.topbar span { color: var(--muted); font-size: 0.9rem; }

/* ===== مساعد الدعم العائم ===== */
.support-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
}
.support-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--amber);
  color: #201400;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  border: none;
  cursor: pointer;
}
.support-panel {
  position: absolute;
  bottom: 68px;
  left: 0;
  width: 320px;
  max-width: 85vw;
  height: 420px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.support-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
}
.support-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  padding: 4px;
}
.support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.support-msg {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  max-width: 85%;
  line-height: 1.5;
}
.support-msg-bot {
  background: #0b0c0f;
  align-self: flex-start;
}
.support-msg-user {
  background: var(--teal);
  color: #00201b;
  align-self: flex-end;
}
.support-input-row {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.support-input-row input {
  flex: 1;
}
.support-input-row button {
  padding: 8px 14px;
  font-size: 0.85rem;
}
.faq-list {
  max-height: 140px;
  overflow-y: auto;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--line);
}
.faq-title {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 8px;
}
.faq-item {
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.faq-item summary {
  cursor: pointer;
  color: var(--amber);
  font-weight: 600;
}
.faq-item p {
  color: var(--muted);
  margin: 6px 0 0;
  padding-right: 10px;
}

/* ===== الباقات والدفع ===== */
.current-plan-box {
  background: #0b0c0f;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 0.92rem;
  color: var(--muted);
}
.current-plan-box strong { color: var(--teal); }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.plan-card {
  background: #0b0c0f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-card.plan-current {
  border-color: var(--teal);
}
.plan-card h3 {
  font-family: 'Cairo', sans-serif;
  margin: 0;
  color: var(--amber);
}
.plan-price {
  font-size: 1.6rem;
  font-weight: 800;
}
.plan-price span { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.plan-quota { color: var(--muted); font-size: 0.88rem; }
.plan-paypal-slot { min-height: 45px; margin-top: 8px; }
.plan-badge-current {
  background: var(--teal);
  color: #00201b;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  align-self: center;
}

/* ===== الصفحة التعريفية (Landing Page) ===== */
.landing-page .hero { border-bottom: none; }
.landing-page .btn-large { margin-top: 22px; }
.hero-cta-note {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 10px;
  opacity: 0.85;
}

/* ===== شريط الثقة — مزودي الذكاء الاصطناعي الحقيقيين ===== */
.landing-trustbar {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 32px;
  text-align: center;
}
.trustbar-label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.trustbar-logos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.trust-badge {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--ivory);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.trust-badge:hover {
  transform: translateY(-3px);
  border-color: var(--amber);
}
.trust-badge-icon { font-size: 1.1rem; }

/* ===== قسم عرض الموقع (Showcase) — مجسّم CSS/HTML مطابق لشكل الواجهة الفعلية،
   مش لقطة شاشة — عشان زائر جديد يشوف شكل الأداة قبل ما يسجل حساب ===== */
.landing-showcase {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}
.showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.demo-badge {
  display: inline-block;
  background: rgba(43, 200, 176, 0.12);
  color: var(--teal);
  border: 1px solid rgba(43, 200, 176, 0.35);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.showcase-text h2 {
  font-family: 'Cairo', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 14px;
}
.showcase-text p {
  color: var(--muted);
  line-height: 1.8;
}
.mock-window {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.mock-topbar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.mock-body { padding: 20px; }
.mock-idea-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.mock-idea-label {
  display: block;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.mock-idea-box p { margin: 0; font-size: 0.88rem; color: var(--ivory); }
.mock-scenes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.mock-scene {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
}
.mock-status {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.mock-status-done { background: var(--teal); color: var(--bg); }
.mock-status-processing { background: var(--amber); animation: mock-pulse 1.2s ease-in-out infinite; }
.mock-status-pending { background: var(--line); }
@keyframes mock-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.mock-video-preview {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.mock-status { transition: background-color 0.4s ease; }
.mock-idea-box p { transition: opacity 0.3s ease; }
/* شريط تقدّم بأسفل المجسّم — بيتحرّك عن طريق runDemoCycle() بـ app.js عشان
   يقلّد إحساس "عرض حي" بدل صورة ثابتة بلا حياة */
.mock-progress-track {
  height: 3px;
  background: var(--line);
  overflow: hidden;
}
.mock-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--teal));
  transition: width 0.4s linear;
}
@media (max-width: 720px) {
  .showcase-inner { grid-template-columns: 1fr; }
}

.landing-steps {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}
.landing-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.landing-step {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.landing-step-num {
  display: inline-block;
  color: var(--bg);
  background: var(--amber);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  text-align: center;
  line-height: 34px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  margin-bottom: 14px;
}
.landing-step h3 {
  font-family: 'Cairo', sans-serif;
  margin: 0 0 8px;
  color: var(--ivory);
}
.landing-step p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

/* ===== نقاط ثقة حقيقية عن المنتج (بدل عداد مستخدمين/شهادات وهمية) ===== */
.landing-benefits {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 20px;
}
.landing-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.benefit-chip {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.benefit-chip:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
}
.benefit-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.benefit-chip h4 {
  font-family: 'Cairo', sans-serif;
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: var(--ivory);
}
.benefit-chip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.landing-audience {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  text-align: center;
}
.landing-audience h2 {
  font-family: 'Cairo', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.landing-audience p {
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.7;
}

.landing-faq {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 80px;
}
.landing-faq h2 {
  font-family: 'Cairo', sans-serif;
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 24px;
}
.landing-faq-list { display: flex; flex-direction: column; gap: 12px; }
.landing-faq-item {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
}
.landing-faq-item summary {
  cursor: pointer;
  color: var(--ivory);
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
}
.landing-faq-item p {
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.7;
}

/* ===== CTA أخير قبل الفوتر — خلفية مرفوعة شوي عشان يبين كـ"إغلاق" بصري
   للصفحة، بدون أي رقم/شهادة وهمية (شوف التعليق فوق القسم بـ index.html) ===== */
.landing-cta-final {
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 56px 20px;
}
.cta-final-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.cta-final-inner h2 {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin-bottom: 22px;
}

/* ===== تأثيرات الإضاءة الخلفية بالهيرو ===== */
.landing-page .hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
  animation: glow-float 9s ease-in-out infinite;
}
.hero-glow-1 {
  width: 340px; height: 340px;
  background: var(--amber);
  top: -80px; left: -60px;
}
.hero-glow-2 {
  width: 300px; height: 300px;
  background: var(--teal);
  bottom: -100px; right: -40px;
  animation-delay: -4.5s;
}
@keyframes glow-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.15); }
}

/* ===== مجسم كلابر (Clapperboard) ثلاثي الأبعاد بـ CSS ===== */
.clapper-scene {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding-bottom: 50px;
  perspective: 900px;
}
.clapper-3d {
  width: 200px;
  height: 150px;
  position: relative;
  transform-style: preserve-3d;
  animation: clapper-spin 12s linear infinite;
}
@keyframes clapper-spin {
  0%   { transform: rotateY(0deg) rotateX(8deg); }
  100% { transform: rotateY(360deg) rotateX(8deg); }
}
.clapper-body {
  position: absolute;
  inset: 0;
  top: 26px;
  background:
    repeating-linear-gradient(45deg, var(--bg) 0 14px, var(--ivory) 14px 28px);
  border: 3px solid var(--bg);
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.clapper-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 34px;
  background:
    repeating-linear-gradient(-45deg, var(--bg) 0 14px, var(--amber) 14px 28px);
  border: 3px solid var(--bg);
  border-radius: 6px;
  transform-origin: top left;
  animation: clapper-clap 3s ease-in-out infinite;
}
@keyframes clapper-clap {
  0%, 15%, 100% { transform: rotateX(0deg); }
  7% { transform: rotateX(-25deg); }
}

/* ===== حركة عند تمرير الفأرة على خطوات الشرح ===== */
.landing-step {
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.landing-step:hover {
  transform: translateY(-6px);
  border-color: var(--amber);
}

/* ============================================================
   ===== إشعارات (Toasts) — بديل احترافي لصناديق alert() =====
   alert() المتصفح الافتراضي بيوقف الصفحة بالكامل، وبيظهر بشكل غير
   احترافي، وكان عم يعرض نص خطأ تقني خام (أحياناً JSON كامل من رد
   Runway/ElevenLabs) مباشرة للمستخدم العادي. هلق بس الرسالة الواضحة
   بالعربي بتظهر بإشعار صغير بزاوية الشاشة، والتفاصيل التقنية الكاملة
   بتنكتب بـ console فقط (لغرض الدعم الفني لو احتجناها).
   ============================================================ */
#toastContainer {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--teal);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  font-family: 'Tajawal', sans-serif;
  color: var(--ivory);
  font-size: 0.92rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toast-in 0.25s ease;
}
.toast.toast-error { border-inline-start-color: #ff5c5c; }
.toast.toast-success { border-inline-start-color: var(--teal); }
.toast.toast-info { border-inline-start-color: var(--amber); }
.toast-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 0.82rem; }
.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.toast-close:hover { color: var(--ivory); }
.toast.toast-out { animation: toast-out 0.2s ease forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

#heroSentinel { height: 1px; }

/* ===== ظهور تدريجي عند التمرير — كل عنصر عليه data-reveal بيبلش مخفي/نازل
   شوي، وIntersectionObserver بـ app.js بيضيفله .is-visible أول ما يدخل
   الشاشة (مرة وحدة بس، ما بيرجع يختفي لما تطلع منه). ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== شريط CTA ثابت بأسفل الشاشة — بيظهر بس بعد ما الهيرو يختفي (شوف
   #heroSentinel + IntersectionObserver بـ app.js)، ومختفي دايماً بالموبايل
   الصغير جداً لو appRoot/authGate ظاهرين (JS بيتحكم بـ .sticky-cta-visible،
   مش بس CSS، عشان ما يظهر إلا بصفحة landing). ===== */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.35);
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.sticky-cta.sticky-cta-visible { transform: translateY(0); }
.sticky-cta-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sticky-cta-text {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-cta #stickyCtaBtn { flex-shrink: 0; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .hero-glow, .clapper-3d, .clapper-top, .landing-step,
  .hero-grain, .btn-glow, [data-reveal], .sticky-cta {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ===== نافذة الحفظ (بعد ما يخلص تجهيز الفيديو) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-box {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
}
.modal-box h3 {
  font-family: 'Cairo', sans-serif;
  margin: 0 0 8px;
  font-size: 1.3rem;
}
.modal-box p { color: var(--muted); font-size: 0.9rem; margin: 0 0 18px; }
.modal-box .edit-group { text-align: right; margin-bottom: 8px; }
.modal-box select { width: 100%; }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ===== أيقونات SVG لخطوات الشرح ===== */
.step-icon {
  width: 56px;
  height: 56px;
  margin: 4px 0 12px;
}
.step-icon .icon-stroke {
  stroke: var(--ivory);
  fill: none;
}
.step-icon .icon-accent {
  fill: var(--amber);
}
.landing-step:hover .icon-stroke {
  stroke: var(--teal);
  transition: stroke 0.3s ease;
}
.landing-step:hover .icon-accent {
  fill: var(--teal);
  transition: fill 0.3s ease;
}
