/* Theme neocities (docs/themes.md, Abschnitt 4). Tokens, Elemente, eigene Klassen.
   Alles unter html.theme-neocities. Sterne, Rahmen und Buttons sind reines CSS. */

/* 1. Tokens */
html.theme-neocities
{
    --theme-bg:           #06060f;
    --theme-fg:           #e9ecf7;
    --theme-muted:        #aab0cf;
    --theme-surface:      #0d0d1d;
    --theme-surface-alt:  #14142b;
    --theme-border:       #3f4f7a;
    --theme-accent:       #2ee6d2;
    --theme-accent-fg:    #031416;
    --theme-accent-soft:  #0e2d36;
    --theme-accent-text:  #6ff5e6;
    --theme-link:         #7fe9ff;
    --theme-link-visited: #cbb0ff;
    --theme-link-hover:   #ffe27a;
    --theme-notice-bg:    #2b2510;
    --theme-notice-fg:    #ffe9a6;
    --theme-danger:       #ff8a98;
    --theme-success:      #7bf5ae;
    --theme-radius:       0;
    --theme-shadow:       none;
    --theme-font:         'Pixelify Sans', Verdana, Tahoma, sans-serif;
    --theme-font-heading: 'Silkscreen', 'Pixelify Sans', monospace;
    --theme-font-mono:    'VT323', 'Courier New', monospace;
    --theme-font-size:    17px;

    --nc-glow:   0 0 6px rgb(46 230 210 / .85), 0 0 18px rgb(46 230 210 / .45);
    --nc-pink:   #ff8fd8;
    --nc-gold:   #ffe27a;
    color-scheme: dark;
}

/* 2. Sternenhimmel: drei Kachelebenen, fest hinter dem Inhalt */
html.theme-neocities body
{
    background-color: var(--theme-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Crect x='34' y='145' width='1' height='1' fill='white' fill-opacity='0.5'/%3E%3Crect x='126' y='194' width='2' height='2' fill='white' fill-opacity='1'/%3E%3Crect x='201' y='53' width='1' height='1' fill='white' fill-opacity='0.5'/%3E%3Crect x='228' y='213' width='2' height='2' fill='white' fill-opacity='0.5'/%3E%3Crect x='178' y='114' width='1' height='1' fill='rgb(180,230,255)' fill-opacity='0.7'/%3E%3Crect x='151' y='26' width='1' height='1' fill='white' fill-opacity='0.5'/%3E%3Crect x='6' y='166' width='1' height='1' fill='white' fill-opacity='0.7'/%3E%3Crect x='108' y='185' width='1' height='1' fill='rgb(180,230,255)' fill-opacity='0.7'/%3E%3Crect x='195' y='112' width='2' height='2' fill='rgb(180,230,255)' fill-opacity='0.7'/%3E%3Crect x='88' y='59' width='1' height='1' fill='white' fill-opacity='0.9'/%3E%3Crect x='237' y='5' width='2' height='2' fill='rgb(180,230,255)' fill-opacity='0.5'/%3E%3Crect x='47' y='161' width='1' height='1' fill='white' fill-opacity='0.9'/%3E%3Crect x='229' y='184' width='2' height='2' fill='rgb(180,230,255)' fill-opacity='0.7'/%3E%3Crect x='77' y='72' width='2' height='2' fill='rgb(180,230,255)' fill-opacity='1'/%3E%3Crect x='150' y='218' width='1' height='1' fill='white' fill-opacity='0.7'/%3E%3Crect x='190' y='204' width='2' height='2' fill='white' fill-opacity='0.7'/%3E%3Crect x='93' y='140' width='1' height='1' fill='white' fill-opacity='1'/%3E%3Crect x='169' y='130' width='1' height='1' fill='white' fill-opacity='1'/%3E%3Crect x='94' y='125' width='1' height='1' fill='white' fill-opacity='0.5'/%3E%3Crect x='78' y='180' width='2' height='2' fill='rgb(180,230,255)' fill-opacity='0.7'/%3E%3Crect x='43' y='128' width='1' height='1' fill='white' fill-opacity='0.7'/%3E%3Crect x='138' y='235' width='1' height='1' fill='white' fill-opacity='0.9'/%3E%3Crect x='216' y='147' width='1' height='1' fill='white' fill-opacity='0.9'/%3E%3Crect x='168' y='140' width='1' height='1' fill='white' fill-opacity='0.7'/%3E%3Crect x='132' y='199' width='1' height='1' fill='white' fill-opacity='0.5'/%3E%3Crect x='123' y='222' width='1' height='1' fill='rgb(180,230,255)' fill-opacity='0.7'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Crect x='60' y='139' width='1' height='1' fill='rgb(255,230,150)' fill-opacity='1'/%3E%3Crect x='148' y='16' width='1' height='1' fill='rgb(255,230,150)' fill-opacity='0.9'/%3E%3Crect x='141' y='59' width='1' height='1' fill='rgb(255,230,150)' fill-opacity='1'/%3E%3Crect x='101' y='38' width='1' height='1' fill='white' fill-opacity='1'/%3E%3Crect x='3' y='16' width='1' height='1' fill='white' fill-opacity='0.9'/%3E%3Crect x='7' y='68' width='2' height='2' fill='rgb(255,230,150)' fill-opacity='1'/%3E%3Crect x='101' y='147' width='2' height='2' fill='white' fill-opacity='0.9'/%3E%3Crect x='24' y='9' width='1' height='1' fill='rgb(255,230,150)' fill-opacity='0.7'/%3E%3Crect x='66' y='111' width='1' height='1' fill='rgb(255,230,150)' fill-opacity='1'/%3E%3Crect x='146' y='89' width='2' height='2' fill='white' fill-opacity='0.9'/%3E%3C/svg%3E"),
        radial-gradient(ellipse at 20% 0%, rgb(46 90 160 / .28), transparent 55%),
        radial-gradient(ellipse at 90% 100%, rgb(110 50 160 / .22), transparent 50%);
    background-attachment: fixed;
    line-height: 1.55;
    position: relative;
}

html.theme-neocities body::before
{
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Crect x='28' y='46' width='1' height='1' fill='rgb(255,255,255)' fill-opacity='0.7'/%3E%3Crect x='342' y='157' width='1' height='1' fill='rgb(200,170,255)' fill-opacity='0.7'/%3E%3Crect x='310' y='18' width='1' height='1' fill='rgb(255,255,255)' fill-opacity='1'/%3E%3Crect x='260' y='190' width='2' height='2' fill='rgb(200,170,255)' fill-opacity='0.9'/%3E%3Crect x='18' y='14' width='1' height='1' fill='rgb(255,255,255)' fill-opacity='0.9'/%3E%3Crect x='194' y='216' width='1' height='1' fill='rgb(200,170,255)' fill-opacity='0.7'/%3E%3Crect x='120' y='118' width='1' height='1' fill='rgb(95,242,228)' fill-opacity='0.9'/%3E%3Crect x='88' y='69' width='1' height='1' fill='rgb(200,170,255)' fill-opacity='0.7'/%3E%3Crect x='228' y='212' width='1' height='1' fill='rgb(200,170,255)' fill-opacity='0.9'/%3E%3Crect x='185' y='228' width='1' height='1' fill='rgb(255,255,255)' fill-opacity='1'/%3E%3Crect x='335' y='271' width='1' height='1' fill='rgb(255,255,255)' fill-opacity='0.9'/%3E%3Crect x='255' y='256' width='1' height='1' fill='rgb(200,170,255)' fill-opacity='1'/%3E%3Crect x='236' y='179' width='2' height='2' fill='rgb(255,255,255)' fill-opacity='0.7'/%3E%3Crect x='166' y='358' width='1' height='1' fill='rgb(200,170,255)' fill-opacity='0.9'/%3E%3Crect x='245' y='158' width='1' height='1' fill='rgb(200,170,255)' fill-opacity='1'/%3E%3Crect x='159' y='106' width='2' height='2' fill='rgb(200,170,255)' fill-opacity='0.9'/%3E%3C/svg%3E");
    opacity: .9;
}

@media (prefers-reduced-motion: no-preference)
{
    html.theme-neocities body::before { animation: nc-twinkle 7s ease-in-out infinite alternate; }
    @keyframes nc-twinkle { from { opacity: .35; } to { opacity: 1; } }
    html.theme-neocities .nc-welcome { animation: nc-shimmer 5s ease-in-out infinite alternate; }
    @keyframes nc-shimmer { from { opacity: .65; } to { opacity: 1; } }
    html.theme-neocities .nc-led { animation: nc-led 2.4s ease-in-out infinite; }
    @keyframes nc-led { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
}

/* 3. Elemente */
html.theme-neocities a { color: var(--theme-link); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
html.theme-neocities a:visited { color: var(--theme-link-visited); }
html.theme-neocities a:hover { color: var(--theme-link-hover); text-decoration-style: solid; text-shadow: 0 0 8px rgb(255 226 122 / .5); }

html.theme-neocities h1,
html.theme-neocities h2,
html.theme-neocities h3
{
    color: var(--theme-accent-text);
    text-shadow: var(--nc-glow);
    letter-spacing: .04em;
}
html.theme-neocities .prose h1,
html.theme-neocities .prose h2,
html.theme-neocities .prose h3,
html.theme-neocities .prose h4 { color: var(--theme-accent-text); }
html.theme-neocities .prose h2::before { content: '\2726\00a0'; color: var(--nc-pink); text-shadow: none; }
html.theme-neocities .prose a { color: var(--theme-link); }
html.theme-neocities .prose a:visited { color: var(--theme-link-visited); }
html.theme-neocities .prose code,
html.theme-neocities pre code,
html.theme-neocities kbd { font-size: 1.2em; }
html.theme-neocities .prose pre
{
    border: 1px dotted var(--theme-border);
    background: #090916;
}
html.theme-neocities .prose blockquote { border-left: 2px double var(--theme-accent); }
html.theme-neocities hr { border: 0; border-top: 1px dotted var(--theme-border); }
html.theme-neocities ::selection { background: var(--theme-accent); color: var(--theme-accent-fg); }

/* Seitenkopf: kein Balken, sondern leuchtender Titel in gepunkteter Rahmenzeile */
html.theme-neocities.theme-neocities .site-page-header { margin-bottom: 1.25rem; }
html.theme-neocities.theme-neocities .page-titlebar
{
    background: transparent;
    border: 1px dotted var(--theme-accent);
    border-width: 1px 0;
    margin: 0;
    padding: .5rem .25rem;
}
html.theme-neocities.theme-neocities .page-titlebar *
{
    color: var(--theme-accent-text);
    text-shadow: var(--nc-glow);
}
html.theme-neocities .site-page-title { font-size: 1.35rem; text-transform: lowercase; }
html.theme-neocities .site-page-title::before { content: '\2605\00a0'; color: var(--nc-gold); text-shadow: 0 0 8px rgb(255 226 122 / .7); }

/* Abschnittstitel: Etikett in eckigen Klammern */
html.theme-neocities.theme-neocities .site-section-title
{
    background: transparent;
    border: 0;
    border-bottom: 1px dotted var(--theme-border);
    color: var(--theme-accent-text);
    text-shadow: var(--nc-glow);
    font-family: var(--theme-font-heading);
    font-size: .9rem;
    display: block;
    padding: 0 0 .3rem;
}
html.theme-neocities .site-section-title::before { content: '[ '; color: var(--nc-pink); text-shadow: none; }
html.theme-neocities .site-section-title::after  { content: ' ]'; color: var(--nc-pink); text-shadow: none; }

/* Karten: gepunkteter Rahmen, leuchtet beim Überfahren */
html.theme-neocities.theme-neocities .site-card
{
    border: 1px dotted var(--theme-border);
    background: var(--theme-surface);
    transition: border-color .2s, box-shadow .2s;
}
html.theme-neocities.theme-neocities .site-card:hover,
html.theme-neocities.theme-neocities .site-card:focus-visible
{
    border-style: solid;
    border-color: var(--theme-accent);
    box-shadow: 0 0 12px rgb(46 230 210 / .35);
}
html.theme-neocities .site-card__title { color: var(--theme-fg); }
html.theme-neocities .site-card:hover .site-card__title { color: var(--theme-accent-text); text-shadow: var(--nc-glow); }
html.theme-neocities.theme-neocities .site-card--hero { border: 2px double var(--theme-accent); }
html.theme-neocities .site-thumb { border: 1px solid var(--theme-border); background: #05050b; }
html.theme-neocities.theme-neocities .site-badge { color: var(--nc-gold); }

/* Chips, Tags, Buttons */
html.theme-neocities.theme-neocities .site-chip
{
    border: 1px dotted var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-fg);
    text-decoration: none;
}
html.theme-neocities.theme-neocities .site-chip:hover { border-color: var(--theme-accent); color: var(--theme-accent-text); }
html.theme-neocities.theme-neocities .site-chip.chip-active,
html.theme-neocities.theme-neocities .site-chip[aria-pressed="true"]
{
    background: var(--theme-accent);
    color: var(--theme-accent-fg);
    border-style: solid;
    box-shadow: 0 0 10px rgb(46 230 210 / .5);
}
html.theme-neocities .site-tag { color: var(--nc-pink); }
html.theme-neocities.theme-neocities .site-button,
html.theme-neocities button[type="submit"],
html.theme-neocities input[type="submit"]
{
    background: var(--theme-accent);
    color: var(--theme-accent-fg);
    border: 2px outset #8ff7ec;
    font-family: var(--theme-font-heading);
    text-decoration: none;
    text-shadow: none;
}
html.theme-neocities.theme-neocities .site-button:hover,
html.theme-neocities button[type="submit"]:hover,
html.theme-neocities input[type="submit"]:hover
{
    background: #6ff5e6;
    color: var(--theme-accent-fg);
    box-shadow: 0 0 14px rgb(46 230 210 / .6);
}
html.theme-neocities .site-button:active { border-style: inset; }
html.theme-neocities .site-pagination a,
html.theme-neocities .site-page-current { border: 1px dotted var(--theme-border); padding: .1rem .5rem; text-decoration: none; }
html.theme-neocities .site-page-current { background: var(--theme-accent); color: var(--theme-accent-fg); border-style: solid; }
html.theme-neocities.theme-neocities .site-notice { border: 1px dashed var(--nc-gold); }
html.theme-neocities .site-prev-next { border-top: 1px dotted var(--theme-border); }

/* Listen, Tabellen */
html.theme-neocities .list-row { border-bottom: 1px dotted var(--theme-border); }
html.theme-neocities .list-year { color: var(--nc-pink); font-family: var(--theme-font-heading); }
html.theme-neocities .list-badge, html.theme-neocities .list-sub { color: var(--theme-muted); }
html.theme-neocities table { border: 1px solid var(--theme-border); }
html.theme-neocities table thead th { font-family: var(--theme-font-heading); letter-spacing: .05em; }
html.theme-neocities table th[colspan][scope="rowgroup"] { color: var(--theme-accent-text); }

/* Formulare */
html.theme-neocities input:not([type="checkbox"]):not([type="radio"]),
html.theme-neocities select,
html.theme-neocities textarea
{
    border: 1px solid var(--theme-border);
    background: #080814;
}
html.theme-neocities input:focus,
html.theme-neocities textarea:focus,
html.theme-neocities select:focus { border-color: var(--theme-accent); box-shadow: 0 0 8px rgb(46 230 210 / .45); outline: none; }
html.theme-neocities ::placeholder { color: var(--theme-muted); opacity: 1; }
html.theme-neocities :focus-visible { outline: 2px dashed var(--nc-gold); outline-offset: 2px; }

/* Cookie-Hinweis */
html.theme-neocities #cookie-banner { border: 2px double var(--theme-accent); background: var(--theme-surface); }

/* 4. Rahmen aus base.html.twig */
html.theme-neocities .nc-skip { position: absolute; left: -9999px; }
html.theme-neocities .nc-skip:focus { left: .5rem; top: .5rem; z-index: 100; background: var(--theme-surface); padding: .5rem; color: var(--theme-fg); }
html.theme-neocities .nc-page { max-width: 1040px; margin: 0 auto; padding: 1rem; }

html.theme-neocities .nc-header { text-align: center; padding: 1.25rem 0 1rem; }
html.theme-neocities .nc-logo
{
    font-family: var(--theme-font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 6vw, 2.6rem);
    color: var(--theme-accent-text);
    text-shadow: var(--nc-glow);
    text-decoration: none;
    letter-spacing: .08em;
}
html.theme-neocities a.nc-logo:visited { color: var(--theme-accent-text); }
html.theme-neocities a.nc-logo:hover { color: #fff; text-shadow: 0 0 6px #fff, 0 0 22px var(--theme-accent); }
html.theme-neocities .nc-tagline { margin: .5rem 0 0; color: var(--theme-muted); }
html.theme-neocities .nc-welcome { margin: .35rem 0 0; color: var(--nc-pink); font-family: var(--theme-font-mono); font-size: 1.3rem; }

html.theme-neocities .nc-layout { display: flex; gap: 1.25rem; align-items: flex-start; }
html.theme-neocities .nc-main
{
    flex: 1 1 auto;
    min-width: 0;
    padding: 1.1rem 1.25rem 1.5rem;
    background: rgb(8 8 20 / .86);
    border: 2px double var(--theme-border);
}
html.theme-neocities .nc-side { flex: 0 0 230px; width: 230px; }

html.theme-neocities .nc-box
{
    border: 1px dotted var(--theme-accent);
    background: rgb(13 13 29 / .92);
    margin-bottom: 1rem;
    position: relative;
}
html.theme-neocities .nc-box__title
{
    margin: 0;
    padding: .3rem .6rem;
    font-size: .8rem;
    text-transform: uppercase;
    border-bottom: 1px dotted var(--theme-accent);
    background: var(--theme-accent-soft);
    color: var(--theme-accent-text);
}
html.theme-neocities .nc-box__title::before { content: '\2726\00a0'; color: var(--nc-pink); text-shadow: none; }
html.theme-neocities .nc-box__body { padding: .6rem; }
html.theme-neocities .nc-box ul,
html.theme-neocities .nc-box dl { margin: 0; padding: .55rem .7rem; list-style: none; }
html.theme-neocities .nc-nav li { padding: .1rem 0; }
html.theme-neocities .nc-nav a { text-decoration: none; display: inline-block; }
html.theme-neocities .nc-nav a::before { content: '\25B8\00a0'; color: var(--theme-muted); }
html.theme-neocities .nc-nav a:hover::before,
html.theme-neocities .nc-nav a.is-active::before { color: var(--nc-gold); }
html.theme-neocities .nc-nav a.is-active { color: var(--theme-accent-text); text-shadow: var(--nc-glow); }
html.theme-neocities .nc-count { color: var(--theme-muted); font-size: .85em; }
html.theme-neocities .nc-status dl,
html.theme-neocities .nc-stats dl { display: grid; grid-template-columns: 1fr; gap: 0; }
html.theme-neocities .nc-status dt { color: var(--theme-muted); font-size: .85em; margin-top: .35rem; }
html.theme-neocities .nc-status dt:first-child { margin-top: 0; }
html.theme-neocities .nc-status dd { margin: 0; }
html.theme-neocities .nc-stats dl { grid-template-columns: 1fr auto; gap: .1rem .6rem; }
html.theme-neocities .nc-stats dd { margin: 0; color: var(--nc-gold); text-align: right; }
html.theme-neocities .nc-led
{
    display: inline-block;
    width: .6em; height: .6em;
    background: #5dff9c;
    box-shadow: 0 0 8px #5dff9c;
    margin-right: .2em;
}

/* Footer */
html.theme-neocities .nc-footer { margin-top: 2rem; padding-top: 1.25rem; text-align: center; border-top: 1px dotted var(--theme-border); }
html.theme-neocities .nc-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
html.theme-neocities .nc-best { color: var(--theme-muted); margin: .75rem 0 0; }
html.theme-neocities .nc-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.25rem; list-style: none; padding: 0; margin: .75rem 0; }

/* 88x31-Buttons: reines CSS, eigene Texte */
html.theme-neocities a.nc-88,
html.theme-neocities span.nc-88
{
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 31px;
    padding: 0 2px;
    border: 2px outset #9aa6c8;
    font-family: 'Silkscreen', monospace;
    font-size: 8px;
    line-height: 1.05;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: none;
    overflow: hidden;
    color: #fff;
}
html.theme-neocities a.nc-88:visited { color: #fff; }
html.theme-neocities a.nc-88:hover { filter: brightness(1.25); color: #fff; text-shadow: none; }
html.theme-neocities .nc-88--home    { background: linear-gradient(#17b9a8, #07554f); border-color: #7ff3e6; color: #fff; }
html.theme-neocities .nc-88--symfony { background: repeating-linear-gradient(135deg, #111 0 3px, #1c1c1c 3px 6px); border-color: #777; }
html.theme-neocities .nc-88--hand    { background: linear-gradient(#b0447f, #5a1942); border-color: #ffb0dc; }
html.theme-neocities .nc-88--web     { background: linear-gradient(90deg, #1a2a78, #5b2a8c); border-color: #a9b6ff; }
html.theme-neocities .nc-88--rss     { background: linear-gradient(#e08a1e, #7a3f05); border-color: #ffd08a; }
html.theme-neocities .nc-88--rss span,
html.theme-neocities .nc-88--home span { text-shadow: 1px 1px 0 rgb(0 0 0 / .6); }

/* Theme-Umschalter */
html.theme-neocities .theme-switcher { margin-top: 1rem; }
html.theme-neocities .theme-switcher__label { display: block; color: var(--theme-muted); font-family: var(--theme-font-heading); font-size: .75rem; text-transform: uppercase; margin-bottom: .4rem; }
html.theme-neocities .theme-switcher__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; list-style: none; padding: 0; margin: 0; }
html.theme-neocities .theme-switcher__item a { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .3rem; border: 1px dotted var(--theme-border); text-decoration: none; font-size: .85rem; }
html.theme-neocities .theme-switcher__item.is-current a { border: 1px solid var(--theme-accent); box-shadow: 0 0 10px rgb(46 230 210 / .45); }
html.theme-neocities .theme-switcher__preview { display: block; width: 64px; height: 40px; image-rendering: pixelated; }

/* Mobil: die Spalte rechts rutscht unter den Inhalt */
@media (max-width: 800px)
{
    html.theme-neocities .nc-layout { flex-direction: column; }
    html.theme-neocities .nc-main { width: 100%; padding: .9rem; }
    html.theme-neocities .nc-side { flex-basis: auto; width: 100%; }
    html.theme-neocities .nc-page { padding: .5rem; }
}

/* Der Seitenkopf zieht sich im Standard per negativem Rand nach oben, hier sitzt er bündig im Rahmen */
html.theme-neocities.theme-neocities .site-page-header { margin-top: 0; }
html.theme-neocities.theme-neocities .page-titlebar { border-top: 0; padding-top: .1rem; }

/* Lange Links umbrechen, breite Tabellen scrollen im Rahmen statt die Seite zu weiten */
html.theme-neocities .nc-main a { overflow-wrap: anywhere; }
@media (max-width: 800px)
{
    html.theme-neocities .nc-main table { display: block; overflow-x: auto; max-width: 100%; }
}
/* sr-only-Texte in Tabellen sind absolut positioniert und würden sonst den Scrollbereich verlassen */
html.theme-neocities .nc-main .overflow-x-auto { position: relative; }
