/* ═══════════════════════════════════════════════════════════════════════
   style.css  ·  Calculadora de Raridade de Parceiros
   Tema: Dark Stealth · Paleta Carbono + Carmesim · Mobile-First
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ────────────────────────────────────────────────────── */
:root {
  /* Fundo / Obsidian */
  --bg-void:        #050505;
  --bg-base:        #0b0a0a;
  --bg-surface:     #121214;
  --bg-card:        #18181b;
  --bg-elevated:    #1f1f23;

  /* Bordas */
  --border-subtle:  rgba(255,255,255,0.05);
  --border-default: rgba(255,255,255,0.09);
  --border-mid:     rgba(255,255,255,0.14);

  /* Accent / Crimson */
  --acc-dim:       #a71d24;
  --acc-base:      #e61e2a;
  --acc-light:     #ff4d4d;
  --acc-pale:      #ffcccc;
  --acc-glow:      rgba(230, 30, 42, 0.15);
  --acc-glow-sm:   rgba(230, 30, 42, 0.08);

  /* Texto */
  --text-primary:   #f0ede8;
  --text-secondary: #9898a8;
  --text-muted:     #55556a;
  --text-acc:       #e61e2a;

  /* Fontes */
  --font-sans:    'Inter', -apple-system, sans-serif;
  --font-display: 'Barlow Condensed', sans-serif;

  /* Semânticas */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Transições */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Cor de destaque centralizada (altere aqui para trocar o tema) ── */
  --color-accent:      var(--acc-base);
  --color-accent-glow: var(--acc-glow);
}

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

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

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
  background: #252528;
  border: 3px solid var(--bg-void);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--acc-base);
}

/* Firefox support */
* {
  scrollbar-width: thin;
  scrollbar-color: #252528 var(--bg-void);
}


body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* ── Grain texture (ruído sutil no fundo) ────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image:
    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='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ── Luz ambiente suave (ouro atenuado) ──────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  top: -30vh;
  right: -20vw;
  width: 70vw;
  height: 70vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(230, 30, 42, 0.045) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Keyframes ────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1);    }
}

@keyframes numberReveal {
  from { opacity: 0; transform: translateY(8px) scale(0.95); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    filter: blur(0);   }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmerAcc {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes subtlePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* ── Utilitários de animação ─────────────────────────────────────────── */
.anim-fade-up {
  opacity: 0;
  animation: fadeUp 0.55s var(--ease-smooth) forwards;
}

/* ══════════════════════════════════════════════════════════════════════
   LOADING OVERLAY
   ══════════════════════════════════════════════════════════════════════ */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-void);
  transition: opacity 0.5s var(--ease-smooth), visibility 0.5s var(--ease-smooth);
}

#loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-inner {
  text-align: center;
  padding: 0 32px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(230, 30, 42, 0.15);
  border-top-color: var(--acc-base);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
}

.loading-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.loading-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL
   ══════════════════════════════════════════════════════════════════════ */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header {
  text-align: center;
  padding-bottom: 52px;
}

/* Supertitle — marca discreta acima do H1 */
.header-supertitle {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
  opacity: 0.7;
}

.header-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc-base);
  margin-bottom: 22px;
}

.eyebrow-line {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--acc-base);
  opacity: 0.6;
}

.header-title,
.audit-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.header-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--acc-base) 0%, var(--acc-pale) 50%, var(--acc-base) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerAcc 4s linear infinite;
  display: block;
}

.header-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Grid principal ──────────────────────────────────────────────────── */
.main-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 1024px) {
  .main-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    align-items: start;
    gap: 32px;
  }
}

/* ── Coluna de formulário ────────────────────────────────────────────── */
.form-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-card {
  background: rgba(20, 20, 24, 0.55);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.form-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--acc-light);
  letter-spacing: -0.01em;
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.btn-reset:hover {
  color: var(--acc-base);
}

.btn-reset svg {
  width: 14px;
  height: 14px;
}

.filters-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Coluna de resultado ─────────────────────────────────────────────── */
.result-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .result-col {
    position: sticky;
    top: 28px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   CARDS DE INPUT
   ══════════════════════════════════════════════════════════════════════ */
.filter-group {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: opacity 0.2s;
}

.filter-group:first-child {
  padding-top: 0;
}

.filter-group.no-border {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-group:focus-within {
  opacity: 1;
}

.toggle-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.toggle-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* ══════════════════════════════════════════════════════════════════════
   CONTROLE: GÊNERO (pastilhas)
   ══════════════════════════════════════════════════════════════════════ */
.gender-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-option input[type="radio"] {
  display: none;
}

.gender-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-default);
  background: var(--bg-elevated);
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.22s var(--ease-smooth),
    background 0.22s var(--ease-smooth),
    box-shadow 0.22s var(--ease-smooth);
}

.gender-pill:hover {
  border-color: var(--acc-dim);
  background: rgba(230, 30, 42, 0.04);
}

.gender-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.gender-text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.22s;
}

.gender-option input[type="radio"]:checked + .gender-pill {
  border-color: var(--acc-base);
  background: rgba(230, 30, 42, 0.08);
  box-shadow: 0 0 20px rgba(230, 30, 42, 0.12), inset 0 1px 0 rgba(230, 30, 42, 0.1);
}

.gender-option input[type="radio"]:checked + .gender-pill .gender-text {
  color: var(--acc-light);
}

/* ══════════════════════════════════════════════════════════════════════
   CONTROLE: SELECT
   ══════════════════════════════════════════════════════════════════════ */
.styled-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 12px 40px 12px 16px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23e61e2a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.styled-select:focus {
  border-color: var(--acc-dim);
  box-shadow: 0 0 0 3px var(--acc-glow-sm);
}

.styled-select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════════════
   CONTROLE: DUAL-THUMB SLIDER (IDADE)
   ══════════════════════════════════════════════════════════════════════ */
.dual-slider-container {
  position: relative;
  width: 100%;
  height: 20px;              /* altura do hit-area para os thumbs */
  margin: 14px 0 8px;
}

/* Trilha de fundo — linha fina cinza */
.dual-slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  transform: translateY(-50%);
  background: var(--bg-elevated);
  border-radius: 9999px;
  z-index: 0;
}

/* Preenchimento dourado entre os dois thumbs — atualizado via JS */
.dual-slider-fill {
  position: absolute;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--acc-base), var(--acc-light));
  border-radius: 9999px;
  z-index: 1;
  box-shadow: 0 0 10px var(--acc-glow);
  pointer-events: none;
}

/* Inputs completamente transparentes e sobrepostos — apenas os thumbs capturam eventos */
.dual-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
  pointer-events: none;  /* a barra em si ignora cliques */
  z-index: 5;
  margin: 0;
  outline: none;
  border: none;
}

.dual-range::-webkit-slider-thumb {
  pointer-events: auto;  /* apenas os thumbs capturam */
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--acc-base);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--acc-dim), 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.18s var(--ease-spring);
}

.dual-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 1px var(--acc-base), 0 0 14px var(--acc-glow), 0 2px 8px rgba(0,0,0,0.4);
  transform: scale(1.15);
}

.dual-range:active::-webkit-slider-thumb {
  transform: scale(0.95);
}

.dual-range::-moz-range-thumb {
  pointer-events: auto;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--acc-base);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--acc-dim);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.18s var(--ease-spring);
}

/* ══════════════════════════════════════════════════════════════════════
   CONTROLE: SLIDERS
   ══════════════════════════════════════════════════════════════════════ */
.slider-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.slider-value {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--acc-light);
  letter-spacing: -0.01em;
  line-height: 1;
}

.styled-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 9999px;
  background: var(--bg-elevated);
  outline: none;
  cursor: pointer;
  border: none;
}

.styled-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--acc-base);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--acc-dim), 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.18s var(--ease-spring);
}

.styled-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 1px var(--acc-base), 0 0 14px var(--acc-glow), 0 2px 8px rgba(0,0,0,0.4);
  transform: scale(1.15);
}

.styled-range:active::-webkit-slider-thumb {
  transform: scale(0.95);
}

.styled-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--acc-base);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--acc-dim);
  cursor: pointer;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 10px;
}

/* ══════════════════════════════════════════════════════════════════════
   CONTROLE: PILLS / CHIPS (Estado civil, escolaridade, religião)
   ══════════════════════════════════════════════════════════════════════ */
.pills-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Oculta os inputs nativos (checkbox e radio) — design via pill-chip */
.pill-option input[type="checkbox"],
.pill-option input[type="radio"] {
  display: none;
}

.pill-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 9999px;
  border: 1.5px solid var(--border-default);
  background: var(--bg-elevated);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition:
    border-color 0.18s var(--ease-smooth),
    background 0.18s var(--ease-smooth),
    color 0.18s var(--ease-smooth);
}

.pill-chip:hover {
  border-color: var(--acc-dim);
  color: var(--text-primary);
}

.pill-check {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-mid);
  transition: background 0.18s, box-shadow 0.18s;
  flex-shrink: 0;
}

/* Estado ativo — checkbox */
.pill-option input[type="checkbox"]:checked + .pill-chip {
  border-color: var(--acc-base);
  background: rgba(230, 30, 42, 0.08);
  color: var(--acc-light);
}

.pill-option input[type="checkbox"]:checked + .pill-chip .pill-check {
  background: var(--acc-base);
  box-shadow: 0 0 6px var(--acc-glow);
}

/* Estado ativo — radio (mesmo visual) */
.pill-option input[type="radio"]:checked + .pill-chip {
  border-color: var(--acc-base);
  background: rgba(230, 30, 42, 0.08);
  color: var(--acc-light);
}

.pill-option input[type="radio"]:checked + .pill-chip .pill-check {
  background: var(--acc-base);
  box-shadow: 0 0 6px var(--acc-glow);
}

.card-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════════
   CONTROLE: TOGGLE (Obesidade)
   ══════════════════════════════════════════════════════════════════════ */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-row .toggle-info h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.toggle-row .toggle-info p {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.toggle-wrap {
  flex-shrink: 0;
}

.toggle-wrap input[type="checkbox"] {
  display: none;
}

.toggle-track {
  display: block;
  width: 50px;
  height: 28px;
  border-radius: 9999px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-default);
  cursor: pointer;
  position: relative;
  transition: background 0.28s var(--ease-smooth), border-color 0.28s var(--ease-smooth);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.28s var(--ease-spring), background 0.28s;
}

.toggle-wrap input[type="checkbox"]:checked + .toggle-track {
  background: rgba(230, 30, 42, 0.15);
  border-color: var(--acc-base);
}

.toggle-wrap input[type="checkbox"]:checked + .toggle-track::after {
  transform: translateX(22px);
  background: var(--acc-base);
  box-shadow: 0 0 8px var(--acc-glow);
}

/* ══════════════════════════════════════════════════════════════════════
   CARD DE RESULTADO — Glassmorphism Premium
   ══════════════════════════════════════════════════════════════════════ */
#result-card {
  background: rgba(15, 15, 18, 0.75);
  border: 1px solid rgba(230, 30, 42, 0.18);
  border-radius: var(--radius-xl);
  padding: 36px 28px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(230, 30, 42, 0.06) inset,
    0 2px 80px rgba(0,0,0,0.5),
    0 0 60px rgba(230, 30, 42, 0.04);
}

/* Linha superior dourada */
#result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--acc-base), transparent);
  opacity: 0.6;
}

/* Brilho de canto */
#result-card::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(230, 30, 42, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Indicador ao vivo */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc-base);
  animation: subtlePulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* Label acima do número */
.result-overline {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* O número grande — fonte serifada dourada */
#big-percentage {
  font-family: var(--font-display);
  font-size: clamp(3rem, 14vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, var(--acc-base) 0%, var(--acc-pale) 45%, var(--acc-base) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerAcc 5s linear infinite;
  margin-bottom: 16px;
  display: block;
}

#big-percentage.pop {
  animation: numberReveal 0.5s var(--ease-spring) both, shimmerAcc 5s linear infinite;
}

/* Subtítulo dinâmico */
#result-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

#result-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Barra de progresso */
.progress-track {
  height: 2px;
  background: rgba(255,255,255,0.05);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 28px;
}

#progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--acc-dim), var(--acc-light));
  transition: width 0.7s var(--ease-spring);
  box-shadow: 0 0 8px var(--acc-glow);
}

/* Divisória */
.result-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0 20px;
}

/* Breakdown grid */
.breakdown-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}

.breakdown-cell {
  background: rgba(255,255,255,0.022);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.breakdown-cell .bc-icon {
  font-size: 0.75rem;
  margin-bottom: 4px;
  display: block;
}

.breakdown-cell .bc-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
  letter-spacing: 0.03em;
}

.breakdown-cell .bc-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}

.breakdown-cell .bc-extra {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

/* Botão compartilhar */
.btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.18s var(--ease-smooth);
}

.btn-share:hover {
  border-color: var(--acc-dim);
  color: var(--acc-light);
  background: rgba(230, 30, 42, 0.04);
}

.btn-share svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Disclaimer */
.result-disclaimer {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ── Fun fact card ────────────────────────────────────────────────────── */
.fun-fact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.fun-fact-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
  filter: grayscale(0.3);
}

#fun-fact {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding-top: 60px;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 2;
}

.footer-rule {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--acc-dim), transparent);
  margin: 0 auto 20px;
}

.footer-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-disclaimer {
  font-size: 0.62rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 20px;
}

/* Footer actions: GitHub + Botão auditoria */
.footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.18s var(--ease-smooth);
}

.footer-credit:hover {
  color: var(--acc-base);
}

.footer-credit svg {
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.18s;
}

.footer-credit:hover svg {
  opacity: 1;
}

/* Botão ghost de auditoria de dados */
.footer-audit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  background: transparent;
  transition:
    border-color 0.18s var(--ease-smooth),
    color 0.18s var(--ease-smooth),
    background 0.18s var(--ease-smooth);
}

.footer-audit-btn:hover {
  border-color: var(--acc-dim);
  color: var(--acc-light);
  background: rgba(230, 30, 42, 0.04);
}

/* ══════════════════════════════════════════════════════════════════════
   ANIMAÇÕES ESCALONADAS (delay para entrada)
   ══════════════════════════════════════════════════════════════════════ */
.anim-fade-up:nth-child(1)  { animation-delay: 0.05s; }
.anim-fade-up:nth-child(2)  { animation-delay: 0.10s; }
.anim-fade-up:nth-child(3)  { animation-delay: 0.15s; }
.anim-fade-up:nth-child(4)  { animation-delay: 0.20s; }
.anim-fade-up:nth-child(5)  { animation-delay: 0.25s; }
.anim-fade-up:nth-child(6)  { animation-delay: 0.30s; }
.anim-fade-up:nth-child(7)  { animation-delay: 0.35s; }
.anim-fade-up:nth-child(8)  { animation-delay: 0.40s; }
.anim-fade-up:nth-child(9)  { animation-delay: 0.45s; }
.anim-fade-up:nth-child(10) { animation-delay: 0.50s; }
.anim-fade-up:nth-child(11) { animation-delay: 0.55s; }

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVO FINO
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 420px) {
  .page-wrapper { padding: 28px 16px 60px; }
  #result-card  { padding: 28px 18px 22px; }
  .input-card   { padding: 18px 16px 16px; }
  .site-header  { padding-bottom: 36px; }
}

@media (min-width: 640px) {
  .page-wrapper { padding: 56px 32px 80px; }
}
/* ══════════════════════════════════════════════════════════════════════
   TEMPLATE FANTASMA (CAPTURE ONLY)
   Otimizado para Instagram Stories (1080x1920)
   ══════════════════════════════════════════════════════════════════════ */
/* ═ TEMPLATE FANTASMA (STORY 1080x1920) ═ */
#share-template {
  position: fixed; top: 0; left: 0; width: 1080px; height: 1920px;
  background: #050505; z-index: -9999; opacity: 0; pointer-events: none;
  display: flex; flex-direction: column; padding: 120px 80px;
  box-sizing: border-box; overflow: hidden; font-family: var(--font-sans);
}
.share-bg-glow {
  position: absolute; top: -20%; left: -20%; width: 140%; height: 140%;
  background: radial-gradient(circle at 50% 40%, rgba(230, 30, 42, 0.15) 0%, transparent 60%); z-index: 0;
}
.share-header, #share-filters, .share-result-box, .share-footer { position: relative; z-index: 1; }
.share-header { text-align: center; margin-bottom: 40px; }
.share-eyebrow { font-size: 32px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--acc-base); margin-bottom: 15px; }
.share-header h2 { font-family: var(--font-display); font-size: 82px; font-weight: 900; color: var(--text-primary); text-transform: uppercase; line-height: 1.05; letter-spacing: 0.02em; }

#share-filters { 
  display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; 
  gap: 16px; width: 100%; margin-top: 40px; margin-bottom: 40px; overflow: hidden;
  max-height: 700px; /* Garante que os filtros não empurrem o footer para fora */
}

.share-tag {
  background: rgba(20, 20, 24, 0.95); border: 3px solid rgba(230, 30, 42, 0.4);
  color: #fff; padding: 18px 36px; border-radius: 100px; font-size: 38px;
  font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.6); display: flex; align-items: center; gap: 12px;
  white-space: nowrap;
}

.share-result-box {
  text-align: center; background: rgba(20, 20, 24, 0.6); border: 3px solid rgba(255,255,255,0.08);
  border-radius: 50px; padding: 60px 40px; margin-bottom: 20px;
  width: 100%;
}

.share-result-label { font-size: 34px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 25px; }
#share-big-pct { font-family: var(--font-display); font-size: 240px; font-weight: 900; color: var(--acc-base); line-height: 0.9; margin: 0 0 40px 0; text-shadow: 0 0 60px rgba(230, 30, 42, 0.45); }
#share-proportion { font-size: 48px; font-weight: 700; color: #f0ede8; background: var(--acc-base); display: inline-block; padding: 18px 48px; border-radius: 100px; box-shadow: 0 10px 40px rgba(230, 30, 42, 0.4); }

.share-footer { text-align: center; margin-top: auto; padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.1); }
.share-footer p { font-size: 32px; color: var(--text-muted); margin-bottom: 12px; }
#share-url { font-size: 46px; font-weight: 800; color: var(--text-primary); letter-spacing: 0.05em; font-family: var(--font-display); }
