/* --------------------------------------------------
   Terminal / CRT style
   -------------------------------------------------- */

:root {
    --bg: #000000;
    --fg: #39ff14;                 /* giftiges Neon-Grün */
    --glow:
        0 0 5px  rgba(57, 255, 20, 1),
        0 0 15px rgba(57, 255, 20, 0.9),
        0 0 35px rgba(57, 255, 20, 0.7),
        0 0 70px rgba(57, 255, 20, 0.45);
    --font: "Courier New", Courier, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100vh;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-weight: 700;
    font-size: 21.5px;
    line-height: 1.5;
    text-shadow: var(--glow);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* "l8p" in der oberen rechten Ecke */
.corner {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.875rem;
    z-index: 4;
}

/* Audio-Toggle in der oberen linken Ecke */
.audio-toggle {
    position: fixed;
    top: 1.75rem;
    left: 2rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    color: #39ff14;
    cursor: pointer;
    padding: 0;
    filter: drop-shadow(0 0 4px rgba(57,255,20,0.95)) drop-shadow(0 0 12px rgba(57,255,20,0.75)) drop-shadow(0 0 26px rgba(57,255,20,0.55));
    transition: opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.audio-toggle:hover,
.audio-toggle:focus,
.audio-toggle:focus-visible,
.audio-toggle:active {
    opacity: 1;
    outline: none;
    box-shadow: none;
}

/* --------------------------------------------------
   Hauptseite — zentrierter Textblock
   -------------------------------------------------- */

.terminal {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 4;
    padding: 1rem;
    pointer-events: none;
}

.terminal-content {
    text-align: center;
    pointer-events: all;
}

.terminal-content p {
    white-space: nowrap;
}

/* Link "Flora Chroma" */
.link {
    color: inherit;
    font-style: italic;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.15s ease;
}

.link:hover,
.link:focus-visible {
    opacity: 0.7;
    outline: none;
}

/* --------------------------------------------------
   Impressum — fließende Inhalte
   -------------------------------------------------- */

.content {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 6rem 1.5rem 3rem;
    position: relative;
    z-index: 4;
}

.content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.content h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    text-transform: lowercase;
}

.content h2::before {
    content: "> ";
    opacity: 0.7;
}

.content section {
    margin-bottom: 0.5rem;
}

.content p,
.content address {
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.content a:hover,
.content a:focus-visible {
    opacity: 0.7;
    outline: none;
}

/* --------------------------------------------------
   Footer — Impressum / Zurück
   -------------------------------------------------- */

.bottom {
    padding: 1.5rem 1rem 2rem;
    text-align: center;
    position: relative;
    z-index: 4;
    font-size: 0.7rem;
    font-weight: 400;
    text-shadow: 0 0 4px rgba(57, 255, 20, 0.3);
}

.bottom a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.bottom a:hover,
.bottom a:focus-visible {
    opacity: 0.85;
    outline: none;
}

/* --------------------------------------------------
   CRT-Effekt: animierte Scanlines, Rolling-Bar,
   Vignette und Flicker
   -------------------------------------------------- */

/* Feine, leicht driftende Scanlines */
body::before {
    content: "";
    position: fixed;
    inset: -4px 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0)      0px,
        rgba(0, 0, 0, 0)      2px,
        rgba(0, 0, 0, 0.28)   3px,
        rgba(0, 0, 0, 0.28)   3px
    );
    mix-blend-mode: multiply;
    z-index: 3;
    animation: scanline-drift 6s linear infinite;
    will-change: transform;
}

@keyframes scanline-drift {
    from { transform: translateY(0);   }
    to   { transform: translateY(3px); }
}

/* Rolling-Bar — die horizontale Welle */
html::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    height: 50%;
    top: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(57, 255, 20, 0)     0%,
        rgba(57, 255, 20, 0.06)  30%,
        rgba(57, 255, 20, 0.18)  50%,
        rgba(57, 255, 20, 0.06)  70%,
        rgba(57, 255, 20, 0)     100%
    );
    z-index: 2;
    animation: rolling-bar 8s linear infinite;
    will-change: transform;
}

@keyframes rolling-bar {
    from { transform: translateY(120vh); }
    to   { transform: translateY(-100%); }
}

/* Vignette + Phosphor-Schimmer + Flicker */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        rgba(57, 255, 20, 0.05) 0%,
        rgba(0, 0, 0, 0)        55%,
        rgba(0, 0, 0, 0.50)     100%
    );
    z-index: 1;
    animation: flicker 4.5s infinite steps(1);
}

@keyframes flicker {
    0%, 100% { opacity: 1;    }
    47%      { opacity: 1;    }
    48%      { opacity: 0.85; }
    49%      { opacity: 1;    }
    72%      { opacity: 1;    }
    73%      { opacity: 0.92; }
    74%      { opacity: 1;    }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after,
    html::before {
        animation: none;
    }
}

/* --------------------------------------------------
   Mobile
   -------------------------------------------------- */

@media (max-width: 480px) {
    body {
        font-size: 15.5px;
    }
    .corner {
        font-size: 1.9375rem;
        top: 1rem;
        right: 1.25rem;
    }
    .audio-toggle {
        font-size: 1.1875rem;
        top: 1.15rem;
        left: 1.25rem;
    }
    .terminal-content p {
        white-space: normal;
    }
    .content {
        padding: 5rem 1.25rem 2rem;
    }
    .content h1 {
        font-size: 1.4rem;
    }
}
