/* LinkKit – Profilseite. Farben/Radius/Schrift kommen als CSS-Variablen aus dem Template. */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    color: var(--text);
    min-height: 100dvh;
}

/* Hintergrund als feste Ebene (mobil zuverlässiger als background-attachment) */
.bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: var(--bg);
}

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, .45);
}

.page {
    max-width: 680px;
    margin: 0 auto;
    padding: 56px 20px 64px;
    position: relative;
}

/* ------------------------------------------------------------- Profilkopf */

.profile {
    text-align: center;
    animation: rise .5s ease backwards;
}

.logo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
}

.logo-link {
    display: inline-block;
    line-height: 0;
    transition: transform .15s ease;
}

.logo-link:hover { transform: scale(1.05); }

.logo-round   { border-radius: 50%; }
.logo-rounded { border-radius: 22px; }
.logo-square  { border-radius: 0; }

.logo-placeholder {
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
    font-size: 42px;
    font-weight: 700;
    line-height: 96px;
    text-align: center;
}

/* Logo ohne Schatten/Backdrop (Klasse am <body>) */
.logo-flat .logo { box-shadow: none; }
.logo-flat .logo-placeholder { backdrop-filter: none; -webkit-backdrop-filter: none; }

.profile h1 {
    margin: 18px 0 0;
    font-size: var(--fs-title, 24px);
    font-weight: 700;
    letter-spacing: .01em;
}

.bio {
    margin: 10px auto 0;
    max-width: 480px;
    font-size: var(--fs-text, 16px);
    font-weight: var(--fw-text, 400);
    line-height: 1.5;
    opacity: .92;
    white-space: pre-line;
}

/* ------------------------------------------------------------------ Links */

.links {
    margin-top: 32px;
}

.link-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 15px 56px;
    margin-bottom: 14px;
    text-decoration: none;
    text-align: center;
    font-size: var(--fs-btn, 16px);
    font-weight: var(--fw-btn, 600);
    line-height: 1.3;
    border-radius: var(--radius);
    box-shadow: var(--btn-shadow);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
    animation: rise .5s ease backwards;
    word-break: break-word;
}

.link-btn:active { transform: scale(.98); }

.btn-caps .link-btn {
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Hover-Effekte (Klasse am <body>) */
.hover-lift .link-btn:hover { transform: translateY(-3px) scale(1.01); }
.hover-grow .link-btn:hover { transform: scale(1.045); }
.hover-invert.btn-solid .link-btn:hover { background: var(--btn-text); color: var(--btn-bg); }
.hover-invert.btn-outline .link-btn:hover { background: var(--btn-bg); color: var(--btn-text); }
.hover-invert.btn-glass .link-btn:hover { background: rgba(255, 255, 255, .88); color: #16232e; }

/* Button-Varianten (Klasse am <body>) */
.btn-solid .link-btn {
    background: var(--btn-bg);
    color: var(--btn-text);
}

.btn-outline .link-btn {
    background: transparent;
    color: var(--text);
    border: var(--btn-border, 2px) solid var(--btn-bg);
}

.btn-glass .link-btn {
    background: rgba(255, 255, 255, .14);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hover-lift.btn-glass .link-btn:hover,
.hover-grow.btn-glass .link-btn:hover { background: rgba(255, 255, 255, .22); }

.link-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--icon-size, 24px) + 8px);
    height: calc(var(--icon-size, 24px) + 8px);
}

.link-emoji { font-size: var(--icon-size, 24px); line-height: 1; }

.link-svg {
    width: var(--icon-size, 24px);
    height: var(--icon-size, 24px);
}

.link-img {
    width: calc(var(--icon-size, 24px) + 6px);
    height: calc(var(--icon-size, 24px) + 6px);
    object-fit: cover;
    border-radius: 8px;
}

/* ----------------------------------------------------------- Social-Icons */

.socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    margin-top: 28px;
    animation: rise .5s ease backwards;
}

.socials a {
    color: var(--socials, var(--text));
    display: flex;
    transition: transform .15s ease, opacity .15s ease;
    opacity: .95;
}

.socials a:hover {
    transform: scale(1.15);
    opacity: 1;
}

.social-icon {
    width: var(--social-size, 26px);
    height: var(--social-size, 26px);
}

/* ------------------------------------------------------- Teilen-Button */

.share {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    background: rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .15s ease, background-color .15s ease;
}

.share:hover { transform: scale(1.08); }
.share svg   { width: 19px; height: 19px; }

/* Vorschau-Zustände: per Klasse zuschaltbar */
.no-share .share { display: none; }
.no-overlay .bg-overlay { display: none; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 80px);
    background: rgba(20, 20, 25, .92);
    color: #fff;
    font-family: var(--font);
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 999px;
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    pointer-events: none;
}

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

/* ------------------------------------------ Layout (große Bildschirme) */

@media (min-width: 900px) {
    .layout-center {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100dvh;
    }

    .layout-center .page {
        width: 100%;
        padding-top: 40px;
        padding-bottom: 48px;
    }

    .layout-frame .page {
        max-width: 580px;
        margin: 56px auto;
        padding: 48px 36px 56px;
        background: rgba(255, 255, 255, .1);
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 32px;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
    }

    .frame-dark .page {
        background: rgba(8, 12, 18, .4);
        border-color: rgba(255, 255, 255, .09);
    }

    /* Kasten mit Schlagschatten: Box behält die gewählte Hintergrundfarbe,
       der umgebende Hintergrund wird stattdessen leicht abgedunkelt. */
    .frame-shadow .bg {
        background: linear-gradient(rgba(0, 0, 0, .18), rgba(0, 0, 0, .18)), var(--bg);
    }
    .frame-shadow .page {
        background: var(--bg);
        border: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
    }

    .layout-center.layout-frame .page { margin: 40px auto; }
}

/* ------------------------------------------------------------- Animation */

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.links .link-btn:nth-child(1)  { animation-delay: .05s; }
.links .link-btn:nth-child(2)  { animation-delay: .10s; }
.links .link-btn:nth-child(3)  { animation-delay: .15s; }
.links .link-btn:nth-child(4)  { animation-delay: .20s; }
.links .link-btn:nth-child(5)  { animation-delay: .25s; }
.links .link-btn:nth-child(6)  { animation-delay: .30s; }
.links .link-btn:nth-child(7)  { animation-delay: .35s; }
.links .link-btn:nth-child(8)  { animation-delay: .40s; }
.links .link-btn:nth-child(n+9) { animation-delay: .45s; }
.socials { animation-delay: .5s; }

/* -------------------------------------------------- Impressum/Datenschutz */

.legal {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 8px 20px 26px;
    font-family: var(--font);
}

.legal a {
    color: var(--text);
    opacity: .6;
    font-size: 12.5px;
    text-decoration: none;
    transition: opacity .12s ease;
}

.legal a:hover { opacity: 1; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .profile, .link-btn, .socials { animation: none; }
    .link-btn:hover { transform: none; }
}

@media (max-width: 480px) {
    .page { padding-top: 44px; }
    .logo { width: 84px; height: 84px; }
    .logo-placeholder { line-height: 84px; font-size: 36px; }
    /* Button-Text einen Tick kleiner, damit er später umbricht */
    .link-btn { font-size: calc(var(--fs-btn, 16px) * .92); padding-left: 46px; padding-right: 46px; }
}
