:root {
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.2);
    --blur-glass: blur(16px);
    --panel-radius: 22px;
    --panel-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.72);
    --accent: #f84982;
    --accent-rgb: 248, 73, 130;
    --accent-secondary: #ff8c42;
    --spotify-accent: #1ed760;
    --spotify-accent-rgb: 30, 215, 96;
    --spotify-accent-2: #7c5cff;
    --spotify-accent-2-rgb: 124, 92, 255;
    --premium-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

img,
svg,
video,
canvas,
a,
button {
    -webkit-user-drag: none;
}

img,
svg,
video,
canvas {
    -webkit-user-select: none;
    user-select: none;
}

html {
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    color: var(--text-primary);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

body::-webkit-scrollbar { display: none; }
.hidden, [hidden] { display: none !important; }
.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;
}

/* --- FOND --- */
#bg-video {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    background: #000;
    object-fit: cover;
    filter: brightness(0.4) contrast(1.15);
    z-index: -3;
}
.video-overlay {
    position: fixed; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.46), rgba(0,0,0,0.58));
    z-index: -2;
    transition: background 0.9s var(--premium-ease);
}
.ambient-glow {
    --ambient-x: 50%;
    --ambient-y: 34%;
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 300px 240px at var(--ambient-x) var(--ambient-y), rgba(var(--spotify-accent-rgb), 0.24), transparent 72%),
        radial-gradient(ellipse 220px 280px at 52% 42%, rgba(var(--spotify-accent-2-rgb), 0.11), transparent 74%);
    filter: blur(36px) saturate(1.06);
    transform: scale(1.01) translate3d(0, 0, 0);
    transition: opacity 1s var(--premium-ease), background 0.8s var(--premium-ease);
    animation: ambient-drift 10s ease-in-out infinite alternate;
    animation-play-state: paused;
}
body.spotify-active .ambient-glow {
    opacity: 0.15;
    animation-play-state: running;
}
body.spotify-active .video-overlay {
    background:
        linear-gradient(180deg, rgba(0,0,0,0.44), rgba(0,0,0,0.6)),
        radial-gradient(circle at 50% 28%, rgba(var(--spotify-accent-rgb), 0.025), transparent 34%);
}
.stars, #particles {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 99;
}

/* --- CONTENEUR --- */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    z-index: 10;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.js-enabled .container {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
}
.js-enabled .container.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.container.visible > * { animation: reveal-item 0.5s ease both; }
.container.visible > :nth-child(2) { animation-delay: 0.04s; }
.container.visible > :nth-child(3) { animation-delay: 0.08s; }
.container.visible > :nth-child(4) { animation-delay: 0.12s; }
.container.visible > :nth-child(5) { animation-delay: 0.16s; }
.container.visible > :nth-child(6) { animation-delay: 0.2s; }
.container.visible > :nth-child(7) { animation-delay: 0.24s; }

@keyframes reveal-item {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- AVATAR --- */
.avatar-container-main {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    isolation: isolate;
}
.avatar-container-main::before,
.avatar-container-main::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.avatar-container-main::before {
    inset: -4px;
    z-index: -1;
    background: conic-gradient(from 0deg, rgba(255,255,255,0.12), rgba(255,255,255,0.75), rgba(255,255,255,0.08), rgba(255,255,255,0.4), rgba(255,255,255,0.12));
    animation: avatar-orbit 9s linear infinite;
}
.avatar-container-main::after {
    inset: -14px;
    z-index: -2;
    opacity: 0.28;
    background: rgba(255,255,255,0.22);
    filter: blur(18px);
    transition: opacity 0.7s var(--premium-ease), background 0.7s var(--premium-ease);
}
.avatar {
    position: relative;
    z-index: 1;
    width: 100%; height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.15);
    background: #090909;
    box-shadow: 0 14px 38px rgba(0,0,0,0.38), inset 0 0 0 1px rgba(255,255,255,0.05);
    transition: transform 0.5s var(--premium-ease), box-shadow 0.7s var(--premium-ease);
}
.avatar img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.7s var(--premium-ease), filter 0.7s var(--premium-ease);
}
.avatar-container-main:hover .avatar { transform: scale(1.025); }
.avatar-container-main:hover .avatar img { transform: scale(1.035); }
body.spotify-active .avatar-container-main::before {
    background: conic-gradient(from 0deg, rgba(var(--spotify-accent-rgb),0.12), rgba(var(--spotify-accent-rgb),0.66), rgba(var(--spotify-accent-2-rgb),0.12), rgba(var(--spotify-accent-2-rgb),0.62), rgba(var(--spotify-accent-rgb),0.12));
}
body.spotify-active .avatar-container-main::after {
    opacity: 0.4;
    background: rgba(var(--spotify-accent-rgb), 0.44);
}

/* --- NOM --- */
.name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.name-row h1 { font-size: 36px; font-weight: 700; }
.verified-badge {
    width: 28px;
    height: 27px;
    object-fit: contain;
    filter: drop-shadow(0 0 0 rgba(255,255,255,0));
    transition: transform 0.35s var(--premium-ease), filter 0.35s ease;
}
.name-row:hover .verified-badge {
    transform: translateY(-1px) rotate(5deg) scale(1.06);
    filter: drop-shadow(0 0 7px rgba(255,255,255,0.32));
}
.bio { color: #d7dcef; font-size: 16px; margin-top: 10px; }
.local-time { margin-top: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 500; }

/* --- DISCORD --- */
.discord-box {
    --discord-status-rgb: 128, 132, 142;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: 22px;
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-radius: 17px;
    box-shadow: var(--panel-shadow);
    text-align: left;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.discord-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 17%;
    left: 17%;
    height: 1px;
    z-index: 2;
    opacity: 0.72;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(var(--discord-status-rgb), 0.62), transparent);
    box-shadow: 0 0 12px rgba(var(--discord-status-rgb), 0.16);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}
.discord-box.presence-online { --discord-status-rgb: 35, 165, 90; }
.discord-box.presence-idle { --discord-status-rgb: 240, 178, 50; }
.discord-box.presence-dnd { --discord-status-rgb: 242, 63, 67; }
.discord-box.presence-offline { --discord-status-rgb: 128, 132, 142; }
.discord-box:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
}
body.spotify-active .discord-box {
    border-color: rgba(var(--spotify-accent-rgb), 0.21);
    background: linear-gradient(135deg, rgba(var(--spotify-accent-rgb), 0.072), rgba(255,255,255,0.045) 52%, rgba(var(--spotify-accent-2-rgb), 0.05));
    box-shadow: 0 14px 40px rgba(var(--spotify-accent-rgb), 0.085), inset 0 1px 0 rgba(255,255,255,0.055);
}
body.spotify-active .discord-avatar-container {
    border-color: rgba(var(--spotify-accent-rgb), 0.3);
}
.discord-avatar-wrapper {
    position: relative;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
}
.discord-avatar-container {
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
}
#discord-avatar { width: 100%; height: 100%; object-fit: cover; }
.discord-avatar-decoration {
    position: absolute;
    inset: -1px;
    z-index: 2;
    width: 56px;
    height: 56px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 3px 7px rgba(0,0,0,0.3));
}
.discord-avatar-decoration[hidden] { display: none; }
.status-dot {
    position: absolute; bottom: 1px; right: 1px;
    width: 13px; height: 13px;
    border-radius: 50%;
    border: 2px solid #0d0d0d;
    z-index: 3;
}
.status-dot.online  { background: #23a55a; box-shadow: 0 0 8px rgba(35,165,90,0.6); }
.status-dot.idle    { background: #f0b232; box-shadow: 0 0 8px rgba(240,178,50,0.6); }
.status-dot.dnd     { background: #f23f43; box-shadow: 0 0 8px rgba(242,63,67,0.6); }
.status-dot.offline { background: #80848e; }
.status-dot.dnd::after {
    content: '';
    position: absolute;
    top: 3.5px;
    left: 2px;
    width: 6px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
}
.discord-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.discord-header-row { min-width: 0; margin-bottom: 3px; }
.discord-name {
    min-width: 0;
    overflow: hidden;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.discord-copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
}
.discord-copy i {
    color: var(--text-secondary);
    font-size: 12px;
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.discord-copy:hover i, .discord-copy:focus-visible i { opacity: 1; transform: translateX(0); color: #fff; }
.discord-copy:focus-visible { outline: 2px solid rgba(255,255,255,0.7); outline-offset: 3px; border-radius: 3px; }
.discord-activity { display: flex; flex-direction: column; min-width: 0; }
.activity-heading {
    color: var(--text-secondary);
    font-weight: 650; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.status-text {
    color: #e1e1e1; font-size: 13px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.discord-brand-mark {
    flex-shrink: 0;
    color: rgba(255,255,255,0.2);
    font-size: 25px;
    transition: color 0.18s ease, transform 0.18s ease;
}
.discord-box:hover .discord-brand-mark {
    color: rgba(88,101,242,0.62);
    transform: scale(1.04);
}
.discord-art-wrapper { width: 58px; height: 58px; flex-shrink: 0; }
.discord-art-link {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    opacity: 1;
    transition: transform 0.25s ease, filter 0.2s ease, opacity 0.25s ease;
}
.discord-art-link:hover { transform: scale(1.04); filter: brightness(1.08); }
.discord-art-link:focus-visible { outline: 2px solid var(--spotify-accent); outline-offset: 3px; }
.discord-art-link.is-changing { opacity: 0; transform: scale(0.94); }
#discord-art {
    width: 100%; height: 100%;
    border-radius: 12px; object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.12);
}
.discord-art-link.hidden, .spotify-details-link.hidden { display: none !important; }
.spotify-details-link {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    border-radius: 5px;
    color: inherit;
    text-decoration: none;
}
.spotify-details-link:focus-visible {
    outline: 2px solid rgba(255,255,255,0.72);
    outline-offset: 3px;
}
.spotify-song {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.spotify-details-link:hover .spotify-song { text-decoration: underline; text-underline-offset: 2px; }
.spotify-meta {
    display: flex;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
}
#spotify-artist,
#spotify-album { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#spotify-artist { max-width: 48%; }
#spotify-album { flex: 1; }
.spotify-progress {
    display: block;
    position: relative;
    width: 100%;
    margin-top: 6px;
}
.spotify-progress::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
}
.spotify-progress-fill {
    display: block;
    position: relative;
    z-index: 1;
    width: 0%; height: 3px;
    background: linear-gradient(90deg, var(--spotify-accent), var(--spotify-accent-2));
    border-radius: 99px;
    box-shadow: 0 0 10px rgba(var(--spotify-accent-rgb), 0.34);
    transition: width 0.1s linear;
}
.spotify-time-row {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    color: rgba(255,255,255,0.58);
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* --- LEETIFY : HUD CS2 --- */
.leetify-box {
    --leetify-surface: rgba(8, 9, 12, 0.44);
    width: 100%;
    margin-top: 14px;
    padding: 16px 18px 14px;
    background:
        radial-gradient(circle at 12% 24%, rgba(var(--accent-rgb), 0.08), transparent 34%),
        linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
    border: 1px solid var(--border-glass);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-radius: var(--panel-radius);
    box-shadow: var(--panel-shadow);
    text-align: left;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
}
.leetify-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent) 16%, var(--accent-secondary) 72%, transparent);
    border-radius: var(--panel-radius) var(--panel-radius) 0 0;
    box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.18);
}
.leetify-box:hover {
    background:
        radial-gradient(circle at 12% 24%, rgba(var(--accent-rgb), 0.11), transparent 36%),
        linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
}

.leetify-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.leetify-header-left,
.leetify-header-right,
.leetify-matches,
.leetify-view-link,
.leetify-rank-label,
.leetify-aim-caption {
    display: flex;
    align-items: center;
}
.leetify-header-left { min-width: 0; gap: 9px; }
.leetify-header-right { flex-shrink: 0; gap: 7px; }
.leetify-logo {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    color: #fff;
    background:
        radial-gradient(circle, rgba(var(--accent-rgb), 0.18), transparent 68%),
        rgba(255,255,255,0.045);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    box-shadow: inset 0 0 12px rgba(var(--accent-rgb), 0.08);
}
.leetify-logo::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 50%;
}
.leetify-logo i { font-size: 19px; text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.55); }
.leetify-title-block { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.leetify-title {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 750;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leetify-subtitle {
    color: rgba(255,255,255,0.52);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.75px;
    line-height: 1;
    text-transform: uppercase;
}
.leetify-matches {
    gap: 4px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 99px;
    background: rgba(255,255,255,0.035);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}
.leetify-matches i { color: rgba(255,255,255,0.46); font-size: 10px; }
.leetify-view-link {
    gap: 3px;
    padding: 5px 10px;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 99px;
    background: rgba(var(--accent-rgb), 0.075);
    color: #ff81aa;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}
.leetify-view-link:hover {
    background: rgba(var(--accent-rgb), 0.16);
    border-color: rgba(var(--accent-rgb), 0.52);
    transform: translateY(-1px);
}
.leetify-view-link i { font-size: 11px; }

.leetify-dashboard {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.leetify-aim-card,
.leetify-metric,
.leetify-rank {
    position: relative;
    border: 1px solid rgba(255,255,255,0.065);
    background: var(--leetify-surface);
    overflow: hidden;
}
.leetify-aim-card {
    min-height: 106px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 13px;
}
.leetify-aim-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 14px 14px;
    mask-image: radial-gradient(circle at center, #000 15%, transparent 76%);
}
.leetify-aim-card::after {
    content: '';
    position: absolute;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.12);
    filter: blur(22px);
}
.leetify-aim-ring {
    --aim-score: 0;
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    padding: 4px;
    border-radius: 50%;
    background: conic-gradient(from -90deg, var(--accent) 0%, var(--accent-secondary) calc(var(--aim-score) * 1%), rgba(255,255,255,0.075) calc(var(--aim-score) * 1%), rgba(255,255,255,0.075) 100%);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.12);
}
.leetify-aim-ring::before,
.leetify-aim-ring::after {
    content: '';
    position: absolute;
    background: rgba(255,255,255,0.14);
}
.leetify-aim-ring::before { width: 84px; height: 1px; }
.leetify-aim-ring::after { width: 1px; height: 84px; }
.leetify-aim-ring-core {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    background: rgba(11, 11, 14, 0.94);
}
.leetify-aim-ring-core { padding-top: 19px; }
.leetify-aim-value {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}
.leetify-aim-scale { color: rgba(255,255,255,0.42); font-size: 8px; font-weight: 700; }
.leetify-aim-caption {
    position: relative;
    z-index: 1;
    gap: 3px;
    color: rgba(255,255,255,0.62);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.85px;
    line-height: 1;
    text-transform: uppercase;
}
.leetify-aim-caption i { color: #ff7da8; font-size: 10px; }

.leetify-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) 31px;
    gap: 6px;
    min-width: 0;
}
.leetify-metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 10px;
}
.leetify-metric::after {
    content: '';
    position: absolute;
    top: -16px; right: -12px;
    width: 58px; height: 58px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.055);
    filter: blur(16px);
    pointer-events: none;
}
.leetify-metric-header {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
}
.leetify-metric-label,
.leetify-rank-label {
    color: rgba(255,255,255,0.58);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.55px;
    line-height: 1;
    text-transform: uppercase;
}
.leetify-metric-value {
    color: #fff;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1;
}
.leetify-rank-value {
    color: #fff;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1;
}
.leetify-meter {
    position: relative;
    height: 4px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255,255,255,0.075);
}
.leetify-meter-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.28);
    transition: width 0.7s var(--premium-ease);
}
.leetify-meter-fill--secondary {
    background: linear-gradient(90deg, rgba(255,255,255,0.65), var(--accent));
}
.leetify-rank {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 10px;
    border-radius: 9px;
}
.leetify-rank-label { gap: 4px; }
.leetify-rank-label i { color: #ff9a59; font-size: 11px; }
.leetify-rank-value.is-excellent,
.leetify-metric-value.is-excellent,
.leetify-aim-value.is-excellent {
    background: linear-gradient(110deg, #ff7ca6, #ff9b5f);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.leetify-state-row {
    min-height: 20px;
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 500;
}
.leetify-box.is-loading .leetify-aim-value,
.leetify-box.is-loading .leetify-metric-value,
.leetify-box.is-loading .leetify-rank-value,
.leetify-box.is-loading #leetify-matches {
    color: transparent;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 200% 100%;
    border-radius: 5px;
    animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.leetify-box.is-loading .leetify-aim-value { min-width: 24px; min-height: 18px; }
.leetify-box.is-loading .leetify-metric-value,
.leetify-box.is-loading .leetify-rank-value { min-width: 28px; min-height: 10px; }
.leetify-box.is-loading #leetify-matches { min-width: 40px; min-height: 9px; }
.leetify-box.is-loading .leetify-meter-fill { opacity: 0; }

@keyframes skeleton-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.widget-retry {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 99px;
    background: rgba(var(--accent-rgb), 0.08);
    color: #ff7ca6;
    font: inherit;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.widget-retry:hover { background: rgba(var(--accent-rgb), 0.18); border-color: rgba(var(--accent-rgb), 0.55); }
.widget-retry:disabled { cursor: wait; opacity: 0.55; }
.widget-retry:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.leetify-footer {
    margin-top: 12px;
}
.leetify-cs2-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}
.cs2-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.cs2-link:hover { transform: translateY(-1px); }
.cs2-link-logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.cs2-link--steam {
    color: #c6d4df;
    background: rgba(198,212,223,0.055);
    border-color: rgba(198,212,223,0.14);
}
.cs2-link--steam:hover { background: rgba(198,212,223,0.12); border-color: rgba(198,212,223,0.32); }
.cs2-link--faceit {
    color: #ff6a1d;
    background: rgba(255,85,0,0.05);
    border-color: rgba(255,85,0,0.18);
}
.cs2-link--faceit:hover { background: rgba(255,85,0,0.13); border-color: rgba(255,85,0,0.4); }
/* --- LIENS RESEAUX --- */
.links { margin-top: 22px; width: 100%; }
.link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    margin-bottom: 14px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 16px; font-weight: 500;
    border-radius: 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
}
.link:hover { transform: translateY(-2px); background: var(--bg-glass-hover); }

:is(.leetify-view-link, .cs2-link, .link):focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Glow coloré par réseau */
.link--x:hover         { border-color: rgba(255,255,255,0.3); box-shadow: 0 4px 20px rgba(255,255,255,0.06); }
.link--instagram:hover { border-color: rgba(225,48,108,0.4);  box-shadow: 0 4px 20px rgba(225,48,108,0.12); }
.link--spotify:hover   { border-color: rgba(30,215,96,0.4);   box-shadow: 0 4px 20px rgba(30,215,96,0.12); }
.link--tiktok:hover    { border-color: rgba(254,44,85,0.4);   box-shadow: 0 4px 20px rgba(254,44,85,0.1); }

.left { display: flex; align-items: center; gap: 16px; }
.link-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.1; }
.link-title { color: var(--text-primary); }
.link-handle { color: var(--text-secondary); font-size: 11px; font-weight: 500; letter-spacing: 0.1px; }
.icon-box { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.icon-box i { font-size: 28px; color: var(--text-primary); }
.arrow {
    color: var(--text-secondary);
    font-size: 22px;
    transition: color 0.25s ease, transform 0.35s var(--premium-ease);
}
.link:hover .arrow { color: #fff; transform: translateX(4px); }
.icon-box i { transition: transform 0.35s var(--premium-ease), filter 0.35s ease; }
.link:hover .icon-box i { transform: translateY(-1px) scale(1.06); }
.link--instagram:hover .icon-box i { filter: drop-shadow(0 0 8px rgba(225,48,108,0.4)); }
.link--spotify:hover .icon-box i { filter: drop-shadow(0 0 8px rgba(var(--spotify-accent-rgb),0.45)); }
.link--tiktok:hover .icon-box i { filter: drop-shadow(0 0 8px rgba(254,44,85,0.35)); }

/* --- OVERLAY --- */
#overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 50;
    display: none; justify-content: center; align-items: center;
    cursor: pointer;
    width: 100%;
    border: 0;
    font: inherit;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.js-enabled #overlay { display: flex; }
#overlay.hidden { opacity: 0; visibility: hidden; }
#entry-text { color: #fff; font-size: 28px; font-weight: 600; }
#entry-text {
    background: linear-gradient(100deg, rgba(255,255,255,0.62) 20%, #fff 48%, rgba(255,255,255,0.62) 76%);
    background-size: 220% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px rgba(255,255,255,0.08);
    animation: entry-shimmer 3.4s ease-in-out infinite;
    transition: letter-spacing 0.45s var(--premium-ease), transform 0.45s var(--premium-ease);
}
#overlay:hover #entry-text { letter-spacing: 0.025em; transform: scale(1.025); }
#overlay:focus-visible #entry-text {
    outline: 2px solid #fff;
    outline-offset: 8px;
    border-radius: 4px;
}

.audio-toggle {
    position: fixed;
    right: 20px;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 40;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    background: rgba(10,10,10,0.55);
    color: #fff;
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    box-shadow: var(--panel-shadow);
    cursor: pointer;
    animation: reveal-item 0.35s ease both;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.audio-toggle i { font-size: 19px; }
.audio-toggle:hover { background: rgba(255,255,255,0.12); border-color: var(--border-glass-hover); transform: translateY(-2px); }
.audio-toggle.is-muted { color: var(--text-secondary); }
.audio-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
body.spotify-active .link--spotify:hover {
    border-color: rgba(var(--spotify-accent-rgb), 0.55);
    box-shadow: 0 4px 24px rgba(var(--spotify-accent-rgb), 0.16);
}

/* --- FINITION PREMIUM : SPOTLIGHT ET PROFONDEUR --- */
.discord-box,
.leetify-box,
.link {
    --spotlight-x: 50%;
    --spotlight-y: 50%;
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}
.discord-box::after,
.leetify-box::after,
.link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    background: radial-gradient(circle 180px at var(--spotlight-x) var(--spotlight-y), rgba(255,255,255,0.12), transparent 68%);
    transition: opacity 0.4s var(--premium-ease);
}
.discord-box > *,
.leetify-box > *,
.link > * {
    position: relative;
    z-index: 1;
}
.leetify-box::before { z-index: 2; }
.discord-box:hover::after,
.leetify-box:hover::after,
.link:hover::after { opacity: 1; }
.leetify-box:hover,
.link:hover {
    transform: perspective(900px) translateY(-3px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}
body.spotify-active .discord-box::after,
body.spotify-active .link--spotify::after {
    background: radial-gradient(circle 200px at var(--spotlight-x) var(--spotlight-y), rgba(var(--spotify-accent-rgb),0.22), transparent 68%);
}
body.spotify-active .discord-art-link {
    box-shadow: 0 0 0 1px rgba(var(--spotify-accent-rgb),0.18), 0 9px 24px rgba(var(--spotify-accent-rgb),0.2);
}

@keyframes ambient-drift {
    from { transform: scale(1.01) translate3d(-0.5%, -0.4%, 0); }
    to { transform: scale(1.035) translate3d(0.8%, 0.6%, 0); }
}

@keyframes avatar-orbit {
    to { transform: rotate(360deg); }
}

@keyframes entry-shimmer {
    0%, 25% { background-position: 180% 0; opacity: 0.78; }
    55%, 100% { background-position: -40% 0; opacity: 1; }
}

.toast {
    position: fixed;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 60;
    transform: translate(-50%, 8px);
    padding: 9px 14px;
    border: 1px solid var(--border-glass-hover);
    border-radius: 99px;
    background: rgba(10,10,10,0.72);
    color: #fff;
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #particles { display: none; }
    .ambient-glow { animation: none; }
    .avatar-container-main::before { animation: none; }
}

@media (hover: none) {
    .discord-box:hover,
    .leetify-box:hover,
    .link:hover,
    .cs2-link:hover,
    .audio-toggle:hover {
        transform: none;
    }

    .discord-box::after,
    .leetify-box::after,
    .link::after { display: none; }
}

@media (max-height: 800px) {
    body { align-items: flex-start; }
    .container { margin: 20px auto; }
}

@media (max-width: 440px) {
    .container { padding-inline: 14px; }
    .leetify-box { padding-inline: 15px; }
    .leetify-header { gap: 7px; }
    .leetify-header-right { gap: 4px; }
    .leetify-title { font-size: 14px; }
    .leetify-subtitle { font-size: 10px; letter-spacing: 0.35px; }
    .leetify-matches { padding-inline: 6px; }
    .leetify-view-link { padding-inline: 7px; }
    .leetify-dashboard { grid-template-columns: 104px minmax(0, 1fr); gap: 8px; }
    .leetify-aim-ring { width: 70px; height: 70px; }
    .leetify-aim-ring::before { width: 80px; }
    .leetify-aim-ring::after { height: 80px; }
    .leetify-aim-ring-core { padding-top: 18px; }
    .leetify-metric { padding-inline: 9px; }
    .leetify-metrics { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
    .leetify-metric { min-height: 48px; }
    .leetify-rank { grid-column: 1; min-height: 31px; }
    .leetify-metric-label { font-size: 10px; letter-spacing: 0.35px; }
    .leetify-state-row, .leetify-state-row .widget-retry { font-size: 11px; }
    .leetify-metric-value { font-size: 18px; }
    .discord-art-wrapper { width: 54px; height: 54px; }
}

@media (max-width: 380px) {
    .container { padding: 24px 14px; }
    .name-row h1 { font-size: 28px; }
    .avatar-container-main { width: 96px; height: 96px; }
    .link { padding: 14px 18px; font-size: 15px; }
    .discord-box { padding: 10px 12px; }
    .discord-avatar-wrapper { width: 52px; height: 52px; }
    .discord-avatar-decoration { inset: -1px; width: 54px; height: 54px; }
    .icon-box i { font-size: 24px; }
    .leetify-box { padding-inline: 12px; }
    .leetify-logo { width: 30px; height: 30px; }
    .leetify-matches i { display: none; }
    .leetify-view-link { font-size: 0; width: 25px; height: 25px; justify-content: center; padding: 0; }
    .leetify-view-link i { font-size: 12px; }
    .leetify-dashboard { grid-template-columns: 98px minmax(0, 1fr); gap: 7px; }
    .leetify-footer { gap: 7px; }
    .leetify-cs2-links { gap: 7px; }
    .cs2-link { min-height: 38px; padding: 9px 8px; font-size: 12px; }
    .cs2-link-logo { width: 19px; height: 19px; }
    .audio-toggle { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); }
}
