@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

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

body {
  font-family: 'Poppins', sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a2e;
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo { font-size: 1.2rem; font-weight: 600; }
.nav-links a { color: #ccc; text-decoration: none; margin-left: 1.5rem; font-size: 0.9rem; }
.nav-links a:hover { color: white; }

/* SECTIONS */
.section {
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}
.section h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; color: #1a1a2e; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.hidden { display: none !important; }

/* CARDS */
.card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.label { font-size: 0.85rem; font-weight: 500; color: #666; display: block; margin-bottom: 1rem; }

/* TEAM GRID */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}
.team-card {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  background: white;
}
.team-card:hover { border-color: #aaa; }
.team-card.selected { border-color: #1A73E8; background: #e8f0fe; }
.team-badge {
  display: inline-block;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.4rem;
}
.team-name { font-size: 0.8rem; font-weight: 500; }
.team-city { font-size: 0.7rem; color: #888; }

/* INPUTS */
.input-field {
  padding: 0.6rem 0.9rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}
.input-field:focus { border-color: #1A73E8; }

/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(to right, #1A73E8, #0f4fa8);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 0.5rem;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
  background: white;
  border: 1.5px solid #1A73E8;
  color: #1A73E8;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.2s;
}
.btn-secondary:hover { background: #e8f0fe; }

/* BADGE */
.badge {
  background: #e8f0fe;
  color: #1A73E8;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

/* SEARCH BAR */
.search-bar-wrap {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.search-bar-wrap .input-field { flex: 1; }

/* TABLE */
.table-wrap { overflow-x: auto; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.88rem;
}
th {
  background: #1a1a2e;
  color: white;
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 500;
}
td { padding: 0.75rem 1rem; border-bottom: 1px solid #f0f0f0; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.weekend-row td { background: #fffbf0; }
.weekend-row:hover td { background: #fff5d6; }

.day-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}
.day-pill.weekend { background: #fff3cd; color: #856404; }
.day-pill.weekday { background: #e8f0fe; color: #1A73E8; }

.team-pill {
  display: inline-block;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-right: 4px;
}
.vs-cell { color: #999; font-size: 0.8rem; text-align: center; }

/* PLAYOFFS */
.playoff-selects { display: flex; flex-direction: column; gap: 0.75rem; }
.playoff-row { display: flex; align-items: center; gap: 1rem; }
.playoff-label { font-size: 0.85rem; font-weight: 500; min-width: 80px; color: #444; }

.bracket-wrap { margin-top: 2rem; }
.bracket-wrap h3 { margin-bottom: 1.5rem; font-size: 1.1rem; }
.bracket {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.bracket-col { display: flex; flex-direction: column; gap: 0.75rem; }
.bracket-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.match-card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  min-height: 80px;
  font-size: 0.82rem;
}
.final-card { border: 2px solid #f9cd05; }
.match-teams { display: flex; flex-direction: column; gap: 0.5rem; line-height: 1.5; }
.versus { color: #999; font-size: 0.75rem; }
.tbd { color: #aaa; font-style: italic; font-size: 0.8rem; }

/* CHAMPION BANNER */
.champion-banner {
  margin-top: 2rem;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: white;
  text-align: center;
  padding: 2rem;
  border-radius: 14px;
  font-size: 1.3rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ERROR */
.error-msg { color: #d93025; font-size: 0.85rem; margin-top: 0.5rem; }

@media (max-width: 700px) {
  .bracket { grid-template-columns: 1fr 1fr; }
  .search-bar-wrap { flex-direction: column; }
}