/* ==================================================================
 * RSS Generator — Frontend Theme
 * --------------------------------------------------------------
 *  Design-Tokens, Darkmode-aware, Komponenten-Styles.
 *  Alles via Custom Properties auf .rssgen-app, damit das Theme
 *  niemals andere Plugins oder das WP-Theme beeinflusst.
 * ================================================================== */

.rssgen-app {
    /* ---------- COLOR TOKENS (Light) ---------- */
    --rg-primary:        #f57c00;
    --rg-primary-hover:  #e06b00;
    --rg-primary-soft:   rgba(245, 124, 0, 0.10);
    --rg-primary-ring:   rgba(245, 124, 0, 0.35);

    --rg-accent:         #2563eb;
    --rg-accent-hover:   #1d4fd8;
    --rg-accent-soft:    rgba(37, 99, 235, 0.10);

    --rg-success:        #0c7a3e;
    --rg-success-soft:   #e3fcec;
    --rg-warn:           #b35d00;
    --rg-warn-soft:      #fff4e0;
    --rg-danger:         #b91c1c;
    --rg-danger-soft:    #fee2e2;

    --rg-bg:             #ffffff;
    --rg-bg-soft:        #f7f9fc;
    --rg-bg-hover:       #eef2f7;
    --rg-surface:        #ffffff;
    --rg-surface-2:      #fafbfd;

    --rg-text:           #0f1722;
    --rg-text-muted:     #5b6776;
    --rg-text-subtle:    #94a0ad;

    --rg-border:         #e3e8ef;
    --rg-border-strong:  #cdd5df;
    --rg-border-focus:   var(--rg-primary);

    --rg-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --rg-shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --rg-shadow-md: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .04);
    --rg-shadow-lg: 0 12px 32px rgba(15, 23, 42, .12), 0 4px 12px rgba(15, 23, 42, .06);
    --rg-shadow-xl: 0 24px 64px rgba(15, 23, 42, .18), 0 8px 24px rgba(15, 23, 42, .08);

    /* ---------- SPACING (4px scale) ---------- */
    --rg-s-1: 4px;  --rg-s-2: 8px;  --rg-s-3: 12px; --rg-s-4: 16px;
    --rg-s-5: 20px; --rg-s-6: 24px; --rg-s-8: 32px; --rg-s-10: 40px; --rg-s-12: 48px;

    /* ---------- RADII ---------- */
    --rg-r-sm: 6px;
    --rg-r-md: 10px;
    --rg-r-lg: 14px;
    --rg-r-xl: 20px;
    --rg-r-pill: 999px;

    /* ---------- TYPOGRAPHY ---------- */
    --rg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Liberation Sans", system-ui, sans-serif;
    --rg-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo,
                    Consolas, "Liberation Mono", monospace;

    --rg-fs-xs:  12px;
    --rg-fs-sm:  13px;
    --rg-fs-md:  14px;
    --rg-fs-lg:  15px;
    --rg-fs-xl:  17px;
    --rg-fs-2xl: 20px;
    --rg-fs-3xl: 26px;
    --rg-fs-4xl: 34px;

    --rg-lh-tight: 1.25;
    --rg-lh-base:  1.5;

    /* ---------- TRANSITIONS ---------- */
    --rg-easing: cubic-bezier(0.4, 0, 0.2, 1);
    --rg-t-fast: 120ms var(--rg-easing);
    --rg-t-base: 180ms var(--rg-easing);
    --rg-t-slow: 280ms var(--rg-easing);

    /* ---------- LAYOUT ---------- */
    --rg-max:    1100px;
    --rg-header-h: 60px;

    /* ---------- BASE ---------- */
    color: var(--rg-text);
    background: var(--rg-bg-soft);
    font-family: var(--rg-font);
    font-size: var(--rg-fs-md);
    line-height: var(--rg-lh-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 600px;
    margin: 0;
}

/* ---------- DARK MODE ---------- */
@media (prefers-color-scheme: dark) {
    .rssgen-app:not([data-theme="light"]),
    .rssgen-app[data-theme="dark"] {
        --rg-primary-soft:   rgba(245, 124, 0, 0.16);
        --rg-accent-soft:    rgba(96, 165, 250, 0.16);
        --rg-accent:         #60a5fa;
        --rg-accent-hover:   #93c5fd;

        --rg-success:        #4ade80;
        --rg-success-soft:   rgba(74, 222, 128, 0.14);
        --rg-warn:           #fbbf24;
        --rg-warn-soft:      rgba(251, 191, 36, 0.14);
        --rg-danger:         #f87171;
        --rg-danger-soft:    rgba(248, 113, 113, 0.14);

        --rg-bg:             #0c111b;
        --rg-bg-soft:        #0c111b;
        --rg-bg-hover:       #1a2030;
        --rg-surface:        #131a26;
        --rg-surface-2:      #181f2d;

        --rg-text:           #e6e9ee;
        --rg-text-muted:     #9aa6b2;
        --rg-text-subtle:    #6b7785;

        --rg-border:         #232c3b;
        --rg-border-strong:  #2f3a4d;

        --rg-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
        --rg-shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
        --rg-shadow-md: 0 4px 12px rgba(0, 0, 0, .5);
        --rg-shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
        --rg-shadow-xl: 0 24px 64px rgba(0, 0, 0, .6);
    }
}

.rssgen-app *,
.rssgen-app *::before,
.rssgen-app *::after { box-sizing: border-box; }

.rssgen-app :focus-visible {
    outline: 2px solid var(--rg-primary-ring);
    outline-offset: 2px;
    border-radius: var(--rg-r-sm);
}

.rssgen-app a {
    color: var(--rg-accent); text-decoration: none;
    transition: color var(--rg-t-fast);
}
.rssgen-app a:hover { color: var(--rg-accent-hover); text-decoration: underline; }

.is-hidden { display: none !important; }
.rssgen-muted { color: var(--rg-text-muted); margin: 0 0 var(--rg-s-4); }

/* ==================================================================
 * HEADER
 * ================================================================== */
.rssgen-app__header {
    display: flex; align-items: center; gap: var(--rg-s-6);
    padding: 12px var(--rg-s-6);
    background: var(--rg-surface);
    border-bottom: 1px solid var(--rg-border);
    position: sticky; top: 0; z-index: 5;
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    background: color-mix(in srgb, var(--rg-surface) 92%, transparent);
}
.rssgen-app__brand {
    display: flex; align-items: center; gap: var(--rg-s-2);
    font-weight: 600; font-size: var(--rg-fs-xl);
    color: var(--rg-text); letter-spacing: -0.01em;
}
.rssgen-app__logo {
    color: var(--rg-primary); display: inline-flex;
    width: 28px; height: 28px; align-items: center; justify-content: center;
    background: var(--rg-primary-soft); border-radius: var(--rg-r-md);
}
.rssgen-app__nav { display: flex; gap: 2px; flex: 1; margin-left: var(--rg-s-3); }
.rssgen-tab {
    background: transparent; border: 0;
    padding: 8px 14px; border-radius: var(--rg-r-sm);
    font: inherit; color: var(--rg-text-muted); cursor: pointer;
    transition: background var(--rg-t-fast), color var(--rg-t-fast);
    font-weight: 500;
}
.rssgen-tab:hover { background: var(--rg-bg-hover); color: var(--rg-text); }
.rssgen-tab.is-active {
    background: var(--rg-primary-soft); color: var(--rg-primary);
    font-weight: 600;
}
.rssgen-app__user {
    display: flex; align-items: center; gap: var(--rg-s-2);
    font-size: var(--rg-fs-sm);
}
.rssgen-app__avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--rg-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: var(--rg-fs-sm);
    flex-shrink: 0;
}
.rssgen-user-name { color: var(--rg-text); font-weight: 500; }
.rssgen-logout {
    color: var(--rg-text-muted) !important; font-size: var(--rg-fs-xs);
    margin-left: var(--rg-s-2);
}
.rssgen-user-trigger {
    background: transparent; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; gap: var(--rg-s-2);
    padding: 4px 8px; border-radius: var(--rg-r-md);
    font: inherit; color: inherit;
    transition: background var(--rg-t-fast);
}
.rssgen-user-trigger:hover { background: var(--rg-bg-hover); }
.rssgen-user-trigger.is-active {
    background: var(--rg-primary-soft);
}
.rssgen-user-trigger.is-active .rssgen-user-name { color: var(--rg-primary); font-weight: 600; }

/* Theme Toggle (Auto / Light / Dark) */
.rssgen-theme-toggle {
    background: transparent; border: 1px solid var(--rg-border);
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--rg-text-muted);
    padding: 0;
    transition: background var(--rg-t-fast), color var(--rg-t-fast),
                border-color var(--rg-t-fast);
    flex-shrink: 0;
}
.rssgen-theme-toggle:hover {
    background: var(--rg-bg-hover); color: var(--rg-text);
    border-color: var(--rg-border-strong);
}
.rssgen-theme-toggle__icon {
    line-height: 0; display: inline-flex;
    align-items: center; justify-content: center;
}

/* ==================================================================
 * ROUTES
 * ================================================================== */
.rssgen-route {
    padding: var(--rg-s-8) var(--rg-s-6);
    max-width: var(--rg-max);
    margin: 0 auto;
    animation: rgRouteIn var(--rg-t-base);
}
@keyframes rgRouteIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==================================================================
 * HERO / GENERATOR
 * ================================================================== */
.rssgen-hero { padding: var(--rg-s-6) 0 var(--rg-s-8); }
.rssgen-hero__title {
    font-size: var(--rg-fs-3xl); font-weight: 700;
    text-align: center; margin: 0 0 var(--rg-s-2);
    letter-spacing: -0.02em;
}
.rssgen-hero__sub {
    text-align: center; color: var(--rg-text-muted);
    margin: 0 auto var(--rg-s-6); max-width: 540px;
}

.rssgen-input-bar {
    display: flex; gap: var(--rg-s-3); align-items: stretch;
    max-width: 720px; margin: 0 auto;
    position: relative;
}
.rssgen-input-bar__field {
    position: relative; flex: 1; display: flex; align-items: center;
    background: var(--rg-surface); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md);
    box-shadow: var(--rg-shadow-sm);
    transition: border-color var(--rg-t-fast), box-shadow var(--rg-t-fast);
}
.rssgen-input-bar__field:focus-within {
    border-color: var(--rg-primary);
    box-shadow: 0 0 0 4px var(--rg-primary-ring), var(--rg-shadow-sm);
}
.rssgen-input {
    flex: 1; border: 0; outline: 0;
    padding: 14px 96px 14px 18px;
    font: inherit; color: var(--rg-text);
    background: transparent; border-radius: var(--rg-r-md);
    width: 100%;
}
.rssgen-input::placeholder { color: var(--rg-text-subtle); }
.rssgen-input__country {
    position: absolute; right: 44px; top: 50%; transform: translateY(-50%);
    color: var(--rg-text-muted); font-size: var(--rg-fs-xs);
    display: inline-flex; align-items: center; gap: 4px;
    background: transparent; border: 0; padding: 4px 8px;
    border-radius: var(--rg-r-sm); cursor: pointer;
    font-weight: 500; letter-spacing: 0.02em;
    transition: background var(--rg-t-fast), color var(--rg-t-fast);
    font-family: inherit;
}
.rssgen-input__country:hover { background: var(--rg-bg-hover); color: var(--rg-text); }
.rssgen-input__country::before {
    content: ""; width: 13px; height: 13px;
    border-radius: 50%; border: 1.4px solid currentColor;
    display: inline-block;
}

/* Region picker (Modal-Inhalt) */
.rssgen-region-search {
    position: relative; margin-bottom: var(--rg-s-3);
}
.rssgen-region-search input {
    width: 100%; padding: 10px 12px 10px 36px;
    background: var(--rg-surface-2); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md); font: inherit;
    transition: border-color var(--rg-t-fast), box-shadow var(--rg-t-fast);
}
.rssgen-region-search input:focus {
    outline: 0; border-color: var(--rg-primary);
    box-shadow: 0 0 0 3px var(--rg-primary-ring);
}
.rssgen-region-search::before {
    content: ""; position: absolute; left: 12px; top: 50%;
    width: 14px; height: 14px;
    border: 1.5px solid var(--rg-text-subtle); border-radius: 50%;
    margin-top: -10px; pointer-events: none;
}
.rssgen-region-search::after {
    content: ""; position: absolute; left: 22px; top: 22px;
    width: 7px; height: 1.5px;
    background: var(--rg-text-subtle);
    transform: rotate(45deg); transform-origin: left center;
    pointer-events: none;
}
.rssgen-region-list {
    max-height: 360px; overflow-y: auto;
    border: 1px solid var(--rg-border); border-radius: var(--rg-r-md);
    background: var(--rg-surface);
}
.rssgen-region-list__item {
    display: flex; align-items: center; gap: var(--rg-s-3);
    padding: 12px 14px; cursor: pointer;
    border-bottom: 1px solid var(--rg-border);
    transition: background var(--rg-t-fast);
}
.rssgen-region-list__item:last-child { border-bottom: 0; }
.rssgen-region-list__item:hover { background: var(--rg-bg-hover); }
.rssgen-region-list__item.is-selected { background: var(--rg-primary-soft); color: var(--rg-primary); font-weight: 600; }
.rssgen-region-list__label { flex: 1; }
.rssgen-region-list__radio {
    width: 18px; height: 18px; border: 1.5px solid var(--rg-border-strong);
    border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.rssgen-region-list__item.is-selected .rssgen-region-list__radio {
    border-color: var(--rg-primary);
}
.rssgen-region-list__item.is-selected .rssgen-region-list__radio::after {
    content: ""; width: 10px; height: 10px; border-radius: 50%;
    background: var(--rg-primary);
}
.rssgen-input__clear {
    position: absolute; right: var(--rg-s-3); top: 50%;
    transform: translateY(-50%);
    background: var(--rg-bg-hover); border: 0;
    width: 22px; height: 22px; border-radius: 50%;
    color: var(--rg-text-muted); cursor: pointer;
    display: none; align-items: center; justify-content: center;
    font-size: 16px; line-height: 1; padding: 0;
    transition: background var(--rg-t-fast), color var(--rg-t-fast);
}
.rssgen-input__clear:hover { background: var(--rg-border-strong); color: var(--rg-text); }
.rssgen-input-bar__field.has-value .rssgen-input { padding-right: 110px; }
.rssgen-input-bar__field.has-value .rssgen-input__clear { display: flex; }

/* As-you-type Suggestion Dropdown */
.rssgen-suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--rg-surface); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md); box-shadow: var(--rg-shadow-lg);
    z-index: 10; padding: var(--rg-s-2);
    animation: rgFadeIn var(--rg-t-fast);
}
.rssgen-suggest__hint {
    padding: var(--rg-s-2) var(--rg-s-3);
    color: var(--rg-text-subtle); font-size: var(--rg-fs-xs);
    text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.rssgen-suggest__item {
    width: 100%; text-align: left;
    background: transparent; border: 0;
    padding: var(--rg-s-2) var(--rg-s-3);
    border-radius: var(--rg-r-sm);
    display: flex; align-items: center; gap: var(--rg-s-3);
    cursor: pointer; font: inherit; color: var(--rg-text);
    transition: background var(--rg-t-fast);
}
.rssgen-suggest__item:hover,
.rssgen-suggest__item.is-active { background: var(--rg-bg-hover); }
.rssgen-suggest__icon {
    width: 22px; height: 22px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--rg-primary); flex-shrink: 0;
}
.rssgen-suggest__text {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: var(--rg-font-mono); font-size: var(--rg-fs-sm);
}
.rssgen-suggest__kind {
    color: var(--rg-text-muted); font-size: var(--rg-fs-xs);
    background: var(--rg-bg-hover); padding: 2px 8px;
    border-radius: var(--rg-r-pill);
}

@keyframes rgFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rssgen-hero__hint {
    color: var(--rg-text-muted); text-align: center;
    font-size: var(--rg-fs-xs); margin: var(--rg-s-4) 0 0;
}
.rssgen-hero__hint kbd {
    background: var(--rg-bg-hover); border: 1px solid var(--rg-border);
    border-bottom-width: 2px; border-radius: var(--rg-r-sm);
    padding: 1px 6px; font-family: var(--rg-font-mono);
    font-size: 11px; color: var(--rg-text);
}

/* ==================================================================
 * SOURCE PICKER
 * ================================================================== */
.rssgen-source-picker { margin-top: var(--rg-s-10); }
.rssgen-section-title {
    font-size: var(--rg-fs-md); font-weight: 600; color: var(--rg-text);
    margin: 0 0 var(--rg-s-4); display: flex; align-items: center; gap: var(--rg-s-2);
}
.rssgen-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--rg-s-3);
}
.rssgen-source-card {
    background: var(--rg-surface); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md);
    padding: var(--rg-s-4);
    display: flex; align-items: center; gap: var(--rg-s-3);
    cursor: pointer; font: inherit; color: var(--rg-text);
    text-align: left;
    transition: border-color var(--rg-t-fast), box-shadow var(--rg-t-fast),
                transform var(--rg-t-fast), background var(--rg-t-fast);
}
.rssgen-source-card:hover {
    border-color: var(--rg-border-strong);
    box-shadow: var(--rg-shadow-md);
    transform: translateY(-1px);
}
.rssgen-source-card:active { transform: translateY(0); }
.rssgen-source-card.is-selected {
    border-color: var(--rg-primary);
    background: var(--rg-primary-soft);
}
.rssgen-source-card__icon {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: var(--rg-r-sm);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 16px;
    box-shadow: var(--rg-shadow-xs);
}
.rssgen-source-card__icon[data-icon="webpage"]    { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.rssgen-source-card__icon[data-icon="webpage"]::before    { content: "🌐"; }
.rssgen-source-card__icon[data-icon="youtube"]    { background: linear-gradient(135deg, #ff0033, #c00020); }
.rssgen-source-card__icon[data-icon="youtube"]::before    { content: "▶"; padding-left: 2px; }
.rssgen-source-card__icon[data-icon="reddit"]     { background: linear-gradient(135deg, #ff5722, #ff4500); }
.rssgen-source-card__icon[data-icon="reddit"]::before     { content: "r"; font-style: italic; }
.rssgen-source-card__icon[data-icon="x"]          { background: #000; }
.rssgen-source-card__icon[data-icon="x"]::before          { content: "𝕏"; font-weight: 400; }
.rssgen-source-card__icon[data-icon="googlenews"] { background: linear-gradient(135deg, #4285f4, #34a853); }
.rssgen-source-card__icon[data-icon="googlenews"]::before { content: "G"; }
.rssgen-source-card__icon[data-icon="bluesky"]    { background: linear-gradient(135deg, #0085ff, #00aaff); }
.rssgen-source-card__icon[data-icon="bluesky"]::before    { content: "🦋"; font-size: 16px; }
.rssgen-source-card__icon[data-icon="mastodon"]   { background: linear-gradient(135deg, #6364ff, #563acc); }
.rssgen-source-card__icon[data-icon="mastodon"]::before   { content: "M"; }
.rssgen-source-card__icon[data-icon="telegram"]   { background: linear-gradient(135deg, #0088cc, #00b4ff); }
.rssgen-source-card__icon[data-icon="telegram"]::before   { content: "✈"; transform: rotate(-12deg); display: inline-block; }
.rssgen-source-card__icon[data-icon="keyword"]    { background: linear-gradient(135deg, #f57c00, #ff9d33); }
.rssgen-source-card__icon[data-icon="keyword"]::before    { content: "#"; }
.rssgen-source-card__icon[data-icon="instagram"]  { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #515bd4); }
.rssgen-source-card__icon[data-icon="instagram"]::before  { content: "📷"; font-size: 16px; }
.rssgen-source-card__icon[data-icon="linkedin"]   { background: #0a66c2; }
.rssgen-source-card__icon[data-icon="linkedin"]::before   { content: "in"; font-style: italic; }
.rssgen-source-card__icon[data-icon="tiktok"]     { background: #000; }
.rssgen-source-card__icon[data-icon="tiktok"]::before     { content: "♪"; }
.rssgen-source-card__icon[data-icon="threads"]    { background: #000; }
.rssgen-source-card__icon[data-icon="threads"]::before    { content: "@"; font-weight: 700; }
.rssgen-source-card__icon[data-icon="facebook"]   { background: #1877f2; }
.rssgen-source-card__icon[data-icon="facebook"]::before   { content: "f"; font-family: Georgia, serif; font-weight: 900; font-style: italic; }
.rssgen-source-card__icon[data-icon="vimeo"]      { background: #1ab7ea; }
.rssgen-source-card__icon[data-icon="vimeo"]::before      { content: "V"; }
.rssgen-source-card__icon[data-icon="rumble"]     { background: linear-gradient(135deg, #85c742, #5dab26); }
.rssgen-source-card__icon[data-icon="rumble"]::before     { content: "▶"; padding-left: 1px; }
.rssgen-source-card__icon[data-icon="craigslist"] { background: #6b46c1; }
.rssgen-source-card__icon[data-icon="craigslist"]::before { content: "☮"; }
.rssgen-source-card__icon[data-icon="pinterest"]  { background: #e60023; }
.rssgen-source-card__icon[data-icon="pinterest"]::before  { content: "P"; font-style: italic; }
.rssgen-source-card__icon[data-icon="ebay"]       { background: #fff; color: #e53238; border: 1px solid var(--rg-border); font-size: 12px; }
.rssgen-source-card__icon[data-icon="ebay"]::before       { content: "ebay"; font-weight: 700; }
.rssgen-source-card__icon[data-icon="tumblr"]     { background: #001935; }
.rssgen-source-card__icon[data-icon="tumblr"]::before     { content: "t"; font-weight: 700; }
.rssgen-source-card__label {
    font-weight: 500; line-height: 1.2;
}
.rssgen-source-card__label small {
    display: block; font-size: var(--rg-fs-xs);
    color: var(--rg-text-muted); font-weight: 400;
    margin-top: 1px;
}

/* ==================================================================
 * PAGE HEADER  (Feeds, Bundles, Stats)
 * ================================================================== */
.rssgen-page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--rg-s-4); gap: var(--rg-s-4); flex-wrap: wrap;
}
.rssgen-page-header h2 {
    margin: 0; font-size: var(--rg-fs-2xl); font-weight: 700;
    letter-spacing: -0.01em;
}
.rssgen-page-header__meta {
    display: flex; align-items: center; gap: var(--rg-s-3);
    color: var(--rg-text-muted); font-size: var(--rg-fs-sm);
}

/* Toolbar (search + actions) */
.rssgen-toolbar {
    display: flex; align-items: center; gap: var(--rg-s-3);
    margin-bottom: var(--rg-s-4); flex-wrap: wrap;
}
.rssgen-search {
    flex: 1; min-width: 220px;
    position: relative;
}
.rssgen-search input {
    width: 100%; padding: 9px 14px 9px 36px;
    background: var(--rg-surface); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md); font: inherit; color: var(--rg-text);
    transition: border-color var(--rg-t-fast), box-shadow var(--rg-t-fast);
}
.rssgen-search input:focus {
    outline: 0; border-color: var(--rg-primary);
    box-shadow: 0 0 0 3px var(--rg-primary-ring);
}
.rssgen-search::before {
    content: ""; position: absolute; left: 12px; top: 50%;
    width: 14px; height: 14px;
    border: 1.5px solid var(--rg-text-subtle); border-radius: 50%;
    margin-top: -10px; pointer-events: none;
}
.rssgen-search::after {
    content: ""; position: absolute; left: 22px; top: 22px;
    width: 7px; height: 1.5px;
    background: var(--rg-text-subtle);
    transform: rotate(45deg); transform-origin: left center;
    pointer-events: none;
}

/* ==================================================================
 * LIST CARDS
 * ================================================================== */
.rssgen-list {
    display: flex; flex-direction: column; gap: var(--rg-s-3);
}
.rssgen-card {
    background: var(--rg-surface); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md);
    padding: var(--rg-s-4);
    display: flex; align-items: flex-start; gap: var(--rg-s-4);
    box-shadow: var(--rg-shadow-xs);
    transition: border-color var(--rg-t-fast), box-shadow var(--rg-t-fast);
    animation: rgFadeIn var(--rg-t-base);
}
.rssgen-card:hover {
    border-color: var(--rg-border-strong);
    box-shadow: var(--rg-shadow-sm);
}
.rssgen-card__avatar {
    width: 48px; height: 48px; border-radius: var(--rg-r-md);
    background: var(--rg-bg-hover);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; color: var(--rg-accent);
    font-weight: 700; font-size: var(--rg-fs-lg);
}
.rssgen-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.rssgen-card__main { flex: 1; min-width: 0; }
.rssgen-card__title {
    font-weight: 600; font-size: var(--rg-fs-lg);
    margin: 0 0 4px;
    color: var(--rg-text);
    display: flex; align-items: center; gap: var(--rg-s-2); flex-wrap: wrap;
    letter-spacing: -0.01em;
}
.rssgen-card__title a { color: inherit; }
.rssgen-card__sub {
    color: var(--rg-text-muted); font-size: var(--rg-fs-sm);
    word-break: break-all;
}
.rssgen-card__sub + .rssgen-card__sub { margin-top: 2px; }

.rssgen-card__url-row {
    display: flex; align-items: center; gap: var(--rg-s-2);
    margin-top: var(--rg-s-3); flex-wrap: wrap;
}
.rssgen-card__url {
    background: var(--rg-bg-hover); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-sm);
    padding: 5px 10px;
    font-family: var(--rg-font-mono);
    font-size: var(--rg-fs-xs);
    color: var(--rg-text);
    flex: 1 1 280px;
    word-break: break-all; line-height: 1.4;
}

.rssgen-card__actions {
    display: flex; gap: var(--rg-s-2); flex-shrink: 0; flex-wrap: wrap;
    align-items: flex-start;
}

/* PILLS */
.rssgen-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: var(--rg-r-pill);
    font-size: var(--rg-fs-xs); font-weight: 600;
    background: var(--rg-bg-hover); color: var(--rg-text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
    white-space: nowrap;
}
.rssgen-pill--ok    { background: var(--rg-success-soft); color: var(--rg-success); }
.rssgen-pill--err   { background: var(--rg-danger-soft);  color: var(--rg-danger); }
.rssgen-pill--paused{ background: var(--rg-warn-soft);    color: var(--rg-warn); }
.rssgen-pill--new   { background: var(--rg-primary-soft); color: var(--rg-primary); }
.rssgen-pill::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}
.rssgen-pill--type::before { display: none; }

/* ==================================================================
 * EMPTY / SKELETON STATES
 * ================================================================== */
.rssgen-empty {
    text-align: center; padding: var(--rg-s-12) var(--rg-s-6);
    color: var(--rg-text-muted);
    background: var(--rg-surface);
    border: 1px dashed var(--rg-border-strong);
    border-radius: var(--rg-r-lg);
}
.rssgen-empty__icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--rg-primary-soft); color: var(--rg-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 26px; margin-bottom: var(--rg-s-4);
}
.rssgen-empty h3 {
    color: var(--rg-text); margin: 0 0 var(--rg-s-2);
    font-size: var(--rg-fs-lg);
}
.rssgen-empty p { margin: 0 0 var(--rg-s-4); }

.rssgen-skeleton {
    background: linear-gradient(
        90deg,
        var(--rg-bg-hover) 0%,
        var(--rg-border) 50%,
        var(--rg-bg-hover) 100%
    );
    background-size: 200% 100%;
    animation: rgShimmer 1.4s linear infinite;
    border-radius: var(--rg-r-sm);
}
@keyframes rgShimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}
.rssgen-skeleton-card {
    background: var(--rg-surface); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md); padding: var(--rg-s-4);
    display: flex; gap: var(--rg-s-4);
}
.rssgen-skeleton-card .rssgen-skeleton.av {
    width: 48px; height: 48px; border-radius: var(--rg-r-md); flex-shrink: 0;
}
.rssgen-skeleton-card .lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.rssgen-skeleton-card .l1 { height: 14px; width: 40%; }
.rssgen-skeleton-card .l2 { height: 11px; width: 70%; }
.rssgen-skeleton-card .l3 { height: 11px; width: 55%; }

/* ==================================================================
 * BUTTONS
 * ================================================================== */
.rssgen-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    border: 1px solid var(--rg-border);
    background: var(--rg-surface); color: var(--rg-text);
    padding: 8px 14px; font: inherit; font-weight: 500;
    border-radius: var(--rg-r-md); cursor: pointer;
    transition: background var(--rg-t-fast), border-color var(--rg-t-fast),
                color var(--rg-t-fast), box-shadow var(--rg-t-fast),
                transform var(--rg-t-fast);
    white-space: nowrap;
    line-height: 1.2;
}
.rssgen-btn:hover { background: var(--rg-bg-hover); border-color: var(--rg-border-strong); }
.rssgen-btn:active { transform: scale(0.98); }
.rssgen-btn--primary {
    background: var(--rg-primary); border-color: var(--rg-primary); color: #fff;
    box-shadow: 0 1px 2px rgba(245, 124, 0, .25);
}
.rssgen-btn--primary:hover {
    background: var(--rg-primary-hover); border-color: var(--rg-primary-hover);
    box-shadow: 0 4px 12px rgba(245, 124, 0, .35);
}
.rssgen-btn--ghost  { background: transparent; border-color: transparent; }
.rssgen-btn--ghost:hover { background: var(--rg-bg-hover); }
.rssgen-btn--lg {
    padding: 14px 28px; font-weight: 600; font-size: var(--rg-fs-md);
    border-radius: var(--rg-r-md);
}
.rssgen-btn--sm {
    padding: 5px 10px; font-size: var(--rg-fs-xs);
    border-radius: var(--rg-r-sm);
}
.rssgen-btn--danger { color: var(--rg-danger); }
.rssgen-btn--danger:hover { background: var(--rg-danger-soft); border-color: var(--rg-danger); }
.rssgen-btn[disabled] { opacity: .55; cursor: not-allowed; }
.rssgen-btn.is-success { background: var(--rg-success); border-color: var(--rg-success); color: #fff; }

/* ==================================================================
 * OVERLAY (loading)
 * ================================================================== */
.rssgen-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: center; justify-content: center;
    z-index: 1100;
    animation: rgFadeIn var(--rg-t-fast);
    backdrop-filter: blur(2px);
}
.rssgen-overlay__box {
    background: var(--rg-surface); padding: var(--rg-s-8) var(--rg-s-10);
    border-radius: var(--rg-r-lg);
    box-shadow: var(--rg-shadow-xl);
    text-align: center; max-width: 360px;
    animation: rgScaleIn var(--rg-t-base);
}
.rssgen-overlay__box h3 {
    margin: var(--rg-s-4) 0 var(--rg-s-2);
    font-size: var(--rg-fs-xl); font-weight: 600;
    letter-spacing: -0.01em;
}
.rssgen-overlay__box p { margin: 0; color: var(--rg-text-muted); font-size: var(--rg-fs-sm); }
.rssgen-spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid var(--rg-border);
    border-top-color: var(--rg-primary);
    animation: rgSpin 0.9s linear infinite; margin: 0 auto;
}
@keyframes rgSpin { to { transform: rotate(360deg); } }
@keyframes rgScaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* ==================================================================
 * TOAST
 * ================================================================== */
.rssgen-toast {
    position: fixed; bottom: var(--rg-s-6); left: 50%;
    transform: translateX(-50%) translateY(0);
    background: var(--rg-text); color: var(--rg-surface);
    padding: 10px 16px; border-radius: var(--rg-r-md);
    box-shadow: var(--rg-shadow-lg);
    z-index: 1200; font-size: var(--rg-fs-sm);
    display: flex; align-items: center; gap: var(--rg-s-2);
    animation: rgToastIn 280ms var(--rg-easing);
    max-width: 90vw;
}
.rssgen-toast.is-out {
    animation: rgToastOut 200ms var(--rg-easing) forwards;
}
.rssgen-toast--err { background: var(--rg-danger); color: #fff; }
.rssgen-toast--ok  { background: var(--rg-success); color: #fff; }
.rssgen-toast__icon {
    width: 18px; height: 18px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.2); border-radius: 50%;
    font-size: 11px; font-weight: 700;
}
@keyframes rgToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes rgToastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ==================================================================
 * MODAL
 * ================================================================== */
.rssgen-modal-host {
    position: fixed; inset: 0;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 60px var(--rg-s-4) var(--rg-s-6);
    z-index: 1000; overflow-y: auto;
    animation: rgFadeIn var(--rg-t-fast);
}
.rssgen-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}
.rssgen-modal {
    position: relative;
    background: var(--rg-surface); border-radius: var(--rg-r-lg);
    box-shadow: var(--rg-shadow-xl);
    width: 100%; max-width: 600px;
    max-height: calc(100vh - 90px);
    overflow: hidden;
    display: flex; flex-direction: column;
    animation: rgScaleIn var(--rg-t-base);
}
.rssgen-modal__header {
    padding: var(--rg-s-4) var(--rg-s-6);
    border-bottom: 1px solid var(--rg-border);
    display: flex; align-items: center; justify-content: space-between;
}
.rssgen-modal__title {
    font-size: var(--rg-fs-xl); font-weight: 600; margin: 0;
    letter-spacing: -0.01em;
}
.rssgen-modal__close {
    background: transparent; border: 0; cursor: pointer;
    width: 30px; height: 30px; border-radius: 50%;
    color: var(--rg-text-muted); display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 20px; line-height: 1;
    transition: background var(--rg-t-fast), color var(--rg-t-fast);
}
.rssgen-modal__close:hover { background: var(--rg-bg-hover); color: var(--rg-text); }
.rssgen-modal__body { padding: var(--rg-s-5) var(--rg-s-6); overflow-y: auto; }
.rssgen-modal__footer {
    padding: var(--rg-s-4) var(--rg-s-6);
    border-top: 1px solid var(--rg-border);
    display: flex; justify-content: flex-end; gap: var(--rg-s-2);
    background: var(--rg-surface-2);
}
.rssgen-modal__source {
    display: flex; gap: var(--rg-s-3); align-items: flex-start;
    padding: var(--rg-s-4);
    background: var(--rg-surface-2); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md); margin-bottom: var(--rg-s-5);
}
.rssgen-modal__source-icon {
    width: 40px; height: 40px; border-radius: var(--rg-r-md);
    background: var(--rg-surface);
    border: 1px solid var(--rg-border);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0; color: var(--rg-accent);
}
.rssgen-modal__source-icon img { width: 26px; height: 26px; object-fit: contain; }
.rssgen-modal__source-info { flex: 1; min-width: 0; }
.rssgen-modal__source-info strong { display: block; color: var(--rg-text); }
.rssgen-modal__source-info a {
    font-size: var(--rg-fs-sm); word-break: break-all;
}
.rssgen-modal__source-desc {
    color: var(--rg-text-muted); font-size: var(--rg-fs-sm);
    margin-top: 4px; line-height: 1.45;
}

/* ==================================================================
 * FORMS
 * ================================================================== */
.rssgen-field { margin-bottom: var(--rg-s-4); }
.rssgen-field label,
.rssgen-field > strong {
    display: block; font-weight: 500;
    margin-bottom: 6px; font-size: var(--rg-fs-sm);
    color: var(--rg-text);
}
.rssgen-field input[type="text"],
.rssgen-field input[type="url"],
.rssgen-field input[type="email"],
.rssgen-field input[type="password"],
.rssgen-field input[type="number"],
.rssgen-field textarea,
.rssgen-field select {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md);
    font: inherit; color: var(--rg-text);
    background: var(--rg-surface);
    transition: border-color var(--rg-t-fast), box-shadow var(--rg-t-fast);
}
.rssgen-field input:focus,
.rssgen-field textarea:focus,
.rssgen-field select:focus {
    outline: 0; border-color: var(--rg-primary);
    box-shadow: 0 0 0 3px var(--rg-primary-ring);
}
.rssgen-field textarea { min-height: 80px; resize: vertical; line-height: 1.45; }
.rssgen-field--inline {
    display: flex; align-items: center; gap: var(--rg-s-3);
    justify-content: space-between;
}
.rssgen-field--inline label { margin: 0; flex: 1; }
.rssgen-field-help {
    color: var(--rg-text-muted); font-size: var(--rg-fs-xs);
    margin-top: 4px;
}

/* Toggle switch */
.rssgen-toggle {
    position: relative; display: inline-block;
    width: 38px; height: 22px; flex-shrink: 0;
}
.rssgen-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.rssgen-toggle__slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--rg-border-strong); border-radius: var(--rg-r-pill);
    transition: background var(--rg-t-fast);
}
.rssgen-toggle__slider::before {
    content: ""; position: absolute; height: 16px; width: 16px;
    left: 3px; top: 3px; background: #fff; border-radius: 50%;
    transition: transform var(--rg-t-fast);
    box-shadow: var(--rg-shadow-xs);
}
.rssgen-toggle input:checked + .rssgen-toggle__slider { background: var(--rg-accent); }
.rssgen-toggle input:checked + .rssgen-toggle__slider::before { transform: translateX(16px); }
.rssgen-toggle input:focus-visible + .rssgen-toggle__slider {
    box-shadow: 0 0 0 3px var(--rg-primary-ring);
}

/* Radio group */
.rssgen-radio-row {
    display: flex; gap: var(--rg-s-4); flex-wrap: wrap;
    margin-bottom: var(--rg-s-3);
}
.rssgen-radio-row label {
    display: inline-flex !important; align-items: center; gap: 6px;
    font-weight: normal; margin: 0; font-size: var(--rg-fs-sm); cursor: pointer;
}
.rssgen-radio-row input[type="radio"] { accent-color: var(--rg-accent); }
.rssgen-radio-row.is-disabled {
    opacity: .45; pointer-events: none;
}

/* Advanced (collapsible) */
.rssgen-advanced {
    margin-top: var(--rg-s-3); border-top: 1px solid var(--rg-border);
    padding-top: var(--rg-s-3);
}
.rssgen-advanced summary {
    cursor: pointer; user-select: none;
    font-weight: 500; font-size: var(--rg-fs-sm);
    padding: 6px 0; color: var(--rg-text-muted);
    display: flex; align-items: center; gap: 6px;
    list-style: none;
}
.rssgen-advanced summary::-webkit-details-marker { display: none; }
.rssgen-advanced summary::before {
    content: "›"; transition: transform var(--rg-t-fast);
    color: var(--rg-text-subtle); font-size: 16px;
    line-height: 1;
}
.rssgen-advanced[open] summary::before { transform: rotate(90deg); }
.rssgen-advanced summary:hover { color: var(--rg-text); }
.rssgen-advanced[open] summary {
    color: var(--rg-text); margin-bottom: var(--rg-s-3);
}

/* ==================================================================
 * STATS
 * ================================================================== */
.rssgen-stats-block {
    background: var(--rg-surface); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md); padding: var(--rg-s-4);
    margin-bottom: var(--rg-s-3);
}
.rssgen-stats-block__head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: var(--rg-s-3); gap: var(--rg-s-3);
}
.rssgen-stats-block h3 {
    margin: 0; font-size: var(--rg-fs-md); font-weight: 600;
}
.rssgen-stats-block__total {
    color: var(--rg-text-muted); font-size: var(--rg-fs-sm);
}
.rssgen-stats-block__total strong {
    color: var(--rg-text); font-weight: 600;
}
.rssgen-bars {
    display: flex; gap: 3px; align-items: flex-end; height: 80px;
    position: relative;
}
.rssgen-bars__bar {
    flex: 1; background: var(--rg-accent);
    border-radius: 2px 2px 0 0; min-height: 2px;
    transition: opacity var(--rg-t-fast);
    cursor: pointer; position: relative;
}
.rssgen-bars__bar:hover { opacity: 0.8; }
.rssgen-bars__bar[data-zero="1"] {
    background: var(--rg-bg-hover);
}
.rssgen-bars__bar:hover::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%); white-space: nowrap;
    background: var(--rg-text); color: var(--rg-surface);
    padding: 4px 8px; border-radius: var(--rg-r-sm);
    font-size: var(--rg-fs-xs); pointer-events: none;
    box-shadow: var(--rg-shadow-md); z-index: 2;
}

/* ==================================================================
 * AUTH (Login / Register)
 * ================================================================== */
.rssgen-auth {
    max-width: 440px; margin: var(--rg-s-12) auto;
    background: var(--rg-surface);
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-lg);
    padding: var(--rg-s-8);
    box-shadow: var(--rg-shadow-md);
}
.rssgen-auth h2 {
    margin: 0 0 var(--rg-s-2);
    font-size: var(--rg-fs-2xl); font-weight: 700;
    letter-spacing: -0.01em;
}
.rssgen-auth__tabs {
    display: flex; gap: 4px;
    margin: var(--rg-s-5) 0 var(--rg-s-5);
    border-bottom: 1px solid var(--rg-border);
}
.rssgen-auth__tab {
    background: transparent; border: 0;
    padding: 10px 14px; font: inherit; cursor: pointer;
    color: var(--rg-text-muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color var(--rg-t-fast), border-color var(--rg-t-fast);
}
.rssgen-auth__tab.is-active {
    color: var(--rg-primary); border-bottom-color: var(--rg-primary);
    font-weight: 600;
}
.rssgen-auth .rssgen-error,
.rssgen-auth .rssgen-success {
    padding: 10px 12px; border-radius: var(--rg-r-sm);
    margin-bottom: var(--rg-s-4); font-size: var(--rg-fs-sm);
}
.rssgen-auth .rssgen-error  { background: var(--rg-danger-soft);  color: var(--rg-danger); }
.rssgen-auth .rssgen-success{ background: var(--rg-success-soft); color: var(--rg-success); }

/* ==================================================================
 * KEYBOARD SHORTCUT HINT
 * ================================================================== */
.rssgen-kbd {
    display: inline-flex; align-items: center;
    background: var(--rg-bg-hover); border: 1px solid var(--rg-border);
    padding: 1px 6px; border-radius: var(--rg-r-sm);
    font-family: var(--rg-font-mono);
    font-size: 11px; color: var(--rg-text-muted);
    line-height: 1.4;
}

/* ==================================================================
 * RESPONSIVE
 * ================================================================== */
@media (max-width: 720px) {
    .rssgen-app__header {
        flex-wrap: wrap; gap: var(--rg-s-3); padding: 10px 14px;
    }
    .rssgen-app__nav {
        order: 3; flex-basis: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .rssgen-app__nav::-webkit-scrollbar { display: none; }
    .rssgen-app__user { margin-left: auto; }
    .rssgen-route { padding: var(--rg-s-5) var(--rg-s-4); }
    .rssgen-input-bar { flex-direction: column; }
    .rssgen-card { flex-wrap: wrap; }
    .rssgen-card__actions { width: 100%; }
    .rssgen-source-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .rssgen-app *, .rssgen-app *::before, .rssgen-app *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================================================================
 * FULLSCREEN MODE
 *  Wenn die Seite das „RSS Generator – Vollbild"-Template nutzt,
 *  bekommt body die Klasse .rssgen-fullscreen. Dann sprengen wir alle
 *  Container-Limits des aktiven WP-Themes.
 * ================================================================== */
body.rssgen-fullscreen .rssgen-app {
    width: 100vw; min-height: 100vh;
    margin: 0; padding: 0;
}
body.rssgen-fullscreen .rssgen-app__header {
    position: sticky; top: 0;
}
body.admin-bar.rssgen-fullscreen .rssgen-app__header { top: 32px; }
@media (max-width: 600px) {
    body.admin-bar.rssgen-fullscreen .rssgen-app__header { top: 46px; }
}

/* ==================================================================
 * MANUAL THEME OVERRIDE
 *  data-theme="dark"  -> immer Dark
 *  data-theme="light" -> immer Light
 *  data-theme="auto" oder fehlend -> via prefers-color-scheme
 * ================================================================== */
.rssgen-app[data-theme="dark"] {
    --rg-primary-soft:   rgba(245, 124, 0, 0.16);
    --rg-accent-soft:    rgba(96, 165, 250, 0.16);
    --rg-accent:         #60a5fa;
    --rg-accent-hover:   #93c5fd;
    --rg-success:        #4ade80;
    --rg-success-soft:   rgba(74, 222, 128, 0.14);
    --rg-warn:           #fbbf24;
    --rg-warn-soft:      rgba(251, 191, 36, 0.14);
    --rg-danger:         #f87171;
    --rg-danger-soft:    rgba(248, 113, 113, 0.14);
    --rg-bg:             #0c111b;
    --rg-bg-soft:        #0c111b;
    --rg-bg-hover:       #1a2030;
    --rg-surface:        #131a26;
    --rg-surface-2:      #181f2d;
    --rg-text:           #e6e9ee;
    --rg-text-muted:     #9aa6b2;
    --rg-text-subtle:    #6b7785;
    --rg-border:         #232c3b;
    --rg-border-strong:  #2f3a4d;
    --rg-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --rg-shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
    --rg-shadow-md: 0 4px 12px rgba(0, 0, 0, .5);
    --rg-shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
    --rg-shadow-xl: 0 24px 64px rgba(0, 0, 0, .6);
}

/* ==================================================================
 * PROFILE
 * ================================================================== */
.rssgen-profile {
    display: grid; gap: var(--rg-s-4);
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
}
@media (min-width: 800px) {
    .rssgen-profile { grid-template-columns: 280px minmax(0, 1fr); }
}
.rssgen-profile__card {
    background: var(--rg-surface); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-lg); padding: var(--rg-s-6);
    box-shadow: var(--rg-shadow-xs);
}
.rssgen-profile__avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--rg-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 700; margin: 0 auto var(--rg-s-3);
    box-shadow: var(--rg-shadow-md);
}
.rssgen-profile__name {
    text-align: center; font-size: var(--rg-fs-xl); font-weight: 600;
    margin: 0 0 4px;
}
.rssgen-profile__sub {
    text-align: center; color: var(--rg-text-muted);
    font-size: var(--rg-fs-sm); margin: 0;
}
.rssgen-profile__divider {
    border: 0; border-top: 1px solid var(--rg-border);
    margin: var(--rg-s-4) 0;
}
.rssgen-profile__stats {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: var(--rg-s-3);
}
.rssgen-profile__stat {
    background: var(--rg-bg-hover); border-radius: var(--rg-r-md);
    padding: var(--rg-s-3); text-align: center;
}
.rssgen-profile__stat strong {
    display: block; font-size: var(--rg-fs-xl); color: var(--rg-text);
    font-weight: 700; line-height: 1.2;
}
.rssgen-profile__stat span {
    color: var(--rg-text-muted); font-size: var(--rg-fs-xs);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.rssgen-profile__form h3 {
    font-size: var(--rg-fs-md); font-weight: 600;
    margin: 0 0 var(--rg-s-3); display: flex; align-items: center;
    gap: var(--rg-s-2);
}
.rssgen-profile__form h3:not(:first-child) {
    margin-top: var(--rg-s-5); padding-top: var(--rg-s-5);
    border-top: 1px solid var(--rg-border);
}
.rssgen-theme-options {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--rg-s-2);
}
.rssgen-theme-options input { position: absolute; opacity: 0; pointer-events: none; }
.rssgen-theme-options label {
    background: var(--rg-surface); border: 1px solid var(--rg-border);
    border-radius: var(--rg-r-md); padding: var(--rg-s-3);
    text-align: center; cursor: pointer; font-weight: 500;
    transition: border-color var(--rg-t-fast), background var(--rg-t-fast);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: var(--rg-fs-sm);
}
.rssgen-theme-options label:hover { border-color: var(--rg-border-strong); }
.rssgen-theme-options input:checked + label {
    border-color: var(--rg-primary); background: var(--rg-primary-soft);
    color: var(--rg-primary); font-weight: 600;
}
.rssgen-theme-options__icon {
    font-size: 22px; line-height: 1;
}
.rssgen-profile__row {
    display: flex; gap: var(--rg-s-2); flex-wrap: wrap;
    margin-top: var(--rg-s-4);
}
.rssgen-profile__row .rssgen-btn { flex: 0 0 auto; }

