/* Pro Card v2 - deployed client styles
   Professional multi-card link bio. Hero photo dissolves into the solid-dark
   card base; white text; circular social icons; 6 card layouts. Layout mirrors
   the legacy Pro Card (public/templates/pro-card): a centered card that flows
   down the page over a blurred backdrop. Mobile = full-bleed card (100% width,
   no radius, min-height 100vh). Desktop = 566px centered card, 1.5rem radius,
   soft shadow, blurred-hero backdrop, 2rem page padding. The PAGE scrolls —
   there is NO internal scroll container.
   VERSION: 1.5 */

* { box-sizing: border-box; }

html { height: 100%; }

html,
body,
#root {
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* Page wrapper (legacy parity): stacks the fixed backdrop + the centered card.
   The PAGE scrolls — there is no internal scroll container. */
#root {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Blurred backdrop behind the card — the hero photo (set inline by the client),
   blurred + darkened. Fixed to the viewport; only visible around the card on
   desktop (on mobile the full-bleed card covers it). Mirrors the legacy bg-blur. */
.pc-frame {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #0a0a0a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(100px) saturate(1.5);
  transform: scale(1.1);
}
.pc-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

/* The card. Mobile: full-bleed, min 100vh, grows with content and flows down. */
.pc-root {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  color: #ffffff;
  background: #1a1a1a;
  font-family: 'Inter', system-ui, sans-serif;
}

/* The card's own base layer (page solid/gradient) behind the content. */
.pc-page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  user-select: none;
}

/* Content flows naturally — NOT a scroll container. */
.pc-scroll {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 28px;
}

/* Desktop (legacy parity): centered 566px card on the blurred backdrop, the
   page itself scrolls (2rem top/bottom padding), card grows with content. */
@media (min-width: 768px) {
  #root { padding: 2rem 16px; }
  .pc-root {
    width: 566px;
    max-width: calc(100vw - 32px);
    min-height: auto;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  }
  .pc-hero { height: 420px; }
}

.pc-header { position: relative; width: 100%; }

/* Hero - header photo that dissolves into the card base */
.pc-hero {
  position: relative;
  width: 100%;
  height: 384px;
  overflow: hidden;
}
.pc-hero.is-empty { height: 120px; }
.pc-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
.pc-hero-placeholder {
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 12px, rgba(255,255,255,0.1) 12px 24px);
  -webkit-mask-image: none;
  mask-image: none;
}
.pc-hero-fade { position: absolute; inset: 0; pointer-events: none; }

/* Body - fills the card */
.pc-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 0;
  box-sizing: border-box;
}
.pc-body.has-hero { margin-top: -64px; }
.pc-section { position: relative; width: 100%; }
.pc-section + .pc-section { margin-top: 18px; }
.pc-section.is-profile { z-index: 3; }

/* Profile */
.pc-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 4px;
}
.pc-name { font-weight: 700; line-height: 1.2; margin: 0 0 2px; color: #ffffff; word-break: break-word; }
.pc-verified-badge { width: 0.9em; height: 0.9em; flex: none; vertical-align: middle; }
.pc-handle { margin: 0 0 6px; color: rgba(255, 255, 255, 0.8); }
.pc-bio { margin: 4px 0 0; max-width: 340px; line-height: 1.5; color: rgba(255, 255, 255, 0.7); white-space: pre-line; word-break: break-word; }
.pc-pills { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pc-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
}
.pc-pill-icon { width: 12px; height: 12px; flex-shrink: 0; }
.pc-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); flex-shrink: 0; animation: pc-pulse 2s ease-in-out infinite; }
@keyframes pc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Socials - circular icons */
.pc-socials { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.pc-social {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease;
  font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, 0.9);
}
.pc-social:hover { transform: scale(1.1); }
.pc-social.is-disabled { cursor: default; opacity: 0.7; }
.pc-social.is-disabled:hover { transform: none; }
.pc-social img { width: 20px; height: 20px; object-fit: contain; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.pc-social span { font-size: 10px; font-weight: 800; line-height: 1; }

/* Links column */
.pc-links { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.pc-link-wrap {
  position: relative; width: 100%;
  border-radius: 14px;
}
.pc-link-anchor { display: block; position: relative; border-radius: inherit; color: inherit; text-decoration: none; cursor: pointer; outline-offset: 4px; }
.pc-link-anchor:focus-visible { outline: 2px solid rgba(120, 170, 255, 0.7); }
.pc-img-empty { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 10px, rgba(255,255,255,0.1) 10px 20px); }

/* Shared row (simple + compact + fullbg) */
.pc-row {
  display: flex; align-items: center; gap: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease;
}
.pc-link-anchor:hover .pc-row { background: rgba(255, 255, 255, 0.12); }
.pc-simple { min-height: 64px; padding: 14px 16px; }
.pc-compact { min-height: 80px; padding: 12px; }
.pc-row-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); flex-shrink: 0; }
.pc-row-icon img { width: 18px; height: 18px; object-fit: contain; display: block; }
.pc-row-icon span { font-size: 12px; font-weight: 800; line-height: 1; }
.pc-compact-img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; display: block; }
.pc-row-text { flex: 1; min-width: 0; }
.pc-row-title { font-size: 16px; font-weight: 500; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-compact .pc-row-title { font-weight: 600; font-size: 15px; }
.pc-row-sub { font-size: 14px; color: rgba(255, 255, 255, 0.6); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-arrow { width: 14px; height: 14px; flex-shrink: 0; color: rgba(255, 255, 255, 0.4); }

/* Featured card */
.pc-featured { position: relative; width: 100%; aspect-ratio: 538 / 326; border-radius: 14px; overflow: hidden; }
.pc-featured-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-featured::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.7) 100%); pointer-events: none; }
.pc-featured-icon { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pc-featured-icon img { width: 16px; height: 16px; object-fit: contain; display: block; }
.pc-featured-icon span { font-size: 11px; font-weight: 800; line-height: 1; color: #ffffff; }
.pc-featured-copy { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: 12px 16px 16px; text-align: center; }
.pc-featured-title { font-size: 20px; font-weight: 700; color: #ffffff; margin-bottom: 4px; overflow-wrap: anywhere; }
.pc-featured-sub { font-size: 14px; color: rgba(255, 255, 255, 0.9); overflow-wrap: anywhere; }

/* Full-background bar */
.pc-fullbg { position: relative; height: 96px; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.pc-fullbg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.3; display: block; }
.pc-fullbg-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.pc-fullbg-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pc-fullbg .pc-row-title { font-weight: 700; }

/* Dual cards */
.pc-dual { display: flex; gap: 12px; justify-content: center; }
.pc-dual-card { position: relative; flex: 1 1 50%; max-width: calc(50% - 6px); aspect-ratio: 262 / 151; border-radius: 12px; overflow: hidden; }
.pc-link-anchor-dual { display: block; flex: 1 1 50%; max-width: calc(50% - 6px); border-radius: 12px; }
.pc-link-anchor-dual .pc-dual-card { flex: 1 1 100%; max-width: 100%; }
.pc-dual-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-dual-fade { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.7) 100%); pointer-events: none; }
.pc-dual-icon { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pc-dual-icon img { width: 13px; height: 13px; object-fit: contain; display: block; }
.pc-dual-icon span { font-size: 10px; font-weight: 800; line-height: 1; color: #ffffff; }
.pc-dual-copy { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: 8px 12px; text-align: center; }
.pc-dual-title { font-size: 16px; font-weight: 700; color: #ffffff; margin-bottom: 2px; overflow-wrap: anywhere; }
.pc-dual-sub { font-size: 12px; color: rgba(255, 255, 255, 0.9); overflow-wrap: anywhere; }
.pc-dual-card .pc-img-empty { position: absolute; inset: 0; }

/* Gallery - fills the row when few; scrolls side-to-side when many (>3) */
.pc-gallery { width: 100%; }
.pc-gallery-title { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: rgba(255,255,255,0.8); margin-bottom: 8px; }
.pc-gallery-track { display: flex; align-items: flex-start; gap: 12px; padding-top: 6px; padding-bottom: 8px; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; user-select: none; }
.pc-gallery-track.is-scroll { overflow-x: auto; cursor: grab; }
.pc-gallery-track.is-grabbing { cursor: grabbing; }
.pc-gallery-track.is-grabbing * { cursor: grabbing !important; }
.pc-gallery-track.is-fill { overflow-x: hidden; }
.pc-gallery-track::-webkit-scrollbar { display: none; }
.pc-gallery-tile { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,0.08); border: 0; padding: 0; display: block; transition: transform 0.2s ease, box-shadow 0.2s ease; }
/* Hover (legacy parity): tile grows slightly + shadow + a dark overlay. */
.pc-gallery-tile::after { content: ''; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0); transition: background-color 0.2s ease; pointer-events: none; }
.pc-gallery-tile:hover { transform: scale(1.05); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3); z-index: 2; }
.pc-gallery-tile:hover::after { background: rgba(0, 0, 0, 0.2); }
/* Suppress the hover grow while drag-scrolling so it does not jitter. */
.pc-gallery-track.is-grabbing .pc-gallery-tile:hover { transform: none; box-shadow: none; }
.pc-gallery-track.is-grabbing .pc-gallery-tile:hover::after { background: rgba(0, 0, 0, 0); }
/* Few (<=3): each tile flexes to fill the row equally (2 -> 50%, 3 -> 33%). */
.pc-gallery-track.is-fill > .pc-gallery-tile { flex: 1 1 0; min-width: 0; }
/* Many (>3): fixed legacy 151x151 so 3 fit and the 4th peeks (signals scroll). */
.pc-gallery-track.is-scroll > .pc-gallery-tile { flex: 0 0 151px; width: 151px; height: 151px; }
.pc-gallery-tile.is-clickable { cursor: pointer; }
.pc-gallery-tile.is-clickable:focus-visible { outline: 2px solid rgba(120, 170, 255, 0.7); outline-offset: 2px; }
.pc-gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.pc-gallery-tile .pc-img-empty { position: absolute; inset: 0; }

/* Card animations (bounce / pulse / shine) */
@keyframes pc-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.pc-anim-bounce { animation: pc-bounce 2s ease-in-out infinite; }
@keyframes pc-scale-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.pc-anim-pulse { animation: pc-scale-pulse 2s ease-in-out infinite; }
.pc-anim-shine { position: relative; overflow: hidden; }
.pc-anim-shine::before {
  content: ''; position: absolute; top: -50%; left: -100%; width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.03) 75%, transparent 100%);
  transform: skewX(-15deg); animation: pc-shine 4s ease-in-out infinite; z-index: 3; pointer-events: none;
}
@keyframes pc-shine { 0% { left: -100%; opacity: 0; } 10% { opacity: 1; } 50% { left: 100%; opacity: 1; } 55% { opacity: 0; } 100% { left: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pc-status-dot,
  .pc-anim-bounce,
  .pc-anim-pulse { animation: none !important; }
  .pc-anim-shine::before { display: none; }
}

/* "Powered by Bouncy" footer (legacy parity) — paid users hide it via Settings */
.pc-footer { margin: 2rem 24px 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.pc-footer-content { display: flex; align-items: center; justify-content: center; gap: 8px; color: rgba(255, 255, 255, 0.4); font-size: 14px; }
.pc-footer-brand { font-weight: 600; color: rgba(255, 255, 255, 0.6); text-decoration: none; transition: color 0.2s; }
.pc-footer-brand:hover { color: rgba(255, 255, 255, 0.8); }

/* Empty state */
.pc-empty-prompt { position: relative; z-index: 2; text-align: center; padding: 56px 28px; }
.pc-empty-title { font-size: 16px; font-weight: 700; color: #ffffff; }
.pc-empty-sub { font-size: 12px; margin-top: 6px; color: rgba(255, 255, 255, 0.6); }

/* Adult content inline warning (dark / glass) */
.pc-link-anchor.has-adult-warning,
.pc-gallery-tile.has-adult-warning { overflow: hidden; }
.pc-adult-inline {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  text-align: center;
  border-radius: inherit;
}
.pc-adult-inline-inner { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; max-width: 300px; }
.pc-adult-inline-title { display: block; color: #ffffff; font-size: 12px; font-weight: 700; line-height: 1.15; }
.pc-adult-inline-body { display: block; color: rgba(255, 255, 255, 0.85); font-size: 11px; font-weight: 500; line-height: 1.28; }
.pc-adult-actions { display: flex; justify-content: center; gap: 8px; width: 100%; }
.pc-adult-btn {
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0 10px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.pc-adult-btn.secondary { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
.pc-adult-btn.primary { border-color: #ffffff; background: #ffffff; color: #000000; }
/* Compact rows have little room — tighten the gate. */
.pc-link-anchor-simple .pc-adult-inline,
.pc-link-anchor-compact .pc-adult-inline,
.pc-link-anchor-fullbg .pc-adult-inline { padding: 7px 10px; }
.pc-link-anchor-simple .pc-adult-inline-title,
.pc-link-anchor-compact .pc-adult-inline-title { display: none; }
.pc-link-anchor-simple .pc-adult-inline-body,
.pc-link-anchor-compact .pc-adult-inline-body { margin-bottom: 4px; white-space: nowrap; }
.pc-link-anchor-simple .pc-adult-btn,
.pc-link-anchor-compact .pc-adult-btn { min-height: 21px; border-radius: 6px; padding: 4px 10px; font-size: 10px; }

/* Gallery image lightbox (dark / glass) */
.pc-image-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pc-image-panel { position: relative; width: min(90vw, 1024px); max-height: 90vh; display: grid; gap: 10px; cursor: default; }
.pc-image-preview {
  width: 100%;
  max-height: min(82vh, 760px);
  display: block;
  border-radius: 8px;
  object-fit: contain;
  background: #000000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-drag: none;
}
.pc-image-close {
  justify-self: end;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pc-image-caption {
  justify-self: center;
  max-width: min(560px, 100%);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 430px) {
  .pc-hero { height: 320px; }
}
