/* ============================================================
   TestPsicologico.online — Main Stylesheet
   Design: Glassmorphism + Soft 3D (Neumorfismo) — Mobile First
   ============================================================ */

/* ── VARIABLES ── */
:root {
  --primary:     #6366F1;
  --primary-dark:#4F46E5;
  --primary-glow:rgba(99,102,241,0.35);
  --secondary:   #06B6D4;
  --secondary-glow:rgba(6,182,212,0.25);
  --bg-start:    #F8FAFC;
  --bg-end:      #E2E8F0;
  --surface:     rgba(255,255,255,0.65);
  --surface-border: rgba(255,255,255,0.9);
  --text-primary:#1E293B;
  --text-secondary:#64748B;
  --text-light:  #94A3B8;
  --success:     #10B981;
  --warning:     #F59E0B;
  --danger:      #EF4444;
  --radius-sm:   12px;
  --radius-md:   20px;
  --radius-lg:   28px;
  --radius-xl:   36px;
  --shadow-sm:   0 2px 8px rgba(99,102,241,0.08), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:   0 8px 24px rgba(99,102,241,0.12), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg:   0 20px 48px rgba(99,102,241,0.15), 0 4px 16px rgba(0,0,0,0.08);
  --shadow-inset:inset 0 2px 8px rgba(99,102,241,0.15), inset 0 1px 3px rgba(0,0,0,0.08);
  --blur:        blur(16px);
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading:'Outfit', system-ui, sans-serif;
  --font-body:   'Inter', system-ui, sans-serif;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px; /* clearance para el sticky-ad-footer fijo (58px) */
}
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
select, input { font-family: var(--font-body); }
a { color: var(--primary); text-decoration: none; }

/* ── UTILITIES ── */
.hidden { display: none !important; }
.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}
.container-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
  padding: 24px 16px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── GLASS CARD ── */
.glass-card {
  background: var(--surface);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.glass-card:hover {
  box-shadow: var(--shadow-lg);
}

/* ── HEADER ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1.5px solid rgba(255,255,255,0.6);
  background: rgba(248,250,252,0.85);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 2px 16px rgba(99,102,241,0.08);
}
.header-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.logo-icon { font-size: 1.5rem; }
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.logo-accent { color: var(--primary); }
.btn-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1.5px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.btn-lang:hover {
  box-shadow: var(--shadow-md);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ── SCREENS ── */
.screen { display: none; padding-top: 24px; padding-bottom: 120px; }
.screen.active { display: block; }
.screen-loading { display: none; padding: 0; }
.screen-loading.active { display: block; }

/* ── HOME SCREEN ── */
.hero { text-align: center; padding: 32px 0 24px; }
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── TESTS GRID ── */
.tests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}
@media (min-width: 480px) {
  .tests-grid { grid-template-columns: 1fr 1fr; }
}

.test-card {
  background: var(--surface);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  padding: 24px 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  /* Efecto flotado 3D */
  transform: translateY(0);
  user-select: none;
}
.test-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}
.test-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--primary-glow);
}
.test-card:hover::before { opacity: 1; }
.test-card:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-inset);
}
.test-card-emoji {
  font-size: 2.8rem;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}
.test-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.test-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.test-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.test-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}
.test-card-time {
  font-size: 0.75rem;
  color: var(--text-light);
}
.test-card-arrow {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: transform var(--transition);
}
.test-card:hover .test-card-arrow { transform: scale(1.15) rotate(-5deg); }

/* ── PROGRESS BAR ── */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.progress-track {
  flex: 1;
  height: 8px;
  background: rgba(99,102,241,0.1);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 100px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px var(--primary-glow);
}
.progress-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 36px;
  text-align: right;
}

/* ── TEST HEADER ── */
.test-header { margin-bottom: 20px; }
.test-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}
.test-step-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── QUESTION CARD ── */
.question-card {
  background: var(--surface);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.question-num {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 10px;
}
.question-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 18px;
}

/* ── OPTIONS ── */
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(226,232,240,0.8);
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.option-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
  opacity: 0;
  transition: opacity var(--transition);
}
.option-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.option-item:hover::before { opacity: 1; }
/* Efecto presión (botón físico) */
.option-item:active {
  transform: scale(0.985) translateX(2px);
  box-shadow: var(--shadow-inset);
}
.option-item.selected {
  border-color: var(--primary);
  background: rgba(99,102,241,0.08);
  box-shadow: 0 0 0 2px var(--primary-glow), var(--shadow-sm);
}
.option-item.selected::before { opacity: 1; }
.option-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  background: white;
  position: relative;
  z-index: 1;
}
.option-item.selected .option-radio {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.option-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transform: scale(0);
  transition: all var(--transition);
}
.option-item.selected .option-radio-dot {
  opacity: 1;
  transform: scale(1);
}
.option-text {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  position: relative;
  z-index: 1;
  flex: 1;
}
.option-item.selected .option-text { color: var(--primary-dark); }

/* ── BOTONES ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
/* Efecto 3D de presión en todos los botones */
.btn:active {
  box-shadow: var(--shadow-inset) !important;
  transform: translateY(1px) !important;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 16px var(--primary-glow), 0 1px 3px rgba(0,0,0,0.1);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow), 0 2px 8px rgba(0,0,0,0.1);
}
.btn-secondary {
  background: rgba(255,255,255,0.7);
  color: var(--text-secondary);
  border: 1.5px solid rgba(226,232,240,0.8);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  color: var(--primary);
  border-color: var(--primary-glow);
  box-shadow: var(--shadow-md);
}
.btn-full { width: 100%; }
.btn-sm { padding: 8px 18px; font-size: 0.82rem; }

/* ── TEST NAV ── */
.test-nav {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.test-nav .btn { flex: 1; }
#btn-prev { flex: 0 0 auto; padding: 14px 20px; }

/* ── AD IN TEST ── */
.ad-in-test {
  display: none; /* visible cuando JS lo active entre páginas */
  margin-bottom: 16px;
}

/* ── LOADING SCREEN ── */
.loading-card {
  width: 100%;
  max-width: 480px;
  text-align: center;
  padding: 40px 28px;
  margin: 0 auto;
}
.brain-anim {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
  animation: brainPulse 2s ease-in-out infinite;
}
@keyframes brainPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 4px 16px rgba(99,102,241,0.3)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 8px 32px rgba(99,102,241,0.5)); }
}
.loading-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.loading-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.loading-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(99,102,241,0.1);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 10px;
}
.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 100px;
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 16px var(--primary-glow);
}
.loading-percent {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 24px;
}
.loading-facts { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.fact-item {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,0.04);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}
.fact-item::before {
  content: '○';
  color: var(--text-light);
  font-size: 0.7rem;
  transition: all var(--transition);
}
.fact-item.active {
  color: var(--primary);
  background: rgba(99,102,241,0.08);
  font-weight: 600;
}
.fact-item.active::before { content: '●'; color: var(--primary); }
.fact-item.done::before { content: '✓'; color: var(--success); }
.fact-item.done { color: var(--text-secondary); }

/* ── DEMOGRAPHICS ── */
.demo-card { max-width: 560px; margin: 0 auto; }
.demo-icon { font-size: 3rem; text-align: center; margin-bottom: 16px; }
.demo-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.demo-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 28px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.select-wrapper {
  position: relative;
}
.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}
select {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(226,232,240,0.8);
  background: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
  backdrop-filter: blur(8px);
}
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Radio groups */
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(226,232,240,0.8);
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.93rem;
  color: var(--text-primary);
}
.radio-option:hover { border-color: var(--primary); background: rgba(99,102,241,0.04); }
.radio-option input[type="radio"] { display: none; }
.radio-custom {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  background: white;
  position: relative;
}
.radio-custom::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transform: scale(0);
  transition: all var(--transition);
}
.radio-option input[type="radio"]:checked ~ .radio-custom {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.radio-option input[type="radio"]:checked ~ .radio-custom::after {
  opacity: 1;
  transform: scale(1);
}
.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(99,102,241,0.06);
}

/* ── RESULT CARD ── */
.result-card { margin-bottom: 16px; text-align: center; }
.result-emoji {
  font-size: 4.5rem;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
  animation: bounceIn 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes bounceIn {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.result-type-label {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  margin-bottom: 12px;
}
.result-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}
.result-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}
.result-traits { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.trait-badge {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(99,102,241,0.1);
  color: var(--primary);
  border: 1px solid rgba(99,102,241,0.2);
}

/* ── SHARE SECTION ── */
.share-section { margin-bottom: 12px; text-align: center; }
.share-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.share-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  color: white;
}
.btn-share:active { transform: scale(0.97); box-shadow: var(--shadow-inset); }
.btn-whatsapp  { background: #25D366; box-shadow: 0 4px 12px rgba(37,211,102,0.3); }
.btn-facebook  { background: #1877F2; box-shadow: 0 4px 12px rgba(24,119,242,0.3); }
.btn-twitter   { background: #000000; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-native    { background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: 0 4px 12px var(--primary-glow); }
.btn-share:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* ── AD PLACEHOLDERS (removidos en producción, reemplazados por AdSense) ── */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(99,102,241,0.15);
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,0.03);
  color: var(--text-light);
  font-size: 0.75rem;
  font-style: italic;
  margin: 16px 0;
}
.ad-300x250 { height: 250px; }
.ad-interstitial { width: 100%; max-width: 480px; height: 280px; margin: 0 auto 24px; }
.ad-in-test { height: 90px; }
.ad-result-top { height: 90px; }
.ad-sticky-footer { height: 50px; }

/* ── STICKY FOOTER AD ── */
.sticky-ad-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(248,250,252,0.95);
  backdrop-filter: var(--blur);
  border-top: 1.5px solid rgba(226,232,240,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

/* ── PWA INSTALL BANNER ── */
.install-banner {
  position: fixed;
  bottom: 64px;
  left: 12px;
  right: 12px;
  z-index: 200;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.install-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.install-icon { font-size: 2rem; }
.install-text { flex: 1; }
.install-text strong { font-size: 0.88rem; display: block; color: var(--text-primary); }
.install-text small { font-size: 0.75rem; color: var(--text-secondary); }
.btn-close-install {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all var(--transition);
}
.btn-close-install:hover { background: rgba(0,0,0,0.12); }

/* ── SCORE BARS (para Test de Temperamentos) ── */
.score-bars { width: 100%; margin: 20px 0; }
.score-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.score-bar-label {
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 110px;
  text-align: left;
  color: var(--text-secondary);
}
.score-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(99,102,241,0.08);
  border-radius: 100px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 100px;
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.score-bar-fill.sanguine { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.score-bar-fill.colerico { background: linear-gradient(90deg, #EF4444, #F87171); }
.score-bar-fill.melancolico { background: linear-gradient(90deg, #6366F1, #818CF8); }
.score-bar-fill.flematico { background: linear-gradient(90deg, #10B981, #34D399); }
.score-bar-pct {
  font-size: 0.78rem;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
  color: var(--text-secondary);
}

/* ── TOAST NOTIFICATION ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: all var(--transition);
  z-index: 999;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── RESPONSIVE ── */
@media (min-width: 640px) {
  .hero-title { font-size: 3rem; }
  .radio-group { flex-direction: row; }
  .share-buttons { grid-template-columns: repeat(4, 1fr); }
  .glass-card { padding: 32px; }
  .question-card { padding: 28px; }
}

/* ── DARK MODE RESPETO DEL SISTEMA ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-start: #0F172A;
    --bg-end:   #1E293B;
    --surface:  rgba(30,41,59,0.75);
    --surface-border: rgba(51,65,85,0.8);
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-light: #64748B;
  }
  .app-header { background: rgba(15,23,42,0.85); border-color: rgba(51,65,85,0.6); }
  select, .option-item, .radio-option { background: rgba(30,41,59,0.7); border-color: rgba(51,65,85,0.7); color: #F1F5F9; }
  .btn-secondary { background: rgba(30,41,59,0.7); color: var(--text-secondary); border-color: rgba(51,65,85,0.7); }
  .sticky-ad-footer { background: rgba(15,23,42,0.95); border-color: rgba(51,65,85,0.6); }
  .test-card { background: rgba(30,41,59,0.75); }
}

/* ── SITE FOOTER ── */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
}
.site-footer .footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.site-footer .footer-link {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}
.site-footer .footer-link:hover { opacity: 0.75; text-decoration: underline; }
.site-footer .footer-sep { opacity: 0.4; }

/* ── REDUCE MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
