/* evry.de – gemeinsamer Arcade-Stil (80er-Automat) fuer alle Seiten */

/* Schrift "Press Start 2P" liegt lokal auf evry.de (SIL Open Font License, siehe fonts/OFL.txt) –
   keine Verbindung zu Google Fonts, keine Weitergabe der Besucher-IP */
@font-face {
    font-family: "Press Start 2P";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Press Start 2P";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/press-start-2p-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --bg: #07020f;
    --pink: #ff2e88;
    --cyan: #19f0ff;
    --yellow: #ffe23d;
    --green: #39ff6a;
    --text: #f4ecff;
    --muted: #8a7bb0;
    --soft: #a99bd0;
    --pixel: "Press Start 2P", ui-monospace, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    /* Abstand zu Notch/Dynamic Island und Home-Leiste auf dem iPhone */
    padding:
        calc(32px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right))
        calc(40px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    align-items: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 46, 136, 0.18), transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(25, 240, 255, 0.14), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--pixel);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Roehrenmonitor: Scanlines + Vignette ueber allem */
body::before, body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}
body::before {
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0 2px, transparent 2px 4px);
}
body::after {
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.65));
    animation: flicker 4s infinite;
}
@keyframes flicker {
    0%, 100% { opacity: 1; }
    48% { opacity: 0.94; }
    50% { opacity: 0.85; }
    52% { opacity: 0.96; }
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Kopf ---------- */

.hud {
    width: min(720px, 100%);
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 0.08em;
}
.hud .p1 { color: var(--pink); }
.hud .hi { color: var(--cyan); text-align: center; }
.hud .credit { color: var(--yellow); text-align: right; }
.hud span { display: block; color: var(--text); margin-top: 6px; }

header.title {
    margin: 44px 0 36px;
    text-align: center;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 8vw, 56px);
    line-height: 1.2;
    font-weight: normal;
    color: var(--yellow);
    letter-spacing: 0.04em;
    text-shadow:
        3px 3px 0 var(--pink),
        6px 6px 0 #5b1aa8,
        0 0 24px rgba(255, 226, 61, 0.45);
}

.tagline {
    margin: 22px 0 0;
    font-size: 10px;
    color: var(--cyan);
    letter-spacing: 0.3em;
}

/* ---------- Rahmen ---------- */

.panel {
    width: min(720px, 100%);
    border: 4px solid var(--cyan);
    box-shadow: 0 0 0 4px var(--bg), 0 0 0 8px var(--pink), 0 0 40px rgba(25, 240, 255, 0.25);
    padding: 26px 22px;
    background: rgba(7, 2, 15, 0.85);
}
.panel + .panel { margin-top: 36px; }

.panel h2 {
    margin: 0 0 22px;
    font-size: 12px;
    font-weight: normal;
    color: var(--green);
    letter-spacing: 0.2em;
    text-align: center;
}

.panel h3 {
    margin: 26px 0 10px;
    font-size: 10px;
    font-weight: normal;
    color: var(--yellow);
    letter-spacing: 0.15em;
}
.panel h3:first-of-type { margin-top: 0; }

/* Fliesstext in Pixel-Schrift: klein, aber mit viel Zeilenabstand gut lesbar */
.prose p, .prose address, .prose li {
    margin: 0 0 14px;
    font-size: 10px;
    line-height: 2.1;
    font-style: normal;
    color: var(--soft);
}
.prose ul { margin: 0 0 14px; padding-left: 18px; }

a.link, .prose a {
    color: var(--cyan);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    overflow-wrap: anywhere;
}
a.link:hover, a.link:focus-visible, .prose a:hover, .prose a:focus-visible {
    color: var(--yellow);
    border-bottom-color: var(--pink);
    outline: none;
}

/* ---------- Menue wie am Automaten ---------- */

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.menu a {
    display: grid;
    grid-template-columns: 28px 44px 1fr;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    color: var(--text);
    text-decoration: none;
    border: 2px dashed transparent;
    outline: none;
}
.menu .cursor {
    color: var(--yellow);
    visibility: hidden;
    animation: blink 0.6s steps(1) infinite;
}
.menu .rank { color: var(--muted); font-size: 12px; }
.menu .name {
    display: block;
    font-size: 14px;
    color: var(--cyan);
    hyphens: auto;
    -webkit-hyphens: auto;
}
.menu .desc {
    display: block;
    margin-top: 8px;
    font-size: 9px;
    color: var(--muted);
    line-height: 1.8;
}
.menu a:hover, .menu a:focus-visible, .menu a.active {
    border-color: var(--pink);
    background: rgba(255, 46, 136, 0.1);
}
.menu a:hover .cursor, .menu a:focus-visible .cursor, .menu a.active .cursor { visibility: visible; }
.menu a:hover .name, .menu a:focus-visible .name, .menu a.active .name { color: var(--yellow); }

.hint {
    margin: 24px 0 0;
    font-size: 9px;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.15em;
}

/* ---------- Zurueck-Knopf unter dem Rahmen ---------- */

.back {
    width: min(720px, 100%);
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    font-size: 10px;
    letter-spacing: 0.12em;
}
.back a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 12px 16px;
    border: 3px solid var(--cyan);
    background: rgba(25, 240, 255, 0.08);
    color: var(--cyan);
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--pink);
    transition: transform 0.08s, box-shadow 0.08s, background 0.2s, color 0.2s;
}
.back a:hover, .back a:focus-visible {
    background: var(--cyan);
    color: var(--bg);
    outline: none;
}
.back a:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 var(--pink);
}

/* ---------- Fuss ---------- */

footer {
    margin-top: 40px;
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 0.2em;
    text-align: center;
    line-height: 2.4;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover, footer a:focus-visible { color: var(--cyan); outline: none; }

/* ---------- iPhone & Co. im Hochformat ---------- */

@media (max-width: 480px) {
    body { padding-top: calc(20px + env(safe-area-inset-top)); }
    .hud { font-size: 9px; }
    header.title { margin: 34px 0 30px; }
    .tagline { font-size: 9px; letter-spacing: 0.2em; }
    .panel {
        padding: 20px 12px;
        border-width: 3px;
        box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--pink), 0 0 30px rgba(25, 240, 255, 0.25);
    }
    .panel h2 { font-size: 11px; margin-bottom: 16px; }
    .menu a {
        grid-template-columns: 16px 30px 1fr;
        align-items: start;
        gap: 8px;
        min-height: 64px;
        padding: 16px 8px;
    }
    .menu .cursor, .menu .rank { line-height: 1.5; }
    .menu .rank { font-size: 10px; }
    .menu .name { font-size: 12px; line-height: 1.5; }
    .menu .desc { font-size: 10px; line-height: 1.9; color: var(--soft); }
}

@media (max-width: 360px) {
    .menu a { grid-template-columns: 14px 24px 1fr; gap: 6px; padding: 14px 4px; }
    .menu .name { font-size: 10px; }
    .menu .desc { font-size: 9px; }
    .prose p, .prose address, .prose li { font-size: 9px; }
}

/* Touch: kein Hover – beim Antippen kurz aufleuchten, Tastatur-Hinweis ausblenden */
@media (hover: none) {
    .menu a.active { border-color: transparent; background: none; }
    .menu a.active .cursor { visibility: hidden; }
    .menu a.active .name { color: var(--cyan); }
    .menu a:active { border-color: var(--pink); background: rgba(255, 46, 136, 0.18); }
    .menu a:active .cursor { visibility: visible; }
    .menu a:active .name { color: var(--yellow); }
    .hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    body::after, .menu .cursor { animation: none; }
}
