/**
 * CyberCorp — modales de premio (F1 / F2 / F3)
 * Incluir después de las fuentes de la página.
 * v5 — barra F2: chips legibles + token fix documentado en JS
 */

/* ── F2 + base (páginas secretas) ─────────────────────────── */
.cc-premio-modal-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-bottom)) 16px;
  box-sizing: border-box;
}
.cc-premio-modal-root.is-open {
  display: flex;
}
.cc-premio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 94, 0.88);
  backdrop-filter: blur(5px);
  cursor: pointer;
}
.cc-premio-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: min(88vh, 900px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, rgba(5, 8, 45, 0.98) 0%, rgba(3, 4, 94, 0.99) 100%);
  border: 1px solid rgba(0, 180, 216, 0.35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 22px 20px 26px;
  animation: ccPremioModalIn 0.35s ease;
}
@keyframes ccPremioModalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* F1: panel más estrecho (misma página que el formulario) */
.cc-premio-modal-panel.cc-premio-modal-panel--narrow {
  max-width: 400px;
  max-height: min(90vh, 860px);
}
.cc-premio-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 180, 216, 0.35);
  background: rgba(0, 0, 0, 0.4);
  color: #00b4d8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, sans-serif;
}
.cc-premio-modal-close:hover {
  background: rgba(0, 180, 216, 0.15);
  color: #fff;
}
/* F2 · barra inferior fija: una fila, poco ruido visual */
body:has(#cc-premio-f2-reopen-wrap.is-visible) {
  padding-bottom: max(52px, calc(48px + env(safe-area-inset-bottom, 0px)));
}
.cc-premio-reopen-pill {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2400;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  min-height: 44px;
  background: rgba(0, 0, 0, 0.82);
  border-top: 1px solid rgba(0, 180, 216, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 180, 216, 0.35) transparent;
}
.cc-premio-reopen-pill.is-visible {
  display: flex;
}
.cc-premio-reopen-pill .cc-pill-label {
  flex: 0 0 auto;
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 220, 255, 0.65);
  padding: 4px 8px 4px 2px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  margin-right: 2px;
}
.cc-premio-reopen-pill .cc-bar-chev {
  display: inline-block;
  margin-left: 2px;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
  color: inherit;
}
.cc-premio-reopen-pill button {
  flex: 0 0 auto;
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  margin: 0;
  background: rgba(255, 183, 0, 0.12);
  border: 1px solid rgba(255, 183, 0, 0.35);
  border-radius: 3px;
  color: #ffc233;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.cc-premio-reopen-pill button:hover {
  color: #ffe08a;
  background: rgba(255, 183, 0, 0.2);
  border-color: rgba(255, 183, 0, 0.5);
}
.cc-premio-reopen-pill .cc-premio-pill-link {
  flex: 0 0 auto;
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  margin: 0;
  border-radius: 3px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.cc-premio-reopen-pill .cc-premio-pill-link--cyan {
  color: #7eeaff;
  background: rgba(0, 180, 216, 0.1);
  border-color: rgba(0, 200, 255, 0.32);
  box-shadow: none;
}
.cc-premio-reopen-pill .cc-premio-pill-link--cyan:hover {
  color: #b8f6ff;
  background: rgba(0, 180, 216, 0.18);
  border-color: rgba(0, 220, 255, 0.45);
}
.cc-premio-reopen-pill .cc-premio-pill-link--amber {
  color: #e8c266;
  background: rgba(255, 183, 0, 0.08);
  border-color: rgba(255, 183, 0, 0.28);
  box-shadow: none;
}
.cc-premio-reopen-pill .cc-premio-pill-link--amber:hover {
  color: #ffe08a;
  background: rgba(255, 183, 0, 0.16);
  border-color: rgba(255, 183, 0, 0.42);
}
@media (max-width: 520px) {
  .cc-premio-reopen-pill {
    gap: 4px;
    padding-left: 6px;
    padding-right: 6px;
    justify-content: flex-start;
  }
  .cc-premio-reopen-pill .cc-pill-label {
    font-size: 9px;
    letter-spacing: 0.14em;
    padding-right: 6px;
  }
  .cc-premio-reopen-pill button,
  .cc-premio-reopen-pill .cc-premio-pill-link {
    font-size: 9px;
    padding: 6px 8px;
    letter-spacing: 0.08em;
  }
}

/* ── F1 (premio-f1.html) ─────────────────────────────────── */
.cc-premio-modal-root.cc-premio-modal--f1 {
  z-index: 80;
}
.cc-premio-modal-panel .result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.cc-premio-summary-bar {
  display: none;
  margin-top: 18px;
  padding: 16px 18px;
  border: 2px solid rgba(0, 220, 255, 0.4);
  background: rgba(0, 180, 216, 0.12);
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 0 24px rgba(0, 200, 255, 0.12);
}
.cc-premio-summary-bar.visible {
  display: block;
  animation: ccPremioSummaryIn 0.45s ease;
}
@keyframes ccPremioSummaryIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cc-premio-summary-bar p {
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #9cf0ff;
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(0, 200, 255, 0.35);
}
.cc-premio-summary-bar button {
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 12px 22px;
  background: rgba(255, 183, 0, 0.2);
  border: 2px solid rgba(255, 200, 100, 0.55);
  color: #ffe6a0;
  cursor: pointer;
  border-radius: 3px;
  box-shadow: 0 0 16px rgba(255, 183, 0, 0.15);
}
.cc-premio-summary-bar button:hover {
  background: rgba(255, 183, 0, 0.2);
}

/* ── F3 (protocolo-final / UMBRA) ───────────────────────── */
#premio-f3-modal-root {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 320;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-bottom)) 16px;
  box-sizing: border-box;
}
#premio-f3-modal-root.is-open {
  display: flex;
}
#premio-f3-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
}
#premio-f3-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: min(82vh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #0c0c14 0%, #050508 100%);
  border: 1px solid rgba(0, 180, 216, 0.35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  padding: 22px 20px 26px;
  text-align: left;
  animation: ccPremioF3In 0.35s ease;
}
@keyframes ccPremioF3In {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
#premio-f3-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 180, 216, 0.35);
  background: rgba(0, 0, 0, 0.5);
  color: #00b4d8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#premio-f3-close:hover {
  background: rgba(0, 180, 216, 0.12);
  color: #fff;
}
#premio-f3-reopen-wrap {
  display: none;
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 310;
  max-width: calc(100vw - 28px);
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
#premio-f3-reopen-wrap.is-visible {
  display: flex;
}
#premio-f3-reopen-wrap .f-tag {
  margin-bottom: 0;
  padding: 8px 12px;
  border: 1px solid rgba(0, 180, 216, 0.3);
  background: rgba(0, 0, 0, 0.5);
}
#premio-f3-reopen-btn {
  padding: 12px 22px;
  background: rgba(192, 57, 43, 0.28);
  border: 2px solid rgba(255, 120, 100, 0.55);
  color: #ffb8a8;
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(192, 57, 43, 0.25);
}
#premio-f3-reopen-btn:hover {
  background: rgba(192, 57, 43, 0.38);
}
#premio-f3-loading {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 12px;
  color: rgba(0, 180, 216, 0.55);
  letter-spacing: 2px;
  text-align: center;
  padding: 20px 8px;
}
#premio-f3-sin-equipo {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.75;
  text-align: center;
  padding: 8px 4px 16px;
}
#premio-f3-narrativa {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 180, 216, 0.22);
  background: rgba(0, 180, 216, 0.04);
}
#premio-f3-narrativa-texto {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.75;
}
#premio-f3-nombre {
  font-family: "Orbitron", monospace;
  font-size: 15px;
  font-weight: 700;
  color: #ffb700;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
#premio-f3-desc {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  margin-bottom: 12px;
}
#premio-f3-info {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 11px;
  color: rgba(0, 180, 216, 0.65);
  margin-bottom: 14px;
  line-height: 1.6;
}
#premio-f3-codigos {
  border-top: 1px solid rgba(0, 180, 216, 0.12);
  padding-top: 10px;
  max-height: 40vh;
  overflow: auto;
}

/* ── v3 · F2 impacto visual + pill links ─────────────────── */
.cc-premio-modal-panel--f2-impact {
  border-width: 2px;
  border-color: rgba(255, 183, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 220, 255, 0.18), 0 28px 90px rgba(0, 0, 0, 0.58),
    0 0 40px rgba(255, 183, 0, 0.1);
}
.premio-f2-insignia-hero {
  font-family: "Rajdhani", system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  padding: 16px 14px;
  margin: 0 0 8px;
  background: linear-gradient(
    90deg,
    rgba(255, 183, 0, 0.28),
    rgba(0, 180, 216, 0.22),
    rgba(255, 183, 0, 0.28)
  );
  border: 2px solid rgba(255, 183, 0, 0.65);
  border-radius: 6px;
  text-shadow: 0 0 28px rgba(255, 230, 140, 0.5);
  animation: ccPremioHeroGlow 2.2s ease-in-out infinite;
}
@keyframes ccPremioHeroGlow {
  0%,
  100% {
    box-shadow: inset 0 0 24px rgba(255, 183, 0, 0.1), 0 0 20px rgba(0, 200, 255, 0.08);
  }
  50% {
    box-shadow: inset 0 0 36px rgba(0, 220, 255, 0.14), 0 0 28px rgba(255, 183, 0, 0.2);
  }
}
.premio-f2-insignia-sub {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.64rem;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.06em;
  line-height: 1.55;
  text-align: center;
  margin: 0 0 16px;
}
.premio-f2-benefit-box {
  padding: 18px 14px 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 183, 0, 0.38);
  border-radius: 8px;
  box-shadow: 0 0 32px rgba(255, 183, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
}
.premio-f2-benefit-box .premio-f2-badge {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  padding: 16px 12px;
  margin: 14px 0 0;
  line-height: 1.4;
}
.premio-f2-benefit-box .premio-f2-codigo {
  font-size: 1.32rem;
  letter-spacing: 0.2em;
  padding: 16px 12px;
  margin-bottom: 10px;
}
.premio-f2-benefit-box .premio-f2-qr {
  padding: 14px;
  transform: scale(1.12);
  transform-origin: center center;
  margin: 10px 0 6px;
}
.premio-f2-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  align-items: stretch;
}
.premio-f2-actions a {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 4px;
  border: 2px solid;
}
.premio-f2-btn-cuponera {
  background: rgba(255, 183, 0, 0.22);
  border-color: rgba(255, 210, 100, 0.7) !important;
  color: #ffe08a !important;
  box-shadow: 0 0 22px rgba(255, 183, 0, 0.18);
}
.premio-f2-btn-perfil {
  background: rgba(0, 180, 216, 0.14);
  border-color: rgba(0, 220, 255, 0.55) !important;
  color: #9cf0ff !important;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.14);
}
.cc-premio-pill-link {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 12px 16px;
  text-decoration: none;
  border-radius: 2px;
  border: 2px solid;
  white-space: nowrap;
}
.cc-premio-pill-link--amber {
  background: rgba(255, 183, 0, 0.18);
  border-color: rgba(255, 210, 100, 0.6);
  color: #ffe08a;
}
.cc-premio-pill-link--cyan {
  background: rgba(0, 180, 216, 0.12);
  border-color: rgba(0, 220, 255, 0.5);
  color: #9cf0ff;
}

/* F3 · pie hacia perfil */
#premio-f3-perfil-foot {
  margin-top: 18px;
  padding: 14px;
  border: 2px solid rgba(255, 183, 0, 0.35);
  border-radius: 6px;
  background: rgba(255, 183, 0, 0.06);
  text-align: center;
}
#premio-f3-perfil-foot p {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
  margin-bottom: 12px;
}
#premio-f3-perfil-link {
  display: inline-block;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 12px 20px;
  background: rgba(0, 180, 216, 0.15);
  border: 2px solid rgba(0, 220, 255, 0.55);
  color: #9cf0ff;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.12);
}
