<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{% block title %}Matzeflix Dashboard{% endblock %}</title>
  <link rel="manifest" href="{% static 'manifest.json' %}">
  <meta name="theme-color" content="#e50914">
  {% if project_description %}
  <meta name="description" content="{{ project_description }}">
  {% endif %}
  {% load static %}
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
  <style>
    :root {
      --primary-red: #e50914;
      --bg-dark: #141414;
      --card-bg: #1f1f1f;
    }
    body {
      background-color: var(--bg-dark);
      color: #fff;
      font-family: 'Inter', sans-serif;
      -webkit-font-smoothing: antialiased;
    }
    .navbar {
      background-color: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid #333;
      padding: 1rem 0;
    }
    .navbar-brand {
      letter-spacing: 2px;
      font-weight: 800;
      color: var(--primary-red) !important;
    }
    .nav-link {
      font-weight: 600;
      text-transform: uppercase;
      font-size: 0.85rem;
      letter-spacing: 1px;
    }
    .card {
      background-color: var(--card-bg);
      border: 1px solid #333;
    }
    .btn-primary {
      background-color: var(--primary-red);
      border-color: var(--primary-red);
      font-weight: 600;
    }
    .btn-primary:hover {
      background-color: #b20710;
      border-color: #b20710;
    }
    .footer {
      padding: 3rem 0;
      margin-top: 5rem;
      border-top: 1px solid #333;
      color: #666;
    }
    ::-webkit-scrollbar {
      width: 10px;
    }
    ::-webkit-scrollbar-track {
      background: #141414;
    }
    ::-webkit-scrollbar-thumb {
      background: #333;
      border-radius: 5px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: #444;
    }
  </style>
  {% block head %}{% endblock %}
</head>

<body>
  <nav class="navbar navbar-expand-lg navbar-dark sticky-top">
    <div class="container">
      <a class="navbar-brand" href="{% url 'home' %}">
        MATZEFLIX
      </a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarNav">
        <ul class="navbar-nav ms-auto">
          <li class="nav-item">
            <a class="nav-link" href="{% url 'home' %}">Dashboard</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="{% url 'settings' %}">Settings</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="/admin/">Admin Portal</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>

  <main class="container py-4">
    {% block content %}{% endblock %}
  </main>

  <footer class="footer">
    <div class="container text-center">
      <p class="mb-0">&copy; 2026 Matzeflix Dashboard. All rights reserved.</p>
      <small>Powered by Django & Matzeflix Media Engine</small>
    </div>
  </footer>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  <script>
    if ('serviceWorker' in navigator) {
      window.addEventListener('load', () => {
        navigator.serviceWorker.register('{% static "js/sw.js" %}');
      });
    }
  </script>
</body>

</html>