/* ═══════════════════════════════════════════════════════════
   6-9.SPACE — Global Styles · Light Theme (sandbar-inspired)
   ═══════════════════════════════════════════════════════════ */

/* Design tokens — warm sand palette */
:root {
  --clr-bg:        #FAF8F0;
  --clr-surface:   #FFFFFF;
  --clr-surface2:  #F0EDE5;
  --clr-border:    rgba(12,11,11,.07);
  --clr-primary:   #c5a028;   /* gold */
  --clr-accent:    #C4622D;   /* terracotta */
  --clr-danger:    #e5484d;   /* error states only */
  --clr-text:      #0C0B0B;
  --clr-muted:     #979585;
  --radius:        12px;
  --radius-sm:     6px;
  --transition:    .2s ease;
  --max-w:         1240px;
  --header-h:      64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ── Utility ─────────────────────────────────────────────── */
.gold   { color: var(--clr-primary); }
.accent { color: var(--clr-accent); }
.muted  { color: var(--clr-muted); }

.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem; border-radius: var(--radius-sm);
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  background: var(--clr-surface2); color: var(--clr-muted);
}
.badge--live    { background: rgba(196,98,45,.1);  color: var(--clr-accent); }
.badge--gold    { background: rgba(197,160,40,.1); color: var(--clr-primary); }
.badge--muted   { background: var(--clr-surface2); color: var(--clr-muted); }
.badge--success { background: rgba(34,197,94,.1);  color: #16a34a; }
/* in_battle status badge — warm amber/gold tone */
.badge--battle  { background: rgba(197,160,40,.12); color: #b58a18; }

/* ── Card ────────────────────────────────────────────────── */
.card {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.032'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 90% 70% at 55% 25%, rgba(196,98,45,.07) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 15% 85%, rgba(197,160,40,.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 85% 70%, rgba(197,160,40,.04) 0%, transparent 50%),
    var(--clr-bg);
  /*background: var(--clr-surface);*/
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* ── Button ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.4rem; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 700; letter-spacing: .04em; cursor: pointer;
  border: none; transition: opacity var(--transition), transform var(--transition);
}
.btn:hover:not(:disabled) { opacity: .85; transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }

.btn--primary     { background: var(--clr-primary); color: var(--clr-bg); }
.btn--accent      { background: var(--clr-accent);  color: #fff; }
.btn--outline {
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
}
.btn--outline:hover:not(:disabled) { border-color: var(--clr-text); }

.btn--outline-gold {
  background: transparent;
  border: 1.5px solid rgba(197,160,40,.4);
  color: var(--clr-primary);
}
.btn--outline-gold:hover:not(:disabled) {
  background: rgba(197,160,40,.07);
  border-color: rgba(197,160,40,.7);
  opacity: 1;
  transform: none;
}

/* ── Section helpers ─────────────────────────────────────── */
.section { padding: 3rem 0; }
.section__title { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.25rem; }
.section__more  { text-align: center; margin-top: 1.5rem; }

/* ── Grid helpers ────────────────────────────────────────── */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* ── Timeline ────────────────────────────────────────────── */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: .25rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: .85rem; top: 1.2rem; bottom: 1.2rem;
  width: 1px;
  background: var(--clr-border);
}

/* ══════════════════════════════════════════════════════════
   ProfileCard — global styles
   Applied to both SSR Astro component AND JS-injected cards
   (insertAdjacentHTML infinite scroll)
   ══════════════════════════════════════════════════════════ */

/* Card shell — override global .card padding, flex column for footer pinning */
.profile-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.profile-card:hover {
  box-shadow: 0 4px 20px rgba(12,11,11,.07);
  transform: translateY(-1px);
}

/* Clickable inner area */
.profile-card__inner {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 1.25rem 1.25rem 1rem;
  flex: 1;
}
.profile-card__inner:hover { opacity: .88; }

/* Top row: avatar + identity */
.profile-card__top {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: .95rem;
}
.profile-card__meta { flex: 1; min-width: 0; }
.profile-card__name-row {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}
.profile-card__name {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* Handle line (SSR version) */
.handle-line {
  font-size: .78rem;
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}
.sep  { opacity: .45; }
.flag { font-size: .9rem; line-height: 1; }

/* Social link (JS renderCard version) */
.profile-card__social-link {
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: var(--clr-muted);
  flex-wrap: wrap;
}
.pc-country { font-size: .75rem; color: var(--clr-muted); display: block; margin-top: .1rem; }

/* Avatar — base (used on detail pages at any size) */
.avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.avatar-wrap img {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clr-border);
  display: block;
}

/* Avatar — fixed 72px only inside profile cards (grid / infinite scroll) */
.profile-card .avatar-wrap {
  width: 72px;
  height: 72px;
}
.profile-card .avatar-wrap img {
  width: 72px;
  height: 72px;
}
.avatar--official {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 2px rgba(197,160,40,.15), 0 0 14px rgba(197,160,40,.25);
}
.official-badge {
  position: absolute;
  bottom: 0; right: 0;
  width: 22px; height: 22px;
  background: var(--clr-primary);
  border-radius: 50%;
  border: 2px solid var(--clr-bg, #FAF8F0);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: #000; line-height: 1;
  pointer-events: none;
}

/* Verified Creator badge */
.pc-verified {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--clr-primary);
  background: rgba(197,160,40,.08);
  padding: .1rem .45rem;
  border-radius: 12px;
  margin-bottom: .15rem;
  white-space: nowrap;
  line-height: 1.5;
}

/* ── ADD immediately after the .pc-verified rule block ─────────────────────── */

/* Famous Person — gold highlight on name in listing cards */
.profile-card__name--famous {
  color: var(--clr-primary);
  padding: .05rem .4rem;
  border-radius: 4px;
  display: inline;                /* stays inline within flex parent */
  line-height: 1.4;
}

/* Famous Person badge on full profile/detail page */
.pd-famous-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: white;
  background: var(--clr-primary);
  padding: .15rem .55rem;
  border-radius: 12px;
  white-space: nowrap;
  line-height: 1.5;
}

/* Stats row */
.profile-card__stats {
  display: flex;
  gap: .5rem;
  text-align: center;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

/* ── SSR version: <strong> value + <span class="muted"> label ── */
.stat strong {
  font-weight: 800;
  font-size: .92rem;
  color: var(--clr-text);
  display: block;
}
.stat--gold   { color: var(--clr-primary) !important; }
.stat--accent { color: var(--clr-accent)  !important; }
/* SSR label — target only direct muted span, NOT .stat__val/.stat__lbl */
.stat > .muted {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* ── JS renderCard version: .stat__val + .stat__lbl ── */
/* NOTE: no generic .stat span rule — it would override .stat__val font-size */
.stat__val {
  font-weight: 800;
  font-size: .92rem;
  color: var(--clr-text);
  display: block;
  line-height: 1.2;
}
.stat__val.gold   { color: var(--clr-primary); }
.stat__val.accent { color: var(--clr-accent);  }
.stat__lbl {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--clr-muted);
  display: block;
}

/* Footer — SSR (.profile-card__footer) and JS (.pc-platform) */
.profile-card__footer,
.pc-platform {
  border-top: 1px solid var(--clr-border);
  padding: .65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--clr-muted);
}
.profile-card__social-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--clr-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.profile-card__social-btn:hover { color: var(--clr-accent); }

@keyframes live-flash {
  0%   { color: var(--clr-primary); }
  100% { color: inherit; }
}
.stat--live-flash {
  animation: live-flash .6s ease-out;
}
   .pc-voted-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--clr-accent);
    background: rgba(196, 98, 45, .09);
    border: 1px solid rgba(196, 98, 45, .22);
    padding: .2rem .6rem;
    border-radius: 999px;
    margin-top: .6rem;
    white-space: nowrap;
    line-height: 1;
  }
  .pc-voted-badge.is-hidden {
    display: none;
  }.nav {
    height: var(--header-h);
    background: rgba(250,248,240,.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--clr-border);
    position: sticky; top: 0; z-index: 99;
  }
  /* nowrap prevents inner flex children from pushing the logo to wrap */
  .nav__inner { display: flex; align-items: center; height: 100%; gap: 2rem; flex-wrap: nowrap; }
  /* logo must never shrink or break across lines */
  .nav__logo  { font-size: 1.3rem; font-weight: 900; letter-spacing: -.02em; flex-shrink: 0; white-space: nowrap; }
  .nav__links { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
  .nav__link  { font-size: .875rem; font-weight: 500; color: var(--clr-muted); transition: color var(--transition); }
  .nav__link:hover, .nav__link--active { color: var(--clr-text); }
  /* white-space: nowrap ensures the button text never wraps (which would make it a circle) */
  .nav__cta   { padding: .45rem 1rem; font-size: .85rem; border-radius: 50px; white-space: nowrap; flex-shrink: 0; }

  /* ── Neon advertise link ──────────────────────────────────── */
  @keyframes neon-flicker {
    0%   { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6), 0 0 22px rgba(197,160,40,.3); opacity: 1;   }
    4%   { color: rgba(197,160,40,.3);          text-shadow: none;                                                                                        opacity: .3;  }
    5%   { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6);                                   opacity: 1;   }
    10%  { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6), 0 0 22px rgba(197,160,40,.3); opacity: 1;   }
    11%  { color: rgba(197,160,40,.15);         text-shadow: none;                                                                                        opacity: .15; }
    12%  { color: var(--clr-primary);          text-shadow: 0 0 6px rgba(197,160,40,1),  0 0 16px rgba(197,160,40,.7), 0 0 28px rgba(197,160,40,.4); opacity: 1;   }
    28%  { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6), 0 0 22px rgba(197,160,40,.3); opacity: 1;   }
    29%  { color: rgba(197,160,40,.4);          text-shadow: none;                                                                                        opacity: .4;  }
    30%  { color: rgba(197,160,40,.15);         text-shadow: none;                                                                                        opacity: .15; }
    31%  { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6);                                   opacity: 1;   }
    55%  { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6), 0 0 22px rgba(197,160,40,.3); opacity: 1;   }
    56%  { color: rgba(197,160,40,.2);          text-shadow: none;                                                                                        opacity: .2;  }
    57%  { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6);                                   opacity: 1;   }
    58%  { color: rgba(197,160,40,.2);          text-shadow: none;                                                                                        opacity: .2;  }
    59%  { color: var(--clr-primary);          text-shadow: 0 0 6px rgba(197,160,40,1),  0 0 16px rgba(197,160,40,.7);                                   opacity: 1;   }
    80%  { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6), 0 0 22px rgba(197,160,40,.3); opacity: 1;   }
    81%  { color: rgba(197,160,40,.35);         text-shadow: none;                                                                                        opacity: .35; }
    82%  { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6);                                   opacity: 1;   }
    100% { color: var(--clr-primary);          text-shadow: 0 0 4px rgba(197,160,40,.9), 0 0 12px rgba(197,160,40,.6), 0 0 22px rgba(197,160,40,.3); opacity: 1;   }
  }

  .nav__link--neon {
    color: var(--clr-primary) !important;
    font-weight: 700;
    letter-spacing: .04em;
    animation: neon-flicker 5s step-end infinite;
  }
  .nav__link--neon:hover {
    animation: none;
    color: var(--clr-primary) !important;
    text-shadow:
      0 0 6px rgba(197,160,40,1),
      0 0 14px rgba(197,160,40,.7),
      0 0 28px rgba(197,160,40,.4);
  }

  /* ── Verified creator indicator ──────────────────────────── */
  .nav-vc {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .55rem .25rem .25rem;
    border-radius: 50px;
    background: rgba(197,160,40,.1);
    border: 1px solid rgba(197,160,40,.25);
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition);
    white-space: nowrap;
    max-width: 200px;
  }
  .nav-vc:hover {
    background: rgba(197,160,40,.18);
    border-color: rgba(197,160,40,.4);
  }
  .nav-vc__avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid var(--clr-primary);
  }
  .nav-vc__handle {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .7rem;
    font-weight: 600;
    color: var(--clr-text);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-vc__network {
    display: inline-flex;
    color: var(--clr-muted);
    flex-shrink: 0;
  }
  .nav-vc__shield {
    flex-shrink: 0;
    color: var(--clr-primary);
  }
  
  /* ── Minimal editorial lang switcher ─────────────────────── */
  .lang-switcher {
    display: flex;
    align-items: center;
    gap: .25rem;
  }
  .lang-sep {
    font-size: .7rem;
    color: var(--clr-border);
    user-select: none;
    line-height: 1;
  }
  .lang-btn {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--clr-muted);
    padding: .1rem 0;
    border-bottom: 1.5px solid transparent;
    transition: color var(--transition), border-color var(--transition);
    text-decoration: none;
  }
  .lang-btn:hover {
    color: var(--clr-text);
  }
  .lang-btn--active {
    color: var(--clr-text);
    border-bottom-color: var(--clr-text);
  }
  
  .nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .5rem; margin-left: auto; flex-shrink: 0; }
  .nav__burger span { display: block; width: 22px; height: 2px; background: var(--clr-text); border-radius: 2px; transition: var(--transition); }
  
  /* ── Tablet + mobile dropdown ────────────────────────────── */
  @media (max-width: 1024px) {
    /* Remove backdrop-filter from nav so the dropdown can blur through to page content */
    .nav {
      background: rgba(250,248,240,.96);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  
    .nav__burger { display: flex; }
  
    .nav__links {
      display: none;
      position: absolute;
      top: var(--header-h);
      left: 0; right: 0;
      /* 2-column grid for tablets */
      grid-template-columns: 1fr 1fr;
      align-items: start;
      gap: 0;
      background: rgba(250,248,238,.28);
      backdrop-filter: blur(60px) saturate(1.8) brightness(1.04);
      -webkit-backdrop-filter: blur(60px) saturate(1.8) brightness(1.04);
      border-bottom: 1px solid rgba(197,160,40,.12);
      padding: .75rem 0;
      box-shadow: 0 12px 40px rgba(12,11,11,.08);
    }
    .nav__links--open { display: grid; }
  
    /* CTA and lang switcher span full width */
    .nav__cta        { grid-column: 1 / -1; margin: .5rem 1.5rem; width: calc(100% - 3rem); text-align: center; }
    .lang-switcher   { grid-column: 1 / -1; margin: .5rem 1.5rem; }
    .nav-vc          { grid-column: 1 / -1; margin: .25rem 1.5rem; }
  
    .nav__link { padding: .65rem 1.5rem; width: 100%; box-sizing: border-box; }
  }
  
  /* ── Single column on small phones ──────────────────────── */
  @media (max-width: 600px) {
    .nav__links {
      grid-template-columns: 1fr;
    }
    .nav__cta      { width: calc(100% - 3rem); }
  }.footer {
  border-top: 1px solid var(--clr-border);
  padding: 3rem 0;
}
.footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 2rem;
}
.footer__copy { 
  font-size: 0.8rem;
  color: var(--clr-text);
  margin-top: 4px;
}
.footer__logo {
  font-size: 1.1rem;
  font-weight: 900;
  text-align: center;
  justify-self: center;
}
.footer__actions {
  display: flex;
  gap: 2.5rem;
  justify-self: end;
}
.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer__links a {
  font-size: .9rem;
  color: var(--clr-muted);
  transition: color var(--transition);
}
.footer__links a:hover {
  color: var(--clr-text);
}

/* Neon $$$ link — reuses neon-flicker keyframes defined globally in Nav.astro */
.footer__link--neon {
  color: var(--clr-primary) !important;
  font-weight: 700;
  letter-spacing: .04em;
  animation: neon-flicker 5s step-end infinite;
}
.footer__link--neon:hover {
  animation: none;
  color: var(--clr-primary) !important;
  text-shadow:
    0 0 6px rgba(197,160,40,1),
    0 0 14px rgba(197,160,40,.7),
    0 0 28px rgba(197,160,40,.4);
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .footer__logo { justify-self: center; }
  .footer__actions {
    justify-self: center;
    gap: 2rem;
  }
}.vft-pill {
      position: fixed;
      right: 1.5rem;
      bottom: calc(1.5rem + var(--vft-stack, 0px));
      z-index: 9998;
  
      backdrop-filter: blur(16px) saturate(1.8);
      -webkit-backdrop-filter: blur(16px) saturate(1.8);
      color: #d4aa2e;
      font-size: .85rem;
      letter-spacing: .02em;
      border-radius: 2rem;
      pointer-events: none;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      animation: vft-fly 5.5s cubic-bezier(.4, 0, .2, 1) forwards;
      will-change: transform, opacity;
    }
  
    @keyframes vft-fly {
      0%   { opacity: 0;   transform: translateY(0)                                          scale(.92); }
      8%   { opacity: 1;   transform: translateY(0)                                          scale(1);   }
      22%  { opacity: 1;   transform: translateY(calc(-1.5rem - var(--vft-stack, 0px)))      scale(1);   }
      78%  { opacity: .85; transform: translateY(calc(-100vh + 8rem + var(--vft-stack, 0px))) scale(.98); }
      100% { opacity: 0;   transform: translateY(calc(-100vh + 5rem + var(--vft-stack, 0px))) scale(.95); }
    }
  
    @media (max-width: 480px) {
      .vft-pill {
        right: .85rem;
        bottom: .85rem;
        font-size: .8rem;
        padding: .42rem .9rem;
      }
    }