<?php
session_start();

// Clear all session data and destroy session
$_SESSION = [];
if (ini_get("session.use_cookies")) {
    $params = session_get_cookie_params();
    setcookie(session_name(), '', time() - 42000,
        $params["path"], $params["domain"],
        $params["secure"], $params["httponly"]
    );
}
session_destroy();

// Render a choice page instead of auto-redirect
?>
<!DOCTYPE html>
<html lang="bn">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>লগআউট সফল</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  <style>
    body { font-family: 'Hind Siliguri', 'Noto Sans Bengali', Arial, sans-serif; background: #f5f7fb; }
    .logout-card { max-width: 520px; margin: 10vh auto; box-shadow: 0 10px 25px rgba(0,0,0,0.08); border: 0; }
    .logout-card .icon { font-size: 48px; color: #0d6efd; }
  </style>
</head>
<body>
  <div class="container">
    <div class="card logout-card">
      <div class="card-body text-center p-4 p-md-5">
        <div class="mb-3 icon">✅</div>
        <h3 class="mb-2">আপনি লগআউট করেছেন</h3>
        <p class="text-muted mb-4">আপনি কোথায় যেতে চান?</p>
        <div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
          <a href="index.php" class="btn btn-outline-primary btn-lg px-4">হোম পেজ</a>
          <a href="login.php" class="btn btn-primary btn-lg px-4">লগইন পেজ</a>
        </div>
      </div>
    </div>
  </div>
</body>
</html>