<!DOCTYPE html>
<html dir="rtl" lang="fa">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<meta name="robots" content="noindex,nofollow" />
	<title>null — null</title>
	<style>
		:root { color-scheme: light dark; }
		* { box-sizing: border-box; }
		body {
			margin: 0;
			min-height: 100vh;
			display: grid;
			place-items: center;
			padding: 24px;
			direction: rtl;
			font-family: Tahoma, Arial, sans-serif;
			background: #f2f4f8;
			color: #202632;
		}
		.error-card {
			width: min(100%, 640px);
			padding: 38px 34px;
			background: #fff;
			border: 1px solid #e2e6ed;
			border-radius: 14px;
			box-shadow: 0 16px 45px rgba(28, 39, 60, .1);
			text-align: center;
		}
		.brand { display: inline-block; margin-bottom: 28px; color: #526073; text-decoration: none; font-size: 18px; }
		.status-code { margin: 0; color: #d33a35; font-size: clamp(62px, 16vw, 108px); line-height: 1; letter-spacing: 2px; }
		h1 { margin: 18px 0 12px; font-size: clamp(23px, 5vw, 31px); }
		.description { max-width: 500px; margin: 0 auto; color: #667085; font-size: 17px; line-height: 2; }
		.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
		.action {
			min-height: 46px;
			display: inline-flex;
			align-items: center;
			justify-content: center;
			padding: 10px 18px;
			border: 1px solid #ccd3dd;
			border-radius: 8px;
			background: transparent;
			color: #344054;
			font: inherit;
			text-decoration: none;
			cursor: pointer;
		}
		.action:hover { border-color: #005ce6; color: #005ce6; }
		.action-primary { border-color: #005ce6; background: #005ce6; color: #fff; }
		.action-primary:hover { background: #004fc7; color: #fff; }
		@media (max-width: 520px) {
			.error-card { padding: 30px 18px; }
			.actions { display: grid; }
			.action { width: 100%; }
		}
		@media (prefers-color-scheme: dark) {
			body { background: #151922; color: #f1f3f7; }
			.error-card { background: #202630; border-color: #343c49; box-shadow: none; }
			.brand, .description { color: #b7c0cd; }
			.action { border-color: #596373; color: #e6e9ee; }
		}
	</style>
</head>
<body>
	<main class="error-card">
		<a class="brand" href="/">تریدرزآرنا</a>
		<p class="status-code"></p>
		<h1></h1>
		<p class="description"></p>

		<div class="actions">
			<a class="action action-primary" href="/">بازگشت به صفحه اصلی</a>
			<button class="action" type="button" onclick="goBackSafely()">بازگشت به صفحه قبل</button>
		</div>
	</main>

	<script>
		function goBackSafely() {
			try {
				var storedPage = window.sessionStorage.getItem('tradersArena:lastHealthyPage');
				var currentPage = window.location.pathname + window.location.search + window.location.hash;
				var storedUrl = storedPage ? new URL(storedPage, window.location.origin) : null;
				if (storedUrl && storedUrl.origin === window.location.origin
						&& storedPage.indexOf('//') !== 0 && storedPage !== currentPage) {
					window.location.assign(storedUrl.pathname + storedUrl.search + storedUrl.hash);
					return;
				}
			} catch (ignored) {
				// Storage may be unavailable; browser history remains as a fallback.
			}

			if (window.history.length > 1) {
				var pageWasLeft = false;
				window.addEventListener('pagehide', function () { pageWasLeft = true; }, { once: true });
				window.history.back();
				window.setTimeout(function () {
					if (!pageWasLeft)
						window.location.assign('/');
				}, 800);
				return;
			}
			window.location.assign('/');
		}
	</script>
</body>
</html>
