<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, shrink-to-fit=no"
    />

    <!-- Bootstrap CSS -->
    <link
      href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
      rel="stylesheet"
      integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
      crossorigin="anonymous"
    />

    <style>
      :root {
        --primary-color: #2563eb;
        --primary-hover: #1d4ed8;
        --secondary-color: #64748b;
        --accent-color: #f1f5f9;
        --border-color: #e2e8f0;
        --text-primary: #1e293b;
        --text-secondary: #64748b;
        --success-color: #10b981;
        --warning-color: #f59e0b;
        --error-color: #ef4444;
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),
          0 2px 4px -2px rgb(0 0 0 / 0.1);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
          0 4px 6px -4px rgb(0 0 0 / 0.1);
        --radius: 12px;
        --radius-sm: 8px;
      }

      * {
        box-sizing: border-box;
      }

      body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          sans-serif;
        line-height: 1.6;
        color: var(--text-primary);
        background-color: #fafafa;
        margin: 0;
        padding: 0;
      }

      .navbar {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        padding: 1rem 0;
        transition: all 0.3s ease;
      }

      .navbar.scrolled {
        background: rgba(255, 255, 255, 0.98) !important;
        box-shadow: var(--shadow-md);
        padding: 0.75rem 0;
      }

      .navbar.hidden {
        transform: translateY(-100%);
      }

      .navbar-brand {
        font-weight: 700;
        font-size: 1.5rem;
        color: var(--primary-color) !important;
        display: flex;
        align-items: center;
        gap: 0.75rem;
      }

      .navbar-logo {
        width: 100px !important;
        height: 50px !important;
        transition: all 0.2s ease;
      }

      .navbar-logo:hover {
        transform: scale(1.05);
      }

      .navbar-nav .nav-link {
        font-weight: 500;
        color: var(--text-secondary) !important;
        transition: all 0.2s ease;
        padding: 0.5rem 1rem;
        border-radius: var(--radius-sm);
      }

      .navbar-nav .nav-link:hover,
      .navbar-nav .nav-link.active {
        color: var(--primary-color) !important;
        background-color: var(--accent-color);
      }

      .hero-section {
        text-align: center;
        padding: 6rem 0 3rem;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        margin-bottom: 3rem;
        margin-top: 80px;
      }

      .hero-section h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        line-height: 1.2;
      }

      .hero-section p {
        font-size: 1.1rem;
        opacity: 0.9;
        max-width: 800px;
        margin: 0 auto 2rem;
      }

      .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
      }

      .section {
        background: white;
        border-radius: var(--radius);
        padding: 2rem;
        margin-bottom: 2rem;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border-color);
        text-align: center;
      }

      .error-message {
        color: var(--error-color);
        font-size: 1.2em;
        font-weight: 600;
      }

      .github-link,
      .goback-button {
        text-decoration: none;
        color: var(--primary-color);
        font-weight: 600;
        margin: 10px;
        padding: 12px 24px;
        border: 2px solid var(--primary-color);
        border-radius: var(--radius-sm);
        display: inline-block;
        transition: all 0.2s ease;
        background: white;
      }

      .goback-button:hover {
        background-color: var(--primary-color);
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
      }

      .github-link:hover {
        background-color: var(--primary-color);
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
      }

      @media (max-width: 768px) {
        .hero-section h1 {
          font-size: 2rem;
        }

        .section {
          padding: 1.5rem;
        }
      }

      /* Smooth scrolling */
      html {
        scroll-behavior: smooth;
      }
    </style>

    <title>MNT Bench - Error</title>
    <link
      rel="shortcut icon"
      href="{{ url_for('static', filename='favicon.ico') }}"
    />
  </head>
  <body>
    <!-- Modern Navbar -->
    <nav class="navbar navbar-expand-lg fixed-top">
      <div class="container">
        <a class="navbar-brand" href="/mntbench">
          <img
            src="{{ url_for('static', filename='mnt_dark.svg')}}"
            alt="MNT Logo"
            width="100"
            height="50"
            class="d-inline-block align-text-top navbar-logo"
          />
          Bench
        </a>
        <button
          class="navbar-toggler"
          type="button"
          data-bs-toggle="collapse"
          data-bs-target="#navbarNavAltMarkup"
          aria-controls="navbarNavAltMarkup"
          aria-expanded="false"
          aria-label="Toggle navigation"
        >
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
          <div class="navbar-nav ms-auto">
            <a class="nav-item nav-link" href="index">Benchmarks</a>
            <a class="nav-item nav-link" href="description"
              >Level and File Descriptions</a
            >
            <a
              class="nav-item nav-link"
              href="https://www.cda.cit.tum.de/research/nanotech/"
              target="_blank"
              >More on our Work</a
            >
            <a class="nav-item nav-link" href="legal">Legal Information</a>
          </div>
        </div>
      </div>
    </nav>

    <!-- Hero Section -->
    <div class="hero-section">
      <div class="container">
        <h1>Oops! Something went wrong.</h1>
        <p>
          An error occurred while processing your request. We apologize for the
          inconvenience.
        </p>
      </div>
    </div>

    <!-- Main Content -->
    <div class="container">
      <div class="section">
        <p class="error-message">
          An error occurred while processing your request.
        </p>
        <p>
          Please report the issue on our
          <a
            href="https://github.com/cda-tum/mnt-bench/issues"
            class="github-link"
            target="_blank"
            >GitHub repository</a
          >.
        </p>
        <button class="goback-button" onclick="goBack()">Go Back</button>
      </div>
    </div>

    <!-- Bootstrap 5 JavaScript -->
    <script
      src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
      integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
      crossorigin="anonymous"
    ></script>

    <script>
      // Navbar scroll effect with hide/show functionality
      let lastScrollTop = 0;
      const scrollThreshold = 100; // Minimum scroll distance before hiding

      window.addEventListener("scroll", function () {
        const navbar = document.querySelector(".navbar");
        const currentScrollTop =
          window.pageYOffset || document.documentElement.scrollTop;

        // Add scrolled class for styling
        if (currentScrollTop > 50) {
          navbar.classList.add("scrolled");
        } else {
          navbar.classList.remove("scrolled");
        }

        // Hide/show navbar based on scroll direction
        if (
          currentScrollTop > lastScrollTop &&
          currentScrollTop > scrollThreshold
        ) {
          // Scrolling down - hide navbar
          navbar.classList.add("hidden");
        } else if (currentScrollTop < lastScrollTop) {
          // Scrolling up - show navbar
          navbar.classList.remove("hidden");
        }

        lastScrollTop = currentScrollTop;
      });

      function goBack() {
        window.history.back();
      }
    </script>
  </body>
</html>
