<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>JavaScript Promises Exercise</title>
  <style>
    body {
      font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
      max-width: 640px;
      margin: 3rem auto;
      padding: 0 1rem;
      color: #1f2933;
      background: #f7f9fb;
    }
    h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
    p.intro { color: #52606d; margin-top: 0; }

    #output {
      margin: 2rem 0 1rem;
      padding: 1.25rem 1.5rem;
      border-radius: 8px;
      border: 2px solid #cbd2d9;
      background: #ffffff;
      font-size: 1.15rem;
      min-height: 1.5em;
    }
    /* Classes set by the student's callbacks */
    #output.info    { border-color: #2f80ed; background: #eaf2fe; color: #12407a; }
    #output.success { border-color: #27ae60; background: #e9f7ef; color: #145a32; }
    #output.error   { border-color: #d64545; background: #fdecec; color: #7b1d1d; }

    button {
      font: inherit;
      padding: 0.5rem 1.1rem;
      border: none;
      border-radius: 6px;
      background: #1f4e79;
      color: #fff;
      cursor: pointer;
    }
    button:hover { background: #163a5a; }
  </style>
</head>
<body>
  <h1>Promises Exercise</h1>
  <p class="intro">An odd number means the promise resolved; an even number means it was rejected.</p>

  <div id="output">Waiting for the promise&hellip;</div>

  <!-- Reloads the page, which runs your scripts again and generates a new number -->
  <button type="button" onclick="location.reload()">Run again</button>

  <!-- Your scripts: keep them at the end of the body, in this order -->
  <script src="create-promise.js"></script>
  <script src="using-promise.js"></script>
</body>
</html>
