"""Blockliste für Benutzernamen — Teilstring-Matching (case-insensitive)."""

_BLOCKED = {
    # Deutsch
    "arsch", "arschloch", "scheiß", "scheiss", "scheiße", "scheisse",
    "fotze", "wichser", "wichse", "ficken", "fick", "hurensohn", "hure",
    "nutte", "schlampe", "dreckau", "drecksau", "idiot", "vollidiot",
    "nazi", "hitler", "heil", "neger", "nigger", "kanake", "spast",
    "spastiker", "behinderter", "opfer", "opfa", "missgeburt",
    "penisgesicht", "penis", "vagina", "schwanz", "schwanzlutscher",
    "pisser", "kackbratze", "kacke", "kacker", "bastard",
    "dummkopf", "depp", "trottel", "blödmann", "blödian",
    "wanker", "scheißkopf", "shithead",
    # Englisch
    "fuck", "fucker", "fucking", "shit", "bitch", "asshole", "ass",
    "cunt", "cock", "dick", "pussy", "whore", "slut", "fag", "faggot",
    "retard", "moron", "nigga", "porn", "sex", "horny",
    "rape", "kill", "murder", "terrorist", "isis",
    # Generisch anstößig
    "admin", "administrator", "moderator", "support", "banyaro",
    "root", "system",
}


def is_username_blocked(name: str) -> bool:
    """True wenn der Username einen gesperrten Begriff enthält."""
    lower = name.lower()
    return any(blocked in lower for blocked in _BLOCKED)
