/* =============================================
   zph.cc — Public profile page (Link3 / Linktree style)
   Clean, centred, single-column. 6 themes are
   driven by CSS custom properties on <body>.
   ============================================= */

::root,
.profile-page.theme-minimal {
  --page-bg: #f4f4f6;
  --glow-a: rgba(96, 104, 255, 0.10);
  --glow-b: rgba(255, 152, 92, 0.08);
  --text: #17181c;
  --muted: #767781;
  --card: #ffffff;
  --card-hover: #ffffff;
  --card-2: #eceef2;
  --border: rgba(12, 13, 20, 0.10);
  --shadow: rgba(15, 16, 24, 0.07);
  --shadow-hover: rgba(15, 16, 24, 0.13);
  --accent: #17181c;
  --ring: rgba(15, 16, 24, 0.04);
}

.profile-page.theme-dark {
  --page-bg: #0e0e12;
  --glow-a: rgba(110, 92, 255, 0.16);
  --glow-b: rgba(0, 210, 255, 0.08);
  --text: #f2f2f5;
  --muted: #9c9ca7;
  --card: #1a1a21;
  --card-hover: #20202a;
  --card-2: #26262f;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.28);
  --shadow-hover: rgba(0, 0, 0, 0.42);
  --accent: #ffffff;
  --ring: rgba(255, 255, 255, 0.05);
}

.profile-page.theme-gradient {
  --page-bg: #eef0fa;
  --glow-a: rgba(148, 166, 255, 0.34);
  --glow-b: rgba(255, 178, 232, 0.26);
  --text: #1b1b25;
  --muted: #5f5f72;
  --card: rgba(255, 255, 255, 0.82);
  --card-hover: rgba(255, 255, 255, 0.96);
  --card-2: #e9ebf5;
  --border: rgba(25, 25, 50, 0.08);
  --shadow: rgba(60, 60, 120, 0.12);
  --shadow-hover: rgba(60, 60, 120, 0.20);
  --accent: #23233e;
  --ring: rgba(255, 255, 255, 0.5);
}

.profile-page.theme-aurora {
  --page-bg: #090a1e;
  --glow-a: rgba(99, 80, 255, 0.38);
  --glow-b: rgba(0, 229, 255, 0.20);
  --text: #f5f4ff;
  --muted: #a6a4c6;
  --card: rgba(255, 255, 255, 0.07);
  --card-hover: rgba(255, 255, 255, 0.13);
  --card-2: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: rgba(0, 0, 0, 0.30);
  --shadow-hover: rgba(0, 0, 0, 0.44);
  --accent: #9f8dff;
  --ring: rgba(255, 255, 255, 0.07);
}

.profile-page.theme-sunset {
  --page-bg: #fff7f0;
  --glow-a: rgba(255, 152, 108, 0.26);
  --glow-b: rgba(255, 208, 96, 0.20);
  --text: #2a1a10;
  --muted: #85715f;
  --card: rgba(255, 255, 255, 0.92);
  --card-hover: #ffffff;
  --card-2: #f8e8da;
  --border: rgba(90, 45, 15, 0.09);
  --shadow: rgba(120, 60, 20, 0.10);
  --shadow-hover: rgba(120, 60, 20, 0.18);
  --accent: #c7500f;
  --ring: rgba(120, 60, 20, 0.05);
}

.profile-page.theme-midnight {
  --page-bg: #0b1526;
  --glow-a: rgba(46, 110, 255, 0.30);
  --glow-b: rgba(0, 190, 200, 0.16);
  --text: #e8eef9;
  --muted: #8fa1bc;
  --card: #131f34;
  --card-hover: #182640;
  --card-2: #1c2b45;
  --border: rgba(255, 255, 255, 0.09);
  --shadow: rgba(0, 0, 0, 0.32);
  --shadow-hover: rgba(0, 0, 0, 0.46);
  --accent: #6ca7ff;
  --ring: rgba(255, 255, 255, 0.06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* soft ambient glow, kept subtle so the page reads clean */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46rem 34rem at 12% -6%, var(--glow-a), transparent 62%),
    radial-gradient(44rem 32rem at 96% 104%, var(--glow-b), transparent 60%),
    var(--page-bg);
}

.profile {
  position: relative;
  width: min(540px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 68px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- head ---------- */

.avatar-frame {
  position: relative;
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 5px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--border), 0 10px 26px var(--shadow);
}

.avatar {
  display: block;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar.avatar-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--card-2), var(--card));
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--muted);
}

.profile h1 {
  margin: 20px 0 3px;
  font-size: 27px;
  line-height: 1.22;
  letter-spacing: -.6px;
  font-weight: 800;
  word-break: break-word;
}

.handle {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--muted);
  opacity: .9;
}

.bio {
  margin: 15px auto 0;
  max-width: 440px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.68;
  white-space: pre-line;
}

/* ---------- activity poster ---------- */

.poster {
  display: block;
  width: 100%;
  margin-top: 24px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow);
  text-align: left;
}

.poster img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- header actions ---------- */

.profile-actions {
  position: absolute;
  top: 22px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.action-btn {
  pointer-events: auto;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 2px 6px var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  background: var(--card-hover);
  box-shadow: 0 8px 18px var(--shadow-hover);
}

.action-btn svg { width: 18px; height: 18px; }

/* grouped actions on the right of the header */
.action-group {
  display: inline-flex;
  gap: 10px;
  pointer-events: none;
}

.action-group .action-btn { pointer-events: auto; }

/* ---------- social row ---------- */

.profile-socials {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 2px;
}

.profile-socials:not(:empty) { display: flex; }

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  transition: transform .16s ease, box-shadow .16s ease;
}

.social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.soc-letter {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.2px;
  line-height: 1;
}

/* ---------- link list (centred, quiet buttons) ---------- */

.profile-links {
  width: 100%;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.link-card {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 24px 9px 9px;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  box-shadow: 0 1px 3px var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.link-card:hover {
  transform: translateY(-1px);
  background: var(--card-hover);
  box-shadow: 0 10px 22px var(--shadow-hover);
}

.link-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.link-icon > svg {
  width: 22px;
  height: 22px;
}

.link-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -.1px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.link-chevron {
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
}

.link-chevron svg { width: 18px; height: 18px; }

.empty-note {
  width: 100%;
  padding: 30px;
  border: 1px dashed var(--border);
  border-radius: 15px;
  color: var(--muted);
  font-size: 14px;
  background: var(--card);
}

/* ---------- footer ---------- */

.profile-foot {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  width: 100%;
  display: flex;
  justify-content: center;
}

.profile-foot a {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--muted);
  opacity: .85;
  transition: color .15s ease, opacity .15s ease;
}

.profile-foot a:hover { color: var(--accent); opacity: 1; }

/* ---------- accessibility ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

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

/* ---------- mobile ---------- */

@media (max-width: 520px) {
  .profile { padding: 48px 16px 30px; }
  .profile-actions { left: 16px; right: 16px; top: 18px; }
  .avatar-frame { width: 92px; height: 92px; padding: 4px; }
  .avatar, .avatar.avatar-placeholder { width: 84px; height: 84px; }
  .avatar.avatar-placeholder { font-size: 34px; }
  .profile h1 { font-size: 24px; }
  .profile-links { gap: 10px; }
  .link-card { min-height: 54px; padding: 8px 16px 8px 8px; }
  .link-icon { width: 36px; height: 36px; font-size: 12px; }
  .link-icon > svg { width: 18px; height: 18px; }
  .link-chevron { flex-basis: 24px; }
}

/* ---------- adsense ---------- */

.profile .ad-slot {
  width: 100%;
  margin-top: 26px;
}
