<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>WinTerSMM Officials</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"/>
    <style>
      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }
      body {
        font-family: Arial, sans-serif;
        background: linear-gradient(to right, #44CC2F, #FFB44D);
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      #login-container {
        background-color: rgba(255, 180, 77, 0.2);
        border-radius: 10px;
        padding: 40px;
        width: 100%;
        max-width: 400px;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5); /* Add black shadow */
        /* Border gradient from #FFB44D to #44CC2F */
        border-left: 5px solid #FFB44D;
        border-right: 5px solid #44CC2F;
      }
      h2 {
        text-align: center;
        margin-bottom: 20px;
        color: #333;
      }
      .login-form-input {
        width: 100%;
        padding: 15px;
        margin: 10px 0;
        border: 1px solid #ccc;
        border-radius: 5px;
        font-size: 16px;
      }
      .login-form-input::placeholder {
        color: #888;
      }
      .form-check-label {
        font-size: 14px;
        color: #666;
      }
      .login-form-btn {
        width: 100%;
        padding: 15px;
        margin: 20px 0;
        /* Bold gradient color and distinct border with shadow */
        background: linear-gradient(to right, #44CC2F, #FFB44D);
        border: 3px solid;
        border-image: linear-gradient(to right, #44CC2F, #FFB44D); /* Gradient border */
        border-image-slice: 1;
        border-radius: 8px; /* Slightly increase border radius */
        color: white;
        font-size: 18px;
        font-weight: bold;
        cursor: pointer;
        /* Add box shadow to make the button stand out */
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); /* Shadow around button */
      }
      .login-form-btn:hover {
        background-color: #3cb02c;
        border-color: #44CC2F; /* Keep a more distinct color on hover */
      }
      .text a {
        color: #007bff;
        text-decoration: none;
      }
      .text a:hover {
        text-decoration: underline;
      }
      .ic-account {
        width: 60px;
        height: 60px;
        margin: 0 auto 20px;
        background-color: #ddd;
        border-radius: 50%;
        background-image: url("https://res.cloudinary.com/djpzmxt46/image/upload/f_auto,q_auto/jozs08aejlqnh1ugaxkh.webp");
        background-size: cover;
        background-position: center;
        animation: rotate 3s linear infinite;
      }
      @keyframes rotate {
        from {
          transform: rotate(0deg);
        }
        to {
          transform: rotate(360deg);
        }
      }
    </style>
  </head>
  <body>
    <div id="login-container">
      <div class="ic-account"></div>
      <?php if( $success ): ?>
        <div class="alert alert-success"><?php echo $successText; ?></div>
      <?php endif; ?>
      <?php if( $error ): ?>
        <div class="alert alert-danger"><?php echo $errorText; ?></div>
      <?php endif; ?>
      <h2>Login</h2>
      <form name="login-form" action="#" method="post">
        <input class="login-form-input" type="text" name="username" placeholder="Username" required>
        <input class="login-form-input" type="password" name="password" placeholder="Password" required>
        <input class="login-form-input" type="number" name="two_factor_code" placeholder="Enter Code (If Setup)">
        <div class="form-check">
          <input type="checkbox" class="form-check-input" name="remember" id="remember-me">
          <label class="form-check-label" for="remember-me">Remember me</label>
        </div>
        <button class="login-form-btn" type="submit" name="submit">Login</button>
      </form>
    </div>
  </body>
</html>