/* =========================================================================
   ddeath.xyz -- public profile page
   Every visual value below is driven by CSS variables that /js/app.js
   writes from the admin settings, so the admin panel can change the look
   without touching this file.
   ========================================================================= */

:root {
  /* typography */
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* background */
  --bg-fallback: #1f5fd6;
  --bg-image: none;
  --bg-blur: 0px;
  --bg-brightness: 1;
  --bg-overlay: 0.1;

  /* glass card */
  --card-w: 900px;
  --card-blur: 24px;
  --card-sat: 160%;
  --card-bg: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.28);
  --card-radius: 28px;
  --card-glow: 0.25;

  /* avatar */
  --avatar-size: 190px;
  --avatar-radius: 22px;
  --avatar-border-w: 2px;
  --avatar-border-c: rgba(255, 255, 255, 0.75);
  --avatar-glow: 24px;

  /* loading screen */
  --loader-bg: #0a0b0b;
  --loader-text: #6b6f6f;
  --ring: rgba(255, 255, 255, 0.55);
  --ring-track: rgba(255, 255, 255, 0.06);
  --ring-speed: 1.2s;

  /* shared ink */
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.72);
  --ink-dim: rgba(255, 255, 255, 0.5);
  --online: #43d67c;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-fallback);
  overflow: hidden;              /* the page is one screen; loader locks scroll */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.scrollable { overflow-y: auto; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] { display: none !important; }

/* =========================================================================
   BACKGROUND
   ========================================================================= */
.bg {
  position: fixed;
  inset: -4vmax;                 /* bleed so blur never shows an edge */
  z-index: 0;
  background-color: var(--bg-fallback);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  filter: blur(var(--bg-blur)) brightness(var(--bg-brightness));
  transform: translateZ(0);
}

.bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.bg-media.show { display: block; }

.bg-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--bg-overlay);
}

/* =========================================================================
   CURSOR TRAIL
   ========================================================================= */
.trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease, transform .12s ease;
}

body.custom-cursor .cursor-dot { opacity: 1; }
body.hide-cursor, body.hide-cursor * { cursor: none !important; }

/* =========================================================================
   PAGE + GLASS CARD
   ========================================================================= */
.page {
  position: relative;
  z-index: 10;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  opacity: 0;
  transition: opacity .7s ease;
}

body.entered .page { opacity: 1; }

.card {
  position: relative;
  width: min(var(--card-w), 100%);
  padding: 34px 38px 22px;
  border-radius: var(--card-radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  -webkit-backdrop-filter: blur(var(--card-blur)) saturate(var(--card-sat));
  backdrop-filter: blur(var(--card-blur)) saturate(var(--card-sat));
  box-shadow:
    0 20px 60px rgba(0, 0, 0, var(--card-glow)),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 0.96));
  transform-style: preserve-3d;
  filter: blur(6px);
  transition: transform .8s cubic-bezier(.22, .8, .25, 1), filter .8s ease;
  overflow: hidden;
}

body.entered .card { filter: blur(0); }
.card.tilt-ready { transition: transform .14s ease-out, filter .8s ease; }

/* travelling light along the border */
.card-light {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg,
    rgba(255, 255, 255, 0.85) 18deg,
    transparent 46deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  animation: spinAngle 7s linear infinite;
}

body.entered .card-light { opacity: .75; transition: opacity 1.2s ease .6s; }
body.no-light .card-light { display: none; }

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spinAngle { to { --angle: 360deg; } }

/* staggered entrance for the card content */
.card-top, .activity, .card-sub, .gh, .card-foot,
.name, .badges, .bio, .socials, .avatar-wrap {
  opacity: 0;
  transform: translateY(10px);
}

body.entered .name        { animation: rise .6s cubic-bezier(.22,.8,.25,1) .22s forwards; }
body.entered .badges      { animation: rise .6s cubic-bezier(.22,.8,.25,1) .30s forwards; }
body.entered .bio         { animation: rise .6s cubic-bezier(.22,.8,.25,1) .38s forwards; }
body.entered .socials     { animation: rise .6s cubic-bezier(.22,.8,.25,1) .46s forwards; }
body.entered .avatar-wrap { animation: rise .7s cubic-bezier(.22,.8,.25,1) .26s forwards; }
body.entered .card-top    { animation: fadeIn .1s linear .2s forwards; }
body.entered .activity    { animation: rise .6s cubic-bezier(.22,.8,.25,1) .54s forwards; }
body.entered .card-sub    { animation: rise .6s cubic-bezier(.22,.8,.25,1) .58s forwards; }
body.entered .gh          { animation: rise .6s cubic-bezier(.22,.8,.25,1) .62s forwards; }
body.entered .card-foot   { animation: rise .6s cubic-bezier(.22,.8,.25,1) .70s forwards; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; transform: none; } }

/* ---------- top row ---------- */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.card-left { min-width: 0; flex: 1; }

.name {
  margin: 0 0 14px;
  font-size: clamp(38px, 5.2vw, 62px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: .01em;
  line-height: 1.05;
  text-shadow: 0 2px 24px rgba(255, 255, 255, .45), 0 1px 2px rgba(0, 0, 0, .18);
  overflow-wrap: anywhere;
}

/* badge pill capsule */
.badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  max-width: 100%;
}

.badge {
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  transition: transform .18s ease;
}

.badge img, .badge svg { width: 100%; height: 100%; object-fit: contain; }
.badge:hover { transform: translateY(-2px) scale(1.12); }

.badge[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 8px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10.5px;
  border-radius: 7px;
  background: rgba(10, 11, 11, .86);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.badge[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* typewriter bio */
.bio {
  margin: 16px 0 14px;
  min-height: 1.5em;
  font-size: 15px;
  font-style: italic;
  font-weight: 300;
  color: rgba(255, 255, 255, .8);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .16);
}

.caret {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -.16em;
  background: rgba(255, 255, 255, .8);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* social icons */
.socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.social {
  position: relative;
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, .88);
  transition: transform .2s cubic-bezier(.2,.9,.3,1.4), color .2s ease, filter .2s ease;
}

.social svg { width: 100%; height: 100%; fill: currentColor; }
.social img { width: 100%; height: 100%; object-fit: contain; }

.social:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.14);
  filter: drop-shadow(0 4px 12px rgba(255, 255, 255, .55));
}

.social[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 9px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  border-radius: 7px;
  background: rgba(10, 11, 11, .86);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.social[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- avatar ---------- */
.card-right { flex: 0 0 auto; }

.avatar-wrap {
  position: relative;
  width: var(--avatar-size);
  height: var(--avatar-size);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--avatar-radius);
  border: var(--avatar-border-w) solid var(--avatar-border-c);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), 0 0 var(--avatar-glow) rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .1);
}

.avatar-deco {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: contain;
  pointer-events: none;
  display: none;
}

.avatar-deco.show { display: block; }

/* =========================================================================
   ACTIVITY / RICH PRESENCE
   ========================================================================= */
.activity {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
}

.act-main { display: flex; align-items: center; gap: 14px; }

.act-art { position: relative; flex: 0 0 auto; }

.act-large {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, .12);
}

.act-small {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(20, 20, 24, .55);
  object-fit: cover;
  display: none;
}

.act-small.show { display: block; }

.act-info { min-width: 0; flex: 1; }

.act-name { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.act-details, .act-state {
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.act-elapsed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--online);
}

.act-elapsed-icon { width: 14px; height: 14px; display: inline-block; }
.act-elapsed-icon svg { width: 100%; height: 100%; fill: currentColor; }

.act-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
}

.act-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  overflow: hidden;
}

.act-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #fff;
  transition: width .9s linear;
}

.act-controls { display: flex; gap: 10px; opacity: .8; }
.act-controls svg { width: 16px; height: 16px; fill: currentColor; }

/* synced lyrics */
.lyrics {
  margin-top: 10px;
  height: 92px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}

.lyrics-track { transition: transform .45s cubic-bezier(.22,.8,.25,1); }

.lyrics-line {
  height: 30px;
  line-height: 30px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .35);
  filter: blur(1.2px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .3s ease, filter .3s ease, transform .3s ease;
}

.lyrics-line.active {
  color: #fff;
  filter: none;
  text-shadow: 0 2px 16px rgba(255, 255, 255, .4);
}

/* =========================================================================
   SUB CARDS (discord user + server)
   ========================================================================= */
.card-sub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.card-sub:empty { display: none; }

.sub {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: background .25s ease, transform .25s ease;
}

.sub:hover { background: rgba(255, 255, 255, .12); }

.sub-body { min-width: 0; flex: 1; }

.sub-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.sub-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-status {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-avatar { position: relative; flex: 0 0 auto; width: 46px; height: 46px; }

.sub-avatar-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .14);
}

.sub-avatar-deco {
  position: absolute;
  inset: -14%;
  width: 128%;
  height: 128%;
  object-fit: contain;
  pointer-events: none;
  display: none;
}

.sub-avatar-deco.show { display: block; }

.status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .22);
  background: #747f8d;
  box-shadow: 0 0 8px rgba(0, 0, 0, .35);
}

.status-dot[data-status="online"] { background: var(--online); }
.status-dot[data-status="idle"]   { background: #f0b232; }
.status-dot[data-status="dnd"]    { background: #f23f43; }

.tag-btn {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .9);
  transition: background .2s ease, transform .2s ease;
}

.tag-btn svg { width: 12px; height: 12px; fill: currentColor; }
.tag-btn:hover { background: rgba(255, 255, 255, .3); transform: scale(1.1); }

.guild-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 11px;
  font-weight: 600;
}

.guild-tag-icon { width: 13px; height: 13px; object-fit: contain; }

.server-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .14);
}

.join-btn {
  padding: 2px 11px;
  border-radius: 8px;
  background: #23a55a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.join-btn:hover {
  background: #1f9550;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(35, 165, 90, .4);
}

.sub-counts {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.count-online { display: inline-flex; align-items: center; gap: 5px; }

.dot-online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 8px rgba(67, 214, 124, .8);
}

.count-sep { opacity: .55; }

/* =========================================================================
   GITHUB WIDGET
   ========================================================================= */
.gh {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

.gh-avatar { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; }
.gh-body { flex: 1; min-width: 0; }
.gh-name { font-weight: 700; font-size: 15px; }

.gh-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 3px 0 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.gh-stats b { color: #fff; }

.gh-btn {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  background: #23a55a;
  font-size: 12px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}

.gh-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(35, 165, 90, .4); }

.gh-joined { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); align-self: flex-end; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  padding-top: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: rgba(255, 255, 255, .85);
  font-variant-numeric: tabular-nums;
}

.foot-left, .foot-right { display: flex; align-items: center; gap: 10px; }
.foot-item { display: inline-flex; align-items: center; gap: 6px; }
.foot-div { opacity: .45; }

.ico { width: 14px; height: 14px; display: inline-block; opacity: .85; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* =========================================================================
   MUSIC BUTTON + MINI PLAYER
   ========================================================================= */
.music-btn {
  position: fixed;
  right: 26px;
  bottom: calc(26px + var(--safe-bottom));
  z-index: 30;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease .9s, transform .5s ease .9s, background .25s ease;
}

body.entered .music-btn { opacity: 1; transform: none; }
.music-btn:hover { background: rgba(255, 255, 255, .28); }
.music-btn svg { width: 22px; height: 22px; fill: #fff; }
.music-btn.playing svg { animation: pulse 2.4s ease-in-out infinite; }

@keyframes pulse { 50% { transform: scale(1.14); } }

.player {
  position: fixed;
  right: 26px;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 31;
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 16px;
  display: flex;
  gap: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .26);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .3s ease, transform .3s cubic-bezier(.22,.8,.25,1);
}

.player.open { opacity: 1; transform: none; pointer-events: auto; }

.player-disc {
  position: relative;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4), inset 0 0 0 5px rgba(255, 255, 255, .08);
  animation: spin 8s linear infinite;
  animation-play-state: paused;
}

.player-disc.spinning { animation-play-state: running; }

@keyframes spin { to { transform: rotate(360deg); } }

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

.player-hole {
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: rgba(15, 15, 18, .9);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .18);
}

.player-body { flex: 1; min-width: 0; }

.player-title {
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-seek { margin-top: 9px; }

.seek, .vol {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  cursor: pointer;
}

.seek::-webkit-slider-thumb, .vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, .7);
}

.seek::-moz-range-thumb, .vol::-moz-range-thumb {
  width: 11px; height: 11px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.player-times {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.player-ctrls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

.pbtn {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  transition: background .2s ease, transform .2s ease;
}

.pbtn:hover { background: rgba(255, 255, 255, .22); transform: scale(1.08); }
.pbtn svg { width: 14px; height: 14px; fill: currentColor; }
.pbtn-main { width: 34px; height: 34px; background: rgba(255, 255, 255, .22); }
.pbtn-main svg { width: 16px; height: 16px; }

.vol-wrap { display: flex; align-items: center; gap: 6px; margin-left: auto; width: 84px; }
.vol-wrap .ico svg { stroke: none; fill: currentColor; }

/* =========================================================================
   LOADING / ENTER SCREEN
   ========================================================================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--loader-bg);
  cursor: pointer;
  transition: opacity .7s ease, filter .7s ease, visibility 0s linear .7s;
}

.loader-inner { display: grid; justify-items: center; gap: 30px; }

.loader-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .58em;
  text-indent: .58em;
  color: var(--loader-text);
  text-transform: lowercase;
}

.loader-ring { position: relative; width: 80px; height: 80px; }

.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.ring-track {
  fill: none;
  stroke: var(--ring-track);
  stroke-width: 2;
}

.ring-arc {
  fill: none;
  stroke: var(--ring);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 62 251;
  transform-origin: 50% 50%;
  animation: ringSpin var(--ring-speed) linear infinite;
  transition: opacity .45s ease;
}

@keyframes ringSpin { to { transform: rotate(360deg); } }

.ring-play {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,.8,.25,1);
  box-shadow: 0 0 34px rgba(255, 255, 255, .35);
}

.ring-play svg { width: 26px; height: 26px; fill: #0a0b0b; margin-left: 2px; }

.loader.ready .ring-play { opacity: 1; transform: scale(1); }
.loader.ready .ring-arc { opacity: 0; }
.loader.ready .loader-ring:hover .ring-play { transform: scale(1.08); }

.loader-hint {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .34em;
  text-indent: .34em;
  color: var(--loader-text);
  animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

body.leaving .loader {
  opacity: 0;
  filter: blur(18px);
  visibility: hidden;
  pointer-events: none;
}

/* =========================================================================
   TOAST
   ========================================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translate(-50%, 14px);
  z-index: 120;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(10, 11, 11, .82);
  border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

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

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 860px) {
  .card { width: 92%; padding: 26px 22px 18px; }

  .card-top { flex-direction: column-reverse; align-items: center; text-align: center; gap: 20px; }
  .card-left { width: 100%; }
  .name { font-size: clamp(32px, 9vw, 46px); }
  .badges, .socials { justify-content: center; }
  .badges { display: flex; }
  .bio { text-align: center; }
  .avatar-wrap { width: min(var(--avatar-size), 56vw); height: min(var(--avatar-size), 56vw); }

  .card-sub { grid-template-columns: 1fr; gap: 12px; }

  .card-foot { flex-direction: column; align-items: stretch; gap: 10px; font-size: 11.5px; }
  .foot-left, .foot-right { justify-content: center; }

  .gh { flex-wrap: wrap; }
  .gh-joined { width: 100%; }

  .player { right: 50%; transform: translate(50%, 12px) scale(.96); transform-origin: bottom center; }
  .player.open { transform: translate(50%, 0) scale(1); }
  .music-btn { right: 18px; bottom: calc(18px + var(--safe-bottom)); }
}

@media (max-width: 420px) {
  .page { padding: 16px 12px calc(16px + var(--safe-bottom)); }
  .activity { padding: 10px; }
  .lyrics { height: 62px; }
  .lyrics-line { height: 31px; line-height: 31px; font-size: 13px; }
}

/* short screens: allow scrolling instead of clipping the card */
@media (max-height: 720px) {
  body.entered { overflow-y: auto; }
  .page { align-items: start; }
}

/* =========================================================================
   REDUCED MOTION
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .card { filter: none; transform: none; }
  .card-top, .activity, .card-sub, .gh, .card-foot,
  .name, .badges, .bio, .socials, .avatar-wrap { opacity: 1; transform: none; }
  .player-disc { animation: none; }
  .trail, .card-light { display: none; }
}
