@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --accent: rgb(214, 166, 255);
  --accent-rgb: 214, 166, 255;
  --text: #f4f4f7;
  --text-muted: rgba(244, 244, 247, .64);
  --text-faint: rgba(244, 244, 247, .4);
  --surface: rgba(12, 12, 18, .46);
  --surface-raised: rgba(255, 255, 255, .045);
  --surface-hover: rgba(255, 255, 255, .075);
  --border: rgba(255, 255, 255, .09);
  --online: #23a55a;
  --idle: #f0b232;
  --dnd: #f23f43;
  --offline: #80848e;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --font: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  overflow: hidden;
  font-family: var(--font);
  color: var(--text);
  background: #06060a;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

img,
svg,
video,
canvas {
  display: block;
}

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
}

.visually-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #06060a;
}

.backdrop__video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: blur(var(--blur, 0));
}

.backdrop__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(var(--accent-rgb), .2), transparent 70%),
    radial-gradient(50% 50% at 85% 80%, rgba(var(--accent-rgb), .12), transparent 70%);
}

.backdrop__dim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(0, 0, 0, .55) 100%),
    rgba(0, 0, 0, var(--dim, .35));
}

.backdrop__particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: opacity .9s ease, visibility .9s;
}

.gate:focus-visible {
  outline: none;
}

.is-entered .gate {
  opacity: 0;
  visibility: hidden;
}

.gate__text {
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: lowercase;
  color: var(--text-muted);
  text-shadow: 0 0 18px rgba(var(--accent-rgb), .7);
  animation: breathe 2.4s ease-in-out infinite;
}

.volume {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .6s .6s, transform .6s .6s var(--ease-out);
}

.is-entered .volume {
  opacity: 1;
  transform: none;
}

.volume__range {
  width: 0;
  opacity: 0;
  transition: width .3s var(--ease-out), opacity .3s, margin .3s;
}

.volume:hover .volume__range,
.volume:focus-within .volume__range {
  width: 104px;
  margin-right: 10px;
  opacity: 1;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  transition: background-color .2s, transform .2s;
}

.icon-button:hover {
  background: rgba(255, 255, 255, .08);
}

.icon-button:active {
  transform: scale(.92);
}

.range {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--accent) var(--progress, 0%), rgba(255, 255, 255, .14) var(--progress, 0%));
  cursor: pointer;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), .9);
  transition: transform .15s;
}

.range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), .9);
}

.range:hover::-webkit-slider-thumb {
  transform: scale(1.2);
}

.stage {
  position: relative;
  z-index: 10;
  display: flex;
  height: 100%;
  padding: 24px 16px;
  overflow-y: auto;
  perspective: 1400px;
  scrollbar-width: none;
}

.stage::-webkit-scrollbar {
  display: none;
}

.card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  width: min(100%, 440px);
  margin: auto;
  padding: 34px 24px 20px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .55),
    0 0 70px rgba(var(--accent-rgb), .14);
  opacity: 0;
  transform: translateY(28px) scale(.97);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.is-entered .card {
  opacity: 1;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}

.is-ready .card {
  transition: opacity 1s var(--ease-out), transform .25s ease-out;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), rgba(255, 255, 255, .08) 0%, rgba(var(--accent-rgb), .75) 12%, rgba(255, 255, 255, .08) 26%, rgba(255, 255, 255, .08) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: orbit 7s linear infinite;
  pointer-events: none;
}

.card__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--glare-x, 50%) var(--glare-y, 0%), rgba(255, 255, 255, .06), transparent 60%);
  pointer-events: none;
}

.views {
  position: absolute;
  top: 16px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.profile__avatar {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto 14px;
}

.profile__image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
  box-shadow:
    0 0 0 3px rgba(var(--accent-rgb), .35),
    0 0 34px rgba(var(--accent-rgb), .4);
}

.profile__decoration {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  pointer-events: none;
}

.profile__status {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 24px;
  height: 24px;
  border: 4px solid #121218;
  border-radius: 50%;
  background: var(--offline);
  transition: background-color .3s, box-shadow .3s;
}

.profile__status[data-status="online"] {
  background: var(--online);
  box-shadow: 0 0 14px rgba(35, 165, 90, .75);
}

.profile__status[data-status="idle"] {
  background: var(--idle);
}

.profile__status[data-status="dnd"] {
  background: var(--dnd);
}

.profile__name {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 35px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-shadow: 0 0 24px rgba(var(--accent-rgb), .75);
}

.profile__badges {
  display: inline-flex;
  gap: 6px;
  font-size: 15px;
}

.badge {
  position: relative;
  display: inline-flex;
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), .8));
  cursor: default;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  z-index: 5;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: 500 12px/1.3 var(--font);
  white-space: nowrap;
  color: #fff;
  text-shadow: none;
  background: rgba(10, 10, 14, .94);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease-out);
}

.badge::after {
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
}

.social::after {
  top: calc(100% + 8px);
  transform: translate(-50%, -4px);
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.profile__username {
  display: block;
  margin: 4px auto 0;
  min-height: 21px;
  font-size: 15px;
  color: var(--text-muted);
  transition: color .2s;
}

.profile__username:hover {
  color: var(--text);
}

.custom-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  background: var(--surface-raised);
}

.custom-status__emoji {
  width: 18px;
  height: 18px;
  line-height: 18px;
}

.custom-status__text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile__bio {
  min-height: 24px;
  margin-top: 14px;
  font-size: 16px;
  color: var(--text-muted);
}

.profile__caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -.15em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

.profile__location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-faint);
}

.presence {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.presence:empty {
  display: none;
}

.activity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  background: var(--surface-raised);
  animation: rise .5s var(--ease-out) both;
  transition: border-color .2s, background-color .2s;
}

.activity__media {
  position: relative;
  flex: none;
  width: 60px;
  height: 60px;
}

.activity__cover,
.activity__placeholder {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
}

.activity__placeholder {
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), .1);
}

.activity__badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  border: 3px solid #16161c;
  border-radius: 50%;
  background: #16161c;
}

.activity__body {
  flex: 1;
  min-width: 0;
}

.activity__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.activity__title {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 600;
}

.activity__line {
  font-size: 13px;
  color: var(--text-muted);
}

.activity__title,
.activity__line {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.activity__timer {
  font-variant-numeric: tabular-nums;
}

.activity__progress {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
}

.activity__progress-fill {
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), .7);
  transition: width 1s linear;
}

.activity__times {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.activity--spotify .activity__label {
  color: #1ed760;
}

.activity--spotify .activity__progress-fill {
  background: #1ed760;
  box-shadow: 0 0 8px rgba(30, 215, 96, .6);
}

a.activity--spotify:hover {
  border-color: rgba(30, 215, 96, .38);
  background: var(--surface-hover);
}

.server {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  background: var(--surface-raised);
  transition: border-color .2s, transform .2s var(--ease-out);
}

.server:hover {
  border-color: rgba(var(--accent-rgb), .45);
  transform: translateY(-1px);
}

.server__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
}

.server__info {
  display: grid;
  flex: 1;
  min-width: 0;
}

.server__name {
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.server__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 2px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--text-muted);
}

.server__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--offline);
}

.server__dot--online {
  background: var(--online);
}

.server__join {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--online);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.feature {
  --tint: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  background: var(--surface-raised);
  transition: transform .3s var(--ease-out), border-color .3s, box-shadow .3s;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tint) 55%, transparent);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--tint) 22%, transparent);
}

.feature__media {
  position: relative;
  display: grid;
  place-items: center;
  height: 96px;
  padding: 12px;
  overflow: hidden;
  background:
    radial-gradient(80% 90% at 50% 100%, color-mix(in srgb, var(--tint) 38%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(0, 0, 0, .25));
}

.feature__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .12) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
}

.feature:hover .feature__media::after {
  transform: translateX(120%);
}

.feature__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5));
  transition: transform .4s var(--ease-out);
}

.feature__image.is-pixelated {
  height: 72px;
  image-rendering: pixelated;
}

.feature:hover .feature__image {
  transform: scale(1.06) rotate(-1deg);
}

.feature__placeholder {
  font-size: 34px;
  color: var(--tint);
}

.feature__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
}

.feature__copy {
  display: grid;
  flex: 1;
  min-width: 0;
}

.feature__title {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.feature__subtitle {
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-faint);
}

.feature__arrow {
  font-size: 12px;
  color: var(--text-faint);
  transition: color .2s, transform .3s var(--ease-out);
}

.feature:hover .feature__arrow {
  color: var(--tint);
  transform: translate(2px, -2px);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.social {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 20px;
  background: var(--surface-raised);
  transition: transform .25s var(--ease-out), border-color .25s, color .25s, box-shadow .25s;
}

.social:hover {
  color: var(--brand, var(--accent));
  border-color: color-mix(in srgb, var(--brand, var(--accent)) 50%, transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--brand, var(--accent)) 30%, transparent);
  transform: translateY(-4px) scale(1.06);
}

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.player__toggle {
  flex: none;
  width: 40px;
  height: 40px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), .16);
}

.player__toggle:hover {
  background: rgba(var(--accent-rgb), .28);
}

.player__main {
  flex: 1;
  min-width: 0;
}

.player__meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
}

.player__title {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

.player__artist {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-faint);
}

.player__seek {
  width: 100%;
  margin-top: 8px;
}

.player__time {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.player__volume {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-faint);
}

.player__volume .range {
  width: 72px;
}

.toast {
  position: fixed;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 60;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: rgba(10, 10, 14, .92);
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity .3s, transform .3s var(--ease-out);
  pointer-events: none;
}

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

.spark {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  pointer-events: none;
  transform: translate(var(--x), var(--y));
  animation: spark .7s ease-out forwards;
}

@keyframes spark {
  to {
    opacity: 0;
    transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) scale(0);
  }
}

@keyframes orbit {
  to {
    --angle: 360deg;
  }
}

@keyframes breathe {
  50% {
    opacity: .35;
  }
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (max-width: 480px) {
  .stage {
    padding-top: 72px;
  }

  .card {
    padding: 30px 16px 18px;
  }

  .profile__name {
    font-size: 26px;
  }

  .player__volume {
    display: none;
  }

  .volume__range {
    width: 96px;
    margin-right: 10px;
    opacity: 1;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }

  .feature__media {
    height: 84px;
  }
}

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