:root {
  color-scheme: dark;
  --page: #050816;
  --ink: #f8fbff;
  --muted: rgba(239, 246, 255, 0.66);
  --line: rgba(255, 255, 255, 0.13);
  --card: rgba(255, 255, 255, 0.082);
  --card-hover: rgba(255, 255, 255, 0.14);
  --cyan: #5bd5ff;
  --green: #72f7d1;
  --purple: #9f7cff;
  --focus: rgba(91, 213, 255, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 50% -15%, rgba(91, 213, 255, 0.32), transparent 32%),
    radial-gradient(circle at 15% 30%, rgba(159, 124, 255, 0.18), transparent 28%),
    radial-gradient(circle at 85% 78%, rgba(114, 247, 209, 0.13), transparent 28%),
    linear-gradient(180deg, #050816 0%, #070b18 48%, #050713 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.74), transparent 82%);
  pointer-events: none;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

.link-page {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 76px 16px 34px;
}

.profile {
  width: min(100%, 480px);
  min-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
}

.profile__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 8px 12px;
  position: relative;
}

.profile__header::before {
  content: "";
  position: absolute;
  top: 8px;
  width: 126px;
  height: 126px;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(91, 213, 255, 0.52), rgba(159, 124, 255, 0.12), rgba(114, 247, 209, 0.42));
  filter: blur(18px);
  opacity: 0.56;
  pointer-events: none;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 213, 255, 0.48);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28), 0 0 34px rgba(91, 213, 255, 0.12);
}

.icon-button:active {
  transform: translateY(0);
}

.icon-button:focus-visible,
.language-picker__select:focus-visible,
.link-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

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

.icon-button--share {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 4;
}

.profile__avatar {
  position: relative;
  z-index: 1;
  width: 108px;
  height: 108px;
  border-radius: 32px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.055));
  box-shadow: 0 24px 70px rgba(91, 213, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(22px);
}

.profile__handle {
  margin: 18px 0 0;
  color: rgba(239, 246, 255, 0.62);
  font-size: 0.9rem;
  font-weight: 800;
}

.profile h1 {
  margin: 7px 0 0;
  font-size: clamp(2rem, 8vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.profile__bio {
  max-width: 320px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.status-pill {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 20px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

.language-picker {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 5px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  font-size: 0.78rem;
  font-weight: 800;
}

.language-picker__select {
  width: 42px;
  height: 30px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  font: inherit;
  cursor: pointer;
}

.language-picker__select option {
  color: #111827;
  background: #fff;
}

.language-picker:focus-within .language-picker__select,
.language-picker:hover .language-picker__select {
  width: auto;
  min-width: 116px;
}

.links {
  display: grid;
  gap: 13px;
  width: 100%;
}

.link-card {
  position: relative;
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  transform: translateY(0);
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(91, 213, 255, 0.16), transparent 46%, rgba(159, 124, 255, 0.13));
  opacity: 0;
  transition: opacity 220ms ease;
}

.link-card:hover {
  background: var(--card-hover);
  border-color: rgba(91, 213, 255, 0.55);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3), 0 0 36px rgba(91, 213, 255, 0.12);
}

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

.link-card:active:not(.link-card--disabled) {
  transform: translateY(0) scale(1);
}

.link-card--featured {
  border-color: rgba(91, 213, 255, 0.34);
  background: rgba(255, 255, 255, 0.095);
}

.link-card--disabled {
  color: rgba(248, 251, 255, 0.58);
  cursor: default;
}

.link-card--disabled:hover {
  background: var(--card);
  border-color: var(--line);
  transform: none;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.22);
}

.link-card--disabled:hover::before {
  opacity: 0;
}

.link-card__icon,
.link-card__text,
.link-card__arrow,
.link-card__badge {
  position: relative;
  z-index: 1;
}

.link-card__icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.link-card--featured .link-card__icon {
  background: rgba(91, 213, 255, 0.12);
  border-color: rgba(91, 213, 255, 0.22);
}

.link-card__icon svg,
.link-card__arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-card__text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.link-card strong,
.link-card small {
  overflow-wrap: anywhere;
}

.link-card strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.link-card small {
  color: rgba(239, 246, 255, 0.56);
  font-size: 0.8rem;
  line-height: 1.35;
}

.link-card--featured small {
  color: rgba(239, 246, 255, 0.68);
}

.link-card__arrow {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.56);
}

.link-card__badge {
  max-width: 96px;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.link-card--featured .link-card__arrow {
  color: rgba(255, 255, 255, 0.7);
}

.profile__footer {
  margin-top: auto;
  padding: 24px 0 0;
  color: rgba(239, 246, 255, 0.42);
  display: flex;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  font-size: 0.92rem;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 520px) {
  .link-page {
    place-items: start center;
    padding: 76px 14px 28px;
  }

  .icon-button--share {
    top: 12px;
    left: 12px;
  }

  .language-picker {
    top: 12px;
    right: 12px;
    font-size: 0.74rem;
  }

  .profile {
    min-height: calc(100vh - 104px);
  }

  .profile__header::before {
    top: 4px;
    width: 112px;
    height: 112px;
  }

  .profile__avatar {
    width: 94px;
    height: 94px;
    border-radius: 29px;
  }

  .profile h1 {
    font-size: 1.95rem;
  }

  .link-card {
    min-height: 64px;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 18px;
  }

  .link-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .link-card__badge {
    max-width: 78px;
    padding: 5px 7px;
    font-size: 0.64rem;
  }
}

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