<?php require_once __DIR__ . '/feature-flags.php'; ?>
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
  <meta name="theme-color" content="#030A12">
  <title><?= $pageTitle ?? 'EL3AB' ?></title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="/public/css/app-v2.css">
  <?php if (isset($extraCss)): ?>
  <?php if (is_array($extraCss)): ?>
  <?php foreach ($extraCss as $css): ?>
  <link rel="stylesheet" href="<?= $css ?>">
  <?php endforeach; ?>
  <?php else: ?>
  <link rel="stylesheet" href="<?= $extraCss ?>">
  <?php endif; ?>
  <?php endif; ?>
</head>
<body>
<div class="shell">

  <?php require __DIR__ . '/../templates/sidebar-v2.php'; ?>

  <header class="hdr">
    <a href="/" class="hdr-brand">EL3AB</a>
    <div class="hdr-center">
      <div class="hdr-rating" id="hdr-elo" title="تصنيف بليتز">
        <svg class="icon-sm icon-fill hdr-rating-icon"><use href="/public/icons/sprite.svg#icon-star"></use></svg>
        <span id="hdr-elo-val">1200</span>
      </div>
    </div>
    <div class="hdr-actions">
      <a href="/notifications" class="hdr-btn" aria-label="الاشعارات">
        <svg class="icon"><use href="/public/icons/sprite.svg#icon-bell"></use></svg>
        <span class="hdr-dot" id="hdr-notif-dot" style="display:none"></span>
      </a>
      <a href="/profile" class="hdr-btn" aria-label="الملف الشخصي">
        <svg class="icon"><use href="/public/icons/sprite.svg#icon-profile"></use></svg>
      </a>
    </div>
  </header>

  <main class="main">
