/* Public profile page: full account background + cover hero */
.acf-profile-page {
  --profile-bg-local: var(--profile-bg, #070a12);
  direction: rtl;
  text-align: right;
  min-height: calc(100dvh - var(--topbar) - var(--tabbar));
  margin: -12px -12px calc(var(--tabbar) * -0.05);
  padding: 12px 12px calc(var(--tabbar) + 22px);
  background:
    radial-gradient(540px 260px at 95% -60px, color-mix(in srgb, var(--profile-bg-local), #7c3aed 26%), transparent 68%),
    linear-gradient(180deg, var(--profile-bg-local) 0, #05070d 420px, #05070d 100%);
}

.acf-profile-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 26px;
  background: rgba(7,10,18,.62);
  box-shadow: 0 18px 46px rgba(0,0,0,.30);
}

.acf-profile-cover {
  height: 132px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(255,255,255,.09);
}

.acf-profile-cover:after {
  content: "";
  display: block;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(7,10,18,.70));
}

.acf-profile-body {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 0 14px 14px;
  margin-top: -36px;
}

.acf-profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 26px;
  border: 4px solid rgba(7,10,18,.96);
  background: #111827;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(0,0,0,.35);
}

.acf-profile-info {
  min-width: 0;
  padding-top: 36px;
  display: grid;
  gap: 8px;
}

.acf-profile-info h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
  direction: ltr;
  text-align: right;
  unicode-bidi: plaintext;
  color: #fff;
}

.acf-profile-info p {
  margin: 0;
  color: #c4ccdb;
  line-height: 1.75;
  font-size: 13.5px;
}

.acf-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.acf-profile-pill,
.acf-profile-actions .btn {
  min-height: 34px;
  border-radius: 999px;
  font-size: 12px;
  padding: 7px 10px;
}

.acf-profile-pill {
  display: inline-flex;
  align-items: center;
  color: #bbf7d0;
  border: 1px solid rgba(34,197,94,.25);
  background: rgba(34,197,94,.10);
  font-weight: 900;
}

.acf-profile-feed {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.acf-profile-empty {
  padding: 18px;
  border: 1px dashed rgba(255,255,255,.15);
  border-radius: 22px;
  background: rgba(255,255,255,.025);
  color: #aab5c8;
  text-align: center;
  line-height: 1.8;
}

@media (max-width: 420px) {
  .acf-profile-page {
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .acf-profile-cover { height: 118px; }
  .acf-profile-body {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 0 12px 13px;
    margin-top: -32px;
  }
  .acf-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 22px;
  }
  .acf-profile-info { padding-top: 32px; }
  .acf-profile-info h1 { font-size: 22px; }
}

/* =========================================================
   Public profile feed cards
   The public profile page does not load main.css by design.
   Result cards are scoped here so /u/{username} always keeps
   the same platform look for guests, logged-in users, and owner.
   ========================================================= */
.acf-profile-page .acf-feed-card {
  border: 1px solid rgba(255,255,255,.105);
  border-radius: 22px;
  background:
    radial-gradient(160px 120px at 100% 0, rgba(124,58,237,.10), transparent 75%),
    linear-gradient(155deg, rgba(37,55,96,.66), rgba(12,18,32,.78));
  box-shadow: 0 12px 32px rgba(0,0,0,.20);
  padding: 12px;
  display: grid;
  gap: 9px;
  overflow: hidden;
  min-width: 0;
}

.acf-profile-page .acf-feed-link {
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.acf-profile-page .acf-feed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #aab5c8;
  font-size: 12px;
  min-width: 0;
}

.acf-profile-page .acf-feed-hash {
  direction: ltr;
  unicode-bidi: plaintext;
  color: #93c5fd;
  font-weight: 950;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acf-profile-page .acf-feed-author {
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.055);
  border-radius: 999px;
  padding: 4px 8px;
  color: #e5e7eb;
  font-size: 11.5px;
}

.acf-profile-page .acf-feed-author.is-ghost {
  color: #aab5c8;
}

.acf-profile-page .acf-feed-date {
  direction: ltr;
  unicode-bidi: plaintext;
  color: #8fa0ba;
  font-size: 11.5px;
}

.acf-profile-page .acf-feed-text {
  margin: 0;
  color: #fff;
  font-size: 15.4px;
  line-height: 1.88;
  white-space: normal;
  overflow-wrap: anywhere;
}

.acf-profile-page .acf-feed-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.acf-profile-page .acf-feed-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.acf-profile-page .acf-feed-stats span {
  min-width: 0;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.040);
  border: 1px solid rgba(255,255,255,.080);
  color: #9aa7bd;
  line-height: 1;
}

.acf-profile-page .acf-feed-stats b {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 950;
}

.acf-profile-page .acf-feed-stats small {
  color: #9aa7bd;
  font-size: 10px;
}

.acf-profile-page .acf-feed-save {
  position: relative;
  overflow: visible;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  display: grid;
  place-items: center;
  padding: 0;
  color: #cbd5e1;
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}

.acf-profile-page .acf-feed-save img {
  width: 20px;
  height: 20px;
  display: block;
  opacity: .72;
  transform: scale(1);
  transition: opacity .16s ease, transform .16s ease, filter .16s ease;
}

.acf-profile-page .acf-feed-save:active {
  transform: scale(.94);
}

.acf-profile-page .acf-feed-save.is-loading {
  opacity: .65;
  pointer-events: none;
}

.acf-profile-page .acf-feed-save.is-saved,
.acf-profile-page .acf-feed-save.saved {
  border-color: rgba(34,197,94,.45);
  background: radial-gradient(circle at 50% 35%, rgba(34,197,94,.22), rgba(34,197,94,.09));
  box-shadow: 0 0 0 1px rgba(34,197,94,.16), 0 10px 28px rgba(34,197,94,.12);
}

.acf-profile-page .acf-feed-save.is-saved img,
.acf-profile-page .acf-feed-save.saved img {
  opacity: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 0 9px rgba(34,197,94,.50));
}

.acf-profile-page .acf-feed-save.just-saved {
  animation: acfProfileSavePop .28s ease;
}

.acf-profile-page .acf-feed-save.just-unsaved {
  animation: acfProfileUnsavePop .20s ease;
}

.acf-profile-page .acf-feed-card.is-saved {
  border-color: rgba(34,197,94,.18);
}

@keyframes acfProfileSavePop {
  0% { transform: scale(.92); }
  60% { transform: scale(1.10); }
  100% { transform: scale(1); }
}

@keyframes acfProfileUnsavePop {
  0% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@media (max-width: 420px) {
  .acf-profile-page .acf-feed-card {
    border-radius: 20px;
    padding: 11px;
  }

  .acf-profile-page .acf-feed-text {
    font-size: 15px;
    line-height: 1.82;
  }

  .acf-profile-page .acf-feed-bottom {
    grid-template-columns: 1fr auto;
  }

  .acf-profile-page .acf-feed-stats {
    gap: 5px;
  }

  .acf-profile-page .acf-feed-stats span {
    padding: 0 7px;
  }

  .acf-profile-page .acf-feed-stats small {
    font-size: 9.5px;
  }

  .acf-profile-page .acf-feed-save {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 15px;
  }
}

@media (max-width: 340px) {
  .acf-profile-page .acf-feed-stats small {
    display: none;
  }

  .acf-profile-page .acf-feed-stats span {
    width: 34px;
    justify-content: center;
  }
}

.acf-profile-empty.is-private-timeline {
  border-color: rgba(6,182,212,.20);
  background:
    radial-gradient(160px 100px at 100% 0, rgba(6,182,212,.12), transparent 70%),
    rgba(255,255,255,.035);
  color: #cffafe;
}
