:root {
  --accent: #a855f7;
  --accent2: #22d3ee;
  --bg: #05050a;
  --card-bg: rgba(15, 15, 22, 0.55);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f7;
  --text-dim: #9ca0ad;
}

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

[hidden] { display: none !important; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
}

/* ---------- backgrounds ---------- */
#bg-canvas, #bg-video, #bg-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
#bg-video, #bg-image { display: none; }
#bg-image { background-size: cover; background-position: center; }

#bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 30%, rgba(5,5,10,0.2), rgba(5,5,10,0.85) 75%);
  pointer-events: none;
}

/* ---------- custom cursor ---------- */
.cursor-el { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; border-radius: 50%; transform: translate(-50%, -50%); }
#cursor-dot { width: 6px; height: 6px; background: var(--accent2); box-shadow: 0 0 8px var(--accent2); }
#cursor-ring { width: 30px; height: 30px; border: 1.5px solid var(--accent); opacity: 0.6; transition: width .15s, height .15s, opacity .15s; }
body.custom-cursor, body.custom-cursor * { cursor: none !important; }
body.cursor-active #cursor-ring.hover { width: 44px; height: 44px; opacity: 1; }

/* ---------- card ---------- */
.card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 28px 28px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: card-in .6s cubic-bezier(.2,.9,.3,1);
}

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

.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), var(--accent), var(--accent2), var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotate-glow 6s linear infinite;
  opacity: 0.8;
  pointer-events: none;
}

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

/* ---------- avatar ---------- */
.avatar-wrap { position: relative; width: 96px; height: 96px; margin: 0 auto 18px; }
#avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 24px rgba(168,85,247,0.5), 0 0 48px rgba(34,211,238,0.25);
  animation: avatar-pulse 3s ease-in-out infinite;
}
@keyframes avatar-pulse {
  0%, 100% { box-shadow: 0 0 22px rgba(168,85,247,0.45), 0 0 40px rgba(34,211,238,0.2); }
  50% { box-shadow: 0 0 32px rgba(168,85,247,0.7), 0 0 56px rgba(34,211,238,0.4); }
}

/* ---------- text ---------- */
#display-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 4s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

#handle { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.badge {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text-dim);
}

.bio { margin-top: 16px; font-size: 14px; color: var(--text); line-height: 1.5; min-height: 1.4em; }
.bio .cursor-blink { display: inline-block; width: 1px; background: var(--accent2); margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- socials ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.social-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text); transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  text-decoration: none;
}
.social-btn:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 18px rgba(168,85,247,0.45);
}
.social-btn svg { width: 18px; height: 18px; }

/* ---------- view counter ---------- */
.view-counter {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim);
}

/* ---------- music toggle ---------- */
.music-toggle {
  position: fixed; bottom: 22px; right: 22px; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(15,15,22,0.7); backdrop-filter: blur(10px);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 0 20px rgba(168,85,247,0.3);
  transition: box-shadow .2s;
}
.music-toggle:hover { box-shadow: 0 0 28px rgba(168,85,247,0.55); }

/* ---------- responsive ---------- */
@media (max-width: 420px) {
  .card { padding: 30px 20px 22px; border-radius: 20px; }
  #display-name { font-size: 22px; }
}

@media (pointer: coarse) {
  .cursor-el { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
