/* ========================
   RESET
======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========================
   BASE
======================== */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f1f5f9;
  color: #1f2937;
  padding: 20px;
  transition: 0.3s;
}

body.dark {
  background: #0f172a;
  color: #e5e7eb;
}

/* ========================
   BOTÃO TEMA
======================== */
#toggle-tema {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: #111827;
  color: white;
  cursor: pointer;
  z-index: 1000;
}

body.dark #toggle-tema {
  background: #e5e7eb;
  color: #111827;
}

/* ========================
   GRID
======================== */
#cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* ========================
   CARD
======================== */
.card {
  background: white;
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: 0.25s;
}

.card:hover {
  transform: translateY(-3px);
}

body.dark .card {
  background: #1e293b;
}

/* ========================
   HEADER CARD
======================== */
.card img {
  width: 50px;
  margin-bottom: 10px;
}

.card h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

/* ========================
   INPUT
======================== */
.card input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  margin-bottom: 10px;
  outline: none;
}

body.dark .card input {
  background: #0f172a;
  border: 1px solid #374151;
  color: white;
}

/* ========================
   BOTÕES
======================== */
.botoes {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.botoes button {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
}

/* botão consultar */
.botoes button:first-child {
  background: #2563eb;
  color: white;
}

.botoes button:first-child:hover {
  background: #1d4ed8;
}

/* botão último */
.botoes button:last-child {
  background: #10b981;
  color: white;
}

.botoes button:last-child:hover {
  background: #059669;
}

/* ========================
   RESULTADO
======================== */
.resultado {
  font-size: 14px;
  line-height: 1.5;
}

/* ========================
   NÚMEROS (bolinhas)
======================== */
.numeros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.numeros span {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 14px;
}

body.dark .numeros span {
  background: #3b82f6;
}

/* ========================
   TREVOS
======================== */
.trevos {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.trevos span {
  background: gold;
  color: #111;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
}

/* ========================
   EXTRA
======================== */
.extra {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
}

body.dark .extra {
  color: #9ca3af;
}

/* ========================
   LOTECA ULTRA COMPACTA (NÍVEL MÁXIMO)
======================== */
.loteca-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

/* cada jogo vira uma linha fina */
.jogo-card {
  background: transparent;
  padding: 2px 0;
  font-size: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

body.dark .jogo-card {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* remove header */
.jogo-header {
  display: none;
}

/* linha única estilo tabela */
.jogo-times {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
}

/* nomes dos times */
.time {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
}

/* placar MINÚSCULO */
.placar-badge {
  background: #16a34a;
  color: white;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: bold;
  min-width: 42px;
  text-align: center;
}

/* colunas 1 X 2 micro */
.colunas {
  display: flex;
  gap: 2px;
}

.colunas span {
  padding: 1px 4px;
  border-radius: 3px;
  background: #e5e7eb;
  font-size: 9px;
}

.colunas span.ativo {
  background: #2563eb;
  color: white;
}

/* aguardando */
.sem-resultado {
  font-size: 9px;
  color: #9ca3af;
  text-align: center;
}
/* resultado com scroll */
.resultado {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 10px;
}

/* info topo */
.info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

/* botão limpar */
.botoes .limpar {
  background: #ef4444;
  color: white;
}

.botoes .limpar:hover {
  background: #dc2626;
}

/* loader */
.loader {
  width: 24px;
  height: 24px;
  border: 3px solid #ccc;
  border-top: 3px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
