/* ============ base ============ */
:root {
  --accent: #a855f7;
  --accent2: #ec4899;
  --card-opacity: 0.35;
  --overlay-opacity: 0.55;
  --blur: 2px;
}

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

html, body {
  height: 100%;
  background: #05040a;
  color: #f5f5f7;
  font-family: 'Sora', system-ui, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* ============ video background ============ */
.bg-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #1a0b2e, #05040a 70%);
}
#bgVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(var(--blur)) saturate(1.1);
  transform: scale(1.05);
}
.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(0,0,0,0), rgba(0,0,0,0.6)),
    rgba(0,0,0,var(--overlay-opacity));
}

/* ============ enter screen ============ */
.enter-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3,2,8,0.7);
  backdrop-filter: blur(10px);
  cursor: pointer;
  animation: fadeIn 0.6s ease;
}
.enter-inner { position: relative; text-align: center; }
.enter-pulse {
  position: absolute;
  inset: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent), transparent 60%);
  opacity: 0.25;
  animation: pulse 2.5s ease-in-out infinite;
}
.enter-text {
  font-size: clamp(1.6rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  position: relative;
}
.enter-sub {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.5;
  animation: blink 2s ease-in-out infinite;
}

/* ============ app / card ============ */
.app {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  animation: fadeIn 0.8s ease;
}
.card {
  width: min(440px, 100%);
  padding: 34px 28px 24px;
  border-radius: 24px;
  text-align: center;
  background: rgba(20, 12, 34, var(--card-opacity));
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: floatUp 0.9s cubic-bezier(.2,.8,.2,1);
}

/* ============ avatar + visualizer ============ */
.avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
}
.avatar-wrap.size-small  { width: 90px;  height: 90px; }
.avatar-wrap.size-medium { width: 120px; height: 120px; }
.avatar-wrap.size-large  { width: 160px; height: 160px; }
.viz {
  position: absolute;
  inset: -30px;
  width: calc(100% + 60px);
  height: calc(100% + 60px);
  pointer-events: none;
}
.avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background:
    linear-gradient(#0c0716, #0c0716) padding-box,
    linear-gradient(135deg, var(--accent), var(--accent2)) border-box;
  box-shadow: 0 0 30px rgba(168,85,247,0.5);
  animation: glowPulse 3s ease-in-out infinite;
}
.avatar[src=""], .avatar:not([src]) { visibility: hidden; }

/* ============ bare layout (no card, text over video) ============ */
.card.bare {
  background: transparent;
  border: none;
  backdrop-filter: none;
  box-shadow: none;
}
.card.bare .display-name,
.card.bare .bio,
.card.bare .status { text-shadow: 0 2px 12px rgba(0,0,0,0.7); }

/* ============ name + bio ============ */
.display-name {
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.bio {
  margin: 10px auto 22px;
  max-width: 340px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(245,245,247,0.85);
  min-height: 1.4em;
}
.bio .cursor { color: var(--accent); animation: blink 1s step-end infinite; }

/* ============ links ============ */
.links { display: flex; flex-direction: column; gap: 12px; }
.link-btn {
  --glow: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  position: relative;
  overflow: hidden;
}
.link-btn i { font-size: 1.2rem; width: 24px; text-align: center; color: var(--glow); transition: transform .2s ease; }
.link-btn .lbl { flex: 1; text-align: left; }
.link-btn .chev { opacity: 0.35; font-size: 0.85rem; }
.link-btn:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.1);
  border-color: color-mix(in srgb, var(--glow) 60%, transparent);
  box-shadow: 0 8px 26px color-mix(in srgb, var(--glow) 40%, transparent);
}
.link-btn:hover i { transform: scale(1.15); }
.link-btn::after {
  content: "";
  position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}
.link-btn:hover::after { left: 130%; }

/* ============ footer ============ */
.foot { margin-top: 20px; }
.views {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  font-family: 'JetBrains Mono', monospace;
}

/* ============ music player ============ */
.player {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 40px;
  background: rgba(20,12,34,0.6);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  max-width: 92vw;
}
.play-btn {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: transform .15s ease;
}
.play-btn:active { transform: scale(0.92); }
.nav-btn {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.nav-btn:hover { background: rgba(255,255,255,0.14); }
.nav-btn:active { transform: scale(0.9); }
.track { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.track-title-wrap { width: 150px; overflow: hidden; white-space: nowrap; }
.track-title {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding-left: 100%;
  animation: marquee 9s linear infinite;
}
.volume { width: 150px; accent-color: var(--accent); cursor: pointer; }

/* ============ spotify embed ============ */
.spotify-embed {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(500px, 92vw);
}

/* ============ live clock chip ============ */
.clock {
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
}
.clock i { margin-right: 4px; opacity: 0.7; }

/* ============ rotating lyrics ============ */
.lyrics {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  max-width: 90vw;
  text-align: center;
  font-size: 0.92rem;
  font-style: italic;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.lyrics.show { opacity: 1; }

/* ============ copy toast ============ */
.flash {
  position: fixed;
  z-index: 60;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: rgba(20,12,34,0.96);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ edit link (gear) ============ */
.edit-link {
  position: fixed;
  z-index: 20;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  color: rgba(255,255,255,0.5);
  background: rgba(20,12,34,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}
.edit-link:hover { color: #fff; transform: rotate(45deg); }

/* ============ TEXT EFFECTS ============ */

/* rainbow */
.fx-rainbow {
  background: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #00ff85, #00cfff, #a855f7, #ff004c);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowSlide 6s linear infinite;
}

/* glow */
.fx-glow {
  color: #fff;
  text-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent), 0 0 40px var(--accent2);
  animation: glowText 2.5s ease-in-out infinite;
}

/* glitch */
.glitch, .fx-glitch {
  position: relative;
  color: #fff;
}
.glitch::before, .glitch::after,
.fx-glitch::before, .fx-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
}
.glitch::before, .fx-glitch::before {
  color: #00fff9;
  clip-path: inset(0 0 55% 0);
  animation: glitchTop 2.5s infinite linear alternate-reverse;
}
.glitch::after, .fx-glitch::after {
  color: #ff00c1;
  clip-path: inset(50% 0 0 0);
  animation: glitchBottom 2s infinite linear alternate-reverse;
}

/* ============ keyframes ============ */
@keyframes rainbowSlide { to { background-position: 300% 0; } }
@keyframes glowText {
  0%,100% { text-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent), 0 0 40px var(--accent2); }
  50%     { text-shadow: 0 0 4px var(--accent), 0 0 12px var(--accent), 0 0 24px var(--accent2); }
}
@keyframes glitchTop {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, -2px); }
  40% { transform: translate(-3px, 2px); }
  60% { transform: translate(3px, -1px); }
  80% { transform: translate(2px, 1px); }
  100% { transform: translate(0); }
}
@keyframes glitchBottom {
  0% { transform: translate(0); }
  20% { transform: translate(3px, 1px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, 2px); }
  80% { transform: translate(-3px, -1px); }
  100% { transform: translate(0); }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 25px rgba(168,85,247,0.4); }
  50%     { box-shadow: 0 0 45px rgba(236,72,153,0.6); }
}
@keyframes floatUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 0.25; } 50% { transform: scale(1.15); opacity: 0.4; } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* thin scrollbar */
.app::-webkit-scrollbar { width: 0; }

/* ============ particle + cursor canvases ============ */
.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.cursor-canvas {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
}

/* ============ name row + badges + status ============ */
.name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.badges { display: inline-flex; gap: 6px; align-items: center; }
.badges .badge {
  font-size: 1.05rem;
  filter: drop-shadow(0 0 6px currentColor);
  animation: badgePop 0.5s cubic-bezier(.2,1.4,.4,1) both;
}
.status {
  margin-top: 6px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.7);
}

/* ============ avatar shapes + rings ============ */
.avatar.shape-rounded { border-radius: 24px; }
.avatar.shape-square { border-radius: 8px; }
.avatar.ring-none { animation: none; box-shadow: none; border-color: rgba(255,255,255,0.2); }
.avatar.ring-spin {
  animation: none;
  border: 3px solid transparent;
  background:
    linear-gradient(#0c0716, #0c0716) padding-box,
    conic-gradient(from 0deg, var(--accent), var(--accent2), var(--accent)) border-box;
}
.avatar-wrap.spinning::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent2), transparent, var(--accent));
  animation: spin 3s linear infinite;
  z-index: -1;
  filter: blur(6px);
  opacity: 0.7;
}

/* ============ button styles ============ */
.links.style-filled .link-btn {
  background: color-mix(in srgb, var(--glow) 22%, rgba(20,12,34,0.6));
  border-color: color-mix(in srgb, var(--glow) 45%, transparent);
}
.links.style-outline .link-btn {
  background: transparent;
  border-color: color-mix(in srgb, var(--glow) 55%, transparent);
}
.links.mono-icons .link-btn i:first-child { color: #fff !important; }

/* ============ card tilt ============ */
.card.tiltable { transition: transform .12s ease; transform-style: preserve-3d; will-change: transform; }

/* ============ more text effects ============ */
/* wave (per-letter bounce, spans added in JS) */
.fx-wave .ch {
  display: inline-block;
  animation: wave 1.6s ease-in-out infinite;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* neon flicker */
.fx-neon {
  color: #fff;
  animation: neonFlicker 3s infinite;
}
/* chrome / metallic */
.fx-chrome {
  background: linear-gradient(180deg, #fff 0%, #b8c6db 45%, #7a8599 55%, #fff 100%);
  background-size: 100% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: chromeShine 4s ease-in-out infinite;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
}

/* static accent gradient */
.fx-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* sweeping shine highlight */
.fx-shine {
  background: linear-gradient(100deg, #fff 0%, #fff 38%, var(--accent) 50%, #fff 62%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineMove 3.5s linear infinite;
}

/* fade + slide up */
.fx-fade { animation: fadeUp 1s ease both; }

/* ============ new keyframes ============ */
@keyframes shineMove { to { background-position: -250% 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes badgePop { from { transform: scale(0) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes wave { 0%,100% { transform: translateY(0); } 25% { transform: translateY(-8px); } 50% { transform: translateY(0); } }
@keyframes chromeShine { 0%,100% { background-position: 0 0; } 50% { background-position: 0 100%; } }
@keyframes neonFlicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow: 0 0 5px var(--accent), 0 0 12px var(--accent), 0 0 25px var(--accent), 0 0 45px var(--accent2);
    opacity: 1;
  }
  20%, 24%, 55% { text-shadow: none; opacity: 0.75; }
}
