<style>
    .analysis-portal {
        margin: 0;
        padding: 40px 20px;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        background: linear-gradient(135deg, #2E5090 0%, #4472C4 100%);
        color: white;
        text-align: center;
        border-radius: 12px;
        min-height: 500px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .portal-content {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .portal-logo {
        font-size: 4em;
        margin-bottom: 20px;
    }
    
    .portal-title {
        font-size: 2em;
        margin-bottom: 10px;
        font-weight: 600;
    }
    
    .portal-subtitle {
        font-size: 1.1em;
        margin-bottom: 30px;
        opacity: 0.9;
    }
    
    .portal-spinner {
        border: 4px solid rgba(255,255,255,0.3);
        border-top: 4px solid white;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        animation: portal-spin 1s linear infinite;
        margin: 30px auto;
    }
    
    @keyframes portal-spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    .portal-link {
        margin-top: 30px;
        padding: 15px 30px;
        background: rgba(255,255,255,0.2);
        border: 2px solid white;
        border-radius: 8px;
        color: white;
        text-decoration: none;
        display: inline-block;
        font-weight: 600;
        transition: all 0.3s;
    }
    
    .portal-link:hover {
        background: white;
        color: #2E5090;
        transform: scale(1.05);
    }
    
    .portal-note {
        margin-top: 40px;
        font-size: 0.85em;
        padding: 15px;
        background: rgba(0,0,0,0.2);
        border-radius: 6px;
        line-height: 1.6;
    }
</style>

<div class="analysis-portal">
    <div class="portal-content">
        <div class="portal-logo">📊</div>
        <h1 class="portal-title">FundTech Analysis Portal</h1>
        <p class="portal-subtitle">Redirecting to analysis server...</p>
        <div class="portal-spinner"></div>
        
        <a href="#" id="portalLink" class="portal-link" style="display: none;">
            Click here if not redirected automatically
        </a>
        
        <div class="portal-note">
            <strong>Note:</strong> This portal connects to Dr. Potdar's secure analysis server.<br>
            The server must be online for access.<br><br>
            <strong>Contact:</strong> prabodhan@potdarortho.com
        </div>
    </div>
</div>

<script>
    // ============================================
    // UPDATE THIS URL WHEN NGROK CHANGES
    // ============================================
    const PORTAL_URL = 'https://your-ngrok-url.ngrok-free.dev';
    
    // Auto-redirect after 2 seconds
    setTimeout(() => {
        window.location.href = PORTAL_URL;
    }, 2000);
    
    // Show manual link after 3 seconds
    setTimeout(() => {
        const link = document.getElementById('portalLink');
        link.href = PORTAL_URL;
        link.style.display = 'inline-block';
    }, 3000);
</script>
