<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Cadastrar Problema</title>
  <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
  <style>
    body {
      background-color: #8C64ED; /* Fundo roxo padrão do projeto */
      color: white;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }
    .container-custom {
      background-color: white;
      color: black;
      border-radius: 20px;
      padding: 20px;
      max-width: 600px;
      width: 100%;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    .btn-primary {
      background-color: #8C64ED;
      border-color: #8C64ED;
      color: #fff!important;
      border-radius: 20px;
    }
    .form-control {
      border-radius: 20px;
    }
    .header-container {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
    }
    .pat2math-header {
      font-size: 1.5em;
      color: #8C64ED;
      font-weight: bold;
      text-align: right;
    }
    .back-button {
      background: none;
      border: 2px solid black;
      color: black;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 1.5em;
      margin-right: 10px;
    }
  </style>
</head>
<body>
  <div class="container container-custom">
    <div class="header-container">
      <button class="back-button" onclick="window.location.href='/api/teacher/dashboard'">
        &#x2190;
      </button>
      <div class="pat2math-header"><strong>PAT2MATH</strong></div>
    </div>
    <h1>Cadastrar Problema</h1>
    <form action="/api/teacher/create-problem" method="POST">
      <div class="form-group">
        <label for="title">Título</label>
        <input type="text" class="form-control" id="title" name="title" required>
      </div>
      <div class="form-group">
        <label for="statement">Enunciado</label>
        <textarea class="form-control" id="statement" name="statement" required></textarea>
      </div>
      <div class="form-group">
        <label for="equation">Equação</label>
        <input type="text" class="form-control" id="equation" name="equation" required>
      </div>
      <div class="form-group">
        <label for="result">Resultado</label>
        <input type="text" class="form-control" id="result" name="result" required>
      </div>
      <div class="form-group">
        <label for="difficulty">Dificuldade</label>
        <select class="form-control" id="difficulty" name="difficulty" required>
          <option value="fácil">Fácil</option>
          <option value="médio">Médio</option>
          <option value="difícil">Difícil</option>
        </select>
      </div>
      <button type="submit" class="btn btn-primary">Cadastrar</button>
    </form>
  </div>
  <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
  <script src="https://stackpath.amazonaws.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
