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

:root {
  --bg-primary: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.04);
  --neon-magenta: #ff00ff;
  --neon-cyan: #00ffff;
  --neon-purple: #8b5cf6;
  --neon-pink: #ec4899;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

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

.container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 50px 20px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Profile Section */
.profile-section {
  text-align: center;
  margin-bottom: 36px;
  width: 100%;
}

.photo-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  opacity: 0;
}

.photo-border {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(var(--neon-magenta), var(--neon-cyan), var(--neon-purple), var(--neon-magenta));
  animation: spin-border 4s linear infinite;
}

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

.profile-photo {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-primary);
  z-index: 1;
}

.profile-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--neon-magenta), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(255, 0, 255, 0.3));
}

.profile-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 8px;
  opacity: 0;
  line-height: 1.5;
}

/* Links */
.links-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-radius: 16px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.3s ease;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon-magenta), var(--neon-cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.link-card:hover::before {
  opacity: 1;
}

.link-card:hover {
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.15), 0 0 60px rgba(0, 255, 255, 0.08);
}

.link-card .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 0, 255, 0.3);
  transform: scale(0);
  pointer-events: none;
}

.link-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--text-primary);
  transition: fill 0.3s ease;
}

.link-card:hover .link-icon svg {
  fill: var(--neon-cyan);
}

.link-title {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.link-arrow {
  opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s;
  font-size: 1.1rem;
}

.link-card:hover .link-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Footer */
.footer {
  margin-top: 40px;
  padding: 20px 0;
  text-align: center;
}

.footer-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Glow pulse animation for links */
@keyframes neon-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 0, 255, 0.05); }
  50% { box-shadow: 0 0 15px rgba(255, 0, 255, 0.12), 0 0 30px rgba(0, 255, 255, 0.06); }
}

.link-card.animated {
  animation: neon-pulse 3s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 520px) {
  .container {
    padding: 40px 16px 30px;
  }
  .profile-name {
    font-size: 1.6rem;
  }
  .link-card {
    padding: 14px 18px;
  }
}

/* No photo fallback */
.profile-photo.no-photo {
  background: linear-gradient(135deg, var(--neon-magenta), var(--neon-purple));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--neon-magenta);
  border-radius: 50%;
  animation: spin-border 0.8s linear infinite;
}
