:root {
  color-scheme: light;
  --page: #fff7fb;
  --panel: #fffafd;
  --panel-strong: #ffffff;
  --pink: #ff5fa7;
  --pink-soft: #ffe0ee;
  --line: rgba(202, 62, 124, 0.18);
  --text: #371120;
  --muted: #946174;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 246, 251, 0.98) 40%, rgba(255, 226, 240, 0.96) 100%),
    linear-gradient(135deg, rgba(255, 95, 167, 0.12), transparent 38%),
    var(--page);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.profile-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.profile-page::before,
.profile-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 9% 18%, rgba(255, 94, 166, 0.92) 0 1px, transparent 2px),
    radial-gradient(circle at 18% 72%, rgba(255, 172, 208, 0.95) 0 1px, transparent 2px),
    radial-gradient(circle at 31% 12%, rgba(255, 255, 255, 0.96) 0 1.5px, transparent 3px),
    radial-gradient(circle at 42% 82%, rgba(255, 94, 166, 0.74) 0 1px, transparent 2px),
    radial-gradient(circle at 61% 24%, rgba(255, 255, 255, 0.98) 0 1.5px, transparent 3px),
    radial-gradient(circle at 73% 68%, rgba(255, 120, 184, 0.78) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 14%, rgba(255, 94, 166, 0.86) 0 1px, transparent 2px),
    radial-gradient(circle at 92% 82%, rgba(255, 255, 255, 0.94) 0 1.5px, transparent 3px);
  animation: twinkle 3.8s ease-in-out infinite;
}

.profile-page::after {
  opacity: 0.7;
  transform: translateY(18px) scale(1.08);
  animation-duration: 5.4s;
  animation-delay: -1.6s;
}

.profile {
  width: min(100%, 540px);
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 251, 0.95)),
    var(--panel);
  box-shadow:
    0 24px 70px rgba(129, 34, 78, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.82),
    0 0 42px rgba(255, 116, 181, 0.22);
}

.cover-frame {
  width: 100%;
  aspect-ratio: 1640 / 624;
  position: relative;
  overflow: hidden;
  background: #fff0f7;
  border-bottom: 1px solid var(--line);
}

.cover-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.18) 44%, transparent 58%),
    linear-gradient(90deg, transparent, rgba(255, 221, 235, 0.2), transparent);
  mix-blend-mode: screen;
  opacity: 0.54;
  transform: translateX(-105%);
  animation: coverShine 6.5s ease-in-out infinite;
}

.cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-wrap {
  width: 132px;
  height: 132px;
  margin: -66px auto 18px;
  padding: 5px;
  position: relative;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, var(--pink), #ffe0ee);
  box-shadow:
    0 16px 34px rgba(129, 34, 78, 0.18),
    0 0 28px rgba(255, 95, 167, 0.44);
}

.avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #fff7fb;
  object-fit: cover;
  object-position: 50% 18%;
}

.links {
  display: grid;
  gap: 12px;
  padding: 0 20px 24px;
}

.link-button {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(202, 62, 124, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.link-button::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -35%;
  width: 32%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  animation: buttonBlink 4.8s ease-in-out infinite;
}

.link-button > span {
  position: relative;
  z-index: 1;
}

.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 95, 167, 0.42);
  background: rgba(255, 255, 255, 0.96);
  outline: none;
}

.link-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 95, 167, 0.13);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.link-icon svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: currentColor;
}

.instagram .link-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.facebook .link-icon {
  color: #1877f2;
}

.instagram .link-icon {
  color: #e1306c;
}

.tiktok .link-icon,
.x-link .link-icon {
  color: #111111;
}

.tiktok-mark .tiktok-cyan {
  fill: #25f4ee;
}

.tiktok-mark .tiktok-pink {
  fill: #fe2c55;
}

.facebook {
  background: linear-gradient(135deg, rgba(24, 119, 242, 0.16), rgba(255, 255, 255, 0.86));
}

.instagram {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.18), rgba(255, 226, 240, 0.88));
}

.tiktok {
  background: linear-gradient(135deg, rgba(0, 242, 234, 0.12), rgba(255, 0, 80, 0.14), rgba(255, 255, 255, 0.86));
}

.x-link {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(235, 216, 225, 0.7));
}

.vip {
  background: linear-gradient(135deg, rgba(255, 95, 167, 0.24), rgba(255, 255, 255, 0.88));
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.36;
    filter: brightness(0.98);
  }

  48% {
    opacity: 1;
    filter: brightness(1.32);
  }
}

@keyframes coverShine {
  0%,
  42% {
    transform: translateX(-105%);
  }

  64%,
  100% {
    transform: translateX(105%);
  }
}

@keyframes buttonBlink {
  0%,
  58% {
    left: -35%;
  }

  78%,
  100% {
    left: 112%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-page::before,
  .profile-page::after,
  .cover-frame::after,
  .link-button::after {
    animation: none;
  }
}

@media (max-width: 520px) {
  .profile-page {
    min-height: 100svh;
    padding: 12px;
    place-items: start center;
  }

  .profile {
    min-height: calc(100svh - 24px);
    border-radius: 18px;
  }

  .cover-frame {
    aspect-ratio: 1640 / 624;
  }

  .cover-image {
    object-position: 50% 50%;
  }

  .avatar-wrap {
    width: 116px;
    height: 116px;
    margin-top: -58px;
    margin-bottom: 16px;
  }

  .links {
    gap: 10px;
    padding-inline: 16px;
    padding-bottom: 18px;
  }

  .link-button {
    min-height: 52px;
    padding: 10px 14px;
    border-radius: 13px;
    font-size: 15px;
  }

  .link-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 11px;
  }
}
