:root {
    --bg: #080b18;
    --card: rgba(18, 25, 52, 0.72);
    --card-strong: rgba(25, 34, 69, 0.96);
    --text: #f6f7ff;
    --muted: #aab2d0;
    --primary: #8b5cf6;
    --secondary: #22d3ee;
    --border: rgba(255, 255, 255, 0.14);
    --focus: #facc15;
    color-scheme: dark light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font:
        16px/1.5 Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        "Segoe UI",
        sans-serif;
    background: var(--bg);
    overflow-x: hidden;
}

body:before,
body:after {
    content: "";
    position: fixed;
    z-index: -1;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    filter: blur(85px);
    opacity: 0.28;
    animation: float 15s ease-in-out infinite alternate;
}

body:before {
    background: var(--primary);
    top: -12rem;
    left: -12rem;
}

body:after {
    background: var(--secondary);
    right: -13rem;
    bottom: -12rem;
    animation-delay: -5s;
}

.wrap {
    width: min(780px, calc(100% - 32px));
    margin: auto;
    padding: 36px 0 30px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -100px;
    padding: 10px 14px;
    border-radius: 9px;
    background: #fff;
    color: #111;
    z-index: 5;
}

.skip-link:focus {
    top: 12px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.top-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.home-link,
.theme-toggle,
.share-button,
.install-button {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff0a;
    cursor: pointer;
    font: inherit;
}

.home-link {
    border: 0;
}

.home-link:hover,
.theme-toggle:hover,
.share-button:hover,
.install-button:hover {
    color: var(--text);
    background: #ffffff17;
}

.theme-toggle:focus-visible,
.share-button:focus-visible,
.install-button:focus-visible,
.home-link:focus-visible,
.filter:focus-visible,
.link:focus-visible,
.favorite:focus-visible,
.quick-links a:focus-visible,
.clear:focus-visible,
.dialog-close:focus-visible,
.dialog-action:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.profile {
    text-align: center;
    animation: rise 0.7s ease both;
}

.avatar {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: auto;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 0 45px #7c3aed88;
    font-size: 29px;
    font-weight: 900;
}

.eyebrow {
    margin: 0 0 8px;
    color: #c8c0ff;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    font-weight: 700;
}

.profile h1 {
    margin: 18px 0 3px;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    letter-spacing: -0.04em;
}

.profile>p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
}

.badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0 28px;
}

.badge {
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: #ffffff0b;
    color: #dce1fa;
    font-size: 0.82rem;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 11px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 24px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff09;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 13px #4ade80;
    animation: pulse 2s ease-in-out infinite;
}

.status-card strong,
.status-card small {
    display: block;
}

.status-card small {
    color: var(--muted);
    font-size: 0.75rem;
}

.status-card time {
    margin-left: 8px;
    color: var(--muted);
    font-size: 0.75rem;
}

.start {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 30px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(120deg, #8b5cf622, #22d3ee10, var(--card));
    backdrop-filter: blur(16px);
}

.start h2 {
    margin: 0 0 5px;
    font-size: 1.3rem;
}

.start p {
    margin: 0;
    color: var(--muted);
}

.quick-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.quick-links a {
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    text-decoration: none;
    background: #ffffff0a;
    font-size: 0.9rem;
}

.quick-links a:hover {
    background: #ffffff17;
}

.toolbar {
    position: sticky;
    top: 12px;
    z-index: 2;
    padding: 12px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(8, 11, 24, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px #0003;
}

.search-wrap {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.search {
    width: 100%;
    padding: 13px 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: 0;
    color: var(--text);
    background: #ffffff0a;
    font: inherit;
}

.search::placeholder {
    color: #8992b2;
}

.search:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px #facc1533;
}

.clear {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    border: 0;
    border-radius: 8px;
    padding: 5px 9px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 1.05rem;
}

.clear:hover {
    color: var(--text);
    background: #ffffff12;
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 11px;
}

.filter {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--muted);
    background: #ffffff08;
    cursor: pointer;
    font: inherit;
}

.filter:hover,
.filter[aria-pressed="true"] {
    border-color: #a996ff;
    color: #fff;
    background: #8b5cf633;
}

.count {
    display: inline-grid;
    place-items: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-left: 3px;
    padding: 0 4px;
    border-radius: 99px;
    color: var(--text);
    background: #ffffff16;
    font-size: 0.72rem;
}

section {
    margin: 26px 0;
}

.label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: #dce1fa;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.label:after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border);
}

.links {
    display: grid;
    gap: 12px;
}

.link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 17px 14px 17px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--text);
    text-decoration: none;
    background: var(--card);
    backdrop-filter: blur(16px);
    transition:
        0.25s transform,
        0.25s border-color,
        0.25s box-shadow;
    animation: rise 0.7s ease both;
}

.link:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: #9b8afb99;
    box-shadow: 0 12px 35px #0005;
}

.link[hidden],
section[hidden] {
    display: none;
}

.icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: #ffffff10;
    font-size: 1.25rem;
}

.link strong {
    display: block;
}

.link small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
}

.arrow {
    color: #b9c1df;
    font-size: 1.25rem;
    transition: 0.2s;
}

.link:hover .arrow {
    transform: translateX(4px);
    color: #fff;
}

.featured {
    border-color: #8b5cf677;
    background: linear-gradient(105deg, #8b5cf622, #22d3ee12, var(--card));
}

.favorite {
    margin-left: auto;
    border: 0;
    padding: 6px;
    color: #cbd2ee;
    background: transparent;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}

.favorite.active {
    color: #facc15;
}

.empty {
    display: none;
    padding: 24px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.empty.show {
    display: block;
}

.favorites {
    margin-top: 0;
}

.favorites .link {
    animation: none;
}

.favorites .links:empty:after {
    content: "Noch keine Favoriten gespeichert.";
    display: block;
    color: var(--muted);
}

footer {
    text-align: center;
    margin-top: 35px;
    color: var(--muted);
    font-size: 0.82rem;
}

footer a {
    color: #c8c0ff;
    text-decoration: none;
}

.hint {
    margin: 10px 2px 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 10;
    transform: translate(-50%, 20px);
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-strong);
    box-shadow: 0 10px 30px #0005;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
}

.reveal.show {
    opacity: 1;
    transform: none;
    transition: 0.7s ease;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

dialog {
    color: var(--text);
}

.qr-dialog {
    width: min(360px, calc(100% - 32px));
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--card-strong);
    box-shadow: 0 20px 70px #0008;
}

.qr-dialog::backdrop {
    background: #02030a99;
    backdrop-filter: blur(4px);
}

.dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dialog-head h2 {
    margin: 0;
}

.dialog-close {
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
}

.qr-dialog p {
    color: var(--muted);
}

.qr-code {
    display: grid;
    place-items: center;
    min-height: 220px;
    margin: 18px 0;
    padding: 15px;
    border-radius: 14px;
    background: #fff;
}

.qr-code img {
    display: block;
    width: 220px;
    height: 220px;
}

.dialog-action {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: #ffffff0b;
    cursor: pointer;
    font: inherit;
}

.legal {
    max-width: 760px;
    margin: 30px auto;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--card);
    backdrop-filter: blur(16px);
}

.legal h2 {
    margin-top: 0;
}

.legal h3 {
    margin-top: 24px;
}

.legal p {
    color: var(--muted);
}

.legal a,
.back {
    color: #c8c0ff;
}

.back {
    display: inline-block;
    margin-top: 16px;
    text-decoration: none;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes float {
    to {
        transform: translate(50px, 35px) scale(1.12);
    }
}

@keyframes pulse {
    50% {
        opacity: 0.45;
        transform: scale(0.75);
    }
}

html[data-theme="light"] {
    --bg: #eef2ff;
    --card: rgba(255, 255, 255, 0.74);
    --card-strong: rgba(255, 255, 255, 0.96);
    --text: #17203c;
    --muted: #5e6886;
    --border: rgba(30, 41, 80, 0.16);
    --focus: #b45309;
}

html[data-theme="light"] body:before,
html[data-theme="light"] body:after {
    opacity: 0.16;
}

html[data-theme="light"] .toolbar {
    background: rgba(238, 242, 255, 0.86);
}

html[data-theme="light"] .search {
    background: #ffffff99;
}

html[data-theme="light"] .search::placeholder {
    color: #68728d;
}

@media (max-width: 650px) {
    .start {
        display: block;
    }

    .quick-links {
        justify-content: flex-start;
        margin-top: 17px;
    }
}

@media (max-width: 520px) {
    .wrap {
        width: min(100% - 22px, 780px);
        padding-top: 22px;
    }

    .topbar {
        align-items: flex-start;
    }

    .top-actions {
        max-width: 220px;
    }

    .status-card {
        width: 100%;
        border-radius: 16px;
    }

    .status-card time {
        margin-left: auto;
    }

    .link {
        padding: 15px 11px 15px 15px;
    }

    .toolbar {
        top: 8px;
    }
}

.qr-link {
    border: 0;
    padding: 6px;
    color: #b9c1df;
    background: transparent;
    cursor: pointer;
    font-size: 1.12rem;
    line-height: 1;
    transition: .2s
}

.qr-link:hover {
    color: #22d3ee;
    transform: scale(1.12)
}

.qr-link:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px
}

.favorite {
    margin-left: auto
}

.favorite+.qr-link {
    margin-left: 0
}

.arrow {
    margin-left: 0
}

.qr-dialog {
    width: min(360px, calc(100% - 32px));
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--card-strong);
    box-shadow: 0 20px 70px #0008
}

.qr-dialog::backdrop {
    background: #02030a99;
    backdrop-filter: blur(4px)
}

.dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.dialog-head h2 {
    margin: 0;
    font-size: 1.2rem
}

.dialog-close {
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer
}

.qr-dialog p {
    color: var(--muted)
}

.qr-code {
    display: grid;
    place-items: center;
    min-height: 290px;
    margin: 18px 0;
    padding: 15px;
    border-radius: 14px;
    background: #fff
}

.qr-code img {
    display: block;
    width: 260px;
    height: 260px
}

.dialog-action {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: #ffffff0b;
    cursor: pointer;
    font: inherit
}

.dialog-action:hover {
    background: #ffffff17
}

@media(max-width:520px) {
    .qr-link {
        padding: 6px 4px
    }

    .favorite {
        padding: 6px 4px
    }

    .link {
        gap: 9px
    }

    .qr-code img {
        width: 220px;
        height: 220px
    }

    .qr-code {
        min-height: 250px
    }
}