<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login Successful - Local Lendables</title>
    
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    
    <!-- Custom Styles -->
    <style>
        /* Cavolini Font Family */
        @font-face {
            font-family: 'Cavolini';
            src: url('/fonts/CAVOLINI.TTF') format('truetype');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }
        
        .onlycavolini { font-family: 'Cavolini', Arial, sans-serif; }
        
        body {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        .success-card {
            background: white;
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.1);
            padding: 3rem;
            text-align: center;
            max-width: 500px;
            width: 90%;
        }
        
        .check-circle {
            width: 80px;
            height: 80px;
            background: #28a745;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 2rem;
            animation: checkmark 0.6s ease-in-out;
        }
        
        @keyframes checkmark {
            0% { transform: scale(0); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }
        
        .check-circle i {
            color: white;
            font-size: 2.5rem;
        }
        
        h1 {
            color: #2c3e50;
            margin-bottom: 1rem;
        }
        
        .username {
            color: #28a745;
            font-weight: bold;
            font-size: 1.2em;
        }
        
        .redirect-info {
            color: #6c757d;
            margin-top: 2rem;
            font-size: 0.9em;
        }
        
        .btn-explore {
            background: #28a745;
            border: none;
            padding: 12px 30px;
            border-radius: 50px;
            color: white;
            font-weight: 600;
            text-decoration: none;
            display: inline-block;
            margin-top: 1.5rem;
            transition: all 0.3s ease;
        }
        
        .btn-explore:hover {
            background: #218838;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
        }
        
        .progress-bar {
            height: 4px;
            background: #e9ecef;
            border-radius: 2px;
            overflow: hidden;
            margin-top: 2rem;
        }
        
        .progress-fill {
            height: 100%;
            background: #28a745;
            border-radius: 2px;
            animation: progress 3s linear forwards;
        }
        
        @keyframes progress {
            from { width: 0%; }
            to { width: 100%; }
        }
    </style>
    
    <!-- Auto-redirect after 3 seconds -->
    <script>
        setTimeout(function() {
            window.location.href = '{{ redirectUrl }}';
        }, 3000);
    </script>
</head>
<body>
    <div class="success-card">
        <div class="check-circle">
            <i class="fas fa-check"></i>
        </div>
        
        <h1 class="onlycavolini">Welcome to our Local Lendables Demo</h1>
        
        <p class="mb-3">You are now logged in as <span class="username">{% if user.showName %}{{ user.showName }}{% else %}{{ user.firstName }} {{ user.lastName }}{% endif %}!</span></p>
        

        
        <div class="redirect-info">
            <i class="fas fa-info-circle me-1"></i>
            You will be automatically redirected to your dashboard in 3 seconds
        </div>
        
        <div class="progress-bar">
            <div class="progress-fill"></div>
        </div>
    </div>
</body>
</html>