<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Unauthorized - RTube</title>
        <style>
            body {
                font-family: Arial, sans-serif;
                max-width: 800px;
                margin: 0 auto;
                padding: 20px;
                background-color: #1a1a1a;
                color: #fff;
                min-height: 100vh;
                display: flex;
                flex-direction: column;
            }
            .error-container {
                flex: 1;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                text-align: center;
                padding: 40px 20px;
            }
            .error-code {
                font-size: 120px;
                font-weight: bold;
                color: #FF9800;
                margin: 0;
                line-height: 1;
            }
            .error-title {
                font-size: 28px;
                margin: 20px 0 10px 0;
                color: #fff;
            }
            .error-message {
                font-size: 16px;
                color: #888;
                margin-bottom: 30px;
                max-width: 500px;
            }
            .btn-home {
                display: inline-block;
                padding: 12px 24px;
                background-color: #4CAF50;
                color: white;
                text-decoration: none;
                border-radius: 5px;
                transition: background-color 0.2s;
                font-size: 16px;
                margin: 5px;
            }
            .btn-home:hover {
                background-color: #45a049;
            }
            .btn-login {
                display: inline-block;
                padding: 12px 24px;
                background-color: #444;
                color: white;
                text-decoration: none;
                border-radius: 5px;
                transition: background-color 0.2s;
                font-size: 16px;
                margin: 5px;
            }
            .btn-login:hover {
                background-color: #555;
            }
            footer {
                padding-top: 20px;
                border-top: 1px solid #333;
                text-align: center;
                color: #666;
                font-size: 12px;
            }
        </style>
        <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
    <link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon.png') }}">

</head>
    <body>
        <div class="error-container">
            <p class="error-code">401</p>
            <h1 class="error-title">Unauthorized</h1>
            <p class="error-message">You need to be logged in to access this page. Please sign in with your credentials.</p>
            <div>
                <a href="{{ url_for('auth.login') }}" class="btn-login">Log in</a>
                <a href="/" class="btn-home">Back to homepage</a>
            </div>
        </div>
        <footer>RTube v{{ rtube_version }}</footer>
    </body>
</html>
