/* ════════════════════════════════════════════════════════════════════════
   BOLÃO NOCTURNA — ESTILO (trigger no placar + modal premium)
   ────────────────────────────────────────────────────────────────────────
   • Identidade: dark premium, cyberpunk clean, neon elegante, glass leve.
   • Paleta: verde neon (placar) + roxo neon (site) + azul + preto/cinza.
   • Performance: blur leve (e desligado no mobile), sem sombras pesadas,
     animações curtas em transform/opacity. Tudo escopado em .bolao-* / #bolao*
     para NÃO colidir com o CSS existente da Nocturna.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --bolao-green:   #2bff9c;
  --bolao-green-2: #00ff7a;
  --bolao-blue:    #19d2ff;
  --bolao-purple:  #7b3cff;
  --bolao-purple-2:#9a6bff;
  --bolao-yellow:  #ffd84d;
  --bolao-red:     #ff5470;
  --bolao-ink:     #04060c;
  --bolao-z-modal: 10050;
}

/* ════════════════════════════════════════════════════════════════════════
   1. TRIGGER — "Dar Palpite" encaixado no placar (#nocScore)
   O botão é injetado dentro de #nocScore (contexto position:fixed), como uma
   "aba" colada ACIMA da caixa do placar — parece parte natural do terminal.
══════════════════════════════════════════════════════════════════════════ */
.bolao-trigger {
  position: absolute;
  bottom: calc(100% - 1px);   /* cola na borda superior da caixa */
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: auto;        /* #nocScore é pointer-events:none — reativa aqui */

  padding: 6px 12px 7px;
  border: 1px solid rgba(43,255,156,.30);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(8,20,15,.92), rgba(4,12,9,.86));

  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bolao-green);
  text-shadow: 0 0 8px rgba(43,255,156,.45);

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .18s ease, border-color .18s ease,
              background .18s ease, transform .18s ease, box-shadow .18s ease;
  will-change: transform;
}
.bolao-trigger::before {           /* ponto neon pulsante */
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bolao-green);
  box-shadow: 0 0 8px var(--bolao-green);
  animation: bolaoPulse 1.6s ease-in-out infinite;
}
.bolao-trigger:hover {
  color: #eafff5;
  border-color: rgba(43,255,156,.6);
  background: linear-gradient(180deg, rgba(12,30,22,.96), rgba(6,16,12,.9));
  transform: translateY(-1px);
  box-shadow: 0 -4px 18px rgba(43,255,156,.18);
}
.bolao-trigger:active { transform: translateY(0); }
.bolao-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(43,255,156,.35);
}

/* Estado: já palpitou / encerrado → vira selo discreto */
.bolao-trigger.is-locked {
  color: rgba(180,210,200,.7);
  border-color: rgba(120,150,140,.3);
  cursor: default;
}
.bolao-trigger.is-locked::before {
  background: var(--bolao-yellow);
  box-shadow: 0 0 6px rgba(255,216,77,.5);
  animation: none;
}
.bolao-trigger.is-locked:hover { transform: none; box-shadow: none; }

@keyframes bolaoPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .35; transform: scale(.82); }
}

/* ════════════════════════════════════════════════════════════════════════
   2. MODAL — overlay + painel glass premium
══════════════════════════════════════════════════════════════════════════ */
#bolaoModal {
  position: fixed;
  inset: 0;
  z-index: var(--bolao-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(20,8,40,.55), rgba(2,4,8,.78));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
#bolaoModal.is-open { opacity: 1; visibility: visible; }
#bolaoModal[hidden] { display: none !important; }

.bolao-modal__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(86vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(123,60,255,.30);
  background:
    linear-gradient(180deg, rgba(16,10,28,.96), rgba(8,6,16,.97));
  box-shadow:
    0 0 0 1px rgba(43,255,156,.06),
    0 24px 70px rgba(0,0,0,.6);
  transform: translateY(14px) scale(.985);
  transition: transform .28s cubic-bezier(.2,.8,.25,1);
}
#bolaoModal.is-open .bolao-modal__panel { transform: translateY(0) scale(1); }

/* Filete neon no topo (verde→roxo): une placar + site */
.bolao-modal__panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bolao-green), var(--bolao-blue), var(--bolao-purple));
  opacity: .85;
}

/* ── Cabeçalho ───────────────────────────────────────────────────────── */
.bolao-modal__head {
  position: relative;
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.bolao-modal__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: "Share Tech Mono", monospace;
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--bolao-green);
}
.bolao-modal__eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--bolao-green); box-shadow: 0 0 8px var(--bolao-green);
}
.bolao-modal__title {
  margin: 8px 0 4px;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #f3eeff;
}
.bolao-modal__title b { color: var(--bolao-green); font-weight: 800; }
.bolao-modal__sub {
  margin: 0;
  font-size: .86rem;
  color: rgba(255,255,255,.6);
}
.bolao-modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.7); font-size: 18px; line-height: 1;
  cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease;
}
.bolao-modal__close:hover { background: rgba(255,255,255,.1); color: #fff; transform: rotate(90deg); }

/* ── Corpo rolável ───────────────────────────────────────────────────── */
.bolao-modal__body {
  padding: 18px 22px 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.bolao-modal__body::-webkit-scrollbar { width: 8px; }
.bolao-modal__body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(43,255,156,.4), rgba(123,60,255,.4));
  border-radius: 8px;
}
.bolao-modal__body::-webkit-scrollbar-track { background: transparent; }

/* ── Placar / formulário ─────────────────────────────────────────────── */
.bolao-score {
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(43,255,156,.18);
  background:
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.18) 3px 4px),
    linear-gradient(180deg, rgba(6,18,13,.7), rgba(3,9,7,.7));
}
.bolao-team {
  text-align: center;
  font-family: "Press Start 2P", "Share Tech Mono", monospace;
  font-size: 11px;
  line-height: 1.5;
  color: #d9fff0;
  text-shadow: 0 0 8px rgba(43,255,156,.35);
  word-break: break-word;
}
.bolao-team small {
  display: block;
  margin-top: 6px;
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(43,255,156,.7);
}
.bolao-score__x {
  font-family: "VT323", monospace;
  font-size: 30px;
  color: rgba(180,210,200,.55);
}
.bolao-score__input {
  width: 58px; height: 64px;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(43,255,156,.3);
  background: rgba(2,8,6,.85);
  color: var(--bolao-green);
  font-family: "VT323", monospace;
  font-size: 44px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(43,255,156,.5);
  transition: border-color .18s ease, box-shadow .18s ease;
  -moz-appearance: textfield;
}
.bolao-score__input::-webkit-outer-spin-button,
.bolao-score__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bolao-score__input:focus {
  outline: none;
  border-color: var(--bolao-green);
  box-shadow: 0 0 0 3px rgba(43,255,156,.18), 0 0 16px rgba(43,255,156,.25);
}
.bolao-score__input:disabled {
  opacity: .85;
  border-color: rgba(120,150,140,.3);
  color: rgba(43,255,156,.85);
}

/* ── Countdown ───────────────────────────────────────────────────────── */
.bolao-countdown {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 14px 0 4px;
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  letter-spacing: .5px;
  color: rgba(255,255,255,.62);
}
.bolao-countdown__time {
  color: var(--bolao-yellow);
  text-shadow: 0 0 8px rgba(255,216,77,.4);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.bolao-countdown.is-closed .bolao-countdown__time { color: var(--bolao-red); text-shadow: none; }

/* ── Regras ──────────────────────────────────────────────────────────── */
.bolao-rules {
  margin-top: 16px;
  border-radius: 14px;
  border: 1px solid rgba(123,60,255,.28);
  background: linear-gradient(180deg, rgba(18,10,32,.6), rgba(10,6,20,.6));
  overflow: hidden;
}
.bolao-rules__head {
  padding: 10px 14px;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--bolao-purple-2);
  border-bottom: 1px solid rgba(123,60,255,.18);
  background: rgba(123,60,255,.06);
}
.bolao-rules__list {
  margin: 0; padding: 12px 14px 12px 30px;
  max-height: 158px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: .85rem;
  color: rgba(255,255,255,.78);
}
.bolao-rules__list li { margin: 0 0 7px; line-height: 1.45; }
.bolao-rules__list li::marker { color: var(--bolao-green); }
.bolao-rules__list::-webkit-scrollbar { width: 7px; }
.bolao-rules__list::-webkit-scrollbar-thumb {
  background: rgba(123,60,255,.4); border-radius: 7px;
}
.bolao-rules__list::-webkit-scrollbar-track { background: transparent; }

/* ── Checkbox aceite ─────────────────────────────────────────────────── */
.bolao-accept {
  display: flex; align-items: center; gap: 11px;
  margin: 16px 0 4px;
  cursor: pointer;
  user-select: none;
}
.bolao-accept input { position: absolute; opacity: 0; width: 0; height: 0; }
.bolao-accept__box {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(43,255,156,.4);
  background: rgba(2,8,6,.6);
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.bolao-accept__box svg { width: 13px; height: 13px; opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .2s cubic-bezier(.2,1.4,.4,1); }
.bolao-accept input:checked + .bolao-accept__box {
  background: linear-gradient(135deg, var(--bolao-green-2), #0bb96a);
  border-color: var(--bolao-green);
}
.bolao-accept input:checked + .bolao-accept__box svg { opacity: 1; transform: scale(1); }
.bolao-accept input:focus-visible + .bolao-accept__box { box-shadow: 0 0 0 3px rgba(43,255,156,.3); }
.bolao-accept__label { font-size: .88rem; color: rgba(255,255,255,.85); }

/* ── Rodapé / submit ─────────────────────────────────────────────────── */
.bolao-modal__foot {
  padding: 8px 22px 20px;
}
.bolao-submit {
  width: 100%;
  padding: 13px 16px;
  border-radius: 13px;
  border: 1px solid rgba(123,60,255,.4);
  background: linear-gradient(135deg, rgba(154,107,255,.95), rgba(88,44,180,.95));
  color: #fff;
  font-size: .98rem; font-weight: 800; letter-spacing: .2px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, opacity .25s ease, filter .2s ease;
  box-shadow: 0 10px 30px rgba(123,60,255,.18);
}
.bolao-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(123,60,255,.32), 0 0 18px rgba(43,255,156,.12);
}
.bolao-submit:active:not(:disabled) { transform: translateY(0); }
.bolao-submit:disabled {
  cursor: not-allowed;
  opacity: .45;
  filter: grayscale(.4);
  box-shadow: none;
}
/* micro-animação ao habilitar (checkbox marcado) */
.bolao-submit.is-armed { animation: bolaoArm .45s cubic-bezier(.2,.9,.3,1.4); }
@keyframes bolaoArm {
  0%   { transform: scale(.97); }
  55%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* ── Mensagens / estados ─────────────────────────────────────────────── */
.bolao-msg {
  margin: 12px 0 2px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: .9rem;
  display: none;
}
.bolao-msg.is-show { display: block; animation: bolaoFade .3s ease; }
.bolao-msg--ok {
  border: 1px solid rgba(43,255,156,.35);
  background: rgba(43,255,156,.08);
  color: #c9ffe9;
}
.bolao-msg--ok b { color: var(--bolao-green); }
.bolao-msg--warn {
  border: 1px solid rgba(255,216,77,.35);
  background: rgba(255,216,77,.08);
  color: #fff0c4;
}
.bolao-msg--err {
  border: 1px solid rgba(255,84,112,.4);
  background: rgba(255,84,112,.1);
  color: #ffd2da;
}
@keyframes bolaoFade { from { opacity: 0; transform: translateY(4px); } }

/* Aviso de login (visitante) */
.bolao-login {
  text-align: center;
  padding: 8px 4px 4px;
}
.bolao-login p { margin: 0 0 14px; color: rgba(255,255,255,.78); font-size: .92rem; }
.bolao-login__btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 12px;
  border: 1px solid rgba(123,60,255,.4);
  background: linear-gradient(135deg, rgba(154,107,255,.95), rgba(88,44,180,.95));
  color: #fff; font-weight: 800; cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease;
  box-shadow: 0 10px 30px rgba(123,60,255,.18);
}
.bolao-login__btn:hover { transform: translateY(-1px); box-shadow: 0 14px 38px rgba(123,60,255,.32); }

/* Skeleton de carregamento */
.bolao-skeleton {
  height: 16px; border-radius: 8px; margin: 10px 0;
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05));
  background-size: 200% 100%;
  animation: bolaoShimmer 1.2s linear infinite;
}
@keyframes bolaoShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Esconde seções por estado (controlado via JS) */
.bolao-hide { display: none !important; }

/* ════════════════════════════════════════════════════════════════════════
   3. RESPONSIVO / PERFORMANCE MOBILE
══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Blur do backdrop desligado no mobile (poupa GPU, igual ao FX da Nocturna) */
  #bolaoModal {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(2,4,8,.9);
    padding: 12px;
    align-items: flex-end;        /* vira "bottom sheet" no celular */
  }
  .bolao-modal__panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }
  #bolaoModal.is-open .bolao-modal__panel { transform: translateY(0); }
  .bolao-modal__panel { transform: translateY(20px); }

  .bolao-trigger { font-size: 9px; letter-spacing: 1.5px; padding: 6px 10px; }
  .bolao-score__input { width: 50px; height: 56px; font-size: 38px; }
  .bolao-team { font-size: 10px; }
  .bolao-modal__title { font-size: 1.05rem; }
}

/* Acessibilidade — reduz movimento */
@media (prefers-reduced-motion: reduce) {
  .bolao-trigger::before,
  .bolao-modal__eyebrow::before { animation: none !important; }
  .bolao-submit.is-armed { animation: none !important; }
  #bolaoModal, .bolao-modal__panel { transition: opacity .15s ease !important; }
}
