/* =================================================================
   Insta Bio Builder — Public CSS v2
   ================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.ibb-bio-page {
  --bg:  #1e1333;
  --acc: #a855f7;
  --txt: #ffffff;
  --crd: #2d1f4e;
  --sc:  #a855f7;
  --dur: 20s;
}

.ibb-bio-page {
  position: relative;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--txt);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

.ibb-bg-layer {
  position: fixed; inset: 0;
  background-size: cover; background-position: center;
  opacity: .14; pointer-events: none; z-index: 0;
}

.ibb-bio-page > *:not(.ibb-bg-layer) { position: relative; z-index: 1; }

/* ── HEADER ── */
.ibb-hdr {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 50px 24px 20px; max-width: 580px; margin: 0 auto;
}

.ibb-av-ring {
  width: 92px; height: 92px; border-radius: 50%; padding: 3px;
  background: linear-gradient(135deg, var(--acc) 0%, #7c3aed 50%, #db2777 100%);
  margin-bottom: 16px; flex-shrink: 0;
}
.ibb-av-ring img,
.ibb-av-init {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; display: block;
  border: 3px solid var(--bg); background: #2a1f44;
}
.ibb-av-init {
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; color: var(--acc);
}

.ibb-name { font-size: 24px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 8px; }

.ibb-stars { display: flex; gap: 2px; margin-bottom: 10px; }
.ibb-star   { font-size: 21px; color: var(--sc, var(--acc)); line-height: 1; }
.ibb-star-h { font-size: 21px; color: rgba(128,128,128,.25); line-height: 1; position: relative; }
.ibb-star-h::before { content:'★'; position:absolute; left:0; top:0; width:50%; overflow:hidden; color: var(--sc, var(--acc)); }
.ibb-star-e { font-size: 21px; color: rgba(128,128,128,.25); line-height: 1; }

.ibb-bio { font-size: 14px; line-height: 1.65; color: rgba(255,255,255,.65); max-width: 400px; margin: 0; }

/* ── SOCIAL ── */
.ibb-social { display: flex; justify-content: center; gap: 18px; padding: 16px 24px 6px; flex-wrap: wrap; }
.ibb-si { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); text-decoration: none; transition: color .2s, transform .2s; }
.ibb-si svg { width: 21px; height: 21px; }
.ibb-si:hover { color: var(--acc); transform: translateY(-3px); }

/* ── STORIES marquee ── */
.ibb-stories-outer {
  width: 100%; overflow: hidden; padding: 12px 0 20px;
  -webkit-mask-image: linear-gradient(to right,transparent 0%,#000 5%,#000 95%,transparent 100%);
  mask-image: linear-gradient(to right,transparent 0%,#000 5%,#000 95%,transparent 100%);
}
.ibb-stories-track {
  display: flex; gap: 16px; width: max-content;
  animation: ibb-mq var(--dur) linear infinite;
}
.ibb-stories-outer:hover .ibb-stories-track,
.ibb-stories-outer:focus-within .ibb-stories-track { animation-play-state: paused; }

@keyframes ibb-mq {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100% / 3)); }
}

.ibb-story {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; flex-shrink: 0; width: 66px; transition: transform .2s;
}
.ibb-story:hover { transform: scale(1.07) translateY(-2px); }

.ibb-sr {
  width: 64px; height: 64px; border-radius: 50%; padding: 2.5px;
  background: linear-gradient(135deg, var(--acc) 0%, #7c3aed 50%, #db2777 100%);
}
.ibb-sr img,
.ibb-si-init {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; display: block;
  border: 2.5px solid var(--bg); background: #2a1f44;
}
.ibb-si-init {
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: var(--acc);
}

.ibb-story span {
  font-size: 11px; font-weight: 500; color: rgba(255,255,255,.7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 66px; text-align: center; display: block;
}

/* ── CARDS — full-width background-image banners ── */
.ibb-cards {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 520px; margin: 16px auto 0; padding: 0 22px;
}
.ibb-card {
  display: block; position: relative; min-height: 80px;
  border-radius: 14px; overflow: hidden;
  background-color: var(--crd);
  background-size: cover; background-position: center;
  text-decoration: none; transition: transform .2s, box-shadow .2s;
  border: 1px solid rgba(255,255,255,.07);
}
.ibb-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0,0,0,.5); }

.ibb-card-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,.08) 100%);
}
.ibb-card-body { position: relative; z-index: 1; padding: 16px 22px; display: flex; flex-direction: column; gap: 3px; }
.ibb-card-badge { display: inline-block; background: var(--acc); color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; margin-bottom: 4px; width: fit-content; }
.ibb-card-title { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.3; }
.ibb-card-sub   { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 1px; }

/* ── GALLERY ── */
.ibb-gallery { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; max-width: 520px; margin: 14px auto 0; padding: 0 22px; }
.ibb-gallery-item { border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--crd); }
.ibb-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ibb-gallery-item:hover img { transform: scale(1.04); }

/* ── FOOTER ── */
.ibb-footer-text { text-align: center; font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.45); max-width: 400px; margin: 28px auto 0; padding: 0 24px; }
.ibb-copy { text-align: center; font-size: 11px; color: rgba(255,255,255,.22); padding: 18px 24px 36px; letter-spacing: .03em; }

@media (max-width: 480px) {
  .ibb-hdr { padding-top: 32px; }
  .ibb-name { font-size: 21px; }
  .ibb-cards, .ibb-gallery { padding: 0 14px; }
}
