body {
  background:
    radial-gradient(circle at top left, rgba(181, 154, 125, 0.26), transparent 34%),
    radial-gradient(circle at bottom right, rgba(111, 78, 55, 0.16), transparent 32%),
    var(--page-bg);
}

.loading-card {
  width: min(420px, calc(100% - 32px));
  margin: 80px auto;
  border: 1px solid var(--border-soft);
  border-radius: 28px;
  padding: 26px;
  background: rgba(255, 250, 243, 0.74);
  color: var(--text-color);
  text-align: center;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.public-shell {
  width: min(470px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 38px 18px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-card {
  border: 1px solid var(--border-soft);
  border-radius: 36px;
  padding: 32px 22px 24px;
  background: color-mix(in srgb, var(--card-bg) 86%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  text-align: center;
}

.avatar-wrapper {
  position: relative;
  width: 116px;
  height: 116px;
  margin: 0 auto 18px;
  border-radius: 50%;
  padding: 5px;
  background:
    linear-gradient(135deg, var(--accent-color), var(--button-bg));
  box-shadow: 0 18px 38px rgba(90, 62, 50, 0.2);
}

.profile-avatar,
.profile-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.profile-avatar {
  display: none;
  object-fit: cover;
  background: #efe3d0;
}

.profile-avatar.has-image {
  display: block;
}

.profile-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #efe3d0;
  color: #6f4e37;
  font-size: 2.3rem;
  font-weight: 800;
}

.profile-initials.is-hidden {
  display: none;
}

.profile-card h1 {
  margin-bottom: 6px;
  font-size: clamp(1.65rem, 8vw, 2.3rem);
  line-height: 1.05;
  color: var(--text-color);
}

#profileUsername {
  margin-bottom: 14px;
  color: var(--accent-color);
  font-weight: 800;
}

#profileBio {
  max-width: 340px;
  margin: 0 auto 18px;
  color: var(--muted-text);
  font-size: 0.97rem;
  line-height: 1.6;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.social-link {
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 250, 243, 0.78);
  color: var(--text-color);
  font-size: 0.8rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  background: var(--card-bg);
}

.links-container {
  display: grid;
  gap: 12px;
}

.link-button {
  width: 100%;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: var(--button-radius);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 34px 1fr 20px;
  align-items: center;
  gap: 10px;
  background: var(--button-bg);
  color: var(--button-text);
  box-shadow: var(--shadow-button);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.link-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 34px rgba(90, 62, 50, 0.22);
}

.link-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 250, 243, 0.18);
  font-size: 0.95rem;
}

.link-title {
  text-align: left;
}

.link-arrow {
  opacity: 0.78;
}

.link-button.featured {
  outline: 3px solid color-mix(in srgb, var(--accent-color) 52%, transparent);
  transform: scale(1.015);
}

body[data-button-style="outline"] .link-button {
  border-color: var(--button-bg);
  background: transparent;
  color: var(--button-bg);
  box-shadow: none;
}

body[data-button-style="outline"] .link-icon {
  background: color-mix(in srgb, var(--button-bg) 12%, transparent);
}

body[data-button-style="soft"] .link-button {
  border-color: var(--border-soft);
  background: color-mix(in srgb, var(--button-bg) 12%, var(--card-bg));
  color: var(--text-color);
  box-shadow: 0 12px 26px rgba(90, 62, 50, 0.1);
}

body[data-button-style="soft"] .link-icon {
  background: rgba(255, 250, 243, 0.56);
}

body[data-button-style="glass"] .link-button {
  border-color: rgba(255, 250, 243, 0.44);
  background: color-mix(in srgb, var(--card-bg) 46%, transparent);
  color: var(--text-color);
  box-shadow: 0 16px 34px rgba(90, 62, 50, 0.12);
  backdrop-filter: blur(18px);
}

body[data-button-style="glass"] .link-icon {
  background: rgba(255, 250, 243, 0.62);
}

.empty-links {
  border: 1px dashed var(--border-soft);
  border-radius: 22px;
  padding: 18px;
  color: var(--muted-text);
  font-size: 0.92rem;
  line-height: 1.5;
}

.public-footer {
  margin-top: 18px;
  color: var(--muted-text);
  text-align: center;
  font-size: 0.76rem;
}

.public-footer strong {
  color: var(--text-color);
}

@media (max-width: 420px) {
  .public-shell {
    padding-top: 24px;
  }

  .profile-card {
    border-radius: 30px;
    padding: 28px 16px 20px;
  }

  .avatar-wrapper {
    width: 104px;
    height: 104px;
  }
}