<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Support Ticket Confirmation</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            line-height: 1.7;
            color: #2c3e50;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            margin: 0;
            padding: 40px 20px;
        }
        
        .email-wrapper {
            max-width: 650px;
            margin: 0 auto;
            background: #ffffff;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
        }
        
        .email-header {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
            padding: 50px 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(218, 165, 32, 0.1) 0%, transparent 70%);
            animation: pulse 8s ease-in-out infinite;
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.5; }
            50% { transform: scale(1.1); opacity: 0.8; }
        }
        
        .email-header h1 {
            color: #ffffff;
            font-size: 32px;
            font-weight: 700;
            margin: 0;
            position: relative;
            z-index: 2;
            letter-spacing: -0.5px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }
        
        .email-header .subtitle {
            color: rgba(255, 255, 255, 0.9);
            font-size: 16px;
            margin-top: 12px;
            font-weight: 300;
            position: relative;
            z-index: 2;
        }
        
        .email-body {
            padding: 50px 40px;
            background: #ffffff;
        }
        
        .greeting {
            font-size: 18px;
            color: #1e293b;
            margin-bottom: 30px;
            font-weight: 500;
        }
        
        .intro-text {
            font-size: 16px;
            color: #475569;
            line-height: 1.8;
            margin-bottom: 35px;
        }
        
        .ticket-number-box {
            background: linear-gradient(135deg, rgba(218, 165, 32, 0.08) 0%, rgba(218, 165, 32, 0.03) 100%);
            border: 2px solid rgba(218, 165, 32, 0.2);
            border-left: 5px solid #daa520;
            padding: 30px;
            margin: 35px 0;
            border-radius: 12px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(218, 165, 32, 0.1);
        }
        
        .ticket-label {
            font-size: 13px;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            font-weight: 600;
            margin-bottom: 12px;
        }
        
        .ticket-number {
            font-size: 36px;
            font-weight: 800;
            color: #daa520;
            font-family: 'Courier New', monospace;
            letter-spacing: 2px;
            text-shadow: 0 2px 4px rgba(218, 165, 32, 0.2);
        }
        
        .ticket-hint {
            font-size: 13px;
            color: #94a3b8;
            margin-top: 12px;
            font-style: italic;
        }
        
        .info-section {
            margin: 40px 0;
        }
        
        .section-title {
            font-size: 20px;
            font-weight: 700;
            color: #0f172a;
            margin-bottom: 25px;
            padding-bottom: 12px;
            border-bottom: 2px solid #e2e8f0;
            position: relative;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 60px;
            height: 2px;
            background: linear-gradient(90deg, #daa520, #d4af37);
        }
        
        .info-row {
            padding: 18px 0;
            border-bottom: 1px solid #f1f5f9;
            display: flex;
            align-items: flex-start;
        }
        
        .info-row:last-child {
            border-bottom: none;
        }
        
        .info-label {
            font-weight: 600;
            color: #475569;
            min-width: 130px;
            font-size: 14px;
        }
        
        .info-value {
            color: #1e293b;
            flex: 1;
            font-size: 15px;
        }
        
        .status-badge {
            display: inline-block;
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: white;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
        }
        
        .description-box {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-left: 4px solid #daa520;
            padding: 25px;
            border-radius: 8px;
            white-space: pre-wrap;
            font-size: 15px;
            line-height: 1.8;
            color: #334155;
            margin-top: 15px;
        }
        
        .cta-container {
            text-align: center;
            margin: 45px 0;
        }
        
        .cta-button {
            display: inline-block;
            background: linear-gradient(135deg, #daa520 0%, #d4af37 100%);
            color: #ffffff !important;
            text-decoration: none;
            padding: 18px 40px;
            border-radius: 10px;
            font-weight: 700;
            font-size: 16px;
            letter-spacing: 0.5px;
            box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
            transition: all 0.3s ease;
            text-transform: uppercase;
        }
        
        .cta-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 35px rgba(218, 165, 32, 0.5);
        }
        
        .next-steps {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            border-left: 4px solid #3b82f6;
            padding: 25px;
            border-radius: 8px;
            margin-top: 40px;
        }
        
        .next-steps strong {
            color: #0f172a;
            font-size: 16px;
            display: block;
            margin-bottom: 12px;
        }
        
        .next-steps p {
            color: #475569;
            font-size: 15px;
            line-height: 1.7;
            margin: 0;
        }
        
        .email-footer {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            padding: 40px;
            text-align: center;
            color: rgba(255, 255, 255, 0.9);
        }
        
        .footer-company {
            font-size: 18px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 8px;
        }
        
        .footer-tagline {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 25px;
        }
        
        .footer-links {
            margin: 25px 0;
            padding-top: 25px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .footer-links a {
            color: #daa520;
            text-decoration: none;
            font-weight: 600;
            font-size: 14px;
        }
        
        .footer-links a:hover {
            text-decoration: underline;
        }
        
        .footer-note {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
            margin-top: 25px;
            line-height: 1.6;
        }
        
        @media (max-width: 600px) {
            body {
                padding: 20px 10px;
            }
            
            .email-header {
                padding: 40px 25px;
            }
            
            .email-header h1 {
                font-size: 26px;
            }
            
            .email-body {
                padding: 35px 25px;
            }
            
            .ticket-number {
                font-size: 28px;
            }
            
            .info-row {
                flex-direction: column;
            }
            
            .info-label {
                min-width: auto;
                margin-bottom: 6px;
            }
            
            .cta-button {
                padding: 16px 30px;
                font-size: 14px;
            }
        }
    </style>
</head>
<body>
    <div class="email-wrapper">
        <!-- Header -->
        <div class="email-header">
            <h1>✓ Ticket Created Successfully</h1>
            <div class="subtitle">Your support request has been received</div>
        </div>

        <!-- Body -->
        <div class="email-body">
            <div class="greeting">Dear {{ user_name }},</div>
            
            <div class="intro-text">
                Thank you for contacting our support team. We've received your support request and our team will respond as soon as possible. Your ticket has been created and assigned a unique reference number.
            </div>

            <!-- Ticket Number Box -->
            <div class="ticket-number-box">
                <div class="ticket-label">Your Ticket Number</div>
                <div class="ticket-number">{{ ticket_number }}</div>
                <div class="ticket-hint">Please save this number for future reference</div>
            </div>

            <!-- Ticket Details -->
            <div class="info-section">
                <h3 class="section-title">Ticket Details</h3>
                
                <div class="info-row">
                    <span class="info-label">Subject:</span>
                    <span class="info-value">{{ title }}</span>
                </div>
                
                <div class="info-row">
                    <span class="info-label">Type:</span>
                    <span class="info-value">{{ ticket_type }}</span>
                </div>
                
                <div class="info-row">
                    <span class="info-label">Category:</span>
                    <span class="info-value">{{ category }}</span>
                </div>
                
                <div class="info-row">
                    <span class="info-label">Priority:</span>
                    <span class="info-value">{{ priority }}</span>
                </div>
                
                <div class="info-row">
                    <span class="info-label">Status:</span>
                    <span class="info-value"><span class="status-badge">{{ status }}</span></span>
                </div>
                
                <div class="info-row">
                    <span class="info-label">Created:</span>
                    <span class="info-value">{{ created_at }}</span>
                </div>
            </div>

            <!-- Description -->
            <div class="info-section">
                <h3 class="section-title">Description</h3>
                <div class="description-box">{{ description }}</div>
            </div>

            <!-- CTA Button -->
            <div class="cta-container">
                <a href="{{ support_url }}" class="cta-button">View Ticket Status</a>
            </div>

            <!-- Next Steps -->
            <div class="next-steps">
                <strong>What happens next?</strong>
                <p>Our support team will review your ticket and respond within our standard SLA timeframe. You'll receive an email notification when there's an update on your ticket.</p>
            </div>
        </div>

        <!-- Footer -->
        <div class="email-footer">
            <div class="footer-company">GNX Software Solutions</div>
            <div class="footer-tagline">Enterprise Support Center</div>
            
            <div class="footer-links">
                <a href="{{ support_url }}">Visit Support Center</a>
            </div>
            
            <div class="footer-note">
                This is an automated message. Please do not reply directly to this email.<br>
                For assistance, please visit our <a href="{{ support_url }}" style="color: #daa520;">Support Center</a>
            </div>
        </div>
    </div>
</body>
</html>
