/* ============================================================
   BICHO VIEW � TEMA DARK MODERNO
   ============================================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deep: #07070f;
  --bg-card: #12121e;
  --bg-elevated: #1a1a2e;
  --bg-section: #16213e;
  --border: #2a2a4a;
  --accent: #e94560;
  --accent-dim: rgba(233, 69, 96, 0.18);
  --teal: #00d4aa;
  --teal-dim: rgba(0, 212, 170, 0.15);
  --text-primary: #f0f0f0;
  --text-secondary: #9999bb;
  --text-muted: #555577;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

body {
  font-family: "Roboto", "Segoe UI", sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-size: 14px;
}

.app-container {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-card);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* STEPPER */
.stepper-container {
  padding: 18px 20px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
}

.st-divider {
  flex: 1;
  height: 2px;
  background: #2a2a4a;
  margin-bottom: 20px;
}

.st-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.st-bubble {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-section);
  border: 2px solid #3a3a5a;
  color: #666688;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.st-item.active .st-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.st-item.completed .st-bubble {
  background: var(--teal);
  border-color: var(--teal);
  color: #07070f;
}

.st-label {
  font-size: 9px;
  color: #555577;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

.st-item.active .st-label {
  color: var(--accent);
}
.st-item.completed .st-label {
  color: var(--teal);
}

/* CONTEUDO */
.content-container {
  padding: 20px 16px;
  min-height: 400px;
}

.step-content {
  display: none;
}

.step-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-content h2 {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

/* GRID DE LOTERIAS */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.selection-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.selection-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-dim);
  opacity: 0;
  transition: opacity 0.2s;
}

.selection-item:hover:not(.disabled)::before {
  opacity: 1;
}

.selection-item:hover:not(.disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.2);
}

.selection-item.selected {
  border-color: var(--accent);
  background: var(--bg-section);
  box-shadow:
    0 0 0 1px var(--accent),
    inset 0 0 20px rgba(233, 69, 96, 0.08);
}

.selection-item.selected::after {
  content: "checked";
  font-family: "Material Icons", sans-serif;
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  font-family: monospace;
  content: "\2713";
}

.selection-item.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.selection-item-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 17px;
  letter-spacing: 0.3px;
}

.selection-item-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* HORARIOS */
.loteria-horarios-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.loteria-horarios-section h3 {
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.horarios-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.horario-btn {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.horario-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.horario-btn.selected {
  background: var(--teal);
  color: #07070f;
  border-color: var(--teal);
  box-shadow: 0 0 8px rgba(0, 212, 170, 0.35);
  font-weight: 700;
}

.horarios-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* MODALIDADES */
#modalidadesGrid.selection-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 7px;
}

#modalidadesGrid .selection-item {
  padding: 9px 11px;
}
#modalidadesGrid .selection-item-title {
  font-size: 13px;
  line-height: 1.3;
}
#modalidadesGrid .selection-item > div:last-child {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* JOGOS / INPUT */
.input-section {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.input-section input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  transition: border 0.2s;
}

.input-section input[type="text"]:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.input-section input[type="text"]::placeholder {
  color: var(--text-muted);
}

.jogos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 60px;
  margin-bottom: 16px;
}

.jogo-chip {
  padding: 5px 12px;
  background: var(--bg-section);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 13px;
}

.jogo-chip .remove {
  cursor: pointer;
  font-size: 14px;
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 0.15s;
}

.jogo-chip .remove:hover {
  opacity: 1;
}

/* VALOR */
.valor-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.valor-section h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.valor-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.valor-input-group span {
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
}

.valor-input-group input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
  background: var(--bg-card);
}

.valor-input-group input:focus {
  border-color: var(--teal);
  outline: none;
}

.valor-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-preset {
  padding: 5px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.btn-preset:hover,
.btn-preset.active {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-dim);
}

/* MODO DIVIDIR / MULTIPLICAR */
.modo-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.modo-section h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.modo-toggle {
  display: flex;
  gap: 8px;
}

.modo-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.modo-btn:hover {
  border-color: var(--text-secondary);
}

.modo-btn:first-child.active {
  background: rgba(68, 0, 255, 0.15);
  border-color: #6644ff;
  color: #a088ff;
  box-shadow: 0 0 10px rgba(68, 0, 255, 0.2);
}

.modo-btn:last-child.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px rgba(233, 69, 96, 0.2);
}

/* RESUMO */
.resumo-section {
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  padding: 14px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 30px rgba(233, 69, 96, 0.04);
}

.resumo-section h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 10px;
}

.resumo-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}

.resumo-item:last-child {
  border-bottom: none;
}

.resumo-item-valor {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border) !important;
  color: var(--text-primary);
}

/* PREMIAÇÃO POTENCIAL */
.prem-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.prem-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #f5c518;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.prem-card {
  background: #07070f;
  border: 1px solid #2a2a4a;
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 5px 0;
}

.prem-mod-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 7px;
}

.prem-escolha {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid rgba(233, 69, 96, 0.3);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.prem-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 12px;
}

.prem-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.prem-milhar {
  background: rgba(0, 212, 170, 0.12);
  color: var(--teal);
  border: 1px solid rgba(0, 212, 170, 0.35);
}

.prem-centena {
  background: rgba(233, 69, 96, 0.12);
  color: var(--accent);
  border: 1px solid rgba(233, 69, 96, 0.35);
}

.prem-formula {
  flex: 1;
  color: var(--text-muted);
  font-size: 11px;
}

.prem-valor {
  color: var(--teal);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.prem-valor-sec {
  color: var(--accent);
}

.total-investido {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--teal-dim);
  border: 1px solid var(--teal);
  color: var(--teal);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
}

/* NAVEGACAO */
.navigation-bar {
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 100;
}

.btn-nav {
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.btn-nav:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-nav.btn-primary {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.2);
}

.btn-nav.btn-primary:hover {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 18px rgba(233, 69, 96, 0.5);
}

.btn-nav.btn-success {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(233, 69, 96, 0.3);
}

.btn-nav.btn-success:hover {
  background: var(--accent);
  color: white;
}

/* BOTOES GERAIS */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #c73652;
}

.btn-secondary {
  background: var(--bg-section);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* BILHETES CONCLUIDOS */
.bilhetes-section {
  padding: 20px 16px;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
}

.bilhetes-section h2 {
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  border-left: 3px solid var(--teal);
  padding-left: 10px;
}

.bilhete-card {
  background: var(--bg-elevated);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  border-left: 3px solid var(--teal);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.bilhete-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.bilhete-header h4 {
  color: var(--text-primary);
  font-size: 14px;
}

.btn-remove {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.bilhete-info {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.bilhete-info strong {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.bilhete-total {
  margin-top: 10px;
  padding: 10px;
  background: var(--teal-dim);
  border: 1px solid var(--teal);
  color: var(--teal);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

/* RESPONSIVO */
@media (max-width: 480px) {
  .stepper-container {
    padding: 20px 14px;
  }
  .step-number {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    font-size: 11px;
  }
  .step-label {
    font-size: 8px;
  }
  .step-line {
    margin-top: 14px;
  }
  .content-container {
    padding: 14px 12px;
  }

  .selection-grid,
  #modalidadesGrid.selection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .selection-item {
    padding: 8px 10px;
  }
  .selection-item-title {
    font-size: 16px;
  }
  .modo-toggle {
    gap: 6px;
  }
  .modo-btn {
    font-size: 12px;
    padding: 9px 6px;
  }
  .navigation-bar {
    padding: 10px 12px;
    gap: 8px;
  }
  .btn-nav {
    padding: 9px 14px;
    font-size: 12px;
  }
  .horarios-grid {
    gap: 5px;
  }
  .horario-btn {
    padding: 8px 16px;
    font-size: 16px;
  }
}

/* ── GRID DE BICHOS ─────────────────────────────── */
.bicho-btn {
  padding: 8px 4px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition:
    border-color 0.18s,
    background 0.18s,
    transform 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.bicho-btn:hover {
  background: var(--bg-elevated);
  border-color: #7c3aed;
  transform: translateY(-2px);
}
.bicho-btn.selected {
  background: #1e1b3a;
  border-color: #7c3aed;
  transform: translateY(-2px);
}
.bicho-btn img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.bicho-btn .bicho-num {
  font-size: 14px;
  font-weight: 700;
  color: #c4b5fd;
}
.bicho-btn .bicho-nome {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-card);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
