:root {
    color-scheme: dark;
    --bg: #0a0a0a;
    --surface: rgba(255, 255, 255, 0.03);
    --border: #2e2e2e;
    --text: #e5e5e5;
    --text-body: #cccccc;
    --muted: #a3a3a3;
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.1);
    --glow: rgba(59, 130, 246, 0.2);
    --grid-dot: rgba(255, 255, 255, 0.07);
    --grid-size: 24px;
    --radius: 8px;
    --string: #86efac;
    --indent-step: 2ch;
    --width-card: 26rem;
    --width-text: 40rem;
    --width-json: 38rem;
    --mono: 'SF Mono', 'Fira Code', 'Roboto Mono', ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 2rem 1rem;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, var(--glow), transparent),
        radial-gradient(var(--grid-dot) 1px, transparent 1px);
    background-size: auto, var(--grid-size) var(--grid-size);
    color: var(--text);
    font-family: var(--mono);
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: var(--width-card);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Startseite */

.prompt {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.prompt::after {
    content: '';
    display: inline-block;
    width: 0.55em;
    height: 1em;
    margin-left: 0.4em;
    vertical-align: text-bottom;
    background: var(--accent);
}

h1 {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.home .container {
    max-width: var(--width-json);
}

.json {
    color: var(--muted);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

/* Umbrochene Zeilen rücken zwei Stufen ein, damit sie nicht wie ein Kind-Element aussehen. */
.line {
    padding-left: calc((var(--indent, 0) + 2) * var(--indent-step));
    text-indent: calc(-2 * var(--indent-step));
}

.i1 {
    --indent: 1;
}

.i2 {
    --indent: 2;
}

.i3 {
    --indent: 3;
}

.i4 {
    --indent: 4;
}

.k {
    color: var(--accent);
}

.s {
    color: var(--string);
}

.nowrap {
    white-space: nowrap;
}

.json h1 {
    display: inline;
    font-size: inherit;
    font-weight: 600;
    letter-spacing: normal;
    line-height: inherit;
}

.json a {
    border-radius: 2px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.json a:hover {
    background: var(--accent-soft);
}

@media (max-width: 480px) {
    .home .container {
        padding: 1.25rem 1rem;
    }

    .json {
        font-size: 0.8rem;
    }
}

.footer {
    color: var(--muted);
    font-size: 0.8rem;
}

.footer a {
    color: var(--muted);
}

.footer a:hover {
    color: var(--text);
}

.separator {
    margin: 0 5px;
    color: var(--border);
}

/* Impressum, Datenschutz */

.page-text {
    justify-content: flex-start;
}

.page-text .container {
    max-width: var(--width-text);
}

.page-text h1 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.5rem;
}

.page-text h2 {
    margin: 1.5rem 0 0.5rem;
    color: var(--accent);
    font-size: 1.1rem;
    line-height: 1.3;
}

.page-text h3 {
    margin: 1.25rem 0 0.5rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.3;
}

.page-text p,
.page-text li {
    margin: 0 0 0.5rem;
    color: var(--text-body);
    font-size: 0.9rem;
    overflow-wrap: break-word;
}

.page-text ul {
    padding-left: 1.2rem;
}

.notice {
    margin: 1.5rem 0;
    padding: 0.25rem 1rem 0.5rem;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
}

/* 404 */

.page-error {
    text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
    .prompt::after {
        animation: blink 1.2s steps(2, jump-none) infinite;
    }
}

@keyframes blink {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}
