<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Internal Server Error - RTube</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            max-width: 100%;
            margin: 0;
            padding: 0;
            background-color: #121212;
            color: #e0e0e0;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .error-container {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            padding: 40px;
            max-width: 600px;
            animation: fadeIn 0.5s ease-out;
        }

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

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .error-code {
            font-size: 120px;
            font-weight: 700;
            background: linear-gradient(135deg, #ff5252 0%, #ff1744 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin: 0;
            line-height: 1;
            text-shadow: 0 10px 30px rgba(255, 23, 68, 0.3);
        }

        .error-title {
            font-size: 32px;
            font-weight: 600;
            margin: 20px 0 10px 0;
            color: #ffffff;
        }

        .error-message {
            font-size: 18px;
            color: #a0a0a0;
            margin-bottom: 40px;
            line-height: 1.6;
        }

        .error-info {
            background-color: #1e1e1e;
            border: 1px solid #333;
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 40px;
            text-align: left;
            width: 100%;
            box-sizing: border-box;
        }

        .error-info p {
            color: #b0b0b0;
            font-size: 15px;
            margin: 8px 0;
            display: flex;
            align-items: center;
        }

        .error-info p:before {
            content: "•";
            color: #666;
            margin-right: 10px;
            font-size: 20px;
        }

        .actions {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 28px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.2s ease;
            cursor: pointer;
            border: none;
        }

        .btn-primary {
            background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #42a5f5 0%, #2196f3 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
        }

        .btn-secondary {
            background-color: #333;
            color: white;
        }

        .btn-secondary:hover {
            background-color: #424242;
            transform: translateY(-2px);
        }

        footer {
            margin-top: auto;
            padding: 40px 0 20px;
            text-align: center;
            color: #444;
            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">500</p>
        <h1 class="error-title">Internal Server Error</h1>
        <p class="error-message">Something went wrong on our end. Our team has been notified and is working to fix the
            issue.</p>
        <div class="error-info">
            <p>You can try:</p>
            <p>- Refreshing the page</p>
            <p>- Going back to the homepage</p>
            <p>- Trying again in a few minutes</p>
        </div>
        <div class="actions">
            <button onclick="location.reload()" class="btn btn-secondary">Try Again</button>
            <a href="/" class="btn btn-primary">Return Home</a>
        </div>
    </div>
    <footer>RTube v{{ rtube_version }}</footer>
</body>

</html>