<?php
session_start();
$email = $_SESSION['reset_email'] ?? null;
if (!$email) {
  header("Location: reset_request.php");
  exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Enter OTP</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body { margin: 0; background-color: #d1d1d1; color: #fff; display: flex; justify-content: center; align-items: center; height: 100vh; font-family: Arial, sans-serif; text-align: center; }

    .form-container {
      background-color: #fff;
      padding: 30px 25px;
      border-radius: 10px;
      width: 100%;
      max-width: 420px;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    }

    .form-container h2 {
      text-align: center;
      margin-bottom: 25px;
      color: #333;
    }

    form {
      display: flex;
      flex-direction: column;
    }

    input[type="text"],
    input[type="password"] {
      padding: 12px 15px;
      border: 1px solid #ccc;
      border-radius: 6px;
      margin-bottom: 20px;
      font-size: 16px;
      transition: border-color 0.3s;
    }

    input:focus {
      border-color: #007bff;
      outline: none;
    }

    button {
      padding: 12px;
      background-color: #007bff;
      color: #fff;
      border: none;
      border-radius: 6px;
      font-size: 16px;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }

    button:hover {
      background-color: #0056b3;
    }

    @media (max-width: 480px) {
      .form-container {
        padding: 20px;
      }

      input, button {
        font-size: 15px;
      }
    }
    
     .logo {
            text-align: center;
            margin-bottom: 20px;
        }
        .logo img {
            max-width: 200px;
            height: 90px;
            width: 310px;
        }
        
        .btn11{
            
             background-color: blue; color: white; border: none; padding: 10px 20px; font-size: 16px; border-radius: 4px; cursor: pointer; transition: background-color 0.3s ease; 
        }
        .btn11:hover { background-color: #34bf0a; }
  </style>
</head>
<body>
  <div class="form-container">
      <div class="logo">
            <img src="logo.png" alt="KYBDATA Logo">
        </div>
    <h2>Verify OTP</h2>
    <form method="POST" action="update_password.php">
      <input type="text" name="code" required placeholder="Enter OTP code">
      <input type="password" name="new_password" required placeholder="Enter new password">
      <button type="submit" class="btn11">Update Password</button>
    </form>
  </div>
</body>
</html>

