<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>{{error_code}} Error - Discord Clone</title>
        <link rel="stylesheet" href="/static/css/index.css"/>
    </head>
    <body>
        <div class="signup-container">
            <div class="signup-header">
                <img src="/static/favicon.ico" class="logo"/>
                <h1>Error {{error_code}}</h1>
            </div>

            <div class="signup-form">
                <div class="success-message" id="errorMessage">
                    {{error_message}}
                </div>

                <div style="text-align: center;">
                    <p>{{additional_info}}</p>
                </div>

                <div style="height: 40px;"></div>

                {% if redirect %}
                    <button type="button" class="submit-button" onclick="window.location.replace('{{redirect.url}}');">
                        {{redirect.message}}
                    </button>
                {% endif %}
            </div>

            <div class="signup-footer">
                If you think this is an error, contact an administrator.
            </div>
        </div>

        <script>
            // Optional: Add some basic JavaScript for dynamic content if needed.
            // For example, to highlight the error code in the title.
            document.title = "Error " + "${error_code}";
        </script>
    </body>
</html>
