:root {
  --bg-deep: #150c2e;
  --bg-mid: #10142a;
  --bg: #0b0e1a;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-solid: #171b2c;
  --teal: #00d9d4;
  --teal-2: #3b82f6;
  --orange: #ff981f;
  --pink: #ff4d9d;
  --yellow: #f5e960;
  --green-credit: #8bd15e;
  --text: #ffffff;
  --text-muted: #aab0c4;
  --border: rgba(255, 255, 255, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: 'Manrope', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 100px;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 38%, var(--bg) 75%);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- Orbes de luz atmosférica (elemento de fondo disruptivo) --- */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
body::before {
  width: 480px; height: 480px;
  top: -140px; left: -120px;
  background: radial-gradient(circle, var(--teal) 0%, transparent 70%);
}
body::after {
  width: 520px; height: 520px;
  top: 60px; right: -160px;
  background: radial-gradient(circle, var(--orange) 0%, transparent 70%);
}

h1, h2, .display {
  font-family: 'Baloo 2', 'Manrope', sans-serif;
  letter-spacing: -0.01em;
}

.marquee-border {
  height: 6px;
  width: 100%;
  position: relative;
  z-index: 2;
  background-image:
    radial-gradient(circle, var(--teal) 1.6px, transparent 1.8px),
    radial-gradient(circle, var(--orange) 1.6px, transparent 1.8px),
    radial-gradient(circle, var(--pink) 1.6px, transparent 1.8px);
  background-size: 66px 6px, 66px 6px, 66px 6px;
  background-position: 0 center, 22px center, 44px center;
}
@media (prefers-reduced-motion: no-preference) {
  .marquee-border { animation: marquee-scroll 4s linear infinite; }
}
@keyframes marquee-scroll {
  from { background-position: 0 center, 22px center, 44px center; }
  to { background-position: 66px center, 88px center, 110px center; }
}

.hero { position: relative; z-index: 2; padding: 44px 24px 36px; text-align: center; }
.hero-inner { max-width: 1000px; margin: 0 auto; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12.5px;
  font-weight: 700;
  margin: 0 0 16px;
}
.eyebrow-link {
  color: var(--green-credit);
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 209, 94, 0.4);
  transition: border-color 0.15s ease;
}
.eyebrow-link:hover { border-color: var(--green-credit); }
.hero-title {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  font-weight: 700;
  margin: 0 0 18px;
  line-height: 1.05;
  color: #fff;
}
.hero-title span {
  display: inline-block;
  color: #ffffff;
  font-weight: 800;
}
.hero-sub { color: var(--text-muted); font-size: 1.08rem; max-width: 540px; margin: 0 auto 30px; }

.hero-stats { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.stat {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 28px;
  backdrop-filter: blur(8px);
}
.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--text-muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }

.empty-nominees {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 40px 0;
  text-align: center;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* --- Pestañas de categoría: grilla de 4 por fila --- */
.category-nav {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 8px 32px 26px;
  max-width: 1280px;
  margin: 0 auto;
}
.nav-pill {
  padding: 15px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
  backdrop-filter: blur(8px);
}
.nav-pill:hover { border-color: var(--teal); color: #fff; }
.nav-pill.active {
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-2) 100%);
  color: #08131a;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(0, 217, 212, 0.35);
}
.nav-pill .done-mark { margin-left: 4px; }

main { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; padding: 8px 32px 48px; }
.loading { color: var(--text-muted); text-align: center; padding: 60px 0; }

.category-section { margin-bottom: 56px; }
.category-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.category-heading h2 { font-size: 1.7rem; margin: 0; color: #fff; }
.category-total { font-family: 'JetBrains Mono', monospace; color: var(--teal); font-size: 0.88rem; font-weight: 700; }

/* --- Tarjetas de nominado (rediseño completo) --- */
.nominee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
  margin: 20px 0 32px;
}
.nominee-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  overflow: visible;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  text-align: center;
  padding: 28px 18px 22px;
  backdrop-filter: blur(10px);
  position: relative;
}
.nominee-card:hover { border-color: var(--teal); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0, 217, 212, 0.18); }
.nominee-card.selected {
  border-color: transparent;
  box-shadow: 0 0 0 2.5px var(--teal), 0 12px 30px rgba(0, 217, 212, 0.3);
}
.nominee-photo-wrap { position: relative; width: 108px; height: 108px; margin: 0 auto 16px; }
.nominee-photo {
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-solid);
  display: block;
  border: 3px solid var(--border);
}
.nominee-card.selected .nominee-photo { border-color: var(--teal); }
.nominee-name { font-weight: 800; font-size: 1.05rem; margin: 0 0 3px; color: #fff; }
.nominee-subtitle { color: var(--text-muted); font-size: 0.82rem; margin: 0 0 14px; line-height: 1.35; min-height: 2.2em; }

/* Categorías de red social única: link creativo con ícono */
.social-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 14px;
  transition: all 0.15s ease;
}
.social-cta:hover { border-color: var(--teal); background: rgba(0, 217, 212, 0.1); }
.social-cta .social-icon-dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.social-cta .social-icon-dot svg { width: 13px; height: 13px; }
.social-cta .arrow { color: var(--teal); }

/* Categorías generales: fila de íconos oficiales de todas las redes */
.nominee-socials { display: flex; justify-content: center; gap: 9px; margin-bottom: 16px; }
.social-badge {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.social-badge svg { width: 16px; height: 16px; }
.social-badge:hover { transform: scale(1.14); }
.select-btn {
  width: 100%;
  padding: 10px 0;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nominee-card.selected .select-btn {
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-2) 100%);
  color: #08131a;
}

/* --- Marcador de resultados en vivo --- */
.leaderboard { display: flex; flex-direction: column; gap: 12px; }
.lb-row {
  display: grid;
  grid-template-columns: 130px 1fr 74px;
  align-items: center;
  gap: 12px;
}
.lb-name { font-size: 0.88rem; color: var(--text-muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lb-row.leading .lb-name { color: var(--orange); font-weight: 800; }
.lb-track {
  position: relative;
  height: 28px;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.lb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-2) 100%);
  border-radius: 8px 0 0 8px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 3px;
}
.lb-row.leading .lb-fill { background: linear-gradient(90deg, var(--orange) 0%, var(--pink) 100%); }
.lb-count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.88rem;
  text-align: left;
  color: #fff;
}

/* --- Barra de boleta inferior --- */
.ballot-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(11, 14, 26, 0.85);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 40;
}
.ballot-bar-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ballot-bar-inner span { color: var(--text-muted); font-size: 0.88rem; font-family: 'JetBrains Mono', monospace; }

.btn-primary {
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-2) 100%);
  color: #08131a;
  border: none;
  border-radius: 999px;
  padding: 13px 30px;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 22px rgba(0, 217, 212, 0.35);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 8px 28px rgba(0, 217, 212, 0.5); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.btn-full { width: 100%; margin-top: 10px; padding: 15px 0; }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8, 10, 20, 0.85);
  display: none; align-items: center; justify-content: center; z-index: 60; padding: 20px;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px; max-width: 430px; width: 100%; position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal h2 { margin: 0 0 8px; font-size: 1.5rem; color: #fff; }
.modal-sub { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 22px; }
.modal-close {
  position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,0.08); border: none;
  color: var(--text-muted); font-size: 1.3rem; cursor: pointer; line-height: 1;
  width: 32px; height: 32px; border-radius: 50%;
}
#voteForm label { display: block; font-size: 0.82rem; color: var(--text-muted); margin: 14px 0 6px; font-weight: 600; }
#voteForm input[type="text"], #voteForm input[type="email"] {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); color: #fff; font-family: 'Manrope', sans-serif; font-size: 0.94rem;
}
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.82rem !important; margin-top: 18px !important; color: var(--text-muted); }
.checkbox-row input { margin-top: 3px; }
.occupation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.occupation-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.76rem;
  color: var(--text-muted);
  cursor: pointer;
}
.occupation-chip input { accent-color: var(--teal); }
.occupation-chip.checked { border-color: var(--teal); color: #fff; background: rgba(0, 217, 212, 0.08); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* --- Spotlight de líder: gráfico circular creativo al final de cada categoría --- */
.category-stats {
  margin-top: 28px;
  padding: 28px 24px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(0, 217, 212, 0.08), rgba(255, 152, 31, 0.05));
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  backdrop-filter: blur(10px);
}
.stats-ring-wrap { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.stats-ring-wrap svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.stats-ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.stats-ring-fill {
  fill: none; stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.stats-ring-photo {
  position: absolute; top: 11px; left: 11px; width: 110px; height: 110px;
  border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-mid);
}
.stats-ring-pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 1.3rem; color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.stats-info { flex: 1; min-width: 200px; }
.stats-label { color: var(--text-muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin: 0 0 4px; }
.stats-leader-name { font-family: 'Baloo 2', sans-serif; font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0 0 6px; }
.stats-detail { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.stats-detail strong { color: var(--teal); font-family: 'JetBrains Mono', monospace; }
.stats-empty { color: var(--text-muted); font-style: italic; font-size: 0.9rem; }
.form-msg { font-size: 0.85rem; margin-top: 12px; min-height: 1.2em; }
.form-msg.error { color: var(--pink); }
.form-msg.success { color: #6ee7a0; }

.site-footer { position: relative; z-index: 2; text-align: center; color: var(--text-muted); font-size: 0.78rem; padding: 30px 24px 40px; }

@media (max-width: 560px) {
  .category-nav { grid-template-columns: repeat(2, 1fr); padding: 8px 20px 20px; }
  .lb-row { grid-template-columns: 92px 1fr 58px; }
  .nominee-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .nominee-card { padding: 20px 10px 16px; }
  .nominee-photo-wrap, .nominee-photo { width: 84px; height: 84px; }
}
@media (min-width: 561px) and (max-width: 860px) {
  .category-nav { grid-template-columns: repeat(3, 1fr); }
}

/* --- Countdown de cierre de votación --- */
.countdown-section {
  position: relative; z-index: 2;
  text-align: center;
  padding: 0 24px 32px;
  max-width: 900px;
  margin: 0 auto;
}
.countdown-label {
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0 0 18px;
}
.countdown-label.closed { color: var(--orange); }
.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.countdown-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px 22px;
  min-width: 84px;
  backdrop-filter: blur(8px);
}
.countdown-num {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 2.1rem;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.countdown-unit {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  font-weight: 700;
}
@media (max-width: 560px) {
  .countdown-box { min-width: 68px; padding: 12px 14px; }
  .countdown-num { font-size: 1.6rem; }
}

/* --- Logos del footer --- */
.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.footer-logos img {
  height: 40px;
  width: auto;
  display: block;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.footer-logos a:hover img { opacity: 1; }
@media (max-width: 560px) {
  .footer-logos img { height: 32px; }
  .footer-logos { gap: 20px; }
}

/* --- Ocupación: chips compactas (reemplaza la grilla de 2 columnas) --- */
.occupation-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.occupation-chip {
  flex: 0 0 auto;
}

/* --- Invitación a seguir en Instagram (en el espacio liberado) --- */
.ig-follow-prompt {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.ig-follow-label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.ig-follow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ig-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888);
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}
.ig-icon { width: 15px; height: 15px; flex-shrink: 0; }
.ig-icon svg { width: 100%; height: 100%; }

/* --- Corrección: forzar chips compactas y habilitar scroll en el modal --- */
.occupation-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 0 4px !important;
}
.occupation-chip {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
  align-items: center;
  gap: 7px;
  padding: 7px 12px !important;
  border-radius: 999px;
  white-space: nowrap;
}
.modal-overlay {
  align-items: flex-start !important;
  overflow-y: auto !important;
  padding: 40px 20px !important;
}

/* --- Rediseño final: ocupación en tira horizontal deslizable --- */
.occupation-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  gap: 8px !important;
  margin: 0 0 4px !important;
  padding-bottom: 6px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.occupation-grid::-webkit-scrollbar { height: 5px; }
.occupation-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.occupation-chip {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  white-space: nowrap;
}

/* --- Rediseño final: Instagram en 2 botones parejos, uno al lado del otro --- */
.ig-follow-links {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
}
.ig-chip {
  flex: 1 1 0 !important;
  justify-content: center !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
