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

:root {
  --navy: #0f1f3d;
  --navy-mid: #1a3260;
  --blue: #1e4db7;
  --blue-light: #3b6fd4;
  --accent: #e8f0fe;
  --ice: #f0f4ff;
  --white: #ffffff;
  --gray-50: #f8f9fc;
  --gray-100: #eef0f5;
  --gray-200: #dde0ea;
  --gray-400: #9299b0;
  --gray-600: #5a6177;
  --gray-800: #2d3250;
  --green: #16a34a;
  --green-bg: #dcfce7;
  --gold: #f59e0b;
  --gold-bg: #fffbeb;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(15,31,61,.07), 0 1px 2px rgba(15,31,61,.04);
  --shadow: 0 4px 16px rgba(15,31,61,.08), 0 1px 4px rgba(15,31,61,.05);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
}

/* Header */
.header {
  background: var(--navy);
  height: 70px;
  display: flex;
  align-items: center;
  padding-left: 1,5px;
}

.header-logo-img {
  height: 98px;
  width: auto;
  cursor: pointer;
  filter: brightness(0) invert(1);
  opacity: .92;
  transition: opacity .15s;
}

.header-logo-img:hover { opacity: 1; }

/* Layout */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* Search mode toggle */
.search-mode-tabs {
  display: flex;
  gap: 0;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 16px;
  width: fit-content;
}

.search-mode-btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  background: none;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.search-mode-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* Search row */
.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}

.search-input {
  flex: 1;
  max-width: 480px;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
}

.search-input::placeholder { color: var(--gray-400); }
.search-input:focus { border-color: var(--blue); }

.btn {
  padding: 11px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--navy-mid); }

.btn-ghost {
  background: var(--white);
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Favorites landing page */
.favorites-section {
  margin-bottom: 32px;
}

.favorites-empty {
  background: var(--white);
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  color: var(--gray-400);
}

.favorites-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.favorites-empty p {
  font-size: 14px;
}

.favorite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.favorite-card:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow-sm);
}

.favorite-card-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.favorite-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.favorite-card-club {
  font-size: 12px;
  color: var(--gray-400);
}

.favorite-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fav-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.fav-type-veld {
  background: #e0f2fe;
  color: #0369a1;
}

.fav-type-zaal {
  background: #f3e8ff;
  color: #7c3aed;
}

.btn-unfav {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: .5;
  transition: opacity .15s;
  padding: 2px 4px;
  line-height: 1;
}

.btn-unfav:hover { opacity: 1; }

/* Club list */
.club-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.club-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.club-item:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow-sm);
}

.club-item img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}

.club-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.club-item-city {
  font-size: 12px;
  color: var(--gray-400);
  margin-left: auto;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--gray-200); }

/* Section title */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.section-sub {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 18px;
}

/* Veld/Zaal hockey type tabs */
.hockey-type-tabs {
  display: flex;
  gap: 0;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 16px;
  width: fit-content;
}

.hockey-type-btn {
  padding: 7px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  background: none;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.hockey-type-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.hockey-type-btn[data-type="VE"].active {
  color: #0369a1;
}
.hockey-type-btn[data-type="ZA"].active {
  color: #7c3aed;
}

/* Teams */
.teams-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
}

.team-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: border-color .15s;
}

.team-item:hover { border-color: var(--blue-light); }

.team-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.chevron {
  color: var(--gray-400);
  font-size: 16px;
}

/* Tabs */
.tabs-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-100);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.tab-btn:hover { color: var(--navy); }

.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Refresh row */
.refresh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.refresh-hint {
  font-size: 12px;
  color: var(--gray-400);
}

/* Matches */
.match-card {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.match-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .04em;
  min-width: 72px;
}

.match-teams {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.match-team {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.match-team.home { text-align: right; }
.match-team.away { text-align: left; }

.match-score {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.match-score.upcoming {
  background: var(--gray-100);
  color: var(--gray-400);
}

.match-actions {
  flex-shrink: 0;
}

.btn-detail {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  background: var(--accent);
  border: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}

.btn-detail:hover { background: #d1dffb; }

/* Standings table */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 13px;
}

.standings-table thead tr {
  background: var(--navy);
  color: #fff;
}

.standings-table th {
  padding: 11px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.standings-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
}

.standings-table tr:last-child td { border-bottom: none; }
.standings-table tbody tr:hover td { background: var(--ice); }

.standings-table .pos {
  color: var(--gray-400);
  font-weight: 600;
  width: 32px;
}

.standings-table .team-name {
  font-weight: 600;
  color: var(--navy);
}

.standings-table .pts {
  font-weight: 700;
  color: var(--blue);
}

/* Highlight current team row */
.standings-table tr.highlight td {
  background: var(--accent);
}

/* Match detail overlay */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,31,61,.45);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}

.overlay.open {
  display: flex;
}

.overlay-panel {
  background: var(--white);
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
}

.overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.overlay-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.overlay-close {
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 16px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-block {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 12px;
}

.detail-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.detail-score-big {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  letter-spacing: .04em;
  padding: 16px;
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  font-size: 13px;
  padding: 20px 0;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--green-bg);
  color: var(--green);
}

/* Favorite button on team page */
.btn-fav-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 16px;
}

.btn-fav-toggle:hover {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
}

.btn-fav-toggle.is-fav {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
}

/* Team search results */
.team-search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: border-color .15s;
}

.team-search-result:hover {
  border-color: var(--blue-light);
}

.team-search-result-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.team-search-result-club {
  font-size: 12px;
  color: var(--gray-400);
}

@media (max-width: 600px) {
  .header { padding: 0px; }
  .container { padding: 18px 14px 50px; }
  .match-team { font-size: 12px; }
  .match-date { min-width: 56px; font-size: 10px; }
}

/* Team category groups */
.team-group {
  margin-bottom: 18px;
}

.team-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray-400);
  padding: 6px 2px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--gray-100);
}


/* ════════════════════════════════════════════
   DASHBOARD  –  Weather card
════════════════════════════════════════════ */
#dashboard-section {
  margin-bottom: 8px;
}

.weather-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--blue) 100%);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 24px;
  color: var(--white);
  box-shadow: var(--shadow);
}

.weather-card-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-icon-wrap {
  font-size: 40px;
  line-height: 1;
  flex-shrink: 0;
}

.weather-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.weather-temp {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}

.weather-desc {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  font-weight: 500;
}

.weather-loc {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  text-align: right;
  align-self: flex-end;
}

/* ════════════════════════════════════════════
   DASHBOARD  –  Favorites with next-match
════════════════════════════════════════════ */

/* Make card a column so the next-match row sits below */
.favorite-card {
  flex-direction: column;
  align-items: stretch;
}

.favorite-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fav-next-match {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.fav-next-vs {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 500;
}

.fav-next-countdown {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.fav-next-none {
  font-size: 12px;
  color: var(--gray-400);
  font-style: italic;
}

/* ════════════════════════════════════════════
   DASHBOARD  –  Upcoming matches (all favs)
════════════════════════════════════════════ */
#upcoming-fav-section {
  margin-bottom: 28px;
}

.upcoming-fav-card {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.upcoming-fav-card:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow-sm);
}

.ufc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.ufc-teams {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ufc-vs {
  font-weight: 400;
  color: var(--gray-400);
  margin: 0 4px;
}

.ufc-countdown {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--accent);
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ufc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ufc-date {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
}

.ufc-comp {
  font-size: 11px;
  color: var(--gray-600);
  background: var(--gray-100);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 500;
}

.ufc-team-tag {
  font-size: 11px;
  color: var(--blue);
  background: var(--accent);
  border-radius: 4px;
  padding: 1px 7px;
  font-weight: 600;
}

/* ════════════════════════════════════════════
   RESPONSIVE tweaks for dashboard
════════════════════════════════════════════ */
@media (max-width: 600px) {
  .weather-temp { font-size: 26px; }
  .weather-icon-wrap { font-size: 32px; }
  .ufc-teams { font-size: 13px; }
  .upcoming-fav-card { padding: 11px 13px; }
}


/* ════════════════════════════════════════════
   TEAM PAGE  –  Competition badge
════════════════════════════════════════════ */
.team-comp-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: var(--accent);
  border: 1px solid #c7d9f9;
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 14px;
  letter-spacing: .01em;
}
.match-card-highlight {
    background: var(--accent);
    border-color: var(--blue-light);
}

.match-card-highlight .match-team {
    font-weight: 700;
}
.maps-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    margin-top: 8px;
    border-radius: 12px;
    background: #1e4db7;
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s;
}

.maps-btn:hover {
    background: #173b8f;
}
