:root {
  color-scheme: dark;
  --bg: #000;
  --text: #f7f7f7;
  --muted: rgba(255,255,255,.72);
  --soft: rgba(255,255,255,.46);
  --glass: rgba(0,0,0,.50);
  --line: rgba(255,255,255,.42);
  --line-soft: rgba(255,255,255,.18);
  --glow: rgba(255,255,255,.42);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #000;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.bg-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: var(--background-image, url("assets/background.png"));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: .88;
  filter: contrast(1.05) brightness(.82);
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .44;
  filter: grayscale(1) contrast(1.18) brightness(.72);
}

body.using-image-background .backdrop { display: none; }

.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.10), transparent 19rem),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,.09), transparent 36rem),
    #000;
}

.shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 21rem, rgba(0,0,0,.20) 38rem, rgba(0,0,0,.66) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.04), rgba(0,0,0,.36));
}

.chain {
  position: absolute;
  top: -4rem;
  left: 50%;
  width: 1.15rem;
  height: 23rem;
  border-radius: 999px;
  opacity: .44;
  filter: blur(.15px) drop-shadow(0 0 18px rgba(255,255,255,.22));
  background:
    repeating-linear-gradient(160deg,
      rgba(255,255,255,.84) 0 .38rem,
      rgba(80,80,80,.9) .38rem .72rem,
      rgba(210,210,210,.55) .72rem 1.02rem,
      rgba(20,20,20,.8) 1.02rem 1.38rem);
}
.chain-left { transform: translateX(-4.6rem) rotate(-13deg); }
.chain-right { transform: translateX(3.5rem) rotate(13deg); }

.pendant {
  position: absolute;
  top: 10rem;
  left: 50%;
  width: 13rem;
  height: 17rem;
  transform: translateX(-50%);
  opacity: .48;
  filter: drop-shadow(0 0 24px rgba(255,255,255,.22));
}
.pendant::before,
.pendant::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.68), rgba(60,60,60,.68), rgba(255,255,255,.76), transparent);
  border: 1px solid rgba(255,255,255,.18);
  clip-path: polygon(50% 0, 62% 28%, 100% 42%, 66% 56%, 56% 100%, 44% 100%, 34% 56%, 0 42%, 38% 28%);
}
.pendant::before { width: 12rem; height: 10rem; top: 3.5rem; }
.pendant::after { width: 3.3rem; height: 16rem; }

.background-word {
  position: absolute;
  left: 50%;
  bottom: 8vh;
  transform: translateX(-50%) skewX(-8deg);
  width: max-content;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5rem, 18vw, 17rem);
  font-weight: 900;
  letter-spacing: -.095em;
  line-height: .76;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,.30);
  text-shadow:
    0 0 2px rgba(255,255,255,.88),
    0 0 24px rgba(255,255,255,.17),
    0 22px 60px rgba(0,0,0,.96);
  opacity: .58;
}
.background-word::after {
  content: attr(data-text);
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 4rem 1.25rem;
}

.glass {
  background: linear-gradient(180deg, rgba(0,0,0,.58), rgba(0,0,0,.43));
  border: 1px solid var(--line);
  box-shadow:
    0 24px 110px rgba(0,0,0,.72),
    inset 0 0 0 1px rgba(255,255,255,.035),
    0 0 24px rgba(255,255,255,.035);
  backdrop-filter: blur(14px);
}


.sound-toggle {
  position: fixed;
  z-index: 10;
  top: 1rem;
  left: 1rem;
  width: 2.65rem;
  height: 2.65rem;
  display: grid;
  place-items: center;
  color: white;
  background:
    radial-gradient(circle at 42% 30%, rgba(255,255,255,.20), rgba(255,255,255,.04) 36%, rgba(0,0,0,.62) 100%);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow:
    0 12px 38px rgba(0,0,0,.72),
    inset 0 0 0 1px rgba(255,255,255,.05),
    0 0 0 rgba(255,255,255,0);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.sound-toggle:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(255,255,255,.50);
  box-shadow:
    0 16px 46px rgba(0,0,0,.78),
    0 0 28px rgba(255,255,255,.14);
}
.sound-toggle:active { transform: scale(.96); }
.sound-toggle:focus-visible { outline: 2px solid rgba(255,255,255,.86); outline-offset: 4px; }
.sound-toggle .sound-icon {
  position: absolute;
  width: 1.36rem;
  height: 1.36rem;
  fill: currentColor;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.40));
  transition: opacity .14s ease, transform .14s ease;
}
.sound-toggle .sound-ring {
  position: absolute;
  inset: .34rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  opacity: 0;
  transform: scale(.72);
  transition: opacity .18s ease, transform .18s ease;
}
.sound-toggle .sound-icon-on { opacity: 0; transform: scale(.72); }
.sound-toggle .sound-icon-off { opacity: .95; transform: scale(1); }
.sound-toggle.playing {
  border-color: rgba(255,255,255,.62);
  box-shadow:
    0 16px 46px rgba(0,0,0,.78),
    0 0 18px rgba(255,255,255,.30),
    0 0 48px rgba(255,255,255,.16);
}
.sound-toggle.playing .sound-ring {
  opacity: 1;
  transform: scale(1);
  animation: soundPulse 1.6s ease-in-out infinite;
}
.sound-toggle.playing .sound-icon-on { opacity: 1; transform: scale(1); }
.sound-toggle.playing .sound-icon-off { opacity: 0; transform: scale(.72); }
.sound-toggle.is-loading { opacity: .68; pointer-events: none; }
.sound-toggle.is-error {
  border-color: rgba(255,80,96,.58);
  box-shadow: 0 0 24px rgba(255,80,96,.18), 0 12px 38px rgba(0,0,0,.72);
}
@keyframes soundPulse {
  0%, 100% { opacity: .36; transform: scale(.92); }
  50% { opacity: .95; transform: scale(1.24); }
}

.profile-card {
  position: relative;
  width: min(58rem, 92vw);
  min-height: 12rem;
  border-radius: 1.85rem;
  padding: 1.75rem 2.25rem 1.7rem;
  overflow: hidden;
}
.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 52% 70%, rgba(255,255,255,.13), transparent 16rem),
    linear-gradient(90deg, rgba(255,255,255,.04), transparent 32%, rgba(255,255,255,.035));
  pointer-events: none;
}

.profile-copy { position: relative; z-index: 1; max-width: calc(100% - 6.5rem); }
h1 {
  margin: 0;
  max-width: 100%;
  color: white;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: .95;
  font-weight: 950;
  letter-spacing: -.075em;
  text-shadow:
    .04em 0 rgba(255,255,255,.6),
    -.035em 0 rgba(255,255,255,.25),
    0 0 18px rgba(255,255,255,.22);
  filter: contrast(1.25);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy p {
  margin: .75rem 0 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.views {
  position: absolute;
  top: 1.55rem;
  right: 2.05rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  color: rgba(255,255,255,.92);
  font-size: 1rem;
  font-weight: 850;
  text-shadow: 0 0 18px rgba(255,255,255,.22);
}
.views svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }

.social-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3.2rem;
  flex-wrap: wrap;
}
.social-link {
  --s: 3.1rem;
  width: var(--s);
  height: var(--s);
  display: grid;
  place-items: center;
  border-radius: .9rem;
  color: white;
  text-decoration: none;
  background: rgba(255,255,255,.92);
  box-shadow:
    0 0 12px rgba(255,255,255,.65),
    0 0 34px rgba(255,255,255,.34),
    inset 0 0 0 1px rgba(255,255,255,.45);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
  mix-blend-mode: screen;
}
.social-link:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 0 18px rgba(255,255,255,.85),
    0 0 54px rgba(255,255,255,.46),
    inset 0 0 0 1px rgba(255,255,255,.72);
}
.social-link svg { width: 2rem; height: 2rem; fill: #000; }
.social-link.github svg { width: 2.08rem; height: 2.08rem; }
.social-link.tiktok svg { width: 1.82rem; height: 1.82rem; }

.status-card {
  position: relative;
  width: min(58rem, 92vw);
  min-height: 6.4rem;
  border-radius: 1.55rem;
  padding: 1.05rem 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: 5rem 1fr 4.65rem;
  align-items: center;
  gap: .95rem;
  overflow: hidden;
}
.status-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 50%, rgba(255,255,255,.11), transparent 13rem),
    linear-gradient(90deg, rgba(255,255,255,.045), transparent 44%, rgba(255,255,255,.045));
  pointer-events: none;
}

.avatar-wrap {
  position: relative;
  z-index: 1;
  width: 4.4rem;
  height: 4.4rem;
}
.avatar {
  width: 4.4rem;
  height: 4.4rem;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.20);
  box-shadow: 0 0 28px rgba(255,255,255,.14);
}
.status-badge {
  position: absolute;
  right: -.05rem;
  bottom: .1rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #777;
  border: .25rem solid rgba(0,0,0,.78);
}
.status-badge.online { background: #3bd671; }
.status-badge.idle { background: #ffc947; }
.status-badge.dnd { background: #ff4258; }
.status-badge.offline { background: #777; }

.status-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.name-row {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  color: white;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.06em;
  text-shadow: 0 0 18px rgba(255,255,255,.20);
}
.name-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.verified {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: rgba(115,148,255,.95);
  color: white;
  font-size: .8rem;
  box-shadow: 0 0 18px rgba(115,148,255,.55);
}
.status-text,
.activity-subtext {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -.035em;
}
.status-text {
  margin-top: .45rem;
  color: rgba(255,255,255,.88);
  font-size: clamp(.95rem, 1.55vw, 1.18rem);
  font-weight: 650;
}
.activity-subtext {
  margin-top: .14rem;
  color: rgba(255,255,255,.62);
  font-size: .9rem;
  font-weight: 600;
}
.activity-art-wrap {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: 4.25rem;
  height: 4.25rem;
  display: none;
  border-radius: .55rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 0 28px rgba(255,255,255,.14);
}
.activity-art-wrap.show { display: block; }
.activity-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.visualizer {
  position: absolute;
  right: .35rem;
  top: .35rem;
  height: 1.15rem;
  display: flex;
  align-items: flex-end;
  gap: .11rem;
}
.visualizer i {
  width: .18rem;
  min-height: .32rem;
  border-radius: 999px;
  background: #39ff9d;
  box-shadow: 0 0 8px rgba(57,255,157,.95);
  animation: bounce .72s ease-in-out infinite alternate;
}
.visualizer i:nth-child(2) { animation-delay: .11s; }
.visualizer i:nth-child(3) { animation-delay: .22s; }
.visualizer i:nth-child(4) { animation-delay: .33s; }
@keyframes bounce { from { height: .32rem; } to { height: 1.1rem; } }

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255,255,255,.15);
}
.progress div {
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,.90);
  box-shadow: 0 0 18px rgba(255,255,255,.55);
}

@media (max-width: 760px) {
  .stage { justify-content: center; padding: 3.5rem .85rem; gap: .85rem; }
  .profile-card { width: 95vw; min-height: 11rem; padding: 1.3rem 1.25rem 1.35rem; border-radius: 1.45rem; }
  .profile-copy { max-width: calc(100% - 4.6rem); }
  .views { top: 1.25rem; right: 1.25rem; font-size: .9rem; }
  .social-row { margin-top: 2.55rem; gap: .72rem; }
  .social-link { --s: 2.6rem; border-radius: .75rem; }
  .social-link svg { width: 1.6rem; height: 1.6rem; }
  .status-card { width: 95vw; grid-template-columns: 4.1rem 1fr 3.7rem; min-height: 5.4rem; padding: .85rem .85rem 1.1rem; border-radius: 1.25rem; }
  .avatar-wrap, .avatar { width: 3.6rem; height: 3.6rem; }
  .status-badge { width: 1rem; height: 1rem; border-width: .22rem; }
  .activity-art-wrap { width: 3.45rem; height: 3.45rem; }
  .background-word { bottom: 13vh; }
}

@media (max-width: 460px) {
  .profile-copy p { white-space: normal; }
  .profile-card { min-height: 12.5rem; }
  .social-row { margin-top: 2rem; justify-content: flex-start; }
  .status-card { grid-template-columns: 3.6rem 1fr; }
  .activity-art-wrap { display: none !important; }
}
