<!DOCTYPE html>
<html>
<head>
    <style>
        .body ,*{
            margin: 0;
            padding: 0;
        }
        .msg-card {
            border-radius: 8px;
            padding: 16px;
            margin: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            display: flex;
            gap: 12px;
            border-left: 4px solid;
            bottom: 10px;
        }

        .msg-card.success {
            border-color: #4CAF50;
            background: #f1f8e9;
        }

        .msg-card.error {
            border-color: #f44336;
            background: #ffebee;
        }

        .icon-wrapper {
            font-size: 1.5em;
            flex-shrink: 0;
        }

        .success .icon-wrapper { color: #2e7d32; }
        .error .icon-wrapper { color: #c62828; }

        .msg-content {
            flex-grow: 1;
        }

        .msg-title {
            font-weight: 500;
            margin-bottom: 4px;
        }

        @media (max-width: 480px) {
            .msg-card {
                margin: 8px;
                padding: 12px;
            }
        }
    </style>
</head>
<body>
    <div class="msg-card {{msgtype}}">
        <div class="icon-wrapper">
            {{if msgtype == 'success'}}✅{{else}}❌{{/if}}
        </div>
        <div class="msg-content">
            <div class="msg-title">
                {{if msgtype == 'success'}}操作成功{{else}}发生错误{{/if}}
            </div>
            <div class="msg-text">{{ecomsg}}</div>
        </div>
    </div>
</body>
</html>