<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="x-apple-disable-message-reformatting">
    <title>%SUBJECT%</title>
    
    <!--[if mso]>
    <noscript>
        <xml>
            <o:OfficeDocumentSettings>
                <o:AllowPNG/>
                <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
    </noscript>
    <![endif]-->
    
    <style>
        /* Reset styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            margin: 0;
            padding: 0;
            -webkit-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            line-height: 1.6;
            color: #333333;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
        }
        
        table {
            border-collapse: collapse;
            mso-table-lspace: 0pt;
            mso-table-rspace: 0pt;
        }
        
        img {
            border: 0;
            height: auto;
            line-height: 100%;
            outline: none;
            text-decoration: none;
            -ms-interpolation-mode: bicubic;
            max-width: 100%;
        }
        
        /* Container styles */
        .email-wrapper {
            padding: 40px 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
        }
        
        .email-container {
            max-width: 600px;
            margin: 0 auto;
            background-color: #ffffff;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        }
        
        /* Header styles */
        .email-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 48px 40px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .email-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
            background-size: 20px 20px;
            animation: float 20s infinite linear;
            pointer-events: none;
        }
        
        @keyframes float {
            0% { transform: translate(0, 0) rotate(0deg); }
            100% { transform: translate(-50px, -50px) rotate(360deg); }
        }
        
        .logo-container {
            position: relative;
            z-index: 2;
            margin-bottom: 20px;
        }
        
        .logo-container img {
            max-height: 60px;
            max-width: 200px;
            height: auto;
            width: auto;
        }
        
        .site-name {
            color: #ffffff;
            font-size: 32px;
            font-weight: 700;
            margin: 0 0 8px 0;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            letter-spacing: -0.5px;
            position: relative;
            z-index: 2;
        }
        
        .email-subject {
            color: rgba(255, 255, 255, 0.95);
            font-size: 18px;
            font-weight: 400;
            margin: 0;
            position: relative;
            z-index: 2;
            line-height: 1.4;
        }
        
        /* Content styles */
        .email-content {
            padding: 48px 40px;
            background-color: #ffffff;
            position: relative;
        }
        
        .email-content::before {
            content: '';
            position: absolute;
            top: 0;
            left: 40px;
            right: 40px;
            height: 3px;
            background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
            opacity: 0.3;
        }
        
        .content-wrapper {
            max-width: 100%;
            position: relative;
            z-index: 1;
        }
        
        .email-content h1,
        .email-content h2,
        .email-content h3 {
            color: #1a202c;
            margin-bottom: 16px;
            line-height: 1.3;
            font-weight: 600;
        }
        
        .email-content h1 {
            font-size: 28px;
            border-bottom: 2px solid #f0f0f0;
            padding-bottom: 12px;
            margin-bottom: 24px;
        }
        
        .email-content h2 {
            font-size: 24px;
            margin-top: 32px;
        }
        
        .email-content h3 {
            font-size: 20px;
            margin-top: 24px;
        }
        
        .email-content p {
            margin-bottom: 16px;
            color: #4a5568;
            font-size: 16px;
            line-height: 1.7;
        }
        
        .email-content ul,
        .email-content ol {
            margin-bottom: 16px;
            padding-left: 24px;
            text-align: left;
        }
        
        .email-content li {
            margin-bottom: 8px;
            color: #4a5568;
            font-size: 16px;
            text-align: left;
            line-height: 1.6;
        }
        
        .email-content strong {
            color: #2d3748;
            font-weight: 600;
        }
        
        .email-content a {
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
            border-bottom: 1px solid transparent;
            transition: border-color 0.2s;
        }
        
        .email-content a:hover {
            border-bottom-color: #667eea;
        }
        
        /* Button styles */
        .btn {
            display: inline-block;
            padding: 14px 32px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #ffffff !important;
            text-decoration: none !important;
            border-radius: 8px;
            font-weight: 600;
            font-size: 16px;
            text-align: center;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
            margin: 24px 0;
            border: none !important;
        }
        
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
        }
        
        .btn-secondary {
            background: #e2e8f0;
            color: #4a5568 !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        
        .btn-secondary:hover {
            background: #cbd5e0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        /* Alert styles */
        .alert {
            padding: 16px 20px;
            border-radius: 8px;
            margin: 24px 0;
            border-left: 4px solid;
            position: relative;
            overflow: hidden;
        }
        
        .alert::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: inherit;
        }
        
        .alert-info {
            background-color: #ebf8ff;
            border-left-color: #3182ce;
            color: #2c5282;
        }
        
        .alert-success {
            background-color: #f0fff4;
            border-left-color: #38a169;
            color: #276749;
        }
        
        .alert-warning {
            background-color: #fffbeb;
            border-left-color: #d69e2e;
            color: #975a16;
        }
        
        .alert-error {
            background-color: #fff5f5;
            border-left-color: #e53e3e;
            color: #c53030;
        }
        
        /* Code block styles */
        .code-block {
            background-color: #f7fafc;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 16px;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.5;
            margin: 16px 0;
            overflow-x: auto;
        }
        
        /* Info card styles */
        .info-card {
            background-color: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 20px;
            margin: 24px 0;
        }
        
        .info-card-title {
            font-size: 18px;
            font-weight: 600;
            color: #1a202c;
            margin-bottom: 12px;
        }
        
        .info-card-content {
            color: #4a5568;
            font-size: 15px;
            line-height: 1.6;
        }
        
        /* Footer styles */
        .email-footer {
            background-color: #f8fafc;
            padding: 32px 40px;
            text-align: center;
            border-top: 1px solid #e2e8f0;
        }
        
        .footer-content {
            color: #718096;
            font-size: 14px;
            line-height: 1.6;
        }
        
        .footer-content a {
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
        }
        
        .footer-content a:hover {
            text-decoration: underline;
        }
        
        .footer-links {
            margin: 20px 0;
            padding: 20px 0;
            border-top: 1px solid #e2e8f0;
            border-bottom: 1px solid #e2e8f0;
        }
        
        .footer-links a {
            display: inline-block;
            margin: 0 12px;
            color: #4a5568;
            font-size: 13px;
        }
        
        .social-links {
            margin: 20px 0;
        }
        
        .social-links a {
            display: inline-block;
            margin: 0 8px;
            width: 32px;
            height: 32px;
            background-color: #e2e8f0;
            border-radius: 50%;
            text-align: center;
            line-height: 32px;
            color: #4a5568;
            transition: all 0.3s ease;
        }
        
        .social-links a:hover {
            background-color: #667eea;
            color: #ffffff;
            transform: translateY(-2px);
        }
        
        .copyright {
            margin-top: 20px;
            font-size: 12px;
            color: #a0aec0;
        }
        
        /* Divider styles */
        .divider {
            height: 1px;
            background: linear-gradient(to right, transparent, #e2e8f0, transparent);
            margin: 32px 0;
        }
        
        /* Responsive styles */
        @media only screen and (max-width: 600px) {
            .email-wrapper {
                padding: 20px 10px;
            }
            
            .email-container {
                border-radius: 12px;
            }
            
            .email-header {
                padding: 32px 24px;
            }
            
            .site-name {
                font-size: 26px;
            }
            
            .email-subject {
                font-size: 16px;
            }
            
            .email-content,
            .email-footer {
                padding: 32px 24px;
            }
            
            .email-content h1 {
                font-size: 24px;
            }
            
            .email-content h2 {
                font-size: 20px;
            }
            
            .email-content h3 {
                font-size: 18px;
            }
            
            .btn {
                display: block;
                width: 100%;
                text-align: center;
            }
            
            .footer-links a {
                display: block;
                margin: 8px 0;
            }
        }
        
        /* Dark mode support */
        @media (prefers-color-scheme: dark) {
            body {
                background: linear-gradient(135deg, #4c5fd5 0%, #5e376d 100%);
            }
            
            .email-container {
                background-color: #1a202c;
                box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            }
            
            .email-content {
                background-color: #1a202c;
            }
            
            .email-content h1,
            .email-content h2,
            .email-content h3 {
                color: #f7fafc;
            }
            
            .email-content h1 {
                border-bottom-color: #2d3748;
            }
            
            .email-content p,
            .email-content li {
                color: #cbd5e0;
            }
            
            .email-content strong {
                color: #e2e8f0;
            }
            
            .email-content a {
                color: #9f7aea;
            }
            
            .code-block {
                background-color: #2d3748;
                border-color: #4a5568;
                color: #e2e8f0;
            }
            
            .info-card {
                background-color: #2d3748;
                border-color: #4a5568;
            }
            
            .info-card-title {
                color: #f7fafc;
            }
            
            .info-card-content {
                color: #cbd5e0;
            }
            
            .email-footer {
                background-color: #2d3748;
                border-top-color: #4a5568;
            }
            
            .footer-links {
                border-top-color: #4a5568;
                border-bottom-color: #4a5568;
            }
            
            .social-links a {
                background-color: #4a5568;
                color: #cbd5e0;
            }
            
            .social-links a:hover {
                background-color: #9f7aea;
            }
            
            .divider {
                background: linear-gradient(to right, transparent, #4a5568, transparent);
            }
        }
    </style>
</head>

<body>
    <div class="email-wrapper">
        <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
            <tr>
                <td align="center">
                    <div class="email-container">
                        <!-- Header -->
                        <div class="email-header">
                            <div class="logo-container">
                                <!-- Logo will be dynamically inserted if available -->
                                <img src="%LOGO_URL%" alt="%SITE_NAME%" style="max-height: 60px; max-width: 200px;" onerror="this.style.display='none'">
                            </div>
                            <h1 class="site-name">%SITE_NAME%</h1>
                            <p class="email-subject">%HEADER%</p>
                        </div>
                        
                        <!-- Content -->
                        <div class="email-content">
                            <div class="content-wrapper">
                                %MESSAGE%
                            </div>
                        </div>
                        
                        <!-- Footer -->
                        <div class="email-footer">
                            <div class="footer-content">
                                <div class="footer-links">
                                    <a href="%SITE_URL%/help">Help Center</a>
                                    <a href="%SITE_URL%/contact">Contact Us</a>
                                    <a href="%SITE_URL%/privacy">Privacy Policy</a>
                                    <a href="%SITE_URL%/terms">Terms of Service</a>
                                </div>
                                
                                <p style="margin: 20px 0;">
                                    This email was sent to you by <strong>%FOOTER%</strong>.<br>
                                    If you have any questions, please don't hesitate to contact our support team.
                                </p>
                                
                                <div class="copyright">
                                    © 2024 %FOOTER%. All rights reserved.<br>
                                    <a href="%SITE_URL%" style="color: #667eea;">%SITE_URL%</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</body>
</html>