<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Access Denied</title>
    <style>
        :root {
            --bg-color: #0d0d0d;
            --text-color: #e6e6e6;
            --container-bg: linear-gradient(145deg, #1a1a1a, #232323);
            --accent-color: #7b2cbf;
            --accent-hover: #9d4edd;
            --error-color: #ff3d3d;
            --button-bg: #7b2cbf;
            --button-hover: #9d4edd;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            background: var(--bg-color);
            color: var(--text-color);
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            align-items: center;
            padding: 20px;
            overflow-x: hidden;
        }

        .container {
            max-width: 600px;
            margin: 0 auto;
            background: var(--container-bg);
            border-radius: 12px;
            padding: 2.5rem;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            animation: fadeIn 0.5s ease-out;
            text-align: center;
        }

        h1 {
            color: var(--error-color);
            font-size: 2rem;
            margin-bottom: 1rem;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        p {
            font-size: 1.1rem;
            margin-bottom: 1.5rem;
        }

        .error-message {
            color: var(--error-color);
            font-weight: 600;
            margin-bottom: 1.5rem;
        }

        .btn {
            display: inline-block;
            padding: 0.8rem 1.5rem;
            background: var(--button-bg);
            color: var(--text-color);
            text-decoration: none;
            border-radius: 6px;
            font-weight: 600;
            transition: background 0.3s ease, transform 0.3s ease;
        }

        .btn:hover {
            background: var(--button-hover);
            transform: translateY(-3px);
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @media (max-width: 768px) {
            .container {
                padding: 1.5rem;
            }

            h1 {
                font-size: 1.6rem;
            }

            p {
                font-size: 1rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Access Denied</h1>
        <p>You do not have permission to access this resource.</p>
        {% if error_message %}
            <div class="error-message">{{ error_message | e }}</div>
        {% endif %}
        <a href="{{ url_for('mbkauthe_bp.login') }}" class="btn">Return to Login</a>
    </div>
</body>
</html>