/* Paleta base */
:root{
  --primary: #662483;
  --secondary: #8A60A6;
  --bg: #f7f5fa;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --white: #ffffff;
  --success: #2aa776;
  --danger: #c0392b;
}

*{ box-sizing: border-box; }
html, body{
  margin:0; padding:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container{
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
}

.header{
  text-align:center;
  margin-bottom: 16px;
}
.logo{
  height: 72px;
  object-fit: contain;
  margin-bottom: 8px;
}
.subtitle{
  margin-top: 4px;
  color: var(--muted);
}

.progress-wrap{
  position: relative;
  background: #e8e1ef;
  border-radius: 999px;
  height: 14px;
  margin: 16px 0 24px;
  overflow: hidden;
}
.progress-bar{
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%;
  transition: width .25s ease;
}
.progress-text{
  position:absolute;
  right: 10px; top: -26px;
  font-size: 12px; color: var(--muted);
}

.card{
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.07);
  padding: 24px;
}

h1,h2,h3{ margin: 0 0 12px; }

.options{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 12px 0 20px;
}
.option{
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #f2ecf7;
  cursor: pointer;
  font-weight: 600;
  transition: transform .05s ease, background .2s ease, border-color .2s ease;
}
.option:hover{ transform: translateY(-1px); }
.option.selected{
  background: #ebe0f3;
  border-color: var(--secondary);
}

.nav{
  display:flex; gap: 12px; flex-wrap: wrap;
}

.btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary, .btn-secondary, .btn-accent{
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
.btn-primary{
  background: var(--primary);
  color: var(--white);
}
.btn-secondary{
  background: #e9e1f1;
  color: var(--primary);
}
.btn-accent{
  background: var(--secondary);
  color: var(--white);
}

.results{
  margin-top: 24px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.07);
  padding: 24px;
}
.results-note{
  color: var(--muted);
  margin-bottom: 16px;
}

/* Grid de boletas (tarjetas con porcentaje superpuesto) */
.ballots-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.ballot{
  position: relative;
  background: #faf8fc url('boleta-bg.svg') center/cover no-repeat; /* Puedes reemplazar por imagen */
  border: 2px dashed #ccb7dd;
  border-radius: 12px;
  padding: 18px 16px 56px;
  overflow: hidden;
}
.ballot-title{
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}
.ballot-party{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.ballot-desc{
  font-size: 14px;
  color: #3e3e3e;
}
/* Círculo de porcentaje superpuesto simulando sello */
.ballot .percent-stamp{
  position: absolute;
  right: 12px; top: 12px;
  width: 84px; height: 84px;
  border-radius: 999px;
  border: 3px solid var(--secondary);
  display:flex; align-items:center; justify-content:center;
  font-weight: 900;
  font-size: 20px;
  color: var(--secondary);
  background: rgba(138,96,166,0.08);
  transform: rotate(-8deg);
}

.stats{
  background: #f8f4fb;
  border: 1px solid #eadff3;
  padding: 14px;
  border-radius: 12px;
  margin-top: 8px;
}

.center{ text-align:center; margin-top: 14px; }

.footer{
  text-align:center;
  color: var(--muted);
  margin: 24px 0 8px;
}

/* Responsive tweaks */
@media (min-width: 640px){
  .options{ grid-template-columns: repeat(3,1fr); }
}

