.container { max-width: 980px; margin: 0 auto; padding: 20px; }

/* ===========================
   TOOLBAR (atualizada)
   =========================== */
.toolbar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 15px; margin-bottom: 25px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.toolbar input[type="date"] {
  background: #111; color: #fff; border: 1px solid #444; 
  padding: 8px; border-radius: 5px;
}
.toolbar button[type="submit"] {
  background: var(--accent-primary); color: white; border: none;
  padding: 8px 15px; border-radius: 5px; cursor: pointer; font-weight: bold;
}

/* ===========================
   CAMPO DE BUSCA (Feature 2)
   =========================== */
.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-wrapper::before {
  content: "🔍";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}
#search-filter {
  width: 100%;
  box-sizing: border-box;
  background: #111;
  color: #fff;
  border: 1px solid #444;
  padding: 8px 8px 8px 34px;
  border-radius: 5px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
#search-filter:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(255, 77, 0, 0.15);
}
#search-filter::placeholder {
  color: #666;
}

/* ===========================
   TOGGLE LIGA/HORÁRIO (Feature 1)
   =========================== */
.toggle-group {
  display: flex;
  gap: 8px;
}
.toggle-btn {
  background: #222;
  color: #888;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.toggle-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}
.toggle-btn:hover:not(.active) {
  background: #333;
  color: #ccc;
}

/* ===========================
   SWITCH JOGOS FUTUROS (Feature 3)
   =========================== */
.future-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.switch {
  position: relative;
  width: 40px;
  height: 22px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #444;
  border-radius: 22px;
  transition: 0.3s;
}
.slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.switch input:checked + .slider {
  background: var(--accent-green);
}
.switch input:checked + .slider::before {
  transform: translateX(18px);
}

/* ===========================
   LIGA CARD
   =========================== */
.league-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px; margin-bottom: 20px;
  overflow: hidden;
  transition: opacity 0.3s;
}
.league-card.hidden { display: none; }
.league-card.all-past { opacity: 0.3; }

/* Cabeçalho da Liga */
.league-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
}
.league-title {
  margin: 0; color: var(--accent-primary); 
  font-size: 1.1rem; font-weight: 700; text-transform: uppercase;
}

/* ===========================
   HORA CARD (Feature 1 - visão por horário)
   =========================== */
.hour-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hour-badge {
  background: var(--accent-primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
}
.hour-count {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.match-liga-tag {
  display: inline-block;
  background: #2a2a2a;
  color: var(--accent-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 6px;
  vertical-align: middle;
}

/* ===========================
   LINHA DO JOGO
   =========================== */
.match-row {
  display: grid;
  /* Colunas: Hora | Times | Odds | Botão */
  grid-template-columns: 70px 1fr auto 100px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid #2a2a2a;
  transition: background 0.2s, opacity 0.3s;
  gap: 15px;
}
.match-row:hover { background-color: rgba(255,255,255,0.03); }
.match-row:last-child { border-bottom: none; }
.match-row.hidden { display: none; }
.match-row.past-game { display: none; }

/* Hora */
.match-time {
  font-family: monospace; font-size: 1.1rem; 
  color: var(--text-secondary); font-weight: bold;
  text-align: center; background: #111; padding: 4px; border-radius: 4px;
}

/* Times */
.match-teams {
  font-size: 1.05rem; font-weight: 500; color: #fff;
}
.match-teams a { text-decoration: none; color: inherit; }
.match-teams a:hover { color: var(--accent-blue); }
.vs { color: #555; margin: 0 5px; font-size: 0.9rem; }

/* Odds */
.odds { display: flex; gap: 5px; align-items: center; }

/* legado */
.odd { 
  background: #222; color: #ddd; border: 1px solid #333;
  padding: 5px 8px; border-radius: 4px; font-size: 0.85rem; 
  min-width: 45px; text-align: center;
}

/* novo: pill com label */
.odd-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.82rem; font-weight: 600; color: #ccc;
  white-space: nowrap;
  transition: background 0.2s;
}
.odd-pill:hover { background: rgba(255,255,255,0.1); }
.odd-pill.odd-fav {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.4);
  color: #81c784;
}
.odd-label-mini {
  font-size: 0.68rem; font-weight: 700;
  color: #777; text-transform: uppercase; letter-spacing: 0.5px;
}
.odd-fav .odd-label-mini { color: #4caf50; }
.odd-empty { font-size: 0.78rem; color: #555; font-style: italic; }


/* Botão */
.analyze-btn {
  background: transparent; color: var(--accent-green);
  border: 1px solid var(--accent-green);
  padding: 6px 0; border-radius: 5px;
  text-align: center; text-decoration: none; font-size: 0.9rem;
  transition: all 0.2s; display: block;
}
.analyze-btn:hover { background: var(--accent-green); color: #fff; }

/* ===========================
   MOBILE
   =========================== */
@media(max-width: 600px) {
  .toolbar { flex-direction: column; }
  .search-wrapper { min-width: 100%; }
  .toggle-group { align-self: stretch; }
  .toggle-btn { flex: 1; text-align: center; }
  .future-toggle { align-self: flex-start; }
  .match-row { grid-template-columns: 60px 1fr; grid-template-rows: auto auto; gap: 10px; }
  .odds { grid-column: 1 / -1; justify-content: flex-start; margin-top: 5px; }
  .analyze-btn { grid-column: 2; grid-row: 2; justify-self: end; width: auto; padding: 6px 15px; }
}

/* ===========================
   ESTADO VAZIO
   =========================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.empty-state h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ===========================
   QUALIDADE DOS DADOS (TIERS)
   =========================== */
.badge-q {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: capitalize;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  user-select: none;
}
.badge-q:hover {
  transform: translateY(-1px);
}

.badge-q-mini {
  font-size: 0.65rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  text-transform: uppercase;
  vertical-align: middle;
}

.badge-q-high {
  background: rgba(0, 188, 212, 0.1);
  color: #00e5ff;
  border: 1px solid rgba(0, 188, 212, 0.3);
  box-shadow: 0 0 8px rgba(0, 188, 212, 0.1);
}
.badge-q-high:hover {
  box-shadow: 0 0 12px rgba(0, 188, 212, 0.25);
  background: rgba(0, 188, 212, 0.15);
}

.badge-q-medium {
  background: rgba(76, 175, 80, 0.1);
  color: #66bb6a;
  border: 1px solid rgba(76, 175, 80, 0.3);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.1);
}
.badge-q-medium:hover {
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.25);
  background: rgba(76, 175, 80, 0.15);
}

.badge-q-basic {
  background: rgba(255, 255, 255, 0.03);
  color: #bbbbbb;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.badge-q-basic:hover {
  background: rgba(255, 255, 255, 0.06);
}
