<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 700px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            border-bottom: 2px solid #3b82f6;
            padding-bottom: 10px;
            margin-bottom: 20px;
        }

        .content {
            background: #f8fafc;
            padding: 20px;
            border-radius: 8px;
            display: grid;
            grid-template-columns: 140px 1fr;
            gap: 16px;
            align-items: start;
        }

        .title {
            color: #1e40af;
            font-size: 22px;
            margin: 0 0 8px 0;
        }

        .overview {
            color: #444;
            margin: 10px 0;
        }

        .meta {
            color: #555;
            font-size: 14px;
            margin: 6px 0;
        }

        .poster {
            width: 140px;
            border-radius: 6px;
            background: #e5e7eb;
            object-fit: cover;
        }

        .kbd {
            display: inline-block;
            padding: 2px 6px;
            border: 1px solid #d1d5db;
            border-bottom-width: 2px;
            border-radius: 4px;
            font-size: 12px;
            background: #fff;
        }
    </style>
</head>

<body>
    <div class="header">
        <h1>Neue {{ type }} verfügbar!</h1>
    </div>
    <div class="content">
        {% if poster_url %}
        <img class="poster" src="{{ poster_url }}" alt="Poster" />
        {% else %}
        <div></div>
        {% endif %}

        <div>
            <p>Hallo {{ username }},</p>

            <h2 class="title">{{ title }}</h2>

            {% if episode_title %}
            <p class="meta">Episode: <strong>{{ episode_title }}</strong></p>
            {% endif %}
            {% if season and episode %}
            <p class="meta"><span class="kbd">S{{ season }}E{{ episode }}</span></p>
            {% endif %}

            {% if year %}
            <p class="meta">Jahr: <strong>{{ year }}</strong></p>
            {% endif %}
            {% if release_type %}
            <p class="meta">Release: {{ release_type }}</p>
            {% endif %}

            {% if air_date %}
            <p class="meta">Veröffentlicht am: {{ air_date }}</p>
            {% endif %}

            {% if overview %}
            <p class="overview">{{ overview }}</p>
            {% endif %}

            <p>Du kannst das jetzt auf Jellyfin anschauen.</p>
        </div>
    </div>
</body>

</html>