/* ============================================
   Cute Blue Theme
   ============================================ */
:root {
  --ink: #1a2f4a;
  --muted: #5a7a9e;
  --blue-900: #0a3d6b;
  --blue-700: #1e6fa6;
  --blue-600: #2980c9;
  --blue-500: #3498db;
  --blue-400: #5dade2;
  --blue-300: #85c1e9;
  --blue-200: #aed6f1;
  --blue-100: #d6eaf8;
  --blue-50: #ebf5fb;
  --pink-accent: #ffb3d9;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.48) 0 1px, transparent 1px 44px),
    linear-gradient(25deg, rgba(255, 255, 255, 0.36) 0 1px, transparent 1px 36px),
    linear-gradient(150deg, #d6eaf8 0%, #aed6f1 35%, #85c1e9 68%, #ebf5fb 100%);
  background-size: 54px 54px, 46px 46px, cover;
}

/* ============================================
   Floating Bubbles
   ============================================ */
.bubbles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.6),
    rgba(173, 216, 241, 0.3) 60%,
    transparent
  );
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(173, 216, 241, 0.2);
  animation: float-bubble linear infinite;
}

.bubble-1 {
  width: 80px;
  height: 80px;
  left: 10%;
  animation-duration: 18s;
  animation-delay: 0s;
}

.bubble-2 {
  width: 120px;
  height: 120px;
  left: 25%;
  animation-duration: 22s;
  animation-delay: 2s;
}

.bubble-3 {
  width: 60px;
  height: 60px;
  left: 45%;
  animation-duration: 16s;
  animation-delay: 4s;
}

.bubble-4 {
  width: 100px;
  height: 100px;
  left: 65%;
  animation-duration: 20s;
  animation-delay: 1s;
}

.bubble-5 {
  width: 90px;
  height: 90px;
  left: 80%;
  animation-duration: 19s;
  animation-delay: 3s;
}

.bubble-6 {
  width: 70px;
  height: 70px;
  left: 15%;
  animation-duration: 17s;
  animation-delay: 5s;
}

.bubble-7 {
  width: 110px;
  height: 110px;
  left: 55%;
  animation-duration: 21s;
  animation-delay: 2.5s;
}

@keyframes float-bubble {
  0% {
    bottom: -150px;
    opacity: 0;
    transform: translateX(0) scale(0.8);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    bottom: 110%;
    opacity: 0;
    transform: translateX(80px) scale(1.1);
  }
}

/* ============================================
   Sparkle Decorations
   ============================================ */
.sparkles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  color: rgba(255, 255, 255, 0.6);
  font-size: 3rem;
  line-height: 1;
  animation: twinkle ease-in-out infinite;
  text-shadow: 0 4px 20px rgba(173, 216, 241, 0.4);
}

.sparkle-1 {
  top: 8%;
  left: 8%;
  font-size: 4rem;
  animation-duration: 3s;
  animation-delay: 0s;
  transform: rotate(-20deg);
}

.sparkle-2 {
  top: 15%;
  right: 12%;
  font-size: 5rem;
  animation-duration: 4s;
  animation-delay: 0.5s;
  transform: rotate(15deg);
}

.sparkle-3 {
  bottom: 20%;
  left: 15%;
  font-size: 3.5rem;
  animation-duration: 3.5s;
  animation-delay: 1s;
  transform: rotate(-10deg);
}

.sparkle-4 {
  bottom: 12%;
  right: 10%;
  font-size: 4.5rem;
  animation-duration: 4.5s;
  animation-delay: 1.5s;
  transform: rotate(25deg);
}

.sparkle-5 {
  top: 45%;
  left: 5%;
  font-size: 3rem;
  animation-duration: 3.8s;
  animation-delay: 2s;
  transform: rotate(5deg);
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.4;
    transform: scale(0.9) rotate(var(--rotate, 0deg));
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(var(--rotate, 0deg));
  }
}

/* ============================================
   Wandering Sparkle Friend
   ============================================ */
.wanderer {
  position: fixed;
  z-index: 2;
  font-size: 3rem;
  color: rgba(255, 179, 217, 0.9);
  text-shadow:
    0 0 20px rgba(255, 179, 217, 0.8),
    0 0 40px rgba(173, 216, 241, 0.6);
  pointer-events: none;
  animation: wander 20s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 179, 217, 0.6));
}

@keyframes wander {
  0% {
    top: 15%;
    left: 10%;
    transform: rotate(0deg) scale(1);
  }
  15% {
    top: 70%;
    left: 80%;
    transform: rotate(180deg) scale(1.1);
  }
  30% {
    top: 25%;
    left: 85%;
    transform: rotate(360deg) scale(0.9);
  }
  45% {
    top: 80%;
    left: 15%;
    transform: rotate(540deg) scale(1.1);
  }
  60% {
    top: 40%;
    left: 50%;
    transform: rotate(720deg) scale(1);
  }
  75% {
    top: 10%;
    left: 70%;
    transform: rotate(900deg) scale(1.2);
  }
  90% {
    top: 60%;
    left: 5%;
    transform: rotate(1080deg) scale(0.95);
  }
  100% {
    top: 15%;
    left: 10%;
    transform: rotate(1260deg) scale(1);
  }
}

/* ============================================
   Page Shell & Profile Card
   ============================================ */
.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
}

.profile-card {
  position: relative;
  width: min(100%, 430px);
  overflow: hidden;
  padding: 34px 28px 24px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(214, 234, 248, 0.72)),
    rgba(255, 255, 255, 0.75);
  box-shadow: 0 30px 80px rgba(10, 61, 107, 0.28);
  backdrop-filter: blur(22px);
  text-align: center;
  animation: card-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Animated gradient border */
.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 2px;
  background: linear-gradient(
    45deg,
    var(--blue-400),
    var(--pink-accent),
    var(--blue-300),
    var(--pink-accent),
    var(--blue-400)
  );
  background-size: 300% 300%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-gradient 6s ease infinite;
  pointer-events: none;
}

@keyframes border-gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes card-entrance {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-shine {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.58) 46%, transparent 100%),
    linear-gradient(180deg, rgba(214, 234, 248, 0.38), transparent 42%);
  opacity: 0.75;
  pointer-events: none;
  animation: shine-shift 8s ease-in-out infinite;
}

@keyframes shine-shift {
  0%, 100% {
    opacity: 0.75;
  }
  50% {
    opacity: 0.85;
  }
}

/* ============================================
   Avatar with Animated Ring
   ============================================ */
.avatar-wrapper {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 18px;
}

.avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--blue-400),
    var(--blue-300),
    var(--pink-accent),
    var(--blue-200),
    var(--blue-400)
  );
  animation: ring-spin 6s linear infinite;
  opacity: 0.7;
}

@keyframes ring-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.avatar {
  position: relative;
  display: block;
  width: 112px;
  height: 112px;
  border: 4px solid var(--white);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(10, 61, 107, 0.25);
  animation: avatar-bounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes avatar-bounce {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   Typography
   ============================================ */
h1,
p {
  position: relative;
  margin: 0;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.18;
  font-weight: 800;
  overflow-wrap: anywhere;
  animation: text-fade-in 0.6s ease-out 0.4s both;
}

@keyframes text-fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.handle {
  margin-top: 4px;
  color: var(--blue-700);
  font-size: 0.98rem;
  font-weight: 700;
  animation: text-fade-in 0.6s ease-out 0.5s both;
}

.bio {
  max-width: 280px;
  margin: 14px auto 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  animation: text-fade-in 0.6s ease-out 0.6s both;
}

/* ============================================
   Link List & Buttons
   ============================================ */
.link-list {
  position: relative;
  display: grid;
  gap: 12px;
}

.link-button {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  min-height: 60px;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(26, 47, 74, 0.12);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 24px rgba(10, 61, 107, 0.12);
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
  animation: button-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Shine sweep effect on hover */
.link-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0) 70%,
    transparent 100%
  );
  transition: none;
  pointer-events: none;
}

.link-button:hover::after {
  animation: shine-sweep 0.6s ease-out forwards;
}

@keyframes shine-sweep {
  0% {
    left: -100%;
  }
  100% {
    left: 130%;
  }
}

.link-button:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(93, 173, 226, 0.45);
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 16px 32px rgba(10, 61, 107, 0.18),
    0 0 20px rgba(133, 193, 233, 0.3);
}

.link-button:nth-child(1) {
  animation-delay: 0.7s;
}

.link-button:nth-child(2) {
  animation-delay: 0.8s;
}

.link-button:nth-child(3) {
  animation-delay: 0.9s;
}

@keyframes button-slide-in {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.link-button-primary {
  color: var(--white);
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700) 62%, var(--pink-accent));
  background-clip: padding-box;
}

.link-button-primary:hover {
  background: linear-gradient(135deg, #0f4a7d, var(--blue-600) 62%, #ffc1e0);
  background-clip: padding-box;
}

/* ============================================
   Button Icons & Text
   ============================================ */
.button-icon,
.button-arrow {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
}

.button-icon {
  border-radius: 50%;
  color: var(--blue-900);
  background: var(--blue-100);
  font-weight: 800;
}

.link-button-primary .button-icon {
  color: #d73c96;
  background: var(--white);
}

.brand-icon {
  font-size: 0.86rem;
}

.button-text {
  min-width: 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.button-text strong,
.button-text small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.button-text strong {
  font-size: 1rem;
}

.button-text small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.button-arrow svg,
.button-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.button-icon svg path {
  fill: currentColor;
  stroke: none;
}

/* ============================================
   Footer
   ============================================ */
footer {
  position: relative;
  margin-top: 22px;
  color: rgba(90, 122, 158, 0.86);
  font-size: 0.82rem;
  font-weight: 700;
  animation: text-fade-in 0.6s ease-out 1.1s both;
}

/* ============================================
   Sociabuzz Donation Modal — Invisible Wrapper
   ============================================ */
.sb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(10, 61, 107, 0.65);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sb-overlay.open {
  display: flex;
  opacity: 1;
}

.sb-frame {
  display: block;
  width: min(90vw, 600px);
  height: min(85vh, 800px);
  border: none;
  outline: none;
  background: transparent;
  box-shadow: none;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 430px) {
  .page-shell {
    padding: 18px 14px;
  }

  .profile-card {
    padding: 28px 18px 22px;
  }

  .sparkle-1 {
    left: -15%;
    font-size: 3rem;
  }

  .sparkle-2 {
    right: -10%;
    font-size: 4rem;
  }

  .sparkle-3 {
    left: -12%;
    font-size: 2.5rem;
  }

  .sparkle-4 {
    right: -8%;
    font-size: 3.5rem;
  }

  h1 {
    font-size: 1.45rem;
  }

  .avatar-wrapper {
    width: 100px;
    height: 100px;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }

  .link-button {
    grid-template-columns: 38px minmax(0, 1fr) 22px;
    min-height: 58px;
    padding-right: 12px;
  }

  .button-icon,
  .button-arrow {
    width: 30px;
    height: 30px;
  }

  .button-text,
  .button-text strong {
    font-size: 0.94rem;
  }

  .sb-frame {
    width: 95vw;
    height: 80vh;
  }
}

/* ============================================
   Accessibility: Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
