:root {
    --bg: #0a0e0d;
    --bg-alt: #0d1512;
    --accent: #00ff88;
    --accent-soft: rgba(0, 255, 136, 0.38);
    --accent-dark: #1a4d2e;
    --accent-silver: #c0d6df;
    --card-bg: rgba(10, 20, 15, 0.85);
    --card-border: rgba(0, 255, 136, 0.35);
    --text-main: #e8f5e9;
    --text-soft: #a8c5b0;
    --danger-soft: rgba(255, 93, 146, 0.18);
    --radius-xl: 26px;
    --shadow-strong: 0 26px 70px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(0, 255, 136, 0.25);
}

/* Reset léger */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    background: radial-gradient(circle at top, #1a3d2e 0, #0a0e0d 48%, #050807 100%) fixed;
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0, 255, 136, 0.08), transparent 60%),
        radial-gradient(circle at bottom right, rgba(26, 77, 46, 0.12), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* === Canvas & shards background === */

#effects-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Shards façon Riven (background shapes) - épées brisées */
.riven-shard {
    display: none;
    /* Hidden - too visible as green cubes */
    position: fixed;
    z-index: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(26, 77, 46, 0.05));
    border: 1px solid rgba(0, 255, 136, 0.3);
    filter: blur(0.2px);
    mix-blend-mode: screen;
    pointer-events: none;
    animation: floatShard 28s linear infinite;
    transform-origin: center;
}

.riven-shard-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -40px;
    clip-path: polygon(12% 0, 88% 6%, 100% 40%, 65% 88%, 10% 100%, 0 40%);
}

.riven-shard-2 {
    width: 360px;
    height: 360px;
    bottom: -140px;
    right: -40px;
    clip-path: polygon(10% 0, 100% 12%, 88% 60%, 52% 100%, 0 80%, 4% 30%);
    animation-delay: -9s;
}

.riven-shard-3 {
    width: 260px;
    height: 260px;
    top: 45%;
    left: 65%;
    clip-path: polygon(18% 0, 90% 10%, 100% 40%, 70% 100%, 0 74%, 2% 24%);
    animation-delay: -16s;
}

@keyframes floatShard {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 0.22;
    }

    40% {
        transform: translate3d(10px, -12px, 0) rotate(4deg);
        opacity: 0.5;
    }

    70% {
        transform: translate3d(-20px, 16px, 0) rotate(-4deg);
        opacity: 0.35;
    }

    100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 0.22;
    }
}

/* === Layout === */

.page-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.linktree-card {
    position: relative;
    width: 100%;
    max-width: 450px;
    padding: 26px 22px 24px;
    border-radius: var(--radius-xl);
    background: radial-gradient(circle at top, rgba(0, 255, 136, 0.2), transparent 60%) 0 0 / 100% 100% no-repeat,
        radial-gradient(circle at bottom, rgba(26, 77, 46, 0.25), transparent 56%) 0 100% / 100% 100% no-repeat,
        var(--card-bg);
    backdrop-filter: blur(26px) saturate(150%);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

/* Halo intérieur */
.linktree-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 1px solid rgba(0, 255, 136, 0.12);
    pointer-events: none;
}

/* Top actions (icône ✦ et partage) */
.top-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.icon-btn {
    border: 0;
    outline: 0;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.22), transparent 55%),
        rgba(10, 25, 18, 0.85);
    border: 1px solid rgba(0, 255, 136, 0.65);
    color: var(--text-main);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.6);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
        background 0.18s ease;
}

.icon-btn:hover {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 0 28px rgba(0, 255, 136, 0.85);
    border-color: rgba(0, 255, 136, 0.95);
}

/* Avatar */

.avatar-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 8px;
    margin-bottom: 16px;
}

.avatar-frame {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 136, 0.9);
    box-shadow: 0 0 32px rgba(0, 255, 136, 0.85);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* === REGLAGES ZOOM & POSITION === */
    /* Modifie scale() pour le zoom */
    /* Modifie translate() pour la position X, Y */
    transform: scale(1.30) translate(-10px, 0px);
    transform-origin: center center;
}


.avatar-glow {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.85), transparent 60%);
    filter: blur(10px);
    opacity: 0.55;
    animation: avatarPulse 5.4s ease-in-out infinite;
}

@keyframes avatarPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.55;
    }

    40% {
        transform: scale(1.12);
        opacity: 0.95;
    }
}

/* Titre / sous-titre */

.profile-header {
    text-align: center;
    margin-bottom: 20px;
}

.username {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 1.55rem;
    margin: 0 0 4px;
    letter-spacing: 0.02em;
    text-shadow: 0 0 14px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(0, 255, 136, 0.8);
}

.subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Liens */

.links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.link-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 136, 0.7);
    background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.16), transparent 60%),
        linear-gradient(135deg, rgba(15, 30, 22, 0.96), rgba(12, 25, 18, 0.96));
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7),
        0 0 18px rgba(0, 255, 136, 0.45);
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease,
        border-color 0.16s ease, background 0.16s ease;
}

.link-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
            transparent 0,
            rgba(255, 255, 255, 0.22) 40%,
            transparent 80%);
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
}

.link-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 136, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.86),
        0 0 28px rgba(0, 255, 136, 0.75);
    background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.2), transparent 60%),
        linear-gradient(135deg, rgba(20, 45, 30, 1), rgba(22, 48, 32, 0.98));
}

.link-btn:hover::after {
    animation: linkShine 0.8s ease-out forwards;
    opacity: 1;
}

@keyframes linkShine {
    0% {
        transform: translateX(-140%);
    }

    100% {
        transform: translateX(130%);
    }
}

/* Icônes */

.link-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
    color: #fff;
}

/* Styles par plateforme */
.icon-x {
    background: #000;
}

.icon-instagram {
    background: radial-gradient(circle at 30% 0, #fdf497 0, #fdf497 12%, transparent 35%),
        radial-gradient(circle at 0 100%, #fd5949 0, #fd5949 30%, transparent 55%),
        radial-gradient(circle at 100% 100%, #285aeb 0, #285aeb 32%, transparent 60%),
        #d6249f;
}

.icon-artstation {
    background: #0a1620;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.7);
}

.icon-pixiv {
    background: #0091ff;
}

.icon-mihuashi {
    background: linear-gradient(135deg, #ff9ad0, #ffd392);
}

.icon-tumblr {
    background: #001935;
}

/* Label */

.link-label {
    flex: 1;
    text-align: left;
}

/* État inactif (Tumblr) */

.link-btn--inactive {
    border-color: rgba(180, 180, 180, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, rgba(20, 26, 52, 0.9), rgba(14, 20, 38, 0.94));
}

.link-btn--inactive .link-label {
    color: rgba(206, 214, 235, 0.68);
}

.link-btn--inactive .link-icon {
    filter: grayscale(0.4);
}

/* Footer */

.footer {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-soft);
    opacity: 0.85;
}

/* Responsif */

@media (max-width: 540px) {
    .linktree-card {
        padding: 22px 16px 20px;
        border-radius: 22px;
    }

    .avatar-frame {
        width: 86px;
        height: 86px;
    }

    .links {
        gap: 9px;
    }

    .link-btn {
        padding-inline: 12px;
    }
}


.icon-svg {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.4),
        inset 0 0 10px rgba(0, 255, 136, 0.25);
    backdrop-filter: blur(8px) saturate(180%);
}