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

:root {
  --bg: #07070b;
  --card: rgba(16, 16, 24, 0.55);
  --card-strong: rgba(24, 24, 34, 0.78);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f3f3f8;
  --muted: #9494a8;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(1200px 800px at 50% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(900px 700px at 110% 110%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%);
  filter: blur(24px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cursor-glow.is-visible { opacity: 1; }

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: 30px 26px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  animation: card-in 0.75s var(--ease) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.profile { text-align: center; }

.avatar-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
}

.avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  opacity: 0.65;
  filter: blur(8px);
  animation: spin 7s linear infinite;
}

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

.avatar {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: var(--card-strong);
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  text-transform: uppercase;
  user-select: none;
}

.presence-dot {
  position: absolute;
  right: 2px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #0b0b12;
  background: #80848e;
}

.name {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.handle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.bio {
  min-height: 2.8em;
  margin: 16px 0 18px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #c7c7d6;
}

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

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

.presence {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-strong);
  animation: card-in 0.6s var(--ease) both;
}

.presence-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

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

.presence-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence-activity {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.spotify-art img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
}

.spotify-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  font-size: 0.74rem;
  line-height: 1.3;
}

.spotify-meta span:first-child {
  color: #1ed760;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-meta span:last-child {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.spotify-bars i {
  width: 3px;
  background: #1ed760;
  border-radius: 2px;
  animation: bounce 0.9s ease-in-out infinite;
}
.spotify-bars i:nth-child(1) { height: 6px; animation-delay: -0.2s; }
.spotify-bars i:nth-child(2) { height: 13px; animation-delay: -0.5s; }
.spotify-bars i:nth-child(3) { height: 9px; animation-delay: -0.8s; }

@keyframes bounce { 50% { transform: scaleY(0.45); } }

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

.social {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--card-strong);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  animation: card-in 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms + 120ms);
}

.social img {
  width: 19px;
  height: 19px;
  opacity: 0.82;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.social:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 10px 24px -12px var(--accent);
}

.social:hover img { opacity: 1; transform: scale(1.08); }

.links { display: flex; flex-direction: column; gap: 10px; }

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--card-strong);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.25s var(--ease), border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  animation: card-in 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms + 220ms);
  overflow: hidden;
}

.link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 14px 30px -18px var(--accent);
}

.link:hover::after { opacity: 1; }

.link-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex: none;
  opacity: 0.85;
}

.link-label { position: relative; flex: 1; }

.link-arrow {
  position: relative;
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.45;
  transition: transform 0.25s var(--ease), opacity 0.25s ease;
}

.link:hover .link-arrow { opacity: 1; transform: translate(2px, -2px); }

.link-count {
  position: relative;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--muted);
}

.spacer { flex: 1; }

.audio-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-strong);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.audio-btn:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

.eq { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.eq i {
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: var(--muted);
  transition: background 0.25s ease;
}

.audio-btn.is-playing .eq i {
  background: var(--accent);
  animation: bounce 0.8s ease-in-out infinite;
}

.audio-btn.is-playing .eq i:nth-child(1) { height: 8px; animation-delay: -0.1s; }
.audio-btn.is-playing .eq i:nth-child(2) { height: 13px; animation-delay: -0.35s; }
.audio-btn.is-playing .eq i:nth-child(3) { height: 10px; animation-delay: -0.6s; }
.audio-btn.is-playing .eq i:nth-child(4) { height: 6px; animation-delay: -0.25s; }

.audio-title {
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

[hidden] { display: none !important; }

@media (max-width: 420px) {
  .card { padding: 26px 18px 16px; }
  .link { padding: 12px 13px; font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .cursor-glow { display: none; }
}
