/* ===== Painel de Odds — tema limpo e moderno ===== */
:root {
  --fs-red: #dc2626;
  --fs-bg: #f4f6f9;
  --fs-card: #ffffff;
  --fs-border: #e2e8f0;
  --fs-border-subtle: #edf1f5;
  --fs-text: #1e293b;
  --fs-text-dark: #0f172a;
  --fs-muted: #64748b;
  --fs-hover: #edf2f9;
  --fs-best: #0f5132;
  --fs-up: #16a34a;
  --fs-down: #dc2626;
  --fs-primary: #0d6efd;
}

body {
  background: var(--fs-bg);
  color: var(--fs-text);
  font-size: 0.9rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.navbar {
  background: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ----- Centralização e Largura Harmoniosa dos Painéis ----- */
#game-content,
#home-main {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* ----- Home: navegação de dia ----- */
.day-nav__btn {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--fs-border);
  background: var(--fs-card);
  color: var(--fs-text);
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}
.day-nav__btn:hover:not(:disabled) {
  background: var(--fs-hover);
  border-color: #cbd5e1;
}
.day-nav__btn:disabled {
  opacity: 0.4;
}
.day-nav__title {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--fs-text-dark);
}

/* ----- Home: bloco de liga e lista de jogos ----- */
.league-block {
  background: var(--fs-card);
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid var(--fs-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 0.75rem;
}
.league-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  background: #f1f4f8;
  border-bottom: 1px solid var(--fs-border);
}
.league-header__name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #1f2937;
}
.league-header__country {
  margin-left: auto;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fs-muted);
}
.country-flag {
  width: 18px;
  height: 13px;
  vertical-align: -2px;
  border-radius: 2px;
}

/* ----- Ligas Favoritas e Estrela de Favorito ----- */
.league-star-btn {
  background: none;
  border: none;
  padding: 0 0.2rem 0 0;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.league-star-btn:hover {
  color: #f59e0b;
  transform: scale(1.2);
}
.league-star-btn.active {
  color: #f59e0b;
  text-shadow: 0 0 5px rgba(245, 158, 11, 0.4);
}
.league-block--favorite {
  border-left: 3px solid #f59e0b !important;
}
.favorites-section__header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  padding: 0.4rem 0.85rem;
  margin-bottom: 0.6rem;
}

.game-list {
  background: var(--fs-card);
}
.game-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.75rem;
  border-bottom: 1px solid var(--fs-border-subtle);
  text-decoration: none;
  color: var(--fs-text);
  transition: background 0.1s ease;
}
.game-row:last-child {
  border-bottom: none;
}
.game-row:nth-child(odd) {
  background-color: #ffffff;
}
.game-row:nth-child(even) {
  background-color: #f8f9fb;
}
.game-row:hover {
  background-color: var(--fs-hover);
  text-decoration: none;
}
.game-row__time {
  flex: 0 0 auto;
  min-width: 5.6rem;
  color: var(--fs-muted);
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.game-row__teams {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  font-weight: 600;
  font-size: 0.88rem;
}
.game-row__team {
  flex: 1 1 0;
  text-align: center;
}
.game-row__team--home { text-align: right; }
.game-row__team--away { text-align: left; }
.game-row__score {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--fs-text-dark);
}
.game-row__sep {
  color: var(--fs-muted);
  margin: 0 0.15rem;
}

/* ----- Página do jogo: cabeçalho do confronto ----- */
.game-header {
  background: var(--fs-card);
  border: 1px solid var(--fs-border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem 0.85rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-align: center;
}
.game-header__league {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fs-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f1f4f8;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.65rem;
}
.game-header__teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a202c;
}
.game-header__team {
  flex: 1 1 0;
}
.game-header__team--home { text-align: right; }
.game-header__team--away { text-align: left; }
.game-header__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.25rem 0.7rem;
  background: #f1f5f9;
  border: 1px solid var(--fs-border);
  border-radius: 0.45rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}
.game-header__sep {
  color: var(--fs-muted);
  margin: 0 0.2rem;
}
.game-header__vs {
  color: var(--fs-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.game-header__status {
  font-size: 0.75rem;
  color: var(--fs-red);
  font-weight: 700;
  margin-top: 0.5rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ----- Abas de mercado ----- */
.market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-bottom: 2px solid var(--fs-border);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}
.market-tabs__link {
  display: inline-block;
  padding: 0.38rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  background: #ffffff;
  border: 1px solid var(--fs-border);
  border-radius: 0.45rem;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.market-tabs__link:hover {
  color: #111827;
  background: #f3f4f6;
  border-color: #cbd5e1;
  text-decoration: none;
}
.market-tabs__link.active {
  color: #ffffff;
  background: var(--fs-primary);
  border-color: var(--fs-primary);
  box-shadow: 0 2px 5px rgba(13, 110, 253, 0.3);
}

/* ----- Blocos e Cards das Tabelas de Odds ----- */
.line-block,
.outcome-block {
  background: var(--fs-card);
  border-radius: 0.65rem;
  border: 1px solid var(--fs-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 1rem;
  padding: 0;
}
.line-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: #374151;
  background: #f8fafc;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--fs-border);
  letter-spacing: 0.2px;
}

/* ----- Tabela de Odds: Compacta, Moderna e Centralizada ----- */
.odds-table {
  font-size: 0.83rem;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
}
.odds-table thead th {
  background-color: #f1f4f8;
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--fs-border);
  border-top: none;
  white-space: nowrap;
}

/* Linhas alternadas com tons levemente diferentes (Zebra Striping) */
.odds-table tbody tr:nth-child(odd) > td {
  background-color: #ffffff;
}
.odds-table tbody tr:nth-child(even) > td {
  background-color: #f8f9fb;
}
.odds-table tbody tr:hover > td {
  background-color: #edf3fa !important;
  transition: background-color 0.1s ease-in-out;
}

.odds-table tbody td {
  padding: 0.42rem 0.75rem;
  border-bottom: 1px solid var(--fs-border-subtle);
  border-top: none;
  vertical-align: middle;
  color: #1f2937;
}
.odds-table tbody tr:last-child td {
  border-bottom: none;
}

.odds-table .casa {
  font-weight: 600;
  color: #111827;
  text-align: left;
  white-space: nowrap;
}
.bookmaker-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
.bookmaker-link:hover,
.bookmaker-link:focus {
  color: inherit;
  text-decoration: none;
}

/* Espaçamento reduzido: colunas de odds mais compactas e alinhadas */
.odds-table th.text-end,
.odds-table td.text-end {
  width: 95px;
  min-width: 80px;
  text-align: right;
}

.odd-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}
.odd-val--best {
  font-weight: 800;
  color: var(--fs-best);
  background-color: #d1e7dd;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}
.trend {
  font-size: 0.65rem;
  margin-left: 0.2rem;
  vertical-align: 1px;
}
.trend--up {
  color: var(--fs-up);
  font-weight: 700;
}
.trend--down {
  color: var(--fs-down);
  font-weight: 700;
}

/* ----- Botão Atualizar fixo moderno ----- */
#atualizar-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1030;
  border-radius: 9999px;
  padding: 0.55rem 1.25rem;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--fs-primary);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
  transition: all 0.2s ease-in-out;
}
#atualizar-btn:hover:not([disabled]) {
  background: #0b5ed7;
  box-shadow: 0 6px 18px rgba(13, 110, 253, 0.45);
  transform: translateY(-1px);
}
#atualizar-btn[disabled] {
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}
#atualizar-btn .spinner {
  display: none;
}
#atualizar-btn.loading .spinner {
  display: inline-block;
}
#atualizar-btn.loading .label {
  display: none;
}

/* ----- Responsividade ----- */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 575.98px) {
  .game-row__time {
    min-width: 4.8rem;
    font-size: 0.72rem;
  }
  .game-header__teams {
    font-size: 0.95rem;
    gap: 0.5rem;
  }
  .market-tabs__link {
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
  }
  .odds-table th.text-end,
  .odds-table td.text-end {
    width: auto;
    min-width: 70px;
    padding: 0.35rem 0.5rem;
  }
}

/* ----- Página de Opções: Mercados ----- */
.cursor-pointer {
  cursor: pointer;
}
.market-check-box {
  background: #f8f9fa;
  border: 1px solid var(--fs-border);
  transition: all 0.12s ease-in-out;
}
.market-check-box:hover {
  background: var(--fs-hover);
  border-color: #c9d0d8;
}
.market-check-box input:checked + label {
  font-weight: 600;
  color: #0d6efd;
}
.market-group-card {
  border: 1px solid var(--fs-border);
}

/* ----- Modo de Pesquisa de Times (Desktop no topo / Mobile fixo embaixo) ----- */
.team-search-bar {
  margin-bottom: 1.1rem;
}
.team-search-inner {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--fs-card);
  border: 1px solid var(--fs-border);
  border-radius: 2rem;
  padding: 0.22rem 0.85rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.18s ease-in-out;
}
.team-search-inner:focus-within {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.14);
  background: #ffffff;
}
.team-search-input {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 0.88rem;
  padding: 0.35rem 0.5rem;
  outline: none;
  width: 100%;
  color: var(--fs-text);
}
.team-search-input:focus {
  outline: none !important;
  box-shadow: none !important;
}
.search-icon {
  font-size: 0.95rem;
  color: var(--fs-muted);
  user-select: none;
}
.search-clear-btn {
  background: none;
  border: none;
  color: var(--fs-muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 50%;
  line-height: 1;
  transition: all 0.15s ease;
}
.search-clear-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}
.search-results-header {
  background: #f8fafc;
  border: 1px solid var(--fs-border);
  border-radius: 0.5rem;
  padding: 0.45rem 0.75rem;
}
.search-badge {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  letter-spacing: 0.3px;
}

@media (max-width: 767.98px) {
  .team-search-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #ffffff;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--fs-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
  }
  .team-search-inner {
    border-radius: 1.5rem;
    background: #f1f5f9;
  }
  body {
    padding-bottom: 4.6rem;
  }
}

