/* Estilos específicos da página pública de enquete */

.intro {
  text-align: center;
  margin-bottom: 1rem;
}
.intro-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: .25rem;
}
.intro h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: .35rem;
  color: var(--text);
}
.intro p { margin: 0; color: var(--muted); }
.intro p strong { color: var(--text); }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-state h2 { color: var(--muted); font-weight: 500; }

/* Tela idle com vídeo YouTube */
.idle-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}
.idle-label {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}
.idle-video-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.idle-video-wrap--portrait {
  max-width: 360px;
  aspect-ratio: 9 / 16;
}
.idle-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.slot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .7rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}
.slot-card--done .slot-header { border-left-color: var(--muted); }
.slot-header .slot-time {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--primary);
}
.slot-card--done .slot-header .slot-time { color: var(--muted); }
.slot-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .25rem;
}
.slot-header .slot-meta { font-size: .82rem; color: var(--muted); }
/* Campeonato no cabeçalho (Agenda — some das opções) */
.slot-header-camp {
  padding: .5rem 1.25rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

/* Status badges */
.slot-status {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
.slot-status--voting {
  background: rgba(34,197,94,.15);
  color: #22c55e;
}
.slot-status--live {
  background: rgba(239,68,68,.15);
  color: #ef4444;
  animation: pulse-live 1.5s ease-in-out infinite;
}

.slot-body { padding: .3rem 0; }

.option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  transition: background .15s;
}
.option-row:last-child { border-bottom: none; }
.option-row--leader {
  background: rgba(59,130,246,.06);
  border-left: 3px solid var(--primary);
  padding-left: calc(1.25rem - 3px);
}

.option-info { flex: 1; min-width: 0; }
.option-confronto {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .15rem;
}
/* Escudo do time (campeonato vinculado) ao lado do nome na enquete pública. */
.enq-crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.22em;
  margin-right: .28em;
  overflow: hidden;
}
.enq-crest img { width: 100%; height: 100%; object-fit: contain; }
.enq-x { opacity: .6; margin: 0 .15em; font-weight: 600; }
.option-championship {
  font-size: .82rem;
  color: var(--muted);
}
.slot-min-votes {
  font-size: .72rem;
  color: var(--warning, #f59e0b);
  margin-top: .15rem;
}
.option-remaining {
  font-size: .74rem;
  color: var(--warning, #f59e0b);
  margin-top: .35rem;
  font-weight: 600;
}
.option-remaining--ok {
  color: #22c55e;
}

/* Vote progress bar */
.option-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: .45rem;
  overflow: hidden;
}
.option-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width .4s ease;
}
.option-row--leader .option-bar-fill { background: #22c55e; }

.option-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
  flex-shrink: 0;
}
.option-votes {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}
.option-votes .label { font-size: .7rem; color: var(--muted); font-weight: 400; }
.option-pct { font-size: .72rem; color: var(--muted); font-weight: 400; margin-left: .1rem; }

.btn-vote { padding: .5rem 1.1rem; font-size: .85rem; font-weight: 700; }
.btn-vote:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-voted {
  font-size: .78rem;
  color: var(--success);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.no-options {
  text-align: center;
  padding: 1.5rem 1.25rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

.slot-footer {
  padding: .55rem 1rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.slot-footer.locked {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}

/* Jogo vencedor no slot encerrado */
.slot-card--done { opacity: .85; }
.slot-winner {
  padding: .7rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.winner-badge {
  font-size: .78rem;
  font-weight: 700;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.winner-confronto {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}
.winner-camp { font-size: .85rem; color: var(--muted); }
.winner-score {
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  align-items: center;
  justify-content: center;
  gap: .1rem .35rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: rgba(229,72,77,.9);
  padding: .3rem .7rem;
  border-radius: 9px;
  margin-top: .25rem;
}
.winner-score .ws-team { font-weight: 700; opacity: .95; font-size: .92rem; min-width: 0; overflow-wrap: break-word; line-height: 1.15; }
.winner-score .ws-team:first-child { text-align: right;  justify-self: end;   }
.winner-score .ws-team:last-child  { text-align: left;   justify-self: start; }
.winner-score .ws-n {
  font-size: 1.6rem; font-weight: 900; line-height: 1; flex-shrink: 0;
  min-width: 1.2em; text-align: center; padding: 0 .12em; border-radius: 6px;
}
.winner-score .ws-n.ws-win { background: rgba(255,255,255,.25); }
.winner-score i { font-style: normal; opacity: .8; font-size: .95rem; }
.winner-badge--live { color: #ef4444; animation: pulse-live 1.5s ease-in-out infinite; }

.slot-yt-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .35rem;
  padding: .45rem 1rem;
  background: #ff0000;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  width: fit-content;
  transition: background .2s, transform .15s;
}
.slot-yt-link:hover { background: #cc0000; transform: translateY(-1px); }
.slot-live-links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .35rem;
}
.slot-live-links .slot-yt-link { margin-top: 0; }
.slot-twitch-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  background: #9146ff;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  width: fit-content;
  transition: background .2s, transform .15s;
}
.slot-twitch-link:hover { background: #772ce8; transform: translateY(-1px); }

/* Banner de destaque AO VIVO (YouTube + Twitch) */
.live-banner {
  background: linear-gradient(135deg, #ff0000, #9146ff);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
  box-shadow: 0 4px 18px rgba(145, 70, 255, .35);
}
.live-banner-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: .65rem;
}
.live-dot {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-live 1.1s infinite;
}
.live-banner-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}
.live-banner-link {
  padding: .55rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  color: #fff;
  transition: transform .15s, filter .2s;
}
.live-banner-link:hover { transform: translateY(-1px); filter: brightness(1.1); }
.live-banner-link.yt { background: #ff0000; }
.live-banner-link.tw { background: #9146ff; }
@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
.winner-label-small {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: .5rem;
}

.add-option-form {
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.radio-row {
  display: flex;
  gap: 1.5rem;
  margin-top: .35rem;
}
.radio-opt {
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  font-weight: 500;
  font-size: .95rem;
}
.add-option-form .field { margin-bottom: .75rem; }
.add-option-form .field:last-of-type { margin-bottom: 1rem; }
.add-option-form .form-actions {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}

/* Botão "Comprar votos" abaixo do voto grátis */
.btn-buy {
  background: transparent;
  border: 1px dashed var(--primary);
  color: var(--primary);
  padding: .35rem .7rem;
  font-size: .78rem;
  border-radius: var(--radius);
}
.btn-buy:hover { background: rgba(59,130,246,.1); }

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: transparent;
  border: 1px solid rgba(34,197,94,.5);
  color: #22c55e;
  padding: .35rem .75rem;
  font-size: .78rem;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}
.btn-share:hover { background: rgba(34,197,94,.1); border-color: #22c55e; }
.btn-share svg { flex-shrink: 0; }

/* Formulário inline de compra de votos */
.buy-form {
  padding: .85rem 1.25rem;
  background: rgba(59,130,246,.06);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.buy-form .buy-row {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}
.buy-form .buy-row label { margin-bottom: 0; }
.buy-form input[type="number"] { width: 90px; }
.buy-form .total {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
}
.buy-form .actions {
  margin-top: .75rem;
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}
.buy-form .target {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .65rem;
}
.buy-form .target strong { color: var(--text); }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.25rem;
  box-shadow: var(--shadow);
  z-index: 100;
  max-width: 90vw;
  text-align: center;
  font-size: .9rem;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }

/* ============================================================
   Responsivo — enquete (mobile)
   ============================================================ */
@media (max-width: 640px) {
  .intro-icon { font-size: 2.2rem; }
  .intro h1 { font-size: 1.5rem; }
  .intro p  { font-size: .9rem; }

  .slot-header { padding: .85rem 1rem; }
  .slot-header .slot-time { font-size: 1.2rem; }
  .slot-header .slot-meta { font-size: .72rem; }
  .slot-status { font-size: .65rem; }

  .option-row {
    flex-direction: column;
    align-items: stretch;
    padding: .85rem 1rem;
    gap: .5rem;
  }
  .option-row--leader { padding-left: calc(1rem - 3px); }
  .option-actions {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: .5rem;
  }
  .option-votes { font-size: 1rem; }
  .btn-vote, .btn-buy { flex: 0 0 auto; }

  .slot-footer { padding: .65rem 1rem; }
  .add-option-form { padding: .85rem 1rem; }
  .add-option-form .form-actions {
    flex-direction: column-reverse;
    gap: .5rem;
  }
  .add-option-form .form-actions button { width: 100%; }

  .buy-form { padding: .85rem 1rem; }
  .buy-form .buy-row { gap: .4rem; font-size: .85rem; }
  .buy-form input[type="number"] { width: 70px; }
  .buy-form .actions { flex-direction: column-reverse; gap: .5rem; }
  .buy-form .actions button { width: 100%; }
}

/* Logo do cabeçalho (transparente, mesma da tela de tutorial) — ocupa toda a
   altura da faixa do topo. Padding vertical reduzido para a faixa "abraçar" a logo. */
header.app-header { padding-top: .3rem; padding-bottom: .3rem; }
header.app-header .brand-logo {
  height: clamp(2.6rem, 9vw, 3.6rem);
  width: auto;
  display: block;
  object-fit: contain;
}

/* Selo de benefícios — incentiva o cadastro do jogo */
.perks-banner {
  max-width: 760px;
  margin: .8rem auto 0;
  padding: .7rem 1rem;
  background: linear-gradient(135deg, rgba(59,130,246,.14), rgba(34,197,94,.12));
  border: 1px solid rgba(96,165,250,.4);
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  align-items: center;
}
.perks-banner .perks-title { font-weight: 800; font-size: .98rem; color: var(--text); }
/* Chamada única (Agenda / Corujão) — sem lista de prêmios */
.perks-banner .perks-title--solo { font-size: 1.3rem; letter-spacing: .01em; }
.perks-banner .perks-list { display: flex; flex-wrap: wrap; gap: .4rem .55rem; justify-content: center; }
.perks-banner .perk {
  font-size: .82rem; font-weight: 600; color: #dbe8ff;
  background: rgba(10,21,36,.55); border: 1px solid var(--border);
  padding: .28rem .6rem; border-radius: 999px; white-space: nowrap;
}
/* Versão compacta dentro do formulário de cadastro */
.perks-inline {
  margin: 0 0 .9rem; padding: .6rem .8rem;
  background: rgba(59,130,246,.1); border: 1px solid rgba(96,165,250,.35);
  border-radius: 10px; font-size: .82rem; line-height: 1.5;
}
.perks-inline strong { color: var(--text); }
@media (max-width: 640px) {
  .perks-banner .perk { font-size: .76rem; padding: .24rem .5rem; }
}

/* Corujão / Transmissão de Campeonato — destaque do campeonato no topo */
.corujao-hero {
  text-align: center;
  margin: 0 auto 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124, 58, 237, .22), rgba(37, 99, 235, .18));
  border: 1px solid var(--border);
}
.corujao-hero-label {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .25rem;
}
.corujao-hero-title {
  font-size: clamp(1.2rem, 4vw, 1.9rem);
  margin: 0;
  line-height: 1.2;
  color: var(--text);
}

/* Corujão — card de confronto agrupado (soma + votos individuais) */
.corujao-group-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem;
  margin-bottom: .6rem;
  background: rgba(124, 58, 237, .06);
}
.corujao-group-card.option-row--leader { border-color: var(--primary); }
.corujao-group-card-head { margin-bottom: .5rem; }
.corujao-group-card-vs {
  font-weight: 700;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.corujao-group-card-sum {
  font-size: .82rem;
  color: var(--muted);
  margin: .15rem 0 .35rem;
}
.corujao-group-card-sum .label { font-size: .72rem; }
