/* ========================
   HEADER-LEISTE – REDESIGN
======================== */

/* Nur der direkte Seiten-Header erhaelt die globale Navigationsleiste.
   Semantische <header>-Elemente in Komponenten (z. B. Chat-Dialoge) duerfen
   weder sticky werden noch die Navigations-Z-Ebene erben. */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* Kunena setzt auf einzelnen Unterseiten zusaetzlich `overflow-auto` direkt
   auf den Body. Neben der HTML-Scrollleiste entstehen sonst zwei Scrollbars
   und der komplette Header verschiebt sich beim Seitenwechsel horizontal. */
body.is-kunena-page.overflow-auto,
body.com-kunena.overflow-auto {
    overflow: visible !important;
}

body > .site-header {
    position: sticky;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20000;
    width: 100%;
    height: 84px;
    min-height: 84px;
    flex: 0 0 auto;
    overflow: visible;
    isolation: isolate;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 52, 52, 0.38);
    background:
        linear-gradient(90deg, rgba(255, 52, 52, 0.045), transparent 25%),
        rgba(8, 9, 12, 0.94);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
}

body > .site-header::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 4%, #ff3434 22%, rgba(255, 52, 52, 0.12) 48%, transparent 78%);
    box-shadow: 0 0 16px rgba(255, 52, 52, 0.42);
}

.header-center {
    width: min(calc(100% - 48px), 1680px);
    height: 84px;
    min-height: 84px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(28px, 4vw, 76px);
    box-sizing: border-box;
}

.header-logo {
    min-width: clamp(72px, 6vw, 88px);
    height: 100%;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

.header-logo p {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.header-logo a {
    display: inline-flex;
    align-items: center;
}

.header-logo img {
    width: auto;
    height: 58px;
    max-width: clamp(78px, 8vw, 112px);
    display: block;
    margin: 0;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.08));
    transition: filter 0.22s ease, transform 0.22s ease;
}

.header-logo a:hover img {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 14px rgba(255, 52, 52, 0.24));
}

.header-right {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(24px, 3vw, 52px);
}

.header-right .mod-menu {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap !important;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-right .mod-menu li {
    position: relative;
    margin: 0;
    padding: 0;
}

.header-right .mod-menu a {
    position: relative;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(0.78rem, 0.85vw, 0.96rem);
    font-weight: 600;
    letter-spacing: 0.015em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.header-right .mod-menu a::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 2px;
    left: 12px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    border-radius: 2px;
    background: #ff3434;
    box-shadow: 0 0 12px rgba(255, 52, 52, 0.72);
    transition: transform 0.2s ease;
}

/*
 * Joomla gibt eine Menü-Überschrift mit Kindern als Button aus. Links und
 * Überschriften erhalten deshalb bewusst dieselbe visuelle Sprache.
 */
.header-right .mod-menu > li > .mod-menu__toggle-sub {
    position: relative;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 29px 0 12px;
    appearance: none;
    border: 0;
    border-radius: 7px;
    background: transparent;
    /* Joomla setzt auf dem nativen Menü-Button `color: currentColor` und
       auf der enthaltenen .nav-header nochmals eine graue Farbe. Die
       expliziten Werte halten Überschrift und normale Menülinks identisch. */
    color: rgba(255, 255, 255, 0.76) !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(0.78rem, 0.85vw, 0.96rem);
    font-weight: 600;
    letter-spacing: 0.015em;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.header-right .mod-menu > li > .mod-menu__toggle-sub .mod-menu__heading {
    color: inherit !important;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.header-right .mod-menu > li > .mod-menu__toggle-sub::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 2px;
    left: 12px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    border-radius: 2px;
    background: #ff3434;
    box-shadow: 0 0 12px rgba(255, 52, 52, 0.72);
    transition: transform 0.2s ease;
}

.header-right .mod-menu > li > .mod-menu__toggle-sub:hover,
.header-right .mod-menu > li > .mod-menu__toggle-sub:focus-visible,
.header-right .mod-menu > li > .mod-menu__toggle-sub[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.045);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.header-right .mod-menu > li > .mod-menu__toggle-sub:hover::after,
.header-right .mod-menu > li > .mod-menu__toggle-sub:focus-visible::after,
.header-right .mod-menu > li > .mod-menu__toggle-sub[aria-expanded="true"]::after {
    transform: scaleX(1);
}

.header-right .mod-menu > li > .mod-menu__toggle-sub .icon-chevron-down {
    display: none;
}

.header-right .mod-menu > li > .mod-menu__toggle-sub[aria-expanded="true"] .icon-chevron-down {
    color: #ff7474;
    transform: rotate(180deg);
}

/* Verlinkte Elternpunkte und Joomla-Menueueberschriften erhalten denselben
   Pfeil. Das Script fuegt dieses Element nur bei tatsaechlichem Untermenue ein. */
.header-right .mod-menu > li.has-submenu > a {
    padding-right: 29px;
}

.header-menu__chevron {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 7px;
    height: 7px;
    margin-top: -5px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: .68;
    pointer-events: none;
    transform: rotate(45deg);
    transform-origin: center;
    transition: opacity .18s ease, transform .18s ease;
}

.header-right .mod-menu > li.mm-active > a .header-menu__chevron,
.header-right .mod-menu > li > a[aria-expanded="true"] .header-menu__chevron,
.header-right .mod-menu > li.mm-active > .mod-menu__toggle-sub .header-menu__chevron,
.header-right .mod-menu > li > .mod-menu__toggle-sub[aria-expanded="true"] .header-menu__chevron {
    margin-top: -2px;
    opacity: 1;
    transform: rotate(225deg);
}

.header-right .mod-menu a:hover,
.header-right .mod-menu a:focus-visible,
.header-right .mod-menu li.active > a,
.header-right .mod-menu li.current > a,
.header-right .mod-menu a.active {
    background: rgba(255, 255, 255, 0.045);
    color: #ffffff;
    transform: translateY(-1px);
}

.header-right .mod-menu a:hover::after,
.header-right .mod-menu a:focus-visible::after,
.header-right .mod-menu li.active > a::after,
.header-right .mod-menu li.current > a::after,
.header-right .mod-menu a.active::after {
    transform: scaleX(1);
}

.header-right .mod-menu .disabled > a,
.header-right .mod-menu a.disabled {
    color: rgba(255, 255, 255, 0.24);
    pointer-events: none;
}

/* Untermenüs schweben außerhalb der Leiste und verändern deren Höhe nicht. */
.header-right .mod-menu > li > ul,
.header-right .mod-menu > li > .mod-menu__sub,
.header-right .mod-menu > li > .mm-collapse {
    position: absolute !important;
    top: calc(100% + 14px);
    left: 50%;
    z-index: 1200;
    width: max-content;
    min-width: 260px;
    max-width: min(360px, calc(100vw - 24px));
    height: auto !important;
    margin: 0;
    padding: 10px;
    display: block !important;
    overflow: visible !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -8px);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-top-color: rgba(255, 52, 52, 0.64);
    border-radius: 10px;
    background:
        linear-gradient(145deg, rgba(255, 52, 52, 0.07), transparent 42%),
        rgba(20, 21, 25, 0.98);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.56), 0 0 28px rgba(255, 52, 52, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    list-style: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.header-right .mod-menu > li > ul::before,
.header-right .mod-menu > li > .mod-menu__sub::before,
.header-right .mod-menu > li > .mm-collapse::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translateX(-50%) rotate(45deg);
    border-top: 1px solid rgba(255, 52, 52, 0.64);
    border-left: 1px solid rgba(255, 52, 52, 0.64);
    background: #15161a;
}

.header-right .mod-menu > li > ul::after,
.header-right .mod-menu > li > .mod-menu__sub::after,
.header-right .mod-menu > li > .mm-collapse::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 15px;
}

.header-right .mod-menu > li:hover > ul,
.header-right .mod-menu > li:focus-within > ul,
.header-right .mod-menu > li.mm-active > ul,
.header-right .mod-menu > li > ul.mm-show,
.header-right .mod-menu > li > ul.show,
.header-right .mod-menu > li > ul.show-menu,
.header-right .mod-menu > li > .mod-menu__sub.mm-show,
.header-right .mod-menu > li > .mod-menu__sub.show,
.header-right .mod-menu > li > .mod-menu__sub.show-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.header-right .mod-menu > li > ul li,
.header-right .mod-menu > li > .mod-menu__sub li,
.header-right .mod-menu > li > .mm-collapse li {
    width: 100%;
    display: block;
    list-style: none;
}

.header-right .mod-menu > li > ul a,
.header-right .mod-menu > li > .mod-menu__sub a,
.header-right .mod-menu > li > .mm-collapse a {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    border-radius: 7px;
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.83rem;
    line-height: 1.35;
    white-space: normal;
    transform: none;
}

.header-right .mod-menu > li > ul a::after,
.header-right .mod-menu > li > .mod-menu__sub a::after,
.header-right .mod-menu > li > .mm-collapse a::after {
    display: none;
}

.header-right .mod-menu > li > ul a:hover,
.header-right .mod-menu > li > ul a:focus-visible,
.header-right .mod-menu > li > .mod-menu__sub a:hover,
.header-right .mod-menu > li > .mod-menu__sub a:focus-visible,
.header-right .mod-menu > li > .mm-collapse a:hover,
.header-right .mod-menu > li > .mm-collapse a:focus-visible {
    background: rgba(255, 52, 52, 0.12);
    color: #ffffff;
    transform: none;
}

.header-right a.login,
.header-right a.logout {
    min-width: 96px;
    min-height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid rgba(255, 52, 52, 0.56);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 52, 52, 0.16), rgba(255, 52, 52, 0.07));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24), 0 0 20px rgba(255, 52, 52, 0.06) inset;
    color: #ffffff !important;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.header-right a.login:hover,
.header-right a.logout:hover,
.header-right a.login:focus-visible,
.header-right a.logout:focus-visible {
    transform: translateY(-2px);
    border-color: #ff3434;
    background: #c91f1f;
    box-shadow: 0 10px 30px rgba(255, 52, 52, 0.24);
}

.header-user {
    position: relative;
    z-index: 1300;
    flex: 0 0 auto;
}

.header-user__trigger {
    box-sizing: border-box;
    min-width: 150px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 5px 11px 5px 6px;
    appearance: none;
    border: 1px solid rgba(255, 52, 52, 0.48);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 60, 66, 0.14), rgba(112, 14, 19, 0.08)),
        rgba(20, 21, 27, 0.88);
    box-shadow:
        0 9px 24px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font: inherit;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.header-user__trigger:hover,
.header-user__trigger:focus-visible,
.header-user.is-open .header-user__trigger {
    border-color: #ff464b;
    background:
        linear-gradient(180deg, rgba(255, 63, 69, 0.22), rgba(130, 19, 24, 0.13)),
        rgba(23, 24, 30, 0.96);
    box-shadow:
        0 11px 28px rgba(0, 0, 0, 0.34),
        0 0 0 3px rgba(239, 52, 57, 0.09);
    transform: translateY(-1px);
    outline: none;
}

.header-user__avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 90, 95, 0.6);
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.16), transparent 36%),
        linear-gradient(145deg, #7e1d23, #311013);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(238, 48, 55, 0.15);
    font-size: 0.76rem;
    font-weight: 850;
    line-height: 1;
}

.header-user__name {
    min-width: 0;
    max-width: 150px;
    overflow: hidden;
    color: #f4f4f6;
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.025em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user__chevron {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-left: auto;
    fill: none;
    stroke: #a8aab2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: stroke 0.18s ease, transform 0.18s ease;
}

.header-user.is-open .header-user__chevron {
    stroke: #ff777b;
    transform: rotate(180deg);
}

.header-user__dropdown[hidden] {
    display: none;
}

.header-user__dropdown {
    position: absolute;
    top: calc(100% + 13px);
    right: 0;
    box-sizing: border-box;
    width: min(310px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid rgba(255, 71, 77, 0.34);
    border-top: 2px solid #ef3439;
    border-radius: 13px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 42%),
        rgba(14, 15, 20, 0.97);
    box-shadow:
        0 26px 64px rgba(0, 0, 0, 0.66),
        0 0 26px rgba(234, 43, 50, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
    color: #ffffff;
    backdrop-filter: blur(18px) saturate(115%);
    -webkit-backdrop-filter: blur(18px) saturate(115%);
}

.header-user__dropdown::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 24px;
    width: 12px;
    height: 12px;
    border-top: 1px solid #ef3439;
    border-left: 1px solid #ef3439;
    background: #121319;
    transform: rotate(45deg);
}

.header-user__identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 17px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(239, 52, 57, 0.09), transparent 72%);
}

.header-user__avatar--large {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 0.9rem;
}

.header-user__identity > span:last-child {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.header-user__identity strong,
.header-user__identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user__identity strong {
    color: #ffffff;
    font-size: 0.91rem;
    font-weight: 800;
}

.header-user__identity small {
    color: #898d98;
    font-size: 0.71rem;
}

.header-user__links {
    display: grid;
    gap: 4px;
    padding: 9px;
}

.header-user__links a,
.header-user__logout a {
    box-sizing: border-box;
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #cfd1d7;
    font-size: 0.79rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.header-user__links a:hover,
.header-user__links a:focus-visible {
    border-color: rgba(255, 78, 84, 0.25);
    background: rgba(137, 25, 31, 0.23);
    color: #ffffff;
    outline: none;
    transform: translateX(2px);
}

.header-user__links svg,
.header-user__logout svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: #ff7176;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.header-user__badge {
    margin-left: auto;
    padding: 3px 6px;
    border: 1px solid rgba(255, 84, 90, 0.28);
    border-radius: 999px;
    background: rgba(117, 20, 25, 0.25);
    color: #ff969a;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.header-user__logout {
    padding: 9px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.header-user__logout a {
    border-color: rgba(255, 76, 82, 0.24);
    background: rgba(120, 20, 25, 0.15);
    color: #ff8f93;
}

.header-user__logout a:hover,
.header-user__logout a:focus-visible {
    border-color: rgba(255, 80, 86, 0.68);
    background: linear-gradient(180deg, #d32a31, #a71920);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(210, 36, 43, 0.2);
    outline: none;
}

.header-user__logout a:hover svg,
.header-user__logout a:focus-visible svg {
    stroke: #ffffff;
}

.header-right a:focus-visible,
.header-logo a:focus-visible,
.header-right .mod-menu__toggle-sub:focus-visible {
    outline: 2px solid #ff3434;
    outline-offset: 3px;
}

body.com-kunena > .site-header,
body.is-kunena-page > .site-header,
body:has(#kunena) > .site-header {
    min-height: 84px !important;
    height: 84px !important;
}

/* Kunena darf die Joomla-Navigation nicht umbrechen. Abstaende und Breite
   bleiben dabei exakt dieselben wie auf allen anderen Unterseiten. */
body.is-kunena-page .header-right .mod-menu,
body:has(#kunena) .header-right .mod-menu {
    flex-wrap: nowrap !important;
    align-content: center;
    gap: 8px;
}

body.is-kunena-page .header-right .mod-menu > li,
body:has(#kunena) .header-right .mod-menu > li {
    min-width: 0;
    flex: 0 0 auto;
}

@media (max-width: 1240px) {
    .header-center {
        width: min(calc(100% - 32px), 1680px);
        gap: 24px;
    }

    .header-right {
        gap: 18px;
    }

    .header-logo {
        min-width: 70px;
    }

    .header-logo img {
        height: 50px;
        max-width: 86px;
    }

    .header-right .mod-menu {
        gap: 1px;
    }

    .header-right .mod-menu a {
        padding-inline: 8px;
        font-size: 0.76rem;
    }

    .header-right .mod-menu > li > .mod-menu__toggle-sub {
        padding-inline: 8px;
        font-size: 0.76rem;
    }

    .header-user__trigger {
        min-width: 132px;
    }

    .header-user__name {
        max-width: 92px;
    }
}

@media (max-width: 900px) {
    body > .site-header,
    .header-center {
        height: auto;
        min-height: 76px;
    }

    .header-center {
        flex-wrap: wrap;
        padding: 8px 0 12px;
    }

    .header-logo {
        width: 100%;
        height: 50px;
        justify-content: center;
    }

    .header-logo img {
        height: 44px;
        max-width: 78px;
    }

    .header-right {
        width: 100%;
        justify-content: center;
    }

    .header-user__dropdown {
        right: 0;
    }

    .header-right .mod-menu {
        justify-content: flex-start;
        flex-wrap: wrap;
        overflow: visible;
        padding-bottom: 4px;
    }

    body.com-kunena > .site-header,
    body.is-kunena-page > .site-header,
    body:has(#kunena) > .site-header {
        height: auto !important;
        min-height: 76px !important;
    }

    body.is-kunena-page .header-right .mod-menu,
    body:has(#kunena) .header-right .mod-menu {
        flex-wrap: wrap !important;
    }
}

@media (max-width: 620px) {
    .header-center {
        width: calc(100% - 20px);
    }

    .header-right {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .header-right .mod-menu {
        width: 100%;
    }

    .header-right a.login,
    .header-right a.logout {
        width: 100%;
        min-height: 38px;
        box-sizing: border-box;
    }

    .header-user,
    .header-user__trigger {
        width: 100%;
    }

    .header-user__trigger {
        min-height: 42px;
    }

    .header-user__name {
        max-width: none;
    }

    .header-user__dropdown {
        right: 0;
        left: 0;
        width: 100%;
    }
}

/* ========================
   LOGIN POPUP – ORIGINAL
======================== */
#login-popup {
    display: none;
    position: absolute;
    background: linear-gradient(135deg, #333, #111);
    border-radius: 6px;
    z-index: 2000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
    color: #fff;
    width: 300px;
    max-width: 90%;
    font-family: Arial, sans-serif;
    text-align: center;
}

#login-popup form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#login-popup input[type="text"],
#login-popup input[type="password"] {
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    width: 75%;
    font-size: 0.95em;
    background-color: rgba(255,255,255,0.05);
    color: #fff;
}

#login-popup input[type="text"]::placeholder,
#login-popup input[type="password"]::placeholder {
    color: #ccc;
}

.input-password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    position: relative;
    top: 3px;
}

.input-password-toggle svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

#login-popup input[type="submit"],
#login-popup button:not(.input-password-toggle) {
    background-color: #4a4a4a;
    color: #f8f8f8;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
    font-weight: normal;
    text-decoration: none;
    font-size: 1em;
    width: 95%;
}

#login-popup input[type="submit"]:hover,
#login-popup button:hover {
    background-color: #f8f8f8;
    color: #4a4a4a;
    transform: translateY(-2px);
}

.fixed-input-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    height: 50px;
    gap: 8px;
    box-sizing: border-box;
}

#form-login-remember-133 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    margin: 10px 0;
}

#form-login-remember-133 label {
    display: inline-block;
    color: #f8f8f8;
    font-size: 0.9em;
    margin-left: 5px;
}

#login-popup .mod-login__options {
    list-style: none;
    padding: 10px 0 10px 10px;
    margin: 15px 0 0 0;
    text-align: left;
}

#login-popup .mod-login__options li {
    margin-bottom: 5px;
}

#login-popup .mod-login__options a {
    color: #f8f8f8;
    text-decoration: none;
    transition: color 0.3s;
}

#login-popup .mod-login__options a:hover {
    color: #1c4ccb;
}

/* Login-Popup im einheitlichen Sternenbürger-Glasdesign */
#login-popup {
    box-sizing: border-box;
    width: min(440px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100vh - 106px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(255, 76, 82, 0.3);
    border-left: 4px solid #ef3439;
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 38%),
        rgba(15, 16, 21, 0.96);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.72),
        0 0 34px rgba(223, 40, 46, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    font-family: inherit;
    text-align: left;
}

#login-popup form,
#login-popup .mod-login__userdata {
    box-sizing: border-box;
    width: 100%;
}

#login-popup .mod-login__userdata {
    display: grid;
    gap: 17px;
    padding: 24px;
}

#login-popup .login-popup__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 18px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

#login-popup .login-popup__header > div {
    min-width: 0;
}

#login-popup .login-popup__kicker {
    display: block;
    margin-bottom: 7px;
    color: #ff7378;
    font-size: 0.69rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    line-height: 1.3;
    text-transform: uppercase;
}

#login-popup .login-popup__header h2 {
    max-width: 22ch;
    margin: 0;
    color: #fff;
    font-size: clamp(1.35rem, 4vw, 1.65rem);
    line-height: 1.12;
    text-wrap: balance;
}

#login-popup .login-popup__header p {
    max-width: 38ch;
    margin: 9px 0 0;
    color: #a5a8b1;
    font-size: 0.84rem;
    line-height: 1.5;
}

/* Höhere Spezifität als die alte allgemeine Popup-Button-Regel. */
#login-popup button.login-popup-close,
#login-popup button.login-popup-close:hover,
#login-popup button.login-popup-close:focus-visible {
    box-sizing: border-box;
    display: inline-grid;
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    height: 38px;
    min-height: 38px;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 91, 96, 0.42);
    border-radius: 9px;
    background: rgba(126, 25, 30, 0.27);
    color: #ff9da0;
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1;
    opacity: 1;
    transform: none;
}

#login-popup button.login-popup-close:hover,
#login-popup button.login-popup-close:focus-visible {
    border-color: #ff6267;
    background: rgba(185, 36, 43, 0.52);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(239, 52, 57, 0.13);
    outline: none;
}

#login-popup .mod-login__username,
#login-popup .mod-login__password {
    display: grid;
    gap: 7px;
    width: 100%;
    margin: 0;
}

#login-popup .mod-login__username > label,
#login-popup .mod-login__password > label {
    margin: 0;
    color: #e7e8ec;
    font-size: 0.8rem;
    font-weight: 750;
}

#login-popup .fixed-input-group {
    width: 100%;
    height: auto;
    min-height: 48px;
    gap: 0;
}

#login-popup input[type="text"],
#login-popup input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #393d47;
    border-radius: 9px;
    background: #1c1e25;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

#login-popup input[type="text"]::placeholder,
#login-popup input[type="password"]::placeholder {
    color: #858995;
}

#login-popup .mod-login__password input {
    padding-right: 48px;
}

#login-popup .mod-login__password .fixed-input-group {
    position: relative;
}

#login-popup button.input-password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 36px;
    min-width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #aeb1ba;
    transform: translateY(-50%);
}

#login-popup button.input-password-toggle:hover,
#login-popup button.input-password-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    outline: none;
}

#login-popup input[type="text"]:focus,
#login-popup input[type="password"]:focus {
    border-color: #f04a50;
    outline: none;
    background: #21242c;
    box-shadow: 0 0 0 3px rgba(239, 52, 57, 0.14);
}

#login-popup #form-login-remember-133 {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: -1px 0 0;
}

#login-popup #form-login-input-remember-133 {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #ef3439;
}

#login-popup #form-login-remember-133 label {
    margin: 0;
    color: #d6d7dc;
    font-size: 0.83rem;
}

#login-popup .mod-login__submit {
    margin: 0;
}

#login-popup .mod-login__submit button {
    width: 100%;
    min-height: 48px;
    margin: 0;
    border: 1px solid #ff4a50;
    border-radius: 9px;
    background: linear-gradient(180deg, #f13940, #c82027);
    color: #fff;
    box-shadow: 0 11px 25px rgba(194, 30, 37, 0.24);
    font-size: 0.95rem;
    font-weight: 800;
}

#login-popup .mod-login__submit button:hover,
#login-popup .mod-login__submit button:focus-visible {
    border-color: #ff666b;
    background: linear-gradient(180deg, #ff4b52, #d82a31);
    color: #fff;
    box-shadow: 0 13px 30px rgba(218, 38, 45, 0.34);
    outline: none;
    opacity: 1;
    transform: translateY(-1px);
}

#login-popup .mod-login__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 1px 0 0;
    padding: 17px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

#login-popup .mod-login__options li {
    margin: 0;
}

#login-popup .mod-login__options li:last-child {
    grid-column: 1 / -1;
}

#login-popup .mod-login__options a {
    box-sizing: border-box;
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: #c9cbd2;
    font-size: 0.74rem;
    line-height: 1.25;
    text-align: center;
}

#login-popup .mod-login__options a:hover,
#login-popup .mod-login__options a:focus-visible {
    border-color: rgba(255, 82, 88, 0.5);
    background: rgba(137, 27, 32, 0.24);
    color: #ff9699;
    outline: none;
}

@media (max-width: 520px) {
    #login-popup {
        width: min(410px, calc(100vw - 16px));
        border-left-width: 3px;
        border-radius: 13px;
    }

    #login-popup .mod-login__userdata {
        gap: 15px;
        padding: 18px 15px;
    }

    #login-popup .login-popup__header {
        grid-template-columns: minmax(0, 1fr) 36px;
        gap: 12px;
    }

    #login-popup button.login-popup-close,
    #login-popup button.login-popup-close:hover,
    #login-popup button.login-popup-close:focus-visible {
        width: 36px;
        min-width: 36px;
        max-width: 36px;
        height: 36px;
        min-height: 36px;
    }

    #login-popup .mod-login__options {
        grid-template-columns: 1fr;
    }

    #login-popup .mod-login__options li:last-child {
        grid-column: auto;
    }
}
