/* =============================================================
   GOALCODEX — master stylesheet
   All page styles live here. No <style> blocks in PHP files.
   ============================================================= */

/* ----- Reset / Base ----- */
/* Ensure [hidden] always wins over any display rule in author styles */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #eef1f7;
  color: #333;
}

/* ----- Header ----- */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 15px 40px;
  gap: 24px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-sizing: border-box;
}

.logo img {
  height: 68px;
  width: auto;
  transition: height 0.3s ease;
}

.burger-menu {
  font-size: 44px;
  color: #333;
  position: absolute;
  left: 20px;
  top: 20px;
  cursor: pointer;
  user-select: none;
  transition: font-size 0.3s ease, top 0.3s ease;
}

.header-container.shrunk { padding: 5px 40px; }
.header-container.shrunk .logo img { height: 50px; }
.header-container.shrunk .burger-menu { font-size: 32px; top: 12px; }

/* Explorer bar */
.explorer-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: bold;
  color: #003f7f;
}
.explorer-bar select {
  padding: 6px 10px;
  min-width: 120px;
  border: 1px solid #003f7f;
  border-radius: 4px;
  background: #f0f8ff;
  color: #003f7f;
  transition: background 0.2s;
}
.explorer-bar select:not(:disabled):hover { background: #e0f0ff; }
.explorer-bar select:disabled { opacity: 0.6; cursor: not-allowed; }

/* Dropdown navigation */
.dropdown-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  width: 300px;
  background-color: #fff;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.dropdown-menu ul { list-style: none; margin: 0; padding: 0; }
.dropdown-menu li {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
  position: relative;
}
.dropdown-menu li:hover { background: #f5f5f5; }

.league-list {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: #fff;
  width: 200px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.country-item { cursor: pointer; transition: background-color 0.2s ease; }
.country-item:hover .league-list { display: block; background-color: #f5f5f5; }

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    padding: 15px 20px;
    gap: 12px;
  }
  .explorer-bar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .explorer-bar select { flex: 1 1 45%; }
  .dropdown-menu { width: 100%; }
  .league-list { position: static; width: 100%; }
}

/* ----- Layout ----- */
.container {
  display: flex;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
  background-image: url('/assets/images/bg.png');
}

@media (max-width: 1024px) {
  .container { flex-direction: column; }
  .filters-side { width: 100%; }
  .filters { justify-content: center; }
}

.filters-side {
  flex: 1;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 10px;
  max-width: 220px;
}
.filters-side h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #0056b3;
  font-weight: bold;
  border-bottom: 2px solid #0056b3;
  padding-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filters-side label {
  display: flex;
  align-items: center;
  font-size: 14px;
  margin-bottom: 8px;
  cursor: pointer;
}
.filters-side input[type="checkbox"] {
  margin-right: 10px;
  transform: scale(1.2);
}

.main-content {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 85%;
  background: whitesmoke;
  border-radius: 20px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  padding: 16px;
}

/* ----- Statistics container ----- */
.stats-container {
  display: flex;
  justify-content: space-around;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  text-align: center;
  position: relative;
  transition: filter 0.3s ease;
}
.stats-container.loading { filter: blur(2px); }

.stats-container-wrapper { position: relative; }

.stats-loader-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.stats-spinner-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,0.5);
  z-index: 10;
  border-radius: 10px;
}

.stat { text-align: center; }
.stat h3 {
  font-size: 30px;
  font-weight: bold;
  color: #0056b3;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}
.stat h3:hover { color: #ffcc00; }
.stat h4 { margin: 0; color: #0056b3; font-size: 22px; font-weight: bold; }
.stat p { margin: 5px 0 0; color: #555; font-size: 14px; }

/* ----- Spinner ----- */
.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #002c5f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ----- Filters container ----- */
.filters-container {
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  padding-top: 10px;
}

.filter-input {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-input label { font-weight: bold; font-size: 16px; }
.filter-input input,
.filter-input select {
  width: 90%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  font-size: 14px;
}
.filter-input input:focus,
.filter-input select:focus { border-color: #007bff; outline: none; background: #fff; }

.filter-input-text {
  flex: 1 1 200px;
  min-width: 200px;
}
.filter-input-text input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  font-size: 14px;
}

.filter-input-checkbox {
  flex: 1 1 150px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 30px;
}
.filter-input-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid #0056b3;
  border-radius: 4px;
  transition: background-color 0.2s, border-color 0.2s;
  cursor: pointer;
  background-color: white;
  margin-right: 8px;
  vertical-align: middle;
}
.filter-input-checkbox input[type="checkbox"]:checked {
  background-color: #0056b3;
  border-color: #0056b3;
}
.filter-input-checkbox input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.filter-input-checkbox label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* Multi-select chip inputs */
.filter-input-multi {
  display: flex;
  flex-direction: column;
  flex: 1 1 180px;
  max-width: 220px;
}
.filter-input-multi label,
.filter-input label { margin-bottom: 4px; font-weight: 600; font-size: 14px; }

.multi-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  min-height: 40px;
  align-items: center;
  cursor: text;
  transition: border-color .2s, box-shadow .2s;
}
.multi-container:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}
.multi-container input {
  border: none;
  outline: none;
  font-size: 14px;
  padding: 2px 4px;
  background: transparent;
  flex: 1 1 120px;
  min-width: 100px;
}
.multi-container input::placeholder { color: #9ca3af; font-style: italic; }
.multi-chip {
  display: inline-flex;
  align-items: center;
  background: #e0f2ff;
  color: #004880;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 13px;
  white-space: nowrap;
}
.multi-chip .remove { margin-left: 4px; cursor: pointer; font-weight: 700; }

.penalty-own-goal-container {
  display: flex;
  align-items: center;
  gap: 30px;
  justify-content: flex-start;
  padding-top: 10px;
}
.penalty-own-goal-container label {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: bold;
  gap: 8px;
  cursor: pointer;
  line-height: 1.2;
}

/* Utility input classes */
.input-text {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #f9fafb;
  font-size: 14px;
}
.checkbox-input { width: 18px; height: 18px; margin-right: 8px; }

/* ----- Reset button ----- */
.reset-button-container { text-align: center; margin-top: 15px; }

/* ----- Utility helpers ----- */
.d-none          { display: none; }
.form-inline     { display: inline; }
.main-content--full { max-width: 100%; }

/* Search/filter bar row used on players, teams, etc. pages */
.search-bar-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.search-bar-row input[type="text"],
.search-bar-row select {
  flex: 1;
  padding: 8px;
  font-size: 16px;
  min-width: 200px;
}
.reset-button {
  background: #dc3545;
  color: white;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}
.reset-button:hover { background: #c82333; }

/* ----- Filter bubbles ----- */
.applied-filters { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.filter-bubble {
  background-color: #007bff;
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.filter-bubble span { margin-left: 8px; font-weight: bold; font-size: 16px; }
.filter-bubble.removing { opacity: 0; transform: scale(0.8); }

/* ----- DataTable ----- */
.dataTable-container { overflow-x: auto; }

table.dataTable {
  width: 100%;
  min-width: 1000px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
table.dataTable thead th {
  background: #0056b3;
  color: white;
  text-align: center !important;
  padding: 12px;
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}
table.dataTable tbody td {
  text-align: center;
  padding: 12px;
  font-size: 15px;
  color: #333;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
}
table.dataTable tbody tr:nth-child(even) { background-color: #f4f7fc; }
table.dataTable tbody tr:hover { background-color: #dde5ff; }
#matchesTable thead th { text-align: center; }

.dataTables_wrapper .dataTables_length { margin-bottom: 10px; }
.dataTables_processing { display: none !important; }

.table-container-wrapper { position: relative; margin-top: 20px; }
.table-container-wrapper.loading-blur .dataTable-container {
  filter: blur(2px);
  pointer-events: none;
  opacity: 0.6;
}

.table-loader {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.6);
  z-index: 10;
  justify-content: center;
  align-items: center;
}

.datatable-loader { text-align: center; font-size: 16px; color: #002c5f; padding: 20px; }

/* Matches expand/collapse control */
td.details-control {
  cursor: pointer;
  width: 32px;
  position: relative;
  background: no-repeat center center;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxOCcgaGVpZ2h0PScxOCcgdmlld0JveD0nMCAwIDI0IDI0Jz48Y2lyY2xlIGN4PScxMicgY3k9JzEyJyByPScxMCcgZmlsbD0nI2ZmZicgc3Ryb2tlPScjOWNhM2FmJy8+PHBhdGggZD0nTTEyIDd2MTBNNyAxMmgxMCcgc3Ryb2tlPScjNmI3MjgwJyBzdHJva2Utd2lkdGg9JzInIHN0cm9rZS1saW5lY2FwPSdyb3VuZCcvPjwvc3ZnPg==');
}
tr.shown td.details-control {
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxOCcgaGVpZ2h0PScxOCcgdmlld0JveD0nMCAwIDI0IDI0Jz48Y2lyY2xlIGN4PScxMicgY3k9JzEyJyByPScxMCcgZmlsbD0nI2ZmZicgc3Ryb2tlPScjOWNhM2FmJy8+PHBhdGggZD0nTTcgMTJoMTAnIHN0cm9rZT0nIzZiNzI4MCcgc3Ryb2tlLXdpZHRoPScyJyBzdHJva2UtbGluZWNhcD0ncm91bmQnLz48L3N2Zz4=');
}
#teamMatchesTable td.dtr-control::before,
#matchesTable td.dtr-control::before { display: none !important; }

/* Match detail panels */
.details-wrap {
  position: relative;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  margin: 10px 40px;
  font-size: 14px;
}
.meta-bar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin-bottom: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.chip .lbl { color: #6b7280; font-weight: 600; }
.chip .val { color: #111827; font-weight: 700; }
.chip.score { background: #111827; color: #fff; border-color: #111827; }
.chip.score .val { color: #fff; }
.meta-toggle {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
}
.meta-more { display: none; gap: 10px 12px; flex-wrap: wrap; margin-top: 8px; }
.meta-more.show { display: flex; }
.goals-header {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: center;
  margin: 6px 0 12px;
  font-weight: 800;
  color: #374151;
}
.goals-header .home { text-align: left; }
.goals-header .away { text-align: right; }

/* Goal timeline */
.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0; bottom: 0;
  width: 2px;
  background: #cbd5e1;
  pointer-events: none;
}
.timeline-row {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: stretch;
  column-gap: 14px;
  position: relative;
}
.timeline-row + .timeline-row { margin-top: 10px; }
.tl-side { display: flex; }
.tl-left { justify-content: flex-end; }
.tl-right { justify-content: flex-start; }
.tl-minute { display: flex; align-items: center; justify-content: center; }
.goal-minute {
  display: inline-block;
  background: #0f172a;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 6px 10px;
  min-width: 46px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,.06);
}
.tl-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
  line-height: 1.25;
  box-shadow: 0 2px 6px rgba(0,0,0,.03);
  max-width: 560px;
}
.card-home { border-left: 4px solid #2563eb; }
.card-away { border-right: 4px solid #ef4444; }
.card-pen  { box-shadow: inset 0 0 0 2px rgba(16,185,129,.25); }
.tl-item .who { font-weight: 700; color: #111827; }
.tl-item .meta { color: #6b7280; font-size: 12px; margin-top: 3px; }
.badges { margin-left: 8px; }
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #f59e0b;
}
.badge.pen { background: #ecfdf5; color: #065f46; border-color: #10b981; }
.badge.og  { background: #fff7ed; color: #9a3412; border-color: #f97316; }
.tl-score  { margin-top: 6px; font-size: 12px; color: #374151; }
.no-goals  { text-align: center; color: #6b7280; padding: 10px 0 2px; }

/* ----- Country group sidebar (goals_script.php) ----- */
.country-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.country-checkbox { margin-right: 6px; }
.country-header .country-name { flex-grow: 1; }
.toggle-icon { margin-left: 10px; transition: transform 0.3s; }

/* ----- Filter summary text ----- */
/* Applied filters chip row */
.applied-filters-text {
  display: none;   /* hidden when empty */
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 18px 2px;
}
.applied-filters-text--visible {
  display: flex;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.filter-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: #c7d2fe;
  color: #3730a3;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.filter-chip-remove:hover {
  background: #818cf8;
  color: #fff;
}

/* ----- Links ----- */
.team-link { color: #007bff; cursor: pointer; text-decoration: underline; }
.team-link:hover { color: #0056b3; }
.season-link {
  background: #f5f5f5;
  border: 1px solid #ccc;
  color: #333;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.season-link:hover { background: #e0e0e0; border-color: #999; }

.country-name { padding: 8px 10px; border-radius: 6px; margin-bottom: 5px; }
.organization-entry { margin-left: 20px; margin-bottom: 3px; }

/* ----- Hero section ----- */
.hero {
  position: relative;
  width: 100%;
  height: 90vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}
.hero video {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  z-index: 2;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}
.hero-overlay h1 {
  font-size: 48px;
  color: #fff;
  margin-bottom: 15px;
  text-transform: uppercase;
}
.hero-overlay p { font-size: 20px; color: #f2f2f2; margin-bottom: 25px; max-width: 700px; }

/* ── Hero Search Bar ─────────────────────────────────────────────────────── */
.hero-search {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 28px;
}
.hero-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.hero-search-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
  flex-shrink: 0;
}
.hero-search-input {
  width: 100%;
  padding: 15px 20px 15px 48px;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.95);
  color: #1e2a3a;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  outline: none;
  box-sizing: border-box;
  transition: background .15s, box-shadow .15s;
}
.hero-search-input:focus {
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3), 0 0 0 3px rgba(0,86,179,0.35);
}
.hero-search-input::placeholder { color: #94a3b8; }

/* Dropdown — rendered on <body> as a fixed portal */
.hero-search-dropdown {
  position: fixed;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.26);
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 9999;
  text-align: left;
}
/* Fade only when content genuinely overflows */
.hero-search-dropdown.has-overflow {
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 36px), transparent 100%);
          mask-image: linear-gradient(to bottom, black calc(100% - 36px), transparent 100%);
}
.hs-section {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.hs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .12s;
  font-size: 14px;
  color: #1e2a3a;
}
.hs-item:hover,
.hs-item--active { background: #eff6ff; }
.hs-item-icon { font-size: 16px; flex-shrink: 0; }
.hs-item-photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #e2e8f0; }
.hs-item-name { font-weight: 500; }

.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-buttons .btn {
  background: #ffcc00;
  color: black;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}
.hero-buttons .btn:hover { background: #ffdd44; }

/* ----- Landing page sections ----- */
.landing-container { font-family: Arial, sans-serif; }

.stats-section,
.features-section { text-align: center; max-width: 1200px; margin: 20px auto; padding: 20px; }
.features-section { background-color: #f5f5f5; padding: 40px 20px; }

.stats { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; }

.features {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.feature {
  flex: 1;
  min-width: 200px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.feature h3 { font-size: 20px; color: #0056b3; margin-bottom: 10px; }
.feature p  { font-size: 14px; color: #555; }

.explore-by-section { background: #fff; padding: 50px 20px; text-align: center; }
.explore-by-section h2 { font-size: 28px; margin-bottom: 25px; color: #003f7f; }
.explore-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.explore-box {
  background: #0056b3;
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.explore-box:hover { background: #003f7f; }

.featured-highlight { background: #eef1f7; padding: 60px 20px; text-align: center; }
.featured-highlight h2 { font-size: 26px; color: #0056b3; margin-bottom: 15px; }
.featured-highlight p  { font-size: 16px; color: #555; }

.recent-updates-section { background-color: #f5f5f5; padding: 40px 20px; text-align: center; }
.recent-updates-section h2 { font-size: 2em; margin-bottom: 30px; color: #333; }
.updates-container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.updates-column {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 20px;
  min-width: 300px;
  max-width: 550px;
  text-align: left;
}
.updates-column h3 { font-size: 1.3em; margin-top: 0; margin-bottom: 15px; color: #444; }
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
}

/* ----- Player / Team grid cards ----- */
.player-grid,
.team-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

@media (max-width: 1200px) {
  .player-grid, .team-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 960px) {
  .player-grid, .team-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 680px) {
  .player-grid, .team-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 440px) {
  .player-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
}

.player-card,
.team-card {
  text-align: center;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.player-card:hover,
.team-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.14); }

/* ── Photo wrapper — fixed height + zoom on hover ── */
.player-photo-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
}
.player-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.player-card:hover .player-photo-wrap img,
.team-card:hover   .player-photo-wrap img { transform: scale(1.06); }

/* ── Name below photo ── */
/* Player photos — crop to fill */
.player-card img { width: 100%; height: 160px; object-fit: cover; }

/* Team logos — show whole crest, centred, with breathing room */
.team-card img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: contain;
  object-position: center;
  padding: 14px 18px;
  box-sizing: border-box;
  background: #fff;
  transition: transform 0.35s ease;
}
.team-card:hover img { transform: scale(1.06); }

.player-name,
.team-name {
  padding: 8px 8px 10px;
  font-weight: 600;
  font-size: 13px;
  color: #002c5f;
  line-height: 1.3;
  word-wrap: break-word;
}

/* Old circle flag — kept for any legacy uses */
.player-flag {
  position: absolute;
  top: -10px; left: -10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 2px rgba(0,0,0,0.2);
  background-color: white;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-flag-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── New rectangular flag badge ── */
.player-flag-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.93);
  border-radius: 4px;
  padding: 2px 5px 2px 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  pointer-events: none;   /* clicks fall through to the card */
  max-width: calc(100% - 14px);
}
.player-flag-rect {
  width: 22px;
  height: 15px;              /* 22×15 ≈ 3:2 — standard flag ratio */
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  border: 0.5px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.player-flag-code {
  font-size: 9px;
  font-weight: 700;
  color: #444;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
}

/* ── Players meta line (showing X–Y of N) ── */
.players-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  min-height: 18px;
}

/* ----- Pagination ----- */
.pagination-container {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.pagination-container button {
  padding: 5px 10px;
  border: 1px solid #aaa;
  background-color: #f9f9f9;
  cursor: pointer;
  border-radius: 5px;
}
.pagination-container button.active {
  background-color: #000416;
  color: white;
  font-weight: bold;
  border: 1px solid #002c5f;
}
.pagination-container span { padding: 5px 10px; color: #888; }
.pagination-hint {
  display: block;
  width: 100%;
  text-align: center;
  color: #bbb;
  font-size: 0.72em;
  margin-top: 10px;
  letter-spacing: 0.03em;
  pointer-events: none;
}

/* ----- Entry animation ----- */
.animate-entry { animation: fadeInUp 0.4s ease both; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----- Organizations page ----- */
.organizations-page {
  padding: 10px 20px;
  max-width: 1400px;
  margin: 0 auto;
  background-image: url('/assets/images/bg.png');
}
.country-block {
  margin-bottom: 10px;
  background: whitesmoke;
  border-radius: 20px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  padding: 20px;
}
.country-title {
  font-size: 26px;
  color: #003f7f;
  margin-top: 0;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}
.flag-icon { width: 24px; height: auto; margin-right: 10px; vertical-align: middle; }
.organization-list { display: flex; flex-wrap: wrap; gap: 20px; }
.organization-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px 20px;
  min-width: 220px;
  max-width: 300px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}
.organization-box:hover { transform: translateY(-5px); }
.organization-link {
  font-size: 16px;
  font-weight: bold;
  color: #0056b3;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}
.organization-link:hover { text-decoration: underline; }
.org-logo-large {
  width: 34px; height: 34px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.seasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ----- Goal / Match feed items (recent lists) ----- */
.goal-item,
.match-item { font-family: Arial, sans-serif; margin-bottom: 15px; list-style: none; }

.goal-info,
.match-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 0.9em;
  color: #555;
  justify-content: center;
  text-align: center;
}
.goal-info .info-item,
.match-info .info-item { background-color: #e9e9e9; padding: 4px 8px; border-radius: 4px; }

.goal-teams,
.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 5px;
}
.goal-teams .team-name.left,
.match-teams .team-name:first-child { text-align: right; }
.goal-teams .team-name.right,
.match-teams .team-name:last-child  { text-align: left; }

.goal-teams .badge,
.match-teams .badge {
  background-color: #FFEB3B;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  color: #000;
  text-align: center;
  min-width: 50px;
}

.goal-scorer { font-size: 0.9em; color: #333; text-align: center; }
.match-extra-line { margin-top: 5px; height: 20px; }

/* ----- Contact page ----- */
.contact-section { background-color: #fff; padding: 60px 20px; }
.contact-card {
  background: #fff;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 40px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: left;
}
.contact-card h2 { margin-top: 0; font-size: 2em; color: #222; text-align: center; }
.contact-card .subtitle { text-align: center; color: #555; margin-bottom: 30px; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; font-weight: 600; color: #333; margin-bottom: 6px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: #333;
  background: #fff;
  transition: border-color .2s;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: #007bff; }
.form-buttons { display: flex; justify-content: flex-end; gap: 12px; margin-top: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  border-radius: 4px;
  padding: 10px 18px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
  border: none;
}
.btn-reset    { background-color: #e53e3e; color: #fff; }
.btn-reset:hover { background-color: #c53030; }
.btn-primary  { background-color: #007bff; color: #fff; }
.btn-primary:hover { background-color: #0056b3; }

.error-msg { color: #c53030; margin-top: 4px; font-size: 0.875rem; }
.toast {
  position: fixed;
  bottom: 20px; right: 20px;
  max-width: 300px;
  padding: 14px 20px;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1000;
}
.toast.success { background-color: #38a169; }
.toast.error   { background-color: #e53e3e; }

/* ----- Footer ----- */
.footer-section {
  background-color: #000416;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 50px 60px;
  gap: 40px;
  font-family: Arial, sans-serif;
}
.footer-section-column { flex: 1 1 200px; min-width: 180px; }
.footer-section-logo-column { max-width: 300px; text-align: center; }
.footer-section-logo { width: 240px; display: block; margin: 0 auto 12px; }
.footer-section-description { font-size: 14px; color: #ccc; line-height: 1.5; }
.footer-heading {
  font-size: 16px;
  margin-bottom: 14px;
  margin-top: 0;
  color: #fff;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #ccc; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 768px) {
  .footer-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
  }
  .footer-section-column { min-width: auto; }
  .footer-section-logo { width: 200px; margin: 0 auto 14px; }
  .footer-links li { margin-bottom: 10px; }
  .stats { flex-direction: column; align-items: center; }
  .features { flex-direction: column; align-items: center; }
}

/* =============================================================
   AUTH — Header bar (Sign In / Join Free / user chip)
   ============================================================= */
.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.auth-bar-link {
  color: #003f7f;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-bar-link:hover { color: #0066cc; text-decoration: underline; }

.auth-bar-btn {
  display: inline-block;
  padding: 6px 16px;
  background: #003f7f;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.auth-bar-btn:hover { background: #0055aa; }
.auth-bar-btn--logout {
  background: transparent;
  color: #666;
  border: 1px solid #ccc;
  font-weight: 400;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1;
}
.auth-bar-btn--logout:hover { background: #f5f5f5; color: #c00; border-color: #999; }

.auth-bar-btn--upgrade {
  background: #1a7a4a;
}
.auth-bar-btn--upgrade:hover { background: #148040; }

.auth-bar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
  min-width: 0;
}
.auth-bar-user:hover { opacity: 0.8; }

.auth-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #003f7f;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.auth-username {
  display: none;
}

/* Tier badges */
.tier-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tier-badge--free    { background: #e0e0e0; color: #555; }
.tier-badge--fan     { background: #d4edda; color: #155724; }
.tier-badge--pro     { background: #cce5ff; color: #004085; }
.tier-badge--admin   { background: #f8d7da; color: #721c24; }

/* =============================================================
   AUTH — Standalone pages (login, register, forgot password)
   ============================================================= */
.auth-body {
  background: #eef1f7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-back-link {
  display: inline-block;
  padding: 12px 20px;
  font-size: 14px;
  color: #003f7f;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.auth-back-link:hover { color: #0066cc; text-decoration: underline; }

.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 36px 40px 32px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 20px;
}
.auth-logo img {
  height: 54px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
  text-align: center;
}

.auth-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 22px;
  text-align: center;
}

/* Alerts */
.auth-alert {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.auth-alert--error   { background: #fff0f0; border: 1px solid #f5c6cb; color: #721c24; }
.auth-alert--info    { background: #e8f4fd; border: 1px solid #bee5eb; color: #0c5460; }
.auth-alert--warning { background: #fff8e1; border: 1px solid #ffe082; color: #856404; }
.auth-alert--ok      { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }

/* Fields */
.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 5px;
}
.auth-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 15px;
  color: #333;
  background: #fafafa;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input:focus {
  outline: none;
  border-color: #003f7f;
  box-shadow: 0 0 0 3px rgba(0,63,127,0.1);
  background: #fff;
}

/* Row inside a field (label + forgot link) */
.auth-field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}
.auth-field-row label { margin-bottom: 0; }
.auth-field-link {
  font-size: 12px;
  color: #003f7f;
  text-decoration: none;
}
.auth-field-link:hover { text-decoration: underline; }

/* Checkbox row */
.auth-checkbox {
  margin-bottom: 18px;
}
.auth-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}
.auth-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.auth-link { color: #003f7f; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

/* Submit button */
.auth-submit {
  width: 100%;
  padding: 11px;
  background: #003f7f;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 6px;
}
.auth-submit:hover { background: #0055aa; }

/* Footer link row */
.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #666;
}
.auth-footer a { color: #003f7f; text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* Responsive */

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 24px; }
  .header-right { gap: 12px; }
  .auth-bar { gap: 6px; }
}

/* =============================================================
   TIER GATE — data access restriction UI
   ============================================================= */

/* Container modifier: hide sidebar, let main content go full-width */
.container--no-sidebar .filters-side  { display: none !important; }
.container--no-sidebar .main-content  { max-width: 100%; }

/* Notice bar (below page title, above stats/table) */
.tier-notice-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  color: #5d4037;
  margin-bottom: 16px;
}
.tier-notice-bar strong { color: #4e342e; }
.tier-notice-link {
  color: #003f7f;
  font-weight: 600;
  text-decoration: none;
}
.tier-notice-link:hover { text-decoration: underline; }
.tier-notice-cta {
  display: inline-block;
  padding: 5px 14px;
  background: #003f7f;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
  margin-left: auto;
}
.tier-notice-cta:hover { background: #0055aa; }

/* Gate notice (replaces filter inputs) */
.tier-gate-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #f8f9fa;
  border: 1px dashed #ccc;
  border-radius: 8px;
  margin-bottom: 16px;
}
.tier-gate-icon { font-size: 22px; flex-shrink: 0; }
.tier-gate-text { flex: 1; min-width: 0; }
.tier-gate-text strong { display: block; font-size: 14px; color: #333; margin-bottom: 2px; }
.tier-gate-text span  { font-size: 13px; color: #666; }
.tier-gate-cta {
  display: inline-block;
  padding: 7px 16px;
  background: #003f7f;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 5px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.tier-gate-cta:hover { background: #0055aa; }

@media (max-width: 600px) {
  .tier-gate-notice { flex-direction: column; align-items: flex-start; }
  .tier-notice-cta  { margin-left: 0; }
}

/* =============================================================
   CSV EXPORT — Pro-tier download button
   ============================================================= */
.export-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: #1a7a4a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.export-btn:hover { background: #145e39; }
.export-btn svg   { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }

/* =============================================================
   UPGRADE / PRICING PAGE
   ============================================================= */
.upgrade-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

.upgrade-flash {
  padding: 14px 18px;
  border-radius: 7px;
  font-size: 15px;
  margin-bottom: 24px;
}
.upgrade-flash--ok   { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.upgrade-flash--info { background: #e8f4fd; border: 1px solid #bee5eb; color: #0c5460; }

.upgrade-hero {
  text-align: center;
  padding: 20px 0 28px;
}
.upgrade-hero h1 { font-size: 28px; color: #1a1a2e; margin: 0 0 8px; }
.upgrade-hero p  { font-size: 16px; color: #555; margin: 0; }

.upgrade-free-note {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 7px;
  padding: 14px 18px;
  font-size: 13px;
  color: #555;
  margin-bottom: 32px;
  line-height: 1.7;
}
.upgrade-inline-link { color: #003f7f; font-weight: 600; text-decoration: none; margin-left: 6px; }
.upgrade-inline-link:hover { text-decoration: underline; }

.upgrade-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.upgrade-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.08);
  padding: 0 0 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.upgrade-card--highlight {
  box-shadow: 0 6px 28px rgba(0,63,127,0.18);
}

.upgrade-popular {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #003f7f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.upgrade-card-header {
  padding: 22px 24px 16px;
}
.upgrade-card-header h2 { font-size: 22px; color: #1a1a2e; margin: 8px 0 4px; }
.upgrade-card-header p  { font-size: 14px; color: #666; margin: 0; }

.upgrade-features {
  list-style: none;
  padding: 0 24px;
  margin: 0 0 20px;
}
.upgrade-features li {
  font-size: 14px;
  color: #444;
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
}
.upgrade-features li:last-child { border: none; }

.upgrade-plan-options {
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.upgrade-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8f9fa;
  border-radius: 7px;
  padding: 10px 14px;
}
.upgrade-plan-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.upgrade-plan-info strong { font-size: 14px; color: #333; }
.upgrade-plan-price { font-size: 15px; font-weight: 700; color: #1a1a2e; }

.upgrade-save-badge {
  background: #d4edda;
  color: #155724;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
}

.upgrade-btn {
  display: inline-block;
  padding: 8px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.2s;
  flex-shrink: 0;
}
.upgrade-btn:hover { filter: brightness(1.15); }
.upgrade-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.upgrade-current-badge {
  font-size: 12px;
  font-weight: 700;
  color: #155724;
  background: #d4edda;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.upgrade-no-plans { padding: 0 24px; font-size: 14px; color: #888; }

.upgrade-footer-note {
  text-align: center;
  font-size: 13px;
  color: #888;
  line-height: 1.7;
}
.upgrade-footer-note a { color: #003f7f; text-decoration: none; }
.upgrade-footer-note a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .upgrade-card--highlight { transform: none; }
  .upgrade-plan-row { flex-direction: column; align-items: flex-start; }
}

/* ── AI Assistant spotlight ── */
.ai-spotlight {
  max-width: 900px;
  margin: 48px auto 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #001f4d 0%, #003f7f 60%, #0057b3 100%);
  padding: 40px 40px 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,31,77,0.22);
}
.ai-spotlight::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.ai-spotlight-badge {
  display: inline-block;
  background: #f0c040;
  color: #1a1a00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.ai-spotlight-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}
.ai-spotlight-icon { font-size: 36px; margin-bottom: 10px; }
.ai-spotlight-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.25;
}
.ai-spotlight-desc {
  font-size: 14px;
  color: #b8cfe8;
  line-height: 1.65;
  margin: 0 0 18px;
}
.ai-spotlight-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-spotlight-list li {
  font-size: 13px;
  color: #d0e4f7;
  line-height: 1.4;
}
.ai-spotlight-list li strong { color: #fff; }
.ai-spotlight-cta {
  display: inline-block;
  background: #f0c040;
  color: #001f4d;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.ai-spotlight-cta:hover { background: #ffd555; transform: translateY(-2px); }

/* Mock chat window */
.ai-chat-demo {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.ai-chat-demo-header {
  background: linear-gradient(135deg, #1e2a3a, #2c3e50);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-chat-demo-dot {
  width: 8px; height: 8px;
  background: #e74c3c;
  border-radius: 50%;
  display: inline-block;
}
.ai-chat-demo-body {
  padding: 14px 12px;
  background: #f7f8fa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-demo-msg {
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 11px;
  border-radius: 10px;
  max-width: 90%;
}
.ai-demo-user {
  align-self: flex-end;
  background: #e74c3c;
  color: #fff;
  border-bottom-right-radius: 3px;
}
.ai-demo-bot {
  align-self: flex-start;
  background: #fff;
  color: #333;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-bottom-left-radius: 3px;
}
.ai-demo-btn {
  display: inline-block;
  margin-top: 5px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 5px;
}

@media (max-width: 760px) {
  .ai-spotlight { padding: 28px 20px 24px; }
  .ai-spotlight-inner { grid-template-columns: 1fr; }
  .ai-spotlight-right { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   ACCOUNT / SETTINGS PAGE
   ═══════════════════════════════════════════════════════════════ */

.account-page {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 16px 60px;
}

/* Flash / alert banner */
.account-flash {
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}
.account-flash--ok    { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.account-flash--error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.account-flash--info  { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Email verification banner */
.account-verify-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 20px;
}
.account-verify-btn {
  padding: 6px 14px;
  background: #856404;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.account-verify-btn:hover { background: #6d5204; }
.account-verify-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.account-verify-status { font-size: 13px; }
.account-verify-status--ok    { color: #155724; }
.account-verify-status--error { color: #721c24; }

/* Grid layout */
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 700px) {
  .account-grid { grid-template-columns: 1fr; }
}

/* Section card */
.account-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}
.account-section:last-child { margin-bottom: 0; }
.account-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}

/* Avatar */
.account-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.account-avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #003f7f;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.account-avatar-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.account-avatar-meta strong { font-size: 15px; color: #1a1a2e; }
.account-avatar-meta span   { font-size: 13px; color: #666; }

/* Form fields */
.account-form { display: flex; flex-direction: column; gap: 16px; }
.account-field { display: flex; flex-direction: column; gap: 5px; }
.account-field label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}
.account-field input[type="text"],
.account-field input[type="email"],
.account-field input[type="password"] {
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  color: #1a1a2e;
  transition: border-color 0.2s;
}
.account-field input:focus {
  outline: none;
  border-color: #003f7f;
  box-shadow: 0 0 0 3px rgba(0,63,127,0.1);
}
.account-field small { font-size: 12px; color: #888; }

.account-email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-email-val    { font-size: 14px; color: #333; }
.account-verified-badge {
  font-size: 12px;
  font-weight: 700;
  color: #155724;
  background: #d4edda;
  padding: 2px 8px;
  border-radius: 10px;
}
.account-unverified-badge {
  font-size: 12px;
  font-weight: 700;
  color: #856404;
  background: #fff3cd;
  padding: 2px 8px;
  border-radius: 10px;
}
.account-static { font-size: 14px; color: #555; }

/* Buttons */
.account-actions { margin-top: 4px; }
.account-btn {
  display: inline-block;
  padding: 9px 20px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, opacity 0.2s;
  line-height: 1;
}
.account-btn--primary {
  background: #003f7f;
  color: #fff;
}
.account-btn--primary:hover { background: #0055aa; }
.account-btn--upgrade {
  background: #1a7a4a;
  color: #fff;
  display: inline-block;
}
.account-btn--upgrade:hover { background: #148040; }
.account-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* Plan card */
.account-plan-card {
  border: 1px solid #e0e0e0;
  border-radius: 7px;
  padding: 16px;
  margin-bottom: 20px;
  background: #f9f9fb;
}
.account-plan-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.account-plan-name { font-size: 15px; color: #1a1a2e; }
.account-plan-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 13px;
  margin: 0 0 14px;
}
.account-plan-details dt { color: #888; font-weight: 600; }
.account-plan-details dd { color: #333; margin: 0; }
.account-plan-note { font-size: 13px; color: #666; margin: 0 0 14px; line-height: 1.5; }
.account-portal-note { font-size: 12px; color: #888; margin: 8px 0 0; }

.account-sub-status { text-transform: capitalize; }
.account-sub-status--active   { color: #155724; font-weight: 700; }
.account-sub-status--trialing { color: #0c5460; font-weight: 700; }
.account-sub-status--past_due { color: #856404; font-weight: 700; }
.account-sub-status--canceled { color: #721c24; font-weight: 700; }

/* Plan comparison table */
.account-plan-compare h3 {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.account-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.account-plan-table th,
.account-plan-table td {
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid #eee;
}
.account-plan-table th:first-child,
.account-plan-table td:first-child {
  text-align: left;
  color: #444;
}
.account-plan-table thead th {
  font-weight: 700;
  color: #333;
  background: #f0f0f5;
}

/* ── Ad Slots ─────────────────────────────────────────────────────────────── */
.promo-slot {
  width: 100%;
  max-width: 970px;
  margin: 18px auto;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
}
.promo-slot--paid {
  background: transparent;
  line-height: 0;
}
.promo-slot--paid a { display: block; line-height: 0; }
.promo-slot--paid img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin: 0 auto;
}
.promo-slot--adsense {
  background: #f8f9fa;
  border: 1px dashed #dee2e6;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-label {
  display: block;
  text-align: right;
  font-size: 9px;
  color: #aaa;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  line-height: 1;
  margin-bottom: 3px;
}
/* Spans full grid width when inserted mid-grid */
.promo-slot--mid {
  grid-column: 1 / -1;
  max-width: none;
  margin: 4px 0 16px;
}

/* ── Explore Statistics Modal ────────────────────────────────────────────── */
.explore-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.explore-modal-overlay.open { display: flex; }

.explore-modal {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px 36px;
  max-width: 580px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  animation: exploreModalIn .2s ease;
}
@keyframes exploreModalIn {
  from { opacity: 0; transform: translateY(-14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.explore-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.explore-modal-close:hover { color: #1e2a3a; background: #f1f5f9; }

.explore-modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0056b3;
  margin: 0 0 8px;
}
.explore-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #1e2a3a;
  margin: 0 0 28px;
}

.explore-back {
  background: none;
  border: none;
  color: #0056b3;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.explore-back:hover { text-decoration: underline; }

/* Tile grids */
.explore-tiles { display: grid; gap: 14px; }
.explore-tiles--two   { grid-template-columns: 1fr 1fr; }
.explore-tiles--three { grid-template-columns: repeat(3, 1fr); }
.explore-tiles--four  { grid-template-columns: 1fr 1fr; }

/* Individual tile */
.explore-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 16px 22px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
  text-align: center;
  font-family: Arial, sans-serif;
}
.explore-tile:hover {
  border-color: #0056b3;
  background: #eff6ff;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 86, 179, .14);
}
.explore-tile-icon  { font-size: 34px; line-height: 1; }
.explore-tile-label { font-size: 16px; font-weight: 700; color: #1e2a3a; }
.explore-tile-desc  { font-size: 12px; color: #64748b; line-height: 1.4; }

@media (max-width: 480px) {
  .explore-modal { padding: 28px 20px 24px; }
  .explore-tiles--two,
  .explore-tiles--three,
  .explore-tiles--four { grid-template-columns: 1fr 1fr; }
  .explore-tile { padding: 18px 10px 16px; }
  .explore-tile-icon { font-size: 28px; }
}

/* ── Favourites ──────────────────────────────────────────────────────────── */

/* Page title row — title + heart side by side */
.page-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.page-title-row h3 { margin: 0; }

/* Table card header — 3-column grid: [name+❤️] [goals] [Compare] */
.table-card-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
}
.table-card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  justify-self: start;
}
.player-header-name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
}
.table-card-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  justify-self: center;
  text-align: center;
}
.goals-total-count {
  font-size: 15px;
  font-weight: 700;
  color: #0056b3;
  white-space: nowrap;
}
.goals-total-count #totalGoals {
  font-size: 18px;
}
.filtered-goals-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff3cd;
  border: 1px solid #f0c040;
  color: #92600a;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.filtered-goals-badge #filteredGoals {
  font-size: 13px;
  font-weight: 800;
}
.goals-top-scorer {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}
.table-card-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Heart button on detail pages */
.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: color .18s, transform .15s;
  flex-shrink: 0;
  text-decoration: none;
  padding: 0;
}
.fav-btn svg { width: 22px; height: 22px; }
.fav-btn:hover { color: #e11d48; background: transparent; transform: scale(1.18); }
.fav-btn--saved { color: #e11d48; }
.fav-btn--guest { opacity: .45; }
.fav-btn--guest:hover { opacity: .7; transform: none; }

/* Header favourites nav */
.fav-nav { position: relative; }
.fav-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: 6px;
  border-radius: 8px;
  position: relative;
  transition: color .15s, background .15s;
}
.fav-nav-btn:hover { color: #e11d48; background: #fff1f2; }
.fav-nav-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #e11d48;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid #fff;
  pointer-events: none;
  line-height: 1;
}
.fav-nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16);
  z-index: 500;
  overflow: hidden;
}
.fav-nav-header {
  padding: 12px 16px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e2a3a;
  border-bottom: 1px solid #f1f5f9;
}
.fav-nav-section {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.fav-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: #1e2a3a;
  text-decoration: none;
  overflow: hidden;
  transition: background .12s;
}
.fav-nav-item:hover { background: #f8fafc; }
.fav-nav-empty {
  padding: 16px;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  margin: 0;
  line-height: 1.5;
}
.fav-nav-footer {
  display: block;
  padding: 10px 16px;
  font-size: 12px;
  color: #0056b3;
  text-decoration: none;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}
.fav-nav-footer:hover { background: #f8fafc; }

/* Account page favourites section */
.fav-account-section { margin-top: 32px; }
.fav-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.fav-account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: #1e2a3a;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, border-color .15s;
  position: relative;
}
.fav-account-card:hover { background: #eff6ff; border-color: #0056b3; }
.fav-account-card-icon { font-size: 18px; flex-shrink: 0; }
.fav-account-card-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #cbd5e1;
  padding: 2px;
  line-height: 1;
  font-size: 16px;
  transition: color .15s;
  flex-shrink: 0;
}
.fav-remove-btn:hover { color: #e11d48; }

/* ── Welcome-back modal ──────────────────────────────────────────────────── */
.wm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,0.55);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.wm-overlay.open { display: flex; }

.wm-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px 28px;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  animation: wmIn .22s ease;
}
@keyframes wmIn {
  from { opacity:0; transform: translateY(-12px) scale(.97); }
  to   { opacity:1; transform: none; }
}
.wm-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none; border: none;
  font-size: 18px; color: #94a3b8;
  cursor: pointer; border-radius: 6px; padding: 4px 6px;
  transition: color .15s, background .15s;
}
.wm-close:hover { color: #1e2a3a; background: #f1f5f9; }
.wm-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #0056b3; margin: 0 0 6px;
}
.wm-title {
  font-size: 24px; font-weight: 800; color: #1e2a3a; margin: 0 0 6px;
}
.wm-subtitle { font-size: 14px; color: #64748b; margin: 0 0 20px; }
.wm-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #94a3b8; margin: 0 0 8px;
}
.wm-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.wm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; background: #f1f5f9; border-radius: 20px;
  font-size: 13px; font-weight: 500; color: #1e2a3a;
  text-decoration: none; transition: background .15s, color .15s;
  white-space: nowrap; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis;
}
.wm-chip:hover { background: #dbeafe; color: #0056b3; }
/* Activity since last login */
.wm-since-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8; margin-bottom: 8px;
}
.wm-activity {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px;
}
.wm-activity-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: #f8fafc; border-radius: 8px;
  text-decoration: none; transition: background .12s;
  border: 1px solid #f1f5f9;
}
.wm-activity-row:hover { background: #eff6ff; border-color: #bfdbfe; }
.wm-activity-icon  { font-size: 16px; flex-shrink: 0; }
.wm-activity-name  { flex: 1; font-size: 13px; font-weight: 600; color: #1e2a3a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-activity-badge {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  white-space: nowrap; flex-shrink: 0;
}
.wm-activity-badge--goal  { background: #dcfce7; color: #166534; }
.wm-activity-badge--match { background: #dbeafe; color: #1e40af; }

.wm-footer {
  border-top: 1px solid #f1f5f9; padding-top: 16px; margin-top: 8px;
}
.wm-disable-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #475569; cursor: pointer;
}
.wm-disable-label input { cursor: pointer; accent-color: #0056b3; }
.wm-hint {
  font-size: 11px; color: #94a3b8; margin: 8px 0 0; line-height: 1.5;
}
.wm-hint a { color: #0056b3; }

/* ── Account preferences ─────────────────────────────────────────────────── */
.account-pref-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 12px 0; flex-wrap: wrap;
}
.account-pref-info { flex: 1; }
.account-pref-label { display: block; font-size: 14px; font-weight: 600; color: #1e2a3a; margin-bottom: 3px; }
.account-pref-desc  { font-size: 13px; color: #64748b; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 24px; cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: #0056b3; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Goal Charts ─────────────────────────────────────────────────────────── */
/* ── Minute range slider ──────────────────────────────────────────────── */
.filter-input--minute {
  flex: 0 1 260px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-input--minute label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.minute-slider-wrap {
  padding: 4px 4px 2px;
  width: 100%;
}
/* Period quick-select buttons */
.minute-period-btns {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.minute-period-btn {
  flex: 1;
  padding: 3px 0;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.minute-period-btn:hover { background: #e0eeff; border-color: #0056b3; color: #0056b3; }
.minute-period-btn.active { background: #0056b3; border-color: #0056b3; color: #fff; }
.minute-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #0056b3;
  margin-top: 6px;
}
/* Override jQuery UI slider to match brand */
.minute-slider-wrap .ui-slider {
  height: 5px;
  background: #e2e8f0;
  border: none;
  border-radius: 4px;
  margin-top: 4px;
}
.minute-slider-wrap .ui-slider .ui-slider-range {
  background: #0056b3;
  border-radius: 4px;
}
.minute-slider-wrap .ui-slider .ui-slider-handle {
  width: 16px;
  height: 16px;
  top: -6px;
  margin-left: -8px;
  background: #fff;
  border: 2px solid #0056b3;
  border-radius: 50%;
  cursor: pointer;
  transition: box-shadow .15s;
}
.minute-slider-wrap .ui-slider .ui-slider-handle:focus,
.minute-slider-wrap .ui-slider .ui-slider-handle:hover {
  box-shadow: 0 0 0 3px rgba(0,86,179,0.2);
  outline: none;
}

/* Data coverage note on homepage */
.stats-coverage-note {
  font-size: 13px;
  color: #64748b;
  margin: -8px 0 20px;
  text-align: center;
}
.stats-coverage-note strong { color: #0056b3; }

/* ── DataTable row-level loading indicator ──────────────────────────────── */
.dt-loading-bar {
  height: 3px;
  background: linear-gradient(90deg, #0056b3 0%, #7ec8f7 50%, #0056b3 100%);
  background-size: 200% 100%;
  animation: dt-bar-slide 1.2s linear infinite;
  width: 100%;
  position: relative;
  z-index: 5;
}
@keyframes dt-bar-slide {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Table card loading overlay ─────────────────────────────────────────── */
.table-card-loading-overlay {
  position: absolute;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 20;
  border-radius: 12px;
}
.table-card-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #0056b3;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.table-card-loading-text {
  font-size: 13px;
  font-weight: 600;
  color: #0056b3;
}

/* ── Unified filters + table card ──────────────────────────────────────── */
.table-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.09);
  overflow: hidden;          /* clips children to rounded corners */
  margin-bottom: 16px;
}
/* Minute slider inside table-card must stay column-oriented */
.table-card .filter-input--minute {
  flex-direction: column !important;
  align-items: flex-start;
  flex: 0 1 260px;
  min-width: 240px;
}
.table-card .filter-input--minute label {
  font-size: 13px;
  font-weight: 600;
}

/* Inside the card, filters lose their own card styling */
.table-card .filters-container {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid #f1f5f9;
  padding: 10px 18px;
}
.table-card .filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 0;
  justify-content: flex-start;
}
/* Opponent Team input — fixed width, no label stacking needed */
.table-card .filter-input {
  flex: 0 1 220px;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.table-card .filter-input label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.table-card .filter-input input {
  width: 160px;
  padding: 7px 10px;
  font-size: 13px;
}
/* Checkboxes — remove top spacer, align inline */
.table-card .filter-input-checkbox {
  padding-top: 0;
  flex: 0 0 auto;
}
/* Reset button inline in the filters row */
.table-card .filters .reset-button {
  margin-left: auto;
  padding: 7px 14px;
  font-size: 13px;
}
/* Table inside card — flush with no extra gap */
.table-card .dataTable-container {
  padding: 0 10px;
}
/* Export bar sits in the card footer */
.export-bar--footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 20px 14px;
  border-top: 1px solid #f1f5f9;
  margin: 0;
}

/* ── Charts upgrade gate (shown to free/fan users) ──────────────────────── */
.charts-upgrade-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  color: #64748b;
  text-align: center;
}
.charts-upgrade-gate svg { opacity: 0.45; }
.charts-upgrade-gate p { margin: 0; font-size: 14px; }
.charts-upgrade-gate p:first-of-type { font-size: 15px; color: #1e293b; }

.charts-toggle-row {
  margin: 8px 0 0;
}
.charts-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.charts-toggle-btn:hover,
.charts-toggle-btn--active {
  background: #dbeafe;
  border-color: #0056b3;
  color: #0056b3;
}
.charts-panel {
  margin-top: 0;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.09);
}
.charts-org-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.charts-filter-note {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
  margin-left: 4px;
}
.charts-org-filter label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.charts-org-filter select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #1e2a3a;
  background: #fff;
  cursor: pointer;
  min-width: 200px;
}
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.chart-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}
.chart-box--full {
  grid-column: 1 / -1;
}
.chart-title {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.chart-wrap {
  position: relative;
  height: 200px;
  overflow-x: auto;
}
.chart-wrap canvas {
  min-width: 100%;
}
.chart-wrap--donut {
  height: 220px;
  overflow-x: visible;
}

@media (max-width: 640px) {
  .charts-grid { grid-template-columns: 1fr; }
  .chart-box--full { grid-column: 1; }
}

/* ── Compare page ────────────────────────────────────────────────────────── */
.cmp-page { max-width: 1100px; margin: 0 auto; padding: 32px 20px 60px; box-sizing: border-box; }
#cmpResults:not([hidden]) { display: flex; flex-direction: column; gap: 24px; }
/* Force both sections to identical width model */
.cmp-stats-grid,
.cmp-charts { width: 100%; box-sizing: border-box; min-width: 0; }

.cmp-header { text-align: center; margin-bottom: 36px; }
.cmp-title  { font-size: 32px; font-weight: 800; color: #1e2a3a; margin: 0 0 8px; }
.cmp-subtitle { font-size: 15px; color: #64748b; margin: 0 0 24px; }

.cmp-type-toggle { display: inline-flex; gap: 8px; margin-bottom: 28px;
  background: #f1f5f9; border-radius: 10px; padding: 4px; }
.cmp-type-btn { padding: 8px 20px; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: #64748b; background: none;
  cursor: pointer; transition: background .15s, color .15s; }
.cmp-type-btn--active { background: #fff; color: #0056b3;
  box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* Search row */
.cmp-search-row { display: flex; align-items: flex-start; gap: 16px;
  justify-content: center; flex-wrap: wrap; }
.cmp-vs { font-size: 22px; font-weight: 900; color: #cbd5e1;
  align-self: center; padding-top: 28px; }
.cmp-search-box { position: relative; width: 300px; }
.cmp-search-label { font-size: 12px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: #94a3b8; margin-bottom: 6px; }
.cmp-search-wrap { position: relative; display: flex; align-items: center; }
.cmp-search-icon { position: absolute; left: 12px; width: 16px; height: 16px;
  color: #94a3b8; pointer-events: none; }
.cmp-search-input { width: 100%; padding: 11px 36px 11px 38px; font-size: 14px;
  border: 2px solid #e2e8f0; border-radius: 10px; outline: none; box-sizing: border-box;
  transition: border-color .15s; background: #fff; }
.cmp-search-input:focus { border-color: #0056b3; }
.cmp-search-input:disabled { background: #f8fafc; color: #64748b; }
.cmp-clear-btn { position: absolute; right: 10px; background: none; border: none;
  font-size: 14px; color: #94a3b8; cursor: pointer; padding: 2px 4px; }
.cmp-clear-btn:hover { color: #e11d48; }

/* Dropdown */
.cmp-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14);
  max-height: 260px; overflow-y: auto; z-index: 200; }
.cmp-dd-item { display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; font-size: 13px; color: #1e2a3a; cursor: pointer;
  transition: background .1s; }
.cmp-dd-item:hover { background: #f1f5f9; }
.cmp-dd-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Selected chip */
.cmp-chip { display: inline-block; margin-top: 8px; padding: 6px 14px;
  border-radius: 20px; font-size: 13px; font-weight: 600; }
.cmp-chip--a { background: #dbeafe; color: #0056b3; }
.cmp-chip--b { background: #ffe4e6; color: #e11d48; }

/* Stats grid */
.cmp-stats-grid { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  overflow: hidden; margin: 0; }
.cmp-names-row { display: grid; grid-template-columns: 1fr 140px 1fr;
  background: #1e2a3a; padding: 16px 20px; }
.cmp-name { font-size: 15px; font-weight: 700; }
.cmp-name--a { color: #93c5fd; text-align: left; }
.cmp-name--b { color: #fca5a5; text-align: right; }
.cmp-name-mid { }
.cmp-stat-row { display: grid; grid-template-columns: 1fr 140px 1fr;
  padding: 14px 20px; border-bottom: 1px solid #f1f5f9; align-items: center; }
.cmp-stat-row:last-child { border-bottom: none; }
.cmp-stat-val { font-size: 18px; font-weight: 700; color: #1e2a3a; }
.cmp-stat-val small { display: block; font-size: 11px; font-weight: 500; color: #94a3b8; }
.cmp-stat-val--a { text-align: left; }
.cmp-stat-val--b { text-align: right; }
.cmp-stat-val--win { color: #0056b3; }
.cmp-stat-val--b.cmp-stat-val--win { color: #e11d48; }
.cmp-stat-label { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8; text-align: center; }

/* Charts — minmax(0,1fr) stops grid cells overflowing their track */
.cmp-charts { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.cmp-chart-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 20px; min-width: 0; overflow: hidden; }
.cmp-chart-box--full { grid-column: 1 / -1; }
.cmp-chart-title { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: #475569; margin: 0 0 14px; }
.cmp-chart-wrap { position: relative; height: 220px; width: 100%; min-width: 0; overflow: hidden; }
.cmp-chart-wrap canvas { max-width: 100%; }
.cmp-chart-wrap--venue { display: flex; gap: 16px; height: auto; overflow: hidden; min-width: 0; }
.cmp-chart-wrap--venue canvas { max-width: 100%; }
.cmp-venue-name { font-size: 11px; font-weight: 600; text-align: center;
  margin: 6px 0 0; }
.cmp-venue-name--a { color: #0056b3; }
.cmp-venue-name--b { color: #e11d48; }

/* Loading */
.cmp-loading { text-align: center; padding: 60px 20px; color: #64748b; }
.cmp-spinner { width: 36px; height: 36px; border: 3px solid #e2e8f0;
  border-top-color: #0056b3; border-radius: 50%; animation: spin .7s linear infinite;
  margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
  .cmp-search-row { flex-direction: column; align-items: center; }
  .cmp-vs { padding-top: 0; }
  .cmp-charts { grid-template-columns: 1fr; }
  .cmp-chart-box--full { grid-column: 1; }
  .cmp-names-row, .cmp-stat-row { grid-template-columns: 1fr 100px 1fr; }
}

/* ── Header Compare link ─────────────────────────────────────────────────── */
.header-compare-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.header-compare-link:hover { color: #0056b3; background: #eff6ff; }

/* ── Inline Compare widget ───────────────────────────────────────────────── */
.inline-cmp-panel {
  margin-top: 16px;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.inline-cmp-search-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.inline-cmp-subject { flex: 1; min-width: 200px; position: relative; }
.inline-cmp-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #94a3b8;
  display: block;
  margin-bottom: 6px;
}
.inline-cmp-chip {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.inline-cmp-chip--a { background: #dbeafe; color: #0056b3; }
.inline-cmp-chip--b { background: #ffe4e6; color: #e11d48; margin-top: 6px; }
.inline-cmp-vs {
  font-size: 18px;
  font-weight: 900;
  color: #cbd5e1;
  flex-shrink: 0;
}
.inline-cmp-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.inline-cmp-input {
  width: 100%;
  padding: 9px 32px 9px 34px;
  font-size: 13px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
.inline-cmp-input:focus { border-color: #0056b3; }
.inline-cmp-input:disabled { background: #f8fafc; color: #64748b; }
.inline-cmp-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
}
.inline-cmp-clear:hover { color: #e11d48; }

/* ── Entity photos (player/team thumbnails) ─────────────────────────────── */
.entity-photo {
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #94a3b8;
  /* works whether .entity-photo is a div wrapper or the img itself */
  object-fit: cover;
}
.entity-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* when <img> itself carries .entity-photo */
img.entity-photo {
  display: block;
  object-fit: cover;
}
.entity-photo--sm  { width: 28px; height: 28px; font-size: 12px; }
.entity-photo--emoji { font-size: 16px; background: transparent; }
.entity-photo--md  { width: 44px; height: 44px; font-size: 18px; }
.entity-photo--lg  { width: 72px; height: 72px; font-size: 28px; margin-bottom: 8px; }

/* Fix compare names row to show photo + name stacked */
.cmp-name--a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.cmp-name--b {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.cmp-name-mid {
  font-size: 16px;
  font-weight: 900;
  color: #94a3b8;
  align-self: center;
  text-align: center;
}

/* Fix stat value alignment — numbers should be prominent */
.cmp-stat-val--a { text-align: left; }
.cmp-stat-val--b { text-align: right; }

/* fav-nav-item photo text truncation */
.fav-nav-item .entity-photo { flex-shrink: 0; }
.fav-nav-item span, .fav-nav-item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Account page fav cards with photos */
.fav-account-card .entity-photo--sm { border-radius: 50%; }

/* ── Compare year/season toggle ─────────────────────────────────────────── */
.cmp-chart-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.cmp-chart-title-row .cmp-chart-title,
.chart-title-row .chart-title { margin-bottom: 0; }
.chart-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.cmp-group-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.cmp-group-btn {
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.cmp-group-btn--active {
  background: #fff;
  color: #0056b3;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* ── Breadcrumbs ─────────────────────────────────────────────────────────── */
.breadcrumbs {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 32px;
  box-sizing: border-box;
}
.breadcrumbs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
}
.breadcrumbs-item {
  display: flex;
  align-items: center;
  color: #94a3b8;
}
.breadcrumbs-item::after {
  content: '›';
  margin-left: 4px;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1;
}
.breadcrumbs-item:last-child::after { content: none; }
.breadcrumbs-link {
  color: #64748b;
  text-decoration: none;
  transition: color .15s;
}
.breadcrumbs-link:hover { color: #0056b3; }
.breadcrumbs-item--current { color: #1e2a3a; font-weight: 600; }

/* ── Embedded wizard page (goals.php / matches.php with no params) ─────── */
.explore-wizard-page {
  max-width: 640px;
  margin: 60px auto 80px;
  padding: 0 20px;
  text-align: center;
}
.explore-wizard-title {
  font-size: 28px;
  font-weight: 800;
  color: #1e2a3a;
  margin: 0 0 10px;
}
.explore-wizard-sub {
  font-size: 15px;
  color: #64748b;
  margin: 0 0 32px;
}
.explore-wizard-tiles {
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
}
/* Make tile links behave like tile buttons */
a.explore-tile {
  text-decoration: none;
  color: inherit;
}

/* ── Top Scorers Leaderboard ─────────────────────────────────────────────── */
.lb-page { max-width: 1100px; margin: 0 auto; padding: 32px 20px 60px; }

.lb-header { text-align: center; margin-bottom: 28px; }
.lb-title  { font-size: 30px; font-weight: 800; color: #1e2a3a; margin: 0 0 8px; }
.lb-sub    { font-size: 15px; color: #64748b; margin: 0; }

.lb-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
}
.lb-filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; }
.lb-filter-label { font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: #94a3b8; }
.lb-select { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; color: #1e2a3a; background: #f8fafc; cursor: pointer; }
.lb-select--sm { max-width: 120px; }
.lb-select:focus { outline: none; border-color: #0056b3; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.lb-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  flex-wrap: wrap;
}
.lb-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.lb-tab:hover { color: #0056b3; }
.lb-tab--active { color: #0056b3; border-bottom-color: #0056b3; }

.lb-tab-panel { position: relative; }

/* Table panels */
.lb-table { width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }

.lb-loading { display: none; padding: 48px; justify-content: center; align-items: center; }

/* ── Records grid ─────────────────────────────────────────────────────────── */
.lb-records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 4px 0 8px;
}
.lb-record-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .15s;
}
.lb-record-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); }
.lb-record-icon   { font-size: 28px; line-height: 1; }
.lb-record-label  { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8; margin-top: 4px; }
.lb-record-value  { font-size: 22px; font-weight: 800; color: #1e2a3a; line-height: 1.1; }
.lb-record-detail { font-size: 12px; color: #64748b; }
.lb-record-entity { font-size: 13px; font-weight: 600; color: #0056b3;
  text-decoration: none; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }
.lb-record-entity:hover { text-decoration: underline; }

/* Select-competition prompt shown when no org is chosen */
.lb-records-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
  color: #64748b;
  gap: 10px;
}
.lb-records-prompt-icon { font-size: 36px; }
.lb-records-prompt p { margin: 0; font-size: 15px; line-height: 1.6; }
.lb-records-prompt span { font-size: 13px; color: #94a3b8; }

.lb-table { width: 100%; border-collapse: collapse; }
.lb-th { padding: 12px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8; background: #f8fafc;
  border-bottom: 1px solid #e2e8f0; text-align: left; white-space: nowrap; }
.lb-th--rank  { width: 52px; text-align: center; }
.lb-th--goals, .lb-th--pens, .lb-th--pct { text-align: right; }

.lb-row { border-bottom: 1px solid #f1f5f9; transition: background .12s; }
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: #f8fafc; }
.lb-row--medal { background: #fffbeb; }
.lb-row--medal:hover { background: #fef3c7; }

.lb-td { padding: 12px 16px; font-size: 14px; color: #1e2a3a; vertical-align: middle; }
.lb-td--rank { text-align: center; }
.lb-td--goals, .lb-td--pens, .lb-td--pct { text-align: right; }
.lb-td--team  { color: #64748b; font-size: 13px; }
.lb-td--pct   { color: #94a3b8; font-size: 13px; }

.lb-rank { font-size: 13px; font-weight: 700; color: #94a3b8; }
.lb-rank--gold   { font-size: 20px; }
.lb-rank--silver { font-size: 20px; }
.lb-rank--bronze { font-size: 20px; }

.lb-player-cell { display: flex; align-items: center; gap: 10px; }
.lb-photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  background: #e2e8f0; flex-shrink: 0; }
.lb-player-name { font-weight: 600; color: #0056b3; text-decoration: none;
  transition: color .15s; }
.lb-player-name:hover { color: #003d8a; text-decoration: underline; }

.lb-empty { padding: 48px; text-align: center; color: #94a3b8; font-size: 14px; }

@media (max-width: 640px) {
  .lb-th--team, .lb-td--team,
  .lb-th--pens, .lb-td--pens,
  .lb-th--pct,  .lb-td--pct  { display: none; }
  .lb-filters { flex-direction: column; }
}

/* ── Head-to-Head ────────────────────────────────────────────────────────── */
.h2h-page { max-width: 860px; margin: 0 auto; padding: 32px 20px 60px; }
.h2h-header { text-align: center; margin-bottom: 32px; }
.h2h-title  { font-size: 30px; font-weight: 800; color: #1e2a3a; margin: 0 0 8px; }
.h2h-sub    { font-size: 15px; color: #64748b; margin: 0; }

.h2h-no-matches { text-align: center; padding: 48px; color: #94a3b8; font-size: 15px; }

/* Scorecard */
.h2h-scorecard { display: grid; grid-template-columns: 1fr auto 1fr;
  background: #1e2a3a; border-radius: 14px 14px 0 0; padding: 28px 20px; gap: 16px; align-items: center; }
.h2h-team { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.h2h-team-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 8px;
  background: rgba(255,255,255,.1); padding: 4px; }
.h2h-team-name { font-size: 13px; font-weight: 600; color: #e2e8f0; text-align: center; }
.h2h-big-num { font-size: 48px; font-weight: 900; line-height: 1; }
.h2h-big-num--a { color: #93c5fd; }
.h2h-big-num--b { color: #fca5a5; }
.h2h-big-label { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #64748b; }
.h2h-middle { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.h2h-middle .h2h-big-num { color: #cbd5e1; font-size: 40px; }
.h2h-played { font-size: 12px; color: #64748b; }
.h2h-goals  { font-size: 16px; font-weight: 700; color: #cbd5e1; }

/* Win bar */
.h2h-bar-wrap { display: flex; height: 10px; border-radius: 0; overflow: hidden; }
.h2h-bar-a { background: #3b82f6; }
.h2h-bar-d { background: #94a3b8; }
.h2h-bar-b { background: #ef4444; }
.h2h-bar-labels { display: flex; justify-content: space-between;
  padding: 4px 8px; font-size: 11px; font-weight: 700;
  background: #f8fafc; border: 1px solid #e2e8f0; border-top: none; }
.h2h-bar-label--a { color: #3b82f6; }
.h2h-bar-label--d { color: #64748b; }
.h2h-bar-label--b { color: #ef4444; }

/* Sections */
.h2h-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #94a3b8; padding: 20px 0 10px;
  border-top: 1px solid #f1f5f9; margin-top: 8px; }

/* Home/Away grid */
.h2h-ha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.h2h-ha-box  { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px 16px; }
.h2h-ha-label { font-size: 12px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.h2h-ha-stats { display: flex; gap: 16px; font-size: 18px; font-weight: 800; }
.h2h-w { color: #22c55e; }
.h2h-d { color: #94a3b8; }
.h2h-l { color: #ef4444; }

/* Records */
.h2h-records { display: flex; flex-direction: column; gap: 8px; }
.h2h-record  { display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-radius: 8px; font-size: 13px; }
.h2h-record--a { background: #eff6ff; }
.h2h-record--b { background: #fef2f2; }
.h2h-record-team  { font-weight: 700; color: #1e2a3a; min-width: 120px; }
.h2h-record-score { font-weight: 600; color: #475569; flex: 1; }
.h2h-record-date  { color: #94a3b8; font-size: 12px; white-space: nowrap; }

/* Last meetings */
.h2h-matches { display: flex; flex-direction: column; gap: 1px; }
.h2h-match   { display: grid; grid-template-columns: 80px 1fr 70px 1fr 1fr;
  align-items: center; gap: 8px; padding: 10px 14px; background: #fff;
  border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.h2h-match:first-child { border-radius: 8px 8px 0 0; }
.h2h-match:last-child  { border-radius: 0 0 8px 8px; border-bottom: none; }
.h2h-match:hover { background: #f8fafc; }
.h2h-match-date  { color: #94a3b8; font-size: 12px; white-space: nowrap; }
.h2h-match-score { font-size: 15px; font-weight: 800; text-align: center;
  padding: 3px 8px; border-radius: 6px; background: #f1f5f9; }
.h2h-res--a { background: #dbeafe; color: #1d4ed8; }
.h2h-res--b { background: #fee2e2; color: #b91c1c; }
.h2h-res--d { background: #f1f5f9; color: #475569; }
.h2h-res--future { background: #f8fafc; color: #94a3b8; font-style: italic; }
.h2h-match-teams { font-weight: 500; color: #1e2a3a; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.h2h-match-teams--away { text-align: left; }
.h2h-match-comp { color: #94a3b8; font-size: 11px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 580px) {
  .h2h-match { grid-template-columns: 65px 1fr 56px 1fr; }
  .h2h-match-comp { display: none; }
  .h2h-big-num { font-size: 36px; }
}

/* ── H2H extra stats ─────────────────────────────────────────────────────── */
.h2h-stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 4px; }
.h2h-stat-box   { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px 12px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.h2h-stat-val   { font-size: 22px; font-weight: 800; color: #94a3b8; text-align: center; }
.h2h-stat-win--a { color: #3b82f6; }
.h2h-stat-win--b { color: #ef4444; }
.h2h-stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8; text-align: center; white-space: nowrap; }

/* Top scorers */
.h2h-scorers { display: flex; flex-direction: column; gap: 6px; }
.h2h-scorer  { display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  border-radius: 8px; font-size: 13px; }
.h2h-scorer--a { background: #eff6ff; border-left: 3px solid #3b82f6; }
.h2h-scorer--b { background: #fef2f2; border-left: 3px solid #ef4444; }
.h2h-scorer-name  { font-weight: 600; color: #1e2a3a; flex: 1; }
.h2h-scorer-team  { color: #64748b; font-size: 12px; }
.h2h-scorer-goals { font-weight: 700; color: #1e2a3a; white-space: nowrap; }
.h2h-scorer-goals small { font-weight: 400; color: #94a3b8; }
.h2h-pen-badge, .h2h-og-badge { font-size: 10px; font-weight: 700; padding: 1px 4px;
  border-radius: 4px; margin-left: 3px; }
.h2h-pen-badge { background: #dbeafe; color: #1d4ed8; }
.h2h-og-badge  { background: #fee2e2; color: #b91c1c; }

/* All matches table — expandable */
.h2h-match { display: grid; grid-template-columns: 80px 1fr 70px 1fr 1fr 28px;
  align-items: center; gap: 8px; padding: 10px 14px; background: #fff;
  border-bottom: 1px solid #f1f5f9; font-size: 13px; cursor: default; }
.h2h-expand-btn { background: none; border: 1px solid #e2e8f0; border-radius: 50%;
  width: 22px; height: 22px; font-size: 14px; font-weight: 700; color: #64748b;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s; padding: 0; }
.h2h-expand-btn:hover { background: #f1f5f9; color: #0056b3; }

.h2h-goals-row[hidden] { display: none !important; }
.h2h-goals-row { display: flex; flex-direction: column; gap: 10px;
  padding: 12px 16px; background: #f8fafc;
  border-bottom: 1px solid #e2e8f0; font-size: 12px; }

@media (max-width: 580px) {
  .h2h-stats-grid { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .h2h-stat-val   { font-size: 18px; }
  .h2h-match { grid-template-columns: 65px 1fr 56px 1fr 28px; }
  .h2h-match-comp { display: none; }
}

/* ── H2H scorer table ────────────────────────────────────────────────────── */
.h2h-scorer-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.h2h-scorer-table thead th { padding: 8px 12px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: #94a3b8;
  background: #f8fafc; border-bottom: 1px solid #e2e8f0; text-align: left; }
.h2h-scorer-table tbody tr { border-bottom: 1px solid #f1f5f9; }
.h2h-scorer-table tbody tr:hover { background: #f8fafc; }
.h2h-st-rank  { width: 32px; color: #94a3b8; font-size: 12px; padding: 10px 12px; }
.h2h-st-name  { padding: 10px 12px; font-weight: 600; color: #1e2a3a; }
.h2h-st-team  { padding: 10px 12px; color: #64748b; display: flex; align-items: center; gap: 6px; }
.h2h-st-goals { padding: 10px 12px; text-align: right; font-size: 16px; }
.h2h-st-pens  { padding: 10px 12px; text-align: right; color: #94a3b8; font-size: 12px; }
.h2h-team-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.h2h-team-dot--a { background: #3b82f6; }
.h2h-team-dot--b { background: #ef4444; }

/* ── H2H match detail — timeline (mirrors team_matches.php expanded row) ─── */
.h2h-detail-pills  { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.h2h-detail-score  { background: #1e2a3a; color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; }
.h2h-detail-season { background: #f1f5f9; color: #64748b; font-size: 12px;
  padding: 4px 12px; border-radius: 20px; }

/* Team name headers */
.h2h-tl-teams { display: flex; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: #1e2a3a; padding: 4px 0 6px; }

/* Goal rows — always 3 equal columns: home | minute | away */
.h2h-tl-goals { display: flex; flex-direction: column; gap: 8px; position: relative; }
.h2h-tl-goals::before { /* vertical centre line */
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: #e2e8f0; transform: translateX(-50%); }
.h2h-tl-row { display: grid; grid-template-columns: 1fr 52px 1fr;
  align-items: center; gap: 8px; position: relative; }
.h2h-tl-col-home { display: flex; justify-content: flex-end; }
.h2h-tl-col-min  { display: flex; justify-content: center; z-index: 1; }
.h2h-tl-col-away { display: flex; justify-content: flex-start; }

.h2h-tl-min  { background: #1e2a3a; color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 14px; white-space: nowrap; }

.h2h-tl-card { background: #fff; border-radius: 8px; padding: 7px 11px;
  font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); max-width: 260px; }
.h2h-tl-card--home { border-left: 3px solid #3b82f6; text-align: right; }
.h2h-tl-card--away { border-right: 3px solid #ef4444; text-align: left; }
.h2h-tl-assist { font-size: 11px; color: #64748b; margin-top: 2px; }

/* ── jQuery UI Autocomplete — custom style (matches hero search dropdown) ── */
.ui-autocomplete {
  background: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.16) !important;
  padding: 4px 0 !important;
  font-family: Arial, sans-serif !important;
  font-size: 13px !important;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  z-index: 9999 !important;
}
.ui-menu .ui-menu-item { padding: 0 !important; border: none !important; }
.ui-menu .ui-menu-item-wrapper {
  padding: 9px 16px !important;
  border-radius: 0 !important;
  border: none !important;
  color: #1e2a3a !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background .1s !important;
}
.ui-menu .ui-menu-item-wrapper.ui-state-active,
.ui-menu .ui-menu-item-wrapper:hover {
  background: #eff6ff !important;
  color: #0056b3 !important;
  border: none !important;
  margin: 0 !important;
}
.ui-widget { font-family: Arial, sans-serif !important; }

/* ── Locked feature button (non-paying users) ─────────────────────────────── */
.charts-toggle-btn--locked {
  opacity: 0.65;
  cursor: pointer;
  text-decoration: none;
  color: #475569;
  font-size: 12px;
}
.charts-toggle-btn--locked:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

/* ── Upgrade modal ───────────────────────────────────────────────────────── */
.ugm-overlay {
  position: fixed; inset: 0; background: rgba(10,20,40,0.6);
  z-index: 9000; display: flex; align-items: center;
  justify-content: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.ugm-overlay[hidden] { display: none !important; }
.ugm-card {
  background: #fff; border-radius: 20px; padding: 40px 36px 32px;
  max-width: 440px; width: 100%; position: relative; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  animation: ugmIn .2s ease;
}
@keyframes ugmIn {
  from { opacity:0; transform: translateY(-12px) scale(.97); }
  to   { opacity:1; transform: none; }
}
.ugm-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; font-size: 18px;
  color: #94a3b8; cursor: pointer; padding: 4px 6px;
  border-radius: 6px; transition: color .15s, background .15s;
}
.ugm-close:hover { color: #1e2a3a; background: #f1f5f9; }
.ugm-icon  { font-size: 44px; margin-bottom: 14px; line-height: 1; }
.ugm-title { font-size: 20px; font-weight: 800; color: #1e2a3a; margin: 0 0 10px; }
.ugm-desc  { font-size: 14px; color: #64748b; line-height: 1.6; margin: 0 0 24px; }
.ugm-btn-primary {
  display: block; background: #0056b3; color: #fff;
  text-decoration: none; padding: 13px 24px; border-radius: 10px;
  font-size: 15px; font-weight: 700; margin-bottom: 10px;
  transition: background .15s;
}
.ugm-btn-primary:hover { background: #003d8a; }
.ugm-btn-later {
  background: none; border: none; color: #94a3b8;
  font-size: 13px; cursor: pointer; padding: 4px;
  transition: color .15s;
}
.ugm-btn-later:hover { color: #475569; }

/* ── Upgrade page — free tier comparison ─────────────────────────────────── */
.upgrade-free-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto 32px;
}
.upgrade-free-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 20px 20px;
}
.upgrade-free-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #1e2a3a;
  margin-bottom: 4px;
}
.upgrade-free-card-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.upgrade-free-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}
.upgrade-free-list li { padding: 3px 0; }
.upgrade-free-card-cta {
  display: inline-block;
  background: #f1f5f9;
  color: #0056b3;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: background .15s;
}
.upgrade-free-card-cta:hover { background: #dbeafe; }

@media (max-width: 520px) {
  .upgrade-free-tiers { grid-template-columns: 1fr; }
}

/* ── Player Career Timeline ──────────────────────────────────────────────── */
/* ── Player Career Timeline — equal-width scrollable cards ───────────────── */
.career-timeline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.ct-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8; white-space: nowrap; flex-shrink: 0;
}
.ct-cards {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 4px;
  scrollbar-width: thin;
  flex: 1;
}
.ct-cards::-webkit-scrollbar { height: 4px; }
.ct-cards::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

.ct-card {
  min-width: 110px;
  max-width: 130px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform .15s, box-shadow .15s;
}
.ct-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.1); }

.ct-card-logo {
  width: 36px; height: 36px; object-fit: contain;
  border-radius: 50%; background: #f1f5f9;
  margin-bottom: 4px;
}
.ct-card-name {
  font-size: 11px; font-weight: 700; color: #1e2a3a;
  text-align: center; line-height: 1.3;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  max-height: 2.6em;
}
.ct-card-goals {
  font-size: 22px; font-weight: 900; color: #0056b3; line-height: 1;
}
.ct-card-years { font-size: 10px; color: #94a3b8; }

/* Relative contribution bar */
.ct-card-bar-wrap {
  width: 100%; height: 3px; background: #f1f5f9;
  border-radius: 2px; margin-top: 5px; overflow: hidden;
}
.ct-card-bar {
  height: 100%; background: #0056b3; border-radius: 2px;
  transition: width .4s ease;
}

.career-timeline-loading { font-size: 12px; color: #94a3b8; }

/* ── Sign In Modal ───────────────────────────────────────────────────────── */
button.auth-bar-link {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: inherit;
}
.signin-modal-overlay {
  position: fixed; inset: 0; background: rgba(10,20,40,0.6);
  z-index: 8000; display: flex; align-items: center;
  justify-content: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.signin-modal-overlay[hidden] { display: none !important; }
.signin-modal-card {
  background: #fff; border-radius: 20px; padding: 36px 32px 28px;
  max-width: 420px; width: 100%; position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  animation: smIn .2s ease;
}
@keyframes smIn {
  from { opacity:0; transform: translateY(-12px) scale(.97); }
  to   { opacity:1; transform: none; }
}
.signin-modal-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; font-size: 18px; color: #94a3b8;
  cursor: pointer; padding: 4px 6px; border-radius: 6px;
  transition: color .15s, background .15s;
}
.signin-modal-close:hover { color: #1e2a3a; background: #f1f5f9; }
.signin-modal-logo { text-align: center; margin-bottom: 20px; }
.signin-modal-title { font-size: 24px; font-weight: 800; color: #1e2a3a;
  margin: 0 0 6px; text-align: center; }
.signin-modal-sub { font-size: 14px; color: #64748b; text-align: center; margin: 0 0 24px; }

/* Input fields — match site style */
.signin-modal-card .auth-field { margin-bottom: 16px; }
.signin-modal-card .auth-field label {
  display: block; font-size: 13px; font-weight: 600;
  color: #374151; margin-bottom: 6px;
}
.signin-modal-card .auth-field-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.signin-modal-card .auth-field-row label { margin-bottom: 0; }
.signin-modal-card .auth-field-link {
  font-size: 12px; color: #0056b3; text-decoration: none;
}
.signin-modal-card .auth-field-link:hover { text-decoration: underline; }
.signin-modal-card input[type="text"],
.signin-modal-card input[type="password"] {
  width: 100%; padding: 11px 14px; font-size: 14px;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  background: #f8fafc; color: #1e2a3a; box-sizing: border-box;
  outline: none; transition: border-color .15s, background .15s;
  font-family: inherit;
}
.signin-modal-card input:focus {
  border-color: #0056b3; background: #fff;
  box-shadow: 0 0 0 3px rgba(0,86,179,.12);
}

/* Sign In button — matches site's blue CTA */
.signin-modal-card .signin-submit {
  width: 100%; margin-top: 8px;
  background: #0056b3; color: #fff;
  border: none; border-radius: 10px;
  padding: 13px 20px; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: background .15s, transform .1s;
}
.signin-modal-card .signin-submit:hover:not(:disabled) { background: #003d8a; }
.signin-modal-card .signin-submit:active { transform: scale(.99); }
.signin-modal-card .signin-submit:disabled { opacity: .6; cursor: default; }

.signin-modal-alert { padding: 10px 14px; border-radius: 8px; font-size: 13px;
  margin-bottom: 16px; }
.signin-modal-alert--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.signin-modal-alert--ok    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.signin-modal-footer { text-align: center; font-size: 13px; color: #64748b;
  margin: 18px 0 0; }
.signin-modal-footer .auth-link { color: #0056b3; font-weight: 600; text-decoration: none; }
.signin-modal-footer .auth-link:hover { text-decoration: underline; }
