:root {
  --text: #fff; --icon: #fff; --card: rgba(0,0,0,.25); --accent: #fff;
  --blur: 12px; --radius: 24px; --card-w: 520px; --font: 'Satoshi', system-ui, sans-serif;
  --muted: color-mix(in srgb, var(--text) 62%, transparent);
  --glass: rgba(20,20,20,.39);
  --fx: #fff;
  --av-size: 118px; --av-border: #fff; --name-size: 40px; --bio-size: 15.5px; --soc-size: 28px;
  --banner-h: 130px; --bg-blur: 0px; --enter-blur: 22px; --enter-bg: rgba(0,0,0,.82);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
/* "Hidden" cursor mode: no pointer anywhere, only the cursor trail effect is visible */
body.no-cursor, body.no-cursor * { cursor: none !important; }
html, body { height: 100%; overflow: hidden; background: #000; color: var(--text); }
body { font-family: var(--font); -webkit-font-smoothing: antialiased; }
body.loading .stage, body.loading .volume { visibility: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: inherit; }

/* background */
.bg-wrap { position: fixed; inset: -4%; z-index: 0; transition: transform .25s ease-out; }
.bg-wrap > video, .bg-wrap > img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* decorative media never receives the mouse, so browsers have nothing to attach video overlays to */
.bg-wrap, .bg-wrap *, .card-banner, .card-banner *, .plate { pointer-events: none; }
.bg-wrap { filter: blur(var(--bg-blur)); }
body.mono .bg-wrap { filter: grayscale(1) blur(var(--bg-blur)); }
body.fx-blurred .bg-wrap { filter: blur(max(8px, var(--bg-blur))); }
body.mono.fx-blurred .bg-wrap { filter: grayscale(1) blur(max(8px, var(--bg-blur))); }
body.fx-old .bg-wrap { filter: sepia(.7) contrast(1.1) brightness(.85); }
.bg-wrap::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--dim, .35); }

.overlay { position: fixed; inset: 0; z-index: 1; pointer-events: none; display: none; }
.dots { background-image: radial-gradient(rgba(0,0,0,.55) 1px, transparent 1.3px); background-size: 3px 3px; opacity: .8; }
.vignette { background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.65) 100%); }
body.ov-dots .dots, body.ov-vignette .vignette { display: block; }
.tv { background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px); animation: flicker .15s infinite; }
body.fx-tv .tv, body.fx-old .tv { display: block; }
.night { background: linear-gradient(180deg, rgba(8,12,40,.5), rgba(4,6,22,.25) 60%, rgba(0,0,0,.1)); }
body.fx-night .night { display: block; }
@keyframes flicker { 50% { opacity: .82; } }
#fx { position: fixed; inset: 0; z-index: 2; pointer-events: none; }

/* splash */
.enter {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: var(--enter-bg); backdrop-filter: blur(var(--enter-blur)); -webkit-backdrop-filter: blur(var(--enter-blur));
  font-weight: 600; font-size: 28px; letter-spacing: -.01em;
}
.enter span { animation: breathe 2.4s ease-in-out infinite; padding: 0 16px; text-align: center; }
.enter.gone { opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; } /* fade only on the way out */
/* Until the profile's settings load we don't know if the splash is wanted, so keep it invisible. */
body.loading .enter { visibility: hidden; transition: none; }
.enter.skip { display: none; }
@keyframes breathe { 50% { opacity: .55; } }

/* volume */
.volume { position: fixed; top: 22px; left: 22px; z-index: 20; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 14px; transition: background .3s; }
body.vol-top-right .volume { left: auto; right: 22px; flex-direction: row-reverse; }
body.vol-bottom-left .volume { top: auto; bottom: 22px; }
body.vol-bottom-right .volume { top: auto; bottom: 22px; left: auto; right: 22px; flex-direction: row-reverse; }
body.vol-slider-always #vol { width: 96px; opacity: 1; margin: 0 8px 0 4px; }
body.vol-slider-hidden #vol { display: none; }
.volume:hover { background: var(--glass); backdrop-filter: blur(10px); }
.vol-btn { width: 34px; height: 34px; display: grid; place-items: center; color: var(--icon); }
.vol-btn svg { width: 28px; height: 28px; }
.vol-btn .x { display: none; }
.volume.muted .w1, .volume.muted .w2 { display: none; }
.volume.muted .x { display: block; }
#vol { -webkit-appearance: none; appearance: none; width: 0; opacity: 0; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); outline: none; transition: width .35s, opacity .3s, margin .35s; }
.volume:hover #vol, #vol:focus { width: 96px; opacity: 1; margin: 0 8px 0 4px; }
#vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
#vol::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }

/* card */
.stage { position: relative; z-index: 3; height: 100%; display: grid; place-items: center; padding: 16px; perspective: 1000px; overflow-y: auto; }
.card {
  position: relative; width: min(var(--card-w), 100%); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 32px 24px 46px; border-radius: var(--radius);
  background: var(--card); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  transform-style: preserve-3d; transition: transform .15s ease-out;
  opacity: 0; translate: 0 18px;
}
body.has-border .card { border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
body.layout-minimal .card { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
body.entered .card { animation: rise 1s .15s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rise { to { opacity: 1; translate: 0 0; } }
.card-banner { position: absolute; inset: 0 0 auto; height: var(--banner-h); z-index: -1; overflow: hidden;
  mask-image: linear-gradient(#000 30%, transparent); -webkit-mask-image: linear-gradient(#000 30%, transparent); opacity: .85; }
.card-banner > img, .card-banner > video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* layout */
body.pos-top .stage { align-items: start; padding-top: 8vh; }
body.pos-bottom .stage { align-items: end; padding-bottom: 8vh; }
body.align-left .card { align-items: flex-start; text-align: left; }
body.align-left .name-row, body.align-left .badges, body.align-left .socials { justify-content: flex-start; }

.avatar-wrap { position: relative; width: var(--av-size); height: var(--av-size); flex: none; }
.avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
body.av-square .avatar { border-radius: 22%; }
body.av-border .avatar { border: 3px solid var(--av-border); }
body.av-glow .avatar { box-shadow: 0 0 22px color-mix(in srgb, var(--av-border) 70%, transparent), 0 10px 40px rgba(0,0,0,.6); }
.deco { position: absolute; inset: -10%; width: 120%; height: 120%; pointer-events: none; }
.status-dot { position: absolute; right: 5px; bottom: 5px; width: 22px; height: 22px; border-radius: 50%; border: 4px solid #0b0b0b; background: #747f8d; }
.status-dot.online { background: #23a55a; } .status-dot.idle { background: #f0b232; } .status-dot.dnd { background: #f23f43; }

.name-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.name { position: relative; font-size: var(--name-size); font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
body.u-glow .name { text-shadow: 0 0 14px color-mix(in srgb, var(--text) 60%, transparent), 0 0 2px var(--text); }
.name.rgb { background: linear-gradient(90deg, #ff4d4d, #ffb84d, #f9ff4d, #4dff88, #4dc3ff, #9b4dff, #ff4d4d); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: rgb 4s linear infinite; }
@keyframes rgb { to { background-position: 200% 0; } }
.name.glitch::before, .name.glitch::after { content: attr(data-text); position: absolute; inset: 0; }
.name.glitch::before { color: #0ff; clip-path: inset(0 0 55% 0); animation: gl1 2.2s infinite steps(1); }
.name.glitch::after { color: #f0f; clip-path: inset(55% 0 0 0); animation: gl2 1.9s infinite steps(1); }
@keyframes gl1 { 0%,90% { transform: none; } 92% { transform: translate(-3px,1px); } 95% { transform: translate(2px,-1px); } }
@keyframes gl2 { 0%,88% { transform: none; } 90% { transform: translate(3px,0); } 94% { transform: translate(-2px,1px); } }
/* animated name effects */
.name.nfx-fuzzy { color: transparent; text-shadow: none !important; }
.name.nfx-fuzzy .fuzz { position: absolute; top: 0; pointer-events: none; }
body.u-glow .name.nfx-fuzzy .fuzz { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--text) 55%, transparent)); }
.name .tw-caret { margin-left: 2px; font-weight: 400; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
/* Discord display name style (colours + effect from Discord) */
body .name.dstyle { color: var(--d1); text-shadow: none; }
body .name.dstyle.dgrad { background: linear-gradient(90deg, var(--d1), var(--d2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
body .name.dstyle.dfx-3 { /* neon: light core, coloured glow */
  color: color-mix(in srgb, var(--d1) 22%, #fff);
  text-shadow: 0 0 4px color-mix(in srgb, var(--d1) 55%, #fff), 0 0 12px color-mix(in srgb, var(--d1) 70%, #fff), 0 0 26px color-mix(in srgb, var(--d1) 80%, #fff);
}
body .name.dstyle.dgrad.dfx-3 { filter: drop-shadow(0 0 8px var(--d1)); text-shadow: none; }
body .name.dstyle.dfx-4 { /* toon: outlined */
  color: color-mix(in srgb, var(--d1) 40%, #fff);
  -webkit-text-stroke: 2px color-mix(in srgb, var(--d1) 80%, #000); paint-order: stroke fill;
}
body .name.dstyle.dfx-5 { /* pop: offset shadow */
  color: color-mix(in srgb, var(--d1) 35%, #fff);
  text-shadow: 3px 3px 0 color-mix(in srgb, var(--d1) 85%, #000);
}
.guild-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 700; }
.guild-tag img { width: 14px; height: 14px; }

.subline { margin-top: 2px; font-size: 14px; color: var(--muted); white-space: pre; }
.badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.badges:empty { display: none; }
.badge { width: 26px; height: 26px; display: grid; place-items: center; }
.badge img, .badge i { width: 22px; height: 22px; display: block; }
.badge i { background: var(--icon); -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
body.b-glow .badge { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--icon) 70%, transparent)); }

.bio { margin-top: 6px; min-height: 1.4em; font-size: var(--bio-size); color: var(--muted); white-space: pre-line; max-width: 100%; }
.bio .caret { display: inline-block; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.location { margin-top: 6px; display: flex; gap: 4px; align-items: center; font-size: 14px; color: var(--muted); }
.location svg { width: 15px; height: 15px; }
.location a { color: inherit; text-decoration: none; font-weight: 600; }
.location a:hover { text-decoration: underline; }
.badge.admin i { background: var(--bc, var(--icon)); }
body.b-glow .badge.admin { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--bc, var(--icon)) 70%, transparent)); }

/* presence */
.presence { position: relative; margin-top: 22px; width: 100%; max-width: 400px; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 14px; border-radius: 16px; background: var(--inner, rgba(255,255,255,.06)); border: 1px solid var(--inner-border, rgba(255,255,255,.08)); overflow: hidden; }
.plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; z-index: -1; }
.pres-art { position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.pres-art > img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.pres-art > img.round { border-radius: 50%; }
.pres-art .small { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #111; background: #111; }
.pres-art .pdeco { position: absolute; inset: -10%; width: 120%; height: 120%; }
.pres-art .pdot { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #111; }
.pres-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pres-body strong { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pres-body span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pres-body span:empty { display: none; }
.bar { margin-top: 6px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; }

/* audio player */
.player { margin-top: 14px; width: 100%; max-width: 400px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); text-align: left; }
.player .cover { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,.1); }
.pl-body { flex: 1; min-width: 0; }
.pl-body strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-ctrl { display: flex; gap: 2px; }
.pl-ctrl button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--icon); border-radius: 8px; }
.pl-ctrl button:hover { background: rgba(255,255,255,.1); }
.pl-ctrl svg { width: 18px; height: 18px; }
.player.paused .pl-pause, .player:not(.paused) .pl-playi { display: none; }
/* linked tracks: Spotify / Apple Music / Bandcamp show their own player in the row */
.pl-embed { display: none; }
.player.embed { padding: 6px; align-items: center; }
.player.embed .pl-embed { display: block; flex: 1; min-width: 0; border-radius: 12px; overflow: hidden; }
.player.embed .pl-embed iframe, .player.embed .pl-embed > div { display: block; width: 100%; border: 0; border-radius: 12px; }
.player.embed .cover, .player.embed .pl-body, .player.embed #pl-play { display: none; }
.player.embed .pl-ctrl { flex-direction: column; }
.player.embed.solo .pl-ctrl { display: none; }
/* hidden SoundCloud / YouTube players: they need a real size to play, so they sit behind the page */
#ext-audio { position: fixed; left: 0; bottom: 0; width: 200px; height: 200px; overflow: hidden; opacity: 0; pointer-events: none; z-index: -1; }
#ext-audio iframe { width: 200px; height: 200px; border: 0; }

/* socials */
.socials { margin-top: 20px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.socials:empty { display: none; }
.socials a { width: calc(var(--soc-size) + 6px); height: calc(var(--soc-size) + 6px); display: grid; place-items: center; transition: transform .2s ease, filter .2s ease; }
.socials a i { width: var(--soc-size); height: var(--soc-size); background: var(--icon); -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
body.s-glow .socials a { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--icon) 55%, transparent)); }
.socials a:hover { transform: translateY(-3px) scale(1.08); filter: drop-shadow(0 0 10px var(--icon)); }

.views { position: absolute; left: 16px; bottom: 12px; display: flex; align-items: center; gap: 5px; font-size: 14.5px; font-weight: 600; }
.views svg { width: 18px; height: 18px; }

/* tooltip */
.tip { position: fixed; z-index: 60; pointer-events: none; padding: 6px 12px; border-radius: 15px; font-size: 14px; color: #fafafa;
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 45px rgba(0,0,0,.45);
  opacity: 0; transform: translate(-50%, calc(-100% - 6px)) scale(.96); transition: opacity .18s, transform .18s; white-space: nowrap; }
.tip.show { opacity: 1; transform: translate(-50%, calc(-100% - 10px)) scale(1); }

@media (max-width: 600px) {
  .name { font-size: min(var(--name-size), 32px); }
  .enter { font-size: 22px; }
  .card { padding: 26px 16px 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .bg-wrap { transition: none; }
  .tv { animation: none; }
}
a.badge { cursor: pointer; transition: transform .15s ease; }
a.badge:hover { transform: translateY(-2px) scale(1.08); }
/* C2W badge looks: recoloured image (keeps shape, transparency and shading) and icon on a background */
.b-tint { position: relative; display: block; width: 22px; height: 22px; }
.b-tint img { width: 100%; height: 100%; filter: grayscale(1) contrast(1.05); }
.b-tint::after { content: ""; position: absolute; inset: 0; background: var(--bc); mix-blend-mode: color; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.b-bg { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.badge .b-bg i { width: 14px; height: 14px; }
