<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Authentication Failed - Muster</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
            color: #fff;
        }
        .container {
            text-align: center;
            padding: 3rem;
            max-width: 480px;
        }
        .icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 2rem;
            box-shadow: 0 10px 40px rgba(231, 76, 60, 0.3);
        }
        .icon svg {
            width: 40px;
            height: 40px;
            stroke: white;
            stroke-width: 3;
            fill: none;
        }
        h1 {
            font-size: 1.75rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: #fff;
        }
        p {
            font-size: 1rem;
            color: rgba(255, 255, 255, 0.7);
            line-height: 1.6;
            margin-bottom: 1rem;
        }
        .error-code {
            background: rgba(255, 255, 255, 0.1);
            padding: 0.5rem 1rem;
            border-radius: 4px;
            font-family: monospace;
            font-size: 0.875rem;
            color: #e74c3c;
            display: inline-block;
            margin-bottom: 1.5rem;
        }
        .footer {
            font-size: 0.875rem;
            color: rgba(255, 255, 255, 0.4);
            margin-top: 2rem;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="icon">
            <svg viewBox="0 0 24 24">
                <line x1="18" y1="6" x2="6" y2="18"></line>
                <line x1="6" y1="6" x2="18" y2="18"></line>
            </svg>
        </div>
        <h1>Authentication Failed</h1>
        {{if .Error}}
        <div class="error-code">{{.Error}}</div>
        {{end}}
        {{if .Description}}
        <p>{{.Description}}</p>
        {{else}}
        <p>An error occurred during authentication. Please try again.</p>
        {{end}}
        <p>You can close this window and retry authentication from your editor.</p>
        <div class="footer">Powered by Muster</div>
    </div>
</body>
</html>
