<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Join {team_name} on Remembra</title>
</head>
<body style="margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background-color: #0F0F0F;">
    <table role="presentation" style="width: 100%; border-collapse: collapse; background-color: #0F0F0F;">
        <tr>
            <td align="center" style="padding: 40px 20px;">
                <table role="presentation" style="max-width: 600px; width: 100%; border-collapse: collapse; background-color: #1A1A1A; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);">
                    <!-- Header -->
                    <tr>
                        <td style="padding: 40px 40px 20px; text-align: center; border-bottom: 3px solid #8B5CF6;">
                            <h1 style="margin: 0; font-size: 32px; font-weight: 700; color: #8B5CF6; letter-spacing: -0.5px;">
                                🧠 Remembra
                            </h1>
                            <p style="margin: 10px 0 0; font-size: 16px; color: #A0A0A0;">
                                Team Collaboration
                            </p>
                        </td>
                    </tr>

                    <!-- Body -->
                    <tr>
                        <td style="padding: 40px;">
                            <h2 style="margin: 0 0 20px; font-size: 28px; font-weight: 700; color: #FFFFFF;">
                                You're Invited! 🎉
                            </h2>
                            
                            <p style="margin: 0 0 20px; font-size: 16px; line-height: 1.8; color: #D0D0D0;">
                                <strong style="color: #FFFFFF;">{inviter_email}</strong> has invited you to join <strong style="color: #8B5CF6;">{team_name}</strong> on Remembra.
                            </p>

                            <p style="margin: 0 0 30px; font-size: 16px; line-height: 1.8; color: #D0D0D0;">
                                Accept this invitation to collaborate with your team using shared memory spaces.
                            </p>

                            <!-- Role Info -->
                            <div style="background-color: #252525; border-left: 4px solid #8B5CF6; padding: 15px 20px; margin: 25px 0; border-radius: 4px;">
                                <p style="margin: 0; font-size: 15px; color: #D0D0D0;">
                                    <strong style="color: #FFFFFF;">You'll be added as:</strong> {role}
                                </p>
                            </div>

                            <!-- What You Can Do -->
                            <h3 style="margin: 30px 0 15px; font-size: 20px; font-weight: 600; color: #FFFFFF;">
                                What You Can Do
                            </h3>

                            <ul style="margin: 0 0 30px; padding-left: 20px; color: #D0D0D0; font-size: 15px; line-height: 1.8;">
                                <li style="margin-bottom: 8px;">Access shared memory spaces</li>
                                <li style="margin-bottom: 8px;">Store and recall team knowledge</li>
                                <li style="margin-bottom: 8px;">Collaborate with AI agents</li>
                                <li>Build on collective memory</li>
                            </ul>

                            <!-- CTA Button -->
                            <div style="text-align: center; margin: 40px 0 30px;">
                                <a href="{invite_url}" style="display: inline-block; background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%); color: #FFFFFF; text-decoration: none; padding: 18px 50px; border-radius: 8px; font-weight: 600; font-size: 18px; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);">
                                    Accept Invitation →
                                </a>
                            </div>

                            <!-- Expiration Notice -->
                            <div style="background-color: #2A2A2A; border-radius: 8px; padding: 15px 20px; margin: 20px 0; text-align: center;">
                                <p style="margin: 0; font-size: 14px; color: #888;">
                                    ⏰ This invitation expires on <strong style="color: #A0A0A0;">{expires_at}</strong>
                                </p>
                            </div>

                            <p style="margin: 30px 0 0; font-size: 14px; color: #666; text-align: center;">
                                If you didn't expect this invitation, you can safely ignore this email.
                            </p>
                        </td>
                    </tr>

                    <!-- Footer -->
                    <tr>
                        <td style="padding: 30px 40px; background-color: #0F0F0F; border-top: 1px solid #333;">
                            <p style="margin: 0 0 10px; font-size: 14px; color: #666; line-height: 1.6;">
                                Need help? Visit our <a href="https://docs.remembra.dev" style="color: #8B5CF6; text-decoration: none;">documentation</a> or contact <a href="mailto:support@remembra.dev" style="color: #8B5CF6; text-decoration: none;">support@remembra.dev</a>.
                            </p>
                            <p style="margin: 0; font-size: 13px; color: #444;">
                                Remembra — Persistent Memory for AI
                            </p>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>
