<?php
/**
 * Standalone themed error page (no layout dependency so it renders even when
 * other subsystems fail).
 *
 * @var int    $status
 * @var string $message
 */
$titles = [
    403 => 'Access Denied',
    404 => 'Page Not Found',
    405 => 'Method Not Allowed',
    419 => 'Session Expired',
    429 => 'Slow Down',
    500 => 'Something Went Wrong',
];
$title = $titles[$status] ?? 'Error';
?>
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?= e($status) ?> · <?= e($title) ?></title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body { min-height: 100vh; display: grid; place-items: center;
               background: radial-gradient(1200px 600px at 50% -10%, #1e293b, #0b1120); }
        .code { font-size: 5rem; font-weight: 800; letter-spacing: -2px;
                background: linear-gradient(90deg,#6366f1,#22d3ee);
                -webkit-background-clip: text; background-clip: text; color: transparent; }
    </style>
</head>
<body>
    <div class="text-center text-light px-3">
        <div class="code"><?= e($status) ?></div>
        <h1 class="h3 mb-2"><?= e($title) ?></h1>
        <p class="text-secondary mb-4"><?= e($message ?: 'An unexpected error occurred.') ?></p>
        <a href="/" class="btn btn-primary px-4">Return home</a>
    </div>
</body>
</html>
