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

:root {
  --accent: #a78bfa;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --card-bg: rgba(15, 15, 20, 0.72);
  --card-border: rgba(255, 255, 255, 0.08);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text);
  background: #09090b;
  overflow-x: hidden;
}

body.custom-cursor {
  cursor: none;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-media {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
}

.bg-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.cursor-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}

body.custom-cursor .cursor-glow.visible {
  opacity: 1;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  text-align: center;
}

.splash-hint {
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  animation: pulse-text 2s ease-in-out infinite;
}

.splash-pulse {
  width: 12px;
  height: 12px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 24px var(--accent);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.7;
  }
}

.page {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 6rem;
  perspective: 1200px;
}

.profile-card {
  width: min(420px, 100%);
  padding: 2rem 1.75rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  backdrop-filter: blur(var(--card-blur, 16px));
  -webkit-backdrop-filter: blur(var(--card-blur, 16px));
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
}

.profile-card.glow {
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 60px color-mix(in srgb, var(--accent) 15%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.avatar-wrap {
  position: relative;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #18181b;
  background: #22c55e;
}

.status-dot.idle {
  background: #eab308;
}

.status-dot.dnd {
  background: #ef4444;
}

.status-dot.offline {
  background: #71717a;
}

.display-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 0%, color-mix(in srgb, var(--accent) 80%, white) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.username {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.bio {
  margin: 1.25rem 0 0;
  text-align: center;
  line-height: 1.6;
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--text) 85%, transparent);
}

.stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.stat::before {
  margin-right: 0.35rem;
  opacity: 0.7;
}

#stat-views::before {
  content: "👁";
}

#stat-location::before {
  content: "📍";
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.link-btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.06));
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.link-btn:active {
  transform: translateY(0);
}

.link-btn .icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.link-btn .icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.link-btn .label {
  flex: 1;
  text-align: left;
}

.link-btn .mode-hint {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.link-btn:hover .mode-hint {
  opacity: 1;
}

.card-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.footer-text {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-text:empty {
  display: none;
}

.card-footer:has(.footer-text:empty) {
  display: none;
}

.audio-widget {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem 0.65rem 0.65rem;
  width: min(420px, calc(100% - 2rem));
  background: rgba(15, 15, 20, 0.88);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.audio-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  transition: transform 0.15s ease, filter 0.2s ease;
}

.audio-toggle:hover {
  filter: brightness(1.1);
  transform: scale(1.05);
}

.audio-icon-pause {
  display: none;
  letter-spacing: -2px;
}

.audio-widget.playing .audio-icon-play {
  display: none;
}

.audio-widget.playing .audio-icon-pause {
  display: inline;
}

.audio-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.audio-title {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
  opacity: 0.5;
}

.audio-visualizer span {
  width: 3px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  transition: height 0.1s ease;
}

.audio-widget.playing .audio-visualizer {
  opacity: 1;
}

.audio-volume {
  width: 72px;
  accent-color: var(--accent);
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 60;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  background: rgba(24, 24, 27, 0.95);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

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

@media (max-width: 480px) {
  .profile-card {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .display-name {
    font-size: 1.5rem;
  }

  .audio-volume {
    width: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-hint,
  .splash-pulse,
  .profile-card,
  .link-btn,
  .cursor-glow {
    animation: none;
    transition: none;
  }

  .bg-media {
    transition: none;
  }
}
