<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Weight Converter</title>
    <style>
        body { font-family: Arial; text-align: center; margin-top: 80px; }
        input { padding: 10px; width: 200px; margin: 10px; }
        button { padding: 10px 20px; cursor: pointer; }
    </style>
</head>
<body>
    <h1>Weight Converter</h1>

    <form method="POST" action="/convert">
        @csrf
        <input type="number" step="0.01" name="kg" placeholder="Enter KG" value="{{ old('kg', $kg ?? '') }}">
        <br>
        <input type="number" step="0.01" name="lbs" placeholder="Enter LBS" value="{{ old('lbs', $lbs ?? '') }}">
        <br>
        <button type="submit">Convert</button>
    </form>

    @isset($result)
        <h2>{{ $result }}</h2>
    @endisset
</body>
</html>
