:root {
  --purple-300: #C4B5FD;
  --purple-400: #A78BFA;
  --purple-500: #8B5CF6;
  --purple-600: #7C3AED;

  --green-300: #6EE7B7;
  --green-400: #34D399;
  --green-500: #10B981;

  --dark-950: #050508;
  --dark-900: #0A0A0F;
  --dark-800: #12121A;
  --dark-700: #1A1A25;

  --gradient-royal: linear-gradient(135deg, #7C3AED 0%, #10B981 100%);
  --gradient-text: linear-gradient(90deg, #A78BFA 0%, #34D399 50%, #A78BFA 100%);
  --gradient-hero: linear-gradient(135deg, #0A0A0F 0%, #1A1A25 50%, #0A0A0F 100%);

  --shadow-neon-purple: 0 0 20px rgba(139, 92, 246, .45), 0 0 40px rgba(139, 92, 246, .25);
  --shadow-neon-double: 0 0 24px rgba(139, 92, 246, .35), 0 0 48px rgba(16, 185, 129, .22);

  --glass-bg: rgba(255, 255, 255, .05);
  --glass-border: rgba(139, 92, 246, .2);

  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--dark-900);
  color: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg { position: fixed; inset: 0; z-index: 0; background: var(--gradient-hero); overflow: hidden; }

.bg__grid {
  position: absolute; inset: -10%;
  background-image:
    linear-gradient(rgba(139, 92, 246, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, .045) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
  animation: gridPulse 6s var(--ease) infinite;
}

.bg__orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.bg__orb--purple {
  width: 30rem; height: 30rem; top: -9rem; left: -8rem;
  background: radial-gradient(circle, rgba(124, 58, 237, .55), transparent 70%);
  animation: float 14s ease-in-out infinite;
}
.bg__orb--green {
  width: 26rem; height: 26rem; bottom: -8rem; right: -7rem;
  background: radial-gradient(circle, rgba(16, 185, 129, .4), transparent 70%);
  animation: float 18s ease-in-out infinite reverse;
}

.bg__noise {
  position: absolute; inset: 0; opacity: .035; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes gridPulse { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1) }
  50% { transform: translate(3rem, 2rem) scale(1.12) }
}

.page {
  position: relative; z-index: 1;
  width: 100%; max-width: 30rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 4.5rem) 1.25rem calc(2.5rem + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center;
}

.profile { text-align: center; width: 100%; }

.profile__avatar {
  position: relative;
  width: 8.25rem; height: 8.25rem;
  margin: 0 auto 1.25rem;
  display: grid; place-items: center;
  animation: fadeUp .7s var(--ease) both;
}

.profile__ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #7C3AED, #10B981, #A78BFA, #34D399, #7C3AED);
  animation: spin 6s linear infinite;
  filter: drop-shadow(0 0 22px rgba(139, 92, 246, .45));
}

.profile__avatar img {
  position: relative;
  width: calc(100% - 6px); height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--dark-900);
  background: var(--dark-800);
}

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

.profile__name {
  font-size: clamp(1.5rem, 6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.02em;
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradientX 4s ease infinite, fadeUp .7s var(--ease) .05s both;
}

@keyframes gradientX { 0%, 100% { background-position: 0% 50% } 50% { background-position: 100% 50% } }

.profile__handle {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: .3rem;
  font-size: .875rem; font-weight: 600;
  color: var(--purple-400);
  text-decoration: none;
  transition: color .3s var(--ease), text-shadow .3s var(--ease);
  animation: fadeUp .7s var(--ease) .1s both;
}

.profile__handle svg { width: .95rem; height: .95rem; color: #2AABEE }

.profile__handle:hover {
  color: var(--green-300);
  text-shadow: 0 0 14px rgba(52, 211, 153, .5);
}

.profile__handle:focus-visible { outline: 2px solid var(--green-400); outline-offset: 3px; border-radius: .35rem }

.profile__bio {
  margin: .75rem auto 2rem;
  max-width: 22rem;
  font-size: .95rem;
  color: rgba(255, 255, 255, .68);
  animation: fadeUp .7s var(--ease) .15s both;
}

.links { width: 100%; display: flex; flex-direction: column; gap: .875rem; }

.link {
  position: relative;
  display: flex; align-items: center; gap: .875rem;
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  text-decoration: none;
  color: #fff;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, .4);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  animation: fadeUp .6s var(--ease) both;
}

.link:nth-child(1) { animation-delay: .25s }
.link:nth-child(2) { animation-delay: .32s }
.link:nth-child(3) { animation-delay: .39s }
.link:nth-child(4) { animation-delay: .46s }

.link:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, .45);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5), var(--shadow-neon-double);
}

.link:active { transform: translateY(-1px) scale(.99) }

.link:focus-visible { outline: 2px solid var(--green-400); outline-offset: 3px }

.link--glow {
  background: linear-gradient(135deg, rgba(124, 58, 237, .22) 0%, rgba(16, 185, 129, .16) 100%), var(--glass-bg);
  border-color: rgba(139, 92, 246, .42);
  box-shadow: 0 4px 30px rgba(0, 0, 0, .4), 0 0 26px rgba(139, 92, 246, .22), 0 0 48px rgba(16, 185, 129, .12);
}

.link--glow::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; padding: 1px;
  background: var(--gradient-royal);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .6; pointer-events: none;
}

.link--glow:hover {
  border-color: rgba(139, 92, 246, .6);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5), var(--shadow-neon-double);
}

.link__icon {
  flex: 0 0 auto;
  width: 2.875rem; height: 2.875rem;
  display: grid; place-items: center;
  border-radius: .75rem;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: hidden;
}

.link__icon svg { width: 1.5rem; height: 1.5rem }
.link__icon--tg { color: #2AABEE }
.link__icon--yt { color: #FF3D3D }
.link__icon--img { padding: 0; border-color: rgba(139, 92, 246, .25) }
.link__icon--img img { width: 100%; height: 100%; object-fit: cover; object-position: center }
.link__icon--logo {
  background: linear-gradient(135deg, rgba(124, 58, 237, .35) 0%, rgba(16, 185, 129, .28) 100%);
  border-color: rgba(139, 92, 246, .45);
}
.link__icon--logo img { width: 74%; height: 74%; object-fit: contain }

.link__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column }

.link__title {
  font-size: 1rem; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.link__sub {
  font-size: .8125rem;
  color: rgba(255, 255, 255, .55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.link__arrow {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .4);
  display: grid; place-items: center;
  transition: transform .35s var(--ease), color .35s var(--ease);
}

.link__arrow svg { width: 1.15rem; height: 1.15rem }
.link:hover .link__arrow { transform: translateX(4px); color: var(--green-400) }

.link__shine {
  position: absolute; top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .1), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}

.link:hover .link__shine { animation: shine .9s var(--ease) }

@keyframes shine { to { left: 130% } }

.actions { margin-top: 1.75rem; animation: fadeUp .6s var(--ease) .55s both }

.share {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.4rem;
  font-family: inherit; font-size: .875rem; font-weight: 700;
  color: rgba(255, 255, 255, .8);
  background: transparent;
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 999px;
  cursor: pointer;
  transition: all .3s var(--ease);
}

.share svg { width: 1rem; height: 1rem }

.share:hover {
  color: #fff;
  border-color: rgba(139, 92, 246, .6);
  box-shadow: var(--shadow-neon-purple);
}

.share.is-done { color: var(--green-300); border-color: rgba(52, 211, 153, .5) }

.foot {
  margin-top: 2.5rem; text-align: center;
  animation: fadeUp .6s var(--ease) .6s both;
}

.foot__brand {
  display: inline-block; opacity: .72;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.foot__brand:hover { opacity: 1; transform: scale(1.04) }
.foot__brand img { height: 18px; width: auto; display: block }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px) }
  to { opacity: 1; transform: none }
}

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