/* Link-Seite von LightningKid im Holo-Stil des CZ-Trackers: Glasflächen mit dünnen hellblauen Linien und
   Eckwinkeln über dem Korridor aus Pyro. Beim Darüberfahren wird ein Link zum flackernden Hologramm mit Rasterzeilen. */

:root {
    --line: rgb(150 205 230 / .26);
    --line-strong: rgb(150 205 230 / .55);
    --glass: rgb(6 14 20 / .62);
    --text: #d6e9f3;
    --dim: #7f9aa8;
    --cyan: #7fd4f5;
    --signal: #d4572a;
    --twitch: #a970ff;

    --display: "Big Shoulders Text", "Bahnschrift", "Segoe UI", sans-serif;
    --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }

body {
    min-height: 100dvh; color: var(--text); background: #05090c;
    font-family: var(--body); font-size: 16px; line-height: 1.45;
}
/* Hintergrund: Lazarus-Komplex bei Nacht (eigener Screenshot aus Squadron 42), abgedunkelt.
   Oben etwas heller, damit der blaue Himmel hinter dem Zeichen durchkommt. */
body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 35%, rgb(4 8 12 / .35), rgb(4 8 12 / .8) 75%),
        linear-gradient(rgb(4 8 12 / .2), rgb(4 8 12 / .7)),
        url("/img/hintergrund.jpg") 50% 50% / cover no-repeat #05090c;
    background:
        radial-gradient(ellipse at 50% 35%, rgb(4 8 12 / .35), rgb(4 8 12 / .8) 75%),
        linear-gradient(rgb(4 8 12 / .2), rgb(4 8 12 / .7)),
        image-set(url("/img/hintergrund.webp") type("image/webp"), url("/img/hintergrund.jpg") type("image/jpeg")) 50% 50% / cover no-repeat #05090c;
}

.wrap {
    max-width: 520px; margin: 0 auto;
    padding: max(36px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* ---------- Kopf: Zeichen als Hologramm ---------- */

.id { text-align: center; margin-bottom: 26px; }
.emblem {
    position: relative; width: 144px; height: 144px; margin: 0 auto 14px; padding: 6px;
    border: 1px solid var(--line-strong); border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, rgb(127 212 245 / .18), rgb(6 14 20 / .7) 70%);
    box-shadow: 0 0 0 4px rgb(127 212 245 / .06), 0 0 30px -6px rgb(127 212 245 / .55), inset 0 0 24px -8px rgb(127 212 245 / .6);
    overflow: hidden;
    animation: flicker 5s steps(1) infinite;
}
.emblem img {
    display: block; width: 100%; height: 100%; border-radius: 50%;
    opacity: .85; /* etwas durchsichtig, damit es mehr nach Hologramm aussieht */
    filter: drop-shadow(0 0 4px rgb(127 212 245 / .7)) drop-shadow(0 0 12px rgb(127 212 245 / .35));
}
/* Rasterzeilen und ein blauer Schimmer über dem Bild */
.emblem::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 50%;
    background:
        repeating-linear-gradient(180deg, rgb(190 240 255 / .2) 0 1px, transparent 1px 3px),
        radial-gradient(circle at 50% 40%, transparent 45%, rgb(127 212 245 / .22) 100%);
    mix-blend-mode: screen; animation: scan 1.6s linear infinite;
}

h1 {
    margin: 0; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1;
    letter-spacing: .08em; text-transform: uppercase; color: #e6f7ff;
    text-shadow: 0 0 10px rgb(127 212 245 / .55), 0 0 26px rgb(127 212 245 / .25);
}
.tag { margin: 8px 0 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* ---------- Glasfläche mit Eckwinkeln ---------- */

.panel {
    position: relative; margin-bottom: 18px; padding: 14px 14px 14px;
    background: var(--glass); border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.panel::before, .panel::after {
    content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid var(--cyan); pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.panel h2 {
    margin: 0 0 12px 2px; font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.1;
    letter-spacing: .18em; text-transform: uppercase; color: var(--cyan);
}

/* ---------- Links ---------- */

.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.link {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 12px 8px 8px;
    border: 1px solid var(--line); color: var(--text); text-decoration: none;
    transition: border-color .12s, background-color .2s, box-shadow .2s;
    touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.ico {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px;
    border: 1px solid var(--line); color: var(--cyan); transition: border-color .12s, box-shadow .2s;
}
.ico svg { width: 22px; height: 22px; fill: currentColor; transition: filter .2s; }
.txt { flex: 1; min-width: 0; display: grid; }
.txt strong { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.1; letter-spacing: .05em; text-transform: uppercase; }
.txt small { font-size: 13px; color: var(--dim); overflow-wrap: anywhere; }
.go { flex: none; font-size: 24px; line-height: 1; color: var(--line-strong); transition: transform .15s, color .12s; }

/* Rasterzeilen: liegen unsichtbar bereit und erscheinen beim Darüberfahren */
.link::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .15s;
    background: repeating-linear-gradient(180deg, rgb(190 240 255 / .09) 0 1px, transparent 1px 3px);
    mix-blend-mode: screen;
}

/* Twitch ist der Hauptkanal: violetter Streifen links */
.link.twitch { border-color: rgb(169 112 255 / .45); box-shadow: inset 3px 0 0 var(--twitch); }
.link.twitch .ico { color: #c9a6ff; border-color: rgb(169 112 255 / .45); }

/* Profilbild und RDOC-Ring als Symbol, hellblau wie die anderen.
   Das Profilbild wird wie die Boards im CZ-Tracker zum Hologramm eingefärbt. */
.ico.pic img {
    display: block; width: 34px; height: 34px;
    filter: grayscale(1) sepia(1) hue-rotate(150deg) saturate(2.4) brightness(1.05) contrast(1.2);
    opacity: .9; transition: filter .2s, opacity .2s;
}
.ico.rdoc svg { width: 26px; height: 26px; }
@media (hover: hover) and (pointer: fine) {
    .link:hover .ico.pic img {
        opacity: 1;
        filter: grayscale(1) sepia(1) hue-rotate(150deg) saturate(2.4) brightness(1.25) contrast(1.25)
                drop-shadow(0 0 3px rgb(127 212 245 / .9)) drop-shadow(0 0 8px rgb(127 212 245 / .4));
    }
}

/* Referral-Code: eigener Block ganz oben, mit Eckwinkeln wie eine Glasfläche und orangem Streifen */
.link.referral {
    margin-bottom: 18px; background: var(--glass); border-color: rgb(240 138 60 / .5);
    box-shadow: inset 3px 0 0 #f08a3c;
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.link.referral .ico { color: #ffb37a; border-color: rgb(240 138 60 / .5); }
.link.referral code {
    font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .08em; color: #ffcf9e;
    white-space: nowrap; /* Code nie in der Mitte umbrechen */
}
.link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Hologramm: beim Darüberfahren und beim Antippen */
.link:active,
.link:focus-visible { border-color: var(--cyan); background: rgb(127 212 245 / .1); }
@media (hover: hover) and (pointer: fine) {
    .link:hover {
        border-color: var(--cyan); background: rgb(127 212 245 / .1);
        box-shadow: 0 0 0 1px rgb(127 212 245 / .25), 0 0 22px -6px rgb(127 212 245 / .6), inset 0 0 26px -12px rgb(127 212 245 / .7);
        animation: flicker 2.4s steps(1) infinite;
    }
    .link:hover::after { opacity: 1; animation: scan 1.6s linear infinite; }
    .link:hover .ico { border-color: var(--line-strong); color: #bff0ff; box-shadow: inset 0 0 12px -4px rgb(127 212 245 / .8); }
    .link:hover .ico svg { filter: drop-shadow(0 0 3px rgb(127 212 245 / .9)) drop-shadow(0 0 8px rgb(127 212 245 / .4)); }
    .link:hover strong { color: #e6f7ff; text-shadow: 0 0 8px rgb(127 212 245 / .6); }
    .link:hover .go { color: var(--cyan); transform: translateX(3px); }

    .link.referral:hover { box-shadow: inset 3px 0 0 #f08a3c, 0 0 0 1px rgb(127 212 245 / .25), 0 0 22px -6px rgb(127 212 245 / .6), inset 0 0 26px -12px rgb(127 212 245 / .7); }
    .link.twitch:hover { box-shadow: inset 3px 0 0 var(--twitch), 0 0 0 1px rgb(127 212 245 / .25), 0 0 22px -6px rgb(127 212 245 / .6), inset 0 0 26px -12px rgb(127 212 245 / .7); }
}
.link:active::after { opacity: 1; }

@keyframes scan { to { background-position: 0 6px; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 50% { opacity: .78; } 53% { opacity: 1; } }

/* ---------- Fuß ---------- */

.foot { margin-top: 26px; text-align: center; font-size: 12px; color: var(--dim); }
.foot p { margin: 4px 0; }
.foot a { color: var(--dim); text-underline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--cyan); } }

@media (max-width: 400px) {
    h1 { font-size: 36px; }
    .panel { padding: 12px 10px; }
    .txt strong { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    .emblem, .emblem::after, .link:hover, .link:hover::after { animation: none !important; }
    .link, .go { transition: none; }
}
