<?php
require_once __DIR__ . "/../middleware/user_auth.php";
require_once __DIR__ . "/../config.php";

// Pick active license (latest)
$license = $_SESSION['licenses'][0]['license_key'] ?? '';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FX-HUNTER Strategy Optimizer</title>

<style>
body {
    background:#0b0f1a;
    color:#e8f1ff;
    font-family: Arial, Helvetica, sans-serif;
    margin:0;
}
.header {
    padding:20px;
    font-size:22px;
    font-weight:bold;
    color:#00e5ff;
}
.card {
    background:#121a2f;
    margin:20px;
    padding:20px;
    border-radius:10px;
}
.btn {
    background:#00e5ff;
    color:#000;
    padding:10px 16px;
    border:none;
    border-radius:6px;
    cursor:pointer;
    font-weight:bold;
}
.badge {
    background:#00e5ff;
    color:#000;
    padding:4px 8px;
    border-radius:6px;
    font-size:12px;
}
</style>
</head>

<body>

<div class="header">
    ⚡ FX-HUNTER Strategy Optimizer
</div>

<div class="card">
    <p><b>License:</b> <span class="badge"><?= htmlspecialchars($license) ?></span></p>
    <p>Status: <span style="color:#00ff9c">CONNECTED</span></p>

    <hr style="border-color:#1f2a44">

    <p>This page is the Optimizer UI shell.</p>
    <p>API is live. License is validated. UI expansion comes next.</p>

    <button class="btn" onclick="alert('Optimizer engine ready')">
        Start Optimization
    </button>
</div>

</body>
</html>
