/* ── Polla Mundialista – Academia Avanza ── */
#pm-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* ── Wheel ── */
#pm-ruleta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}
#pm-wheel-wrap {
  position: relative;
  width: 380px;
  height: 380px;
}
#pm-canvas { display: block; border-radius: 50%; }
#pm-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 28px solid #fcfcfc;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
  z-index: 10;
}
#pm-spin-btn {
  padding: 11px 40px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #e5b123;
  color: #111;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
#pm-spin-btn:hover  { background: #f5f5f5; }
#pm-spin-btn:active { transform: scale(.97); }
#pm-spin-btn:disabled { opacity: .45; cursor: not-allowed; }

#pm-result-box {
  min-height: 70px;
  width: 100%;
  max-width: 380px;
  background-color: rgba(0, 0, 0, 0.142); ;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  text-align: center;
}
#pm-result-score {
  font-size: 26px;
  font-weight: 500;
  color: #555;
}
#pm-result-label {
  font-size: 13px;
  color: #777;
  margin-top: 3px;
}
#pm-legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: #d5d5d5;
  flex-wrap: wrap;
  justify-content: center;
}
#pm-legend span { display: flex; align-items: center; gap: 5px; }
.pm-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Modal ── */
#pm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
#pm-modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px 32px;
  max-width: 440px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#pm-modal h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #111;
}
#pm-modal-resultado {
  font-size: 16px;
  color: #282828;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0;
}
#pm-modal label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
}
#pm-modal input {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 7px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
#pm-modal input:focus { border-color: #e5b123; }
#pm-modal-err {
  font-size: 13px;
  color: #c0392b;
  min-height: 16px;
}
#pm-modal-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
#pm-modal-cancel {
  padding: 9px 20px;
  border-radius: 7px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 14px;
}
#pm-modal-ok {
  padding: 9px 22px;
  border-radius: 7px;
  border: none;
  background: #e5b123;
  color: #2a1a00;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s;
}
#pm-modal-ok:hover { background: #f5c800; }

/* ── Bono oculto (generación PNG) ── */
#pm-bono-hidden {
  position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: -1;
}
#pm-bono-card {
  width: 900px;
  background: #000;
  padding: 4px;
  border-radius: 16px;
}
.pm-bono-border {
  border: 3px solid #e5b123;
  border-radius: 12px;
  padding: 3px;
}
.pm-bono-inner {
  background: #000;
  border-radius: 9px;
  padding: 36px 56px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 490px;
}
.pm-bono-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 6px;
}
#pm-bono-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.pm-bono-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pm-bono-h3 {
  font-size: 13px;
  color: #aaa;
  font-weight: 400;
  letter-spacing: .5px;
}
.pm-bono-academia {
  font-size: 18px;
  font-weight: 700;
  color: #e5b123;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.pm-bono-hr {
  border: none;
  border-top: 1px solid #e5b123;
  margin: 18px 0;
  opacity: .6;
}
.pm-bono-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  flex: 1;
  padding: 10px 0;
}
.pm-bono-h2 {
  font-size: 17px;
  color: #ccc;
  font-weight: 400;
  letter-spacing: .3px;
}
.pm-bono-h1-name {
  font-size: 44px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.pm-bono-h4 {
  font-size: 15px;
  color: #aaa;
  font-weight: 400;
}
.pm-bono-descuento {
  font-size: 46px;
  font-weight: 800;
  color: #e5b123;
  line-height: 1.15;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.pm-bono-sub {
  font-size: 17px;
  color: #c2c1c1;
}
.pm-bono-footer {
  font-size: 12px;
  color: #555;
  text-align: center;
  margin-top: 6px;
}

@media (max-width: 420px) {
  #pm-wheel-wrap { width: 300px; height: 300px; }
  #pm-canvas { width: 300px; height: 300px; }
}
