/**
 * iOS Onboarding Email Template
 * Sent automatically to iOS users 1 hour after registration to guide them to the web platform.
 */
const iosOnboardingTemplate = (name) => {
    return `
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Unlock Your Full Command Center</title>
        <style>
            body { 
                font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
                background-color: #0f172a; 
                margin: 0; 
                padding: 0; 
                color: #e2e8f0;
            }
            .container { 
                max-width: 600px; 
                margin: 40px auto; 
                background-color: #1e293b; 
                border-radius: 16px; 
                overflow: hidden; 
                box-shadow: 0 10px 25px rgba(0,0,0,0.5);
                border: 1px solid #334155;
            }
            .header { 
                background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); 
                padding: 40px 20px; 
                text-align: center;
                border-bottom: 2px solid #6366f1;
            }
            .header h1 { 
                margin: 0; 
                color: #ffffff; 
                font-size: 28px; 
                letter-spacing: -0.5px;
            }
            .content { 
                padding: 40px 30px; 
                line-height: 1.6;
            }
            h2 {
                color: #f8fafc;
                font-size: 22px;
                margin-top: 0;
            }
            .feature-box {
                background-color: #0f172a;
                border: 1px solid #334155;
                border-radius: 12px;
                padding: 20px;
                margin: 25px 0;
            }
            .feature-list {
                margin: 0;
                padding-left: 20px;
                color: #cbd5e1;
            }
            .feature-list li {
                margin-bottom: 10px;
            }
            .primary-button { 
                display: inline-block; 
                background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
                color: #ffffff !important; 
                text-decoration: none; 
                padding: 16px 32px; 
                border-radius: 8px; 
                font-weight: bold; 
                font-size: 16px;
                text-align: center;
                margin: 30px 0 10px;
                box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
                width: 100%;
                box-sizing: border-box;
            }
            .footer { 
                text-align: center; 
                padding: 30px; 
                background-color: #0f172a; 
                color: #64748b; 
                font-size: 13px;
                border-top: 1px solid #334155;
            }
            .footer a {
                color: #94a3b8;
                text-decoration: none;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <div class="header">
                <img src="${process.env.CLIENT_ORIGIN || 'https://infoseclabs.io'}/logo.png" alt="InfoSecLabs" style="height: 40px; margin-bottom: 10px; background-color: rgba(255,255,255,0.05); padding: 8px; border-radius: 8px;"><br>
                <h1 style="color: #ffffff; font-size: 20px; margin: 0;">Central Command</h1>
            </div>
            <div class="content">
                <h2>Welcome to the Special Operations, ${name || 'Agent'}!</h2>
                
                <p>We see you've initiated your training via mobile. While the mobile app is your field tool for reconnaissance, the **InfoSecLabs Command Center** on the web is where high-stakes operations happen.</p>
                
                <div class="feature-box">
                    <p style="margin-top: 0; font-weight: bold; color: #818cf8;">Bridge the gap to the web platform to unlock:</p>
                    <ul class="feature-list">
                        <li><strong>Live SIEM Labs:</strong> Conduct deep forensics and memory analysis in a full-scale environment.</li>
                        <li><strong>Advanced Threat Scenarios:</strong> Go beyond basics and hunt for APTS and zero-day threats.</li>
                        <li><strong>PRO Certification:</strong> Elevate your status to 'Pro Analyst' to unlock unlimited missions and exclusive AI feedback.</li>
                    </ul>
                </div>
                
                <p>Ready to deploy to the full-scale simulation? Your career as a Senior SOC Analyst starts here.</p>
                
                <a href="https://infoseclabs.io/login" class="primary-button">Launch Command Center</a>
            </div>
            <div class="footer">
                <p>InfoSecLabs<br>
                Empowering the next generation of Cyber Defenders.</p>
                <p><a href="https://infoseclabs.io">infoseclabs.io</a></p>
            </div>
        </div>
    </body>
    </html>
    `;
};

module.exports = {
    iosOnboardingTemplate
};
