/* ------------------------------------------------------------------
   Jogo do Bicho — estilo único, extraído dos protótipos HTML.
   Cores base: #172B4D (marinho), #0052CC (azul), #00875A (verde).
   ------------------------------------------------------------------ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #172B4D 0%, #0052CC 100%);
  padding: 20px;
}

.card {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(9, 30, 66, 0.3);
  padding: 40px 32px;
}
.card.narrow { max-width: 400px; padding: 44px 36px; }

/* Mobile: o "card" vira a própria tela do app, sem moldura flutuante,
   respeitando a área segura (notch/home indicator) do aparelho. */
@media (max-width: 600px) {
  body {
    padding: 0;
    align-items: stretch;
    background: #FFFFFF;
  }
  .card, .card.narrow {
    max-width: none;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 0px));
    padding-top: calc(24px + env(safe-area-inset-top, 0px));
  }
}

/* Cabeçalho com logo e saldo */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: #0052CC;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.logo i { color: #fff; font-size: 24px; }
.logo-mini {
  width: 40px; height: 40px; border-radius: 10px;
  background: #0052CC;
  display: flex; align-items: center; justify-content: center;
}
.logo-mini i { color: #fff; font-size: 16px; }

.balance { text-align: right; }
.balance-label {
  font-size: 11px; color: #5E6C84;
  text-transform: uppercase; letter-spacing: .03em;
}
.balance-value { font-size: 16px; font-weight: 800; color: #172B4D; }
.brand-name { font-size: 14px; font-weight: 800; color: #172B4D; }

/* Títulos */
h1 { font-size: 22px; font-weight: 800; color: #172B4D; margin-bottom: 6px; }
.card h1.left { font-size: 20px; margin-bottom: 4px; text-align: left; }
.subtitle { font-size: 14px; color: #5E6C84; margin-bottom: 26px; }
.subtitle.left { text-align: left; font-size: 13px; margin-bottom: 22px; }
h1.center, .subtitle.center { text-align: center; }

.section-title {
  font-size: 12px; font-weight: 700; color: #5E6C84;
  text-transform: uppercase; letter-spacing: .04em;
  margin: 20px 0 10px;
}

/* Formulários */
.field { margin-bottom: 18px; }
label {
  display: block; font-size: 13px; font-weight: 600;
  color: #172B4D; margin-bottom: 6px;
}
.input-wrap { position: relative; }
.input-wrap > i {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: #5E6C84; font-size: 14px;
}
input[type="email"], input[type="password"], input[type="text"],
input[type="number"], input[type="date"], select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px 12px 40px;
  border: 1px solid #DFE1E6;
  border-radius: 8px;
  font-size: 16px; color: #172B4D;
  outline: none; background: #F4F5F7;
  transition: border-color .15s, box-shadow .15s;
}
select { padding-left: 14px; }
input:focus, select:focus {
  border-color: #0052CC; background: #FFFFFF;
  box-shadow: 0 0 0 3px #DEEBFF;
}
.toggle-pass {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%); color: #5E6C84;
  cursor: pointer; font-size: 14px; background: none; border: none;
}

.row-between {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; font-size: 13px;
}
.remember { display: flex; align-items: center; gap: 6px; color: #42526E; }
.remember input { width: auto; padding: 0; }

a.link { color: #0052CC; text-decoration: none; font-weight: 600; }
a.link:hover { text-decoration: underline; }

/* Botões */
button.submit, a.submit {
  width: 100%; min-height: 48px; padding: 13px;
  background: #0052CC; color: #fff;
  border: none; border-radius: 8px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .15s; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
button.submit:hover, a.submit:hover { background: #003D99; }
button.ghost, a.ghost {
  background: #fff; color: #172B4D; border: 1px solid #DFE1E6;
}
button.ghost:hover, a.ghost:hover { background: #F4F5F7; }

/* Mensagens */
.alert {
  border-radius: 8px; padding: 10px 12px; font-size: 13px;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.alert.error { background: #FFEBE6; color: #BF2600; }
.alert.success { background: #E3FCEF; color: #006644; }
.alert.info { background: #DEEBFF; color: #0747A6; align-items: flex-start; }
.alert ul { margin: 0 0 0 4px; padding-left: 16px; }

/* Info da extração */
.draw-info {
  display: flex; align-items: center; gap: 10px;
  background: #DEEBFF; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 20px;
}
.draw-info i { color: #0052CC; font-size: 16px; }
.draw-info .txt { font-size: 13px; color: #172B4D; font-weight: 600; }
.draw-info .txt span {
  display: block; font-size: 11px; color: #5E6C84;
  font-weight: 500; margin-top: 1px;
}

/* Grade de bichos */
.animals-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 8px;
}
.animal {
  border: 1px solid #DFE1E6; border-radius: 10px;
  padding: 10px 4px; text-align: center; cursor: pointer;
  min-height: 64px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: all .15s; background: #fff;
  -webkit-user-select: none; user-select: none;
}
.animal:hover { background: #F4F5F7; }
.animal:active { transform: scale(.96); }
.animal.selected { border-color: #0052CC; background: #DEEBFF; }
.animal i { font-size: 18px; color: #42526E; margin-bottom: 4px; display: block; }
.animal.selected i { color: #0052CC; }
.animal .num { font-size: 10px; color: #97A0AF; font-weight: 700; }
.animal .name { font-size: 11px; color: #172B4D; font-weight: 600; margin-top: 1px; }

/* Tipo de aposta */
.bet-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bet-type {
  border: 1px solid #DFE1E6; border-radius: 8px;
  padding: 10px 6px; text-align: center; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #42526E;
  cursor: pointer; background: #fff;
  -webkit-user-select: none; user-select: none;
}
.bet-type:active { transform: scale(.97); }
.bet-type.selected { border-color: #0052CC; background: #0052CC; color: #fff; }

@media (max-width: 340px) {
  .animals-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Valores rápidos */
.quick-values { display: flex; gap: 8px; margin-top: 10px; }
.quick-values button {
  flex: 1; padding: 8px; border: 1px solid #DFE1E6;
  background: #fff; border-radius: 8px;
  font-size: 12px; font-weight: 700; color: #172B4D; cursor: pointer;
}
.quick-values button:hover { background: #F4F5F7; }

/* Caixa de resumo */
.summary-box {
  background: #F4F5F7; border: 1px solid #DFE1E6;
  border-radius: 10px; padding: 14px 16px; margin: 20px 0;
}
.summary-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: #42526E; padding: 4px 0;
}
.summary-row.total {
  border-top: 1px solid #DFE1E6; margin-top: 6px; padding-top: 10px;
  font-weight: 800; color: #172B4D; font-size: 15px;
}
.summary-row.total span:last-child { color: #00875A; }

/* Listas (histórico, resultados) */
.list { list-style: none; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid #DFE1E6; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 8px;
}
.list-item .ico {
  width: 38px; height: 38px; border-radius: 9px;
  background: #DEEBFF; color: #0052CC;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  flex-shrink: 0;
}
.list-item .body { flex: 1; }
.list-item .body .t { font-size: 14px; font-weight: 700; color: #172B4D; }
.list-item .body .s { font-size: 12px; color: #5E6C84; margin-top: 2px; }
.list-item .amount { font-size: 14px; font-weight: 800; text-align: right; }

/* Etiquetas de status */
.tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.tag.open { background: #DEEBFF; color: #0052CC; }
.tag.win { background: #E3FCEF; color: #006644; }
.tag.lose { background: #FFEBE6; color: #BF2600; }

/* Bilhete / ticket */
.ticket {
  border: 2px dashed #0052CC; border-radius: 12px;
  padding: 20px; margin: 20px 0; text-align: center;
}
.ticket .code {
  font-size: 22px; font-weight: 800; color: #0052CC;
  letter-spacing: .05em; margin-bottom: 4px;
}
.ticket .big-num {
  font-size: 40px; font-weight: 800; color: #172B4D; margin: 10px 0;
}

/* Prêmio destacado (resultado) */
.result-hero {
  text-align: center; background: #F4F5F7;
  border-radius: 12px; padding: 20px; margin-bottom: 18px;
}
.result-hero .milhar { font-size: 40px; font-weight: 800; color: #0052CC; letter-spacing: .06em; }
.result-hero .grupo { font-size: 14px; color: #5E6C84; margin-top: 6px; }

/* Navegação inferior de página */
.page-nav {
  display: flex; gap: 10px; margin-top: 8px;
}
.page-nav a { flex: 1; }

.disclaimer {
  text-align: center; font-size: 11px; color: #97A0AF;
  margin-top: 16px; line-height: 1.5;
}
.footer-text { text-align: center; font-size: 13px; color: #5E6C84; margin-top: 20px; }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0; color: #97A0AF; font-size: 12px;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: #DFE1E6;
}

.empty {
  text-align: center; color: #97A0AF; font-size: 14px;
  padding: 30px 0;
}
