/* ============================================================
   Arkansas Razorbacks Transfer Dashboard — Stylesheet
   Colors: Cardinal Red #9D2235, Black #1A1A1A, White #FFFFFF
   ============================================================ */

:root {
  --red:        #9D2235;
  --red-dark:   #7a1a28;
  --red-light:  #c42a42;
  --black:      #1A1A1A;
  --gray-900:   #1f1f1f;
  --gray-800:   #2c2c2c;
  --gray-700:   #3d3d3d;
  --gray-600:   #555555;
  --gray-400:   #999999;
  --gray-200:   #e5e5e5;
  --gray-100:   #f5f5f5;
  --white:      #ffffff;
  --gold:       #c8a84b;
  --green:      #2e7d32;
  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 2px 12px rgba(0,0,0,0.12);
  --shadow-lg:  0 6px 32px rgba(0,0,0,0.18);
  --transition: 0.2s ease;
  --font:       'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--black);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 60%, var(--red-light) 100%);
  color: var(--white);
  padding: 0;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hog-icon {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.header-logo h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.header-sub {
  font-size: 0.85rem;
  opacity: 0.85;
  font-weight: 400;
  margin-top: 2px;
}

.header-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--white);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

.badge-alt {
  background: #FFECB3;
  border: 1px solid #FFC107;
  color: #5C0612;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 16px;
  letter-spacing: 0.4px;
}

/* ── Summary Cards ─────────────────────────────────────────── */
.summary-bar {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  display: flex;
  justify-content: center;
  gap: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-stat {
  flex: 1;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 14px;
  border-right: 1px solid var(--gray-200);
  transition: background var(--transition);
}

.card-stat:last-child { border-right: none; }

.card-stat:hover { background: var(--gray-100); }

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-top: 4px;
}

/* ── Controls Bar ──────────────────────────────────────────── */
.controls-bar {
  background: var(--gray-800);
  padding: 10px 24px;
  border-bottom: 2px solid var(--red);
}

.controls-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-group label {
  font-size: 0.7rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.control-group select,
.control-group input[type="text"] {
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  color: var(--white);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--font);
  min-width: 150px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.control-group select:focus,
.control-group input[type="text"]:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(157,34,53,0.3);
}

.control-group select option { background: var(--gray-800); }

/* Toggle button group */
.toggle-group {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gray-600);
}

.toggle-btn {
  background: var(--gray-700);
  color: var(--gray-400);
  border: none;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition), color var(--transition);
  border-right: 1px solid var(--gray-600);
}

.toggle-btn:last-child { border-right: none; }

.toggle-btn:hover { background: var(--gray-600); color: var(--white); }

.toggle-btn.active {
  background: var(--red);
  color: var(--white);
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  max-width: 1400px;
  margin: 16px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Section Cards ─────────────────────────────────────────── */
.section-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 20px 24px;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.2px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--red);
  display: inline-block;
  margin-bottom: 0;
}

.table-click-hint {
  font-size: 0.78rem;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.result-count {
  font-size: 0.82rem;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
}

/* ── Table ─────────────────────────────────────────────────── */
.table-section {
  padding: 18px 20px 16px 20px;
}

.table-wrapper {
  max-height: 540px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

/* Custom sleek scrollbar for table */
.table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}
.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #999;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  white-space: nowrap;
}

thead tr {
  background: var(--gray-900);
  color: var(--white);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--gray-900);
  padding: 11px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition), transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

thead th:hover { background: var(--red-dark); }

thead th[data-key="compositeRating"]:hover {
  transform: scale(1.02);
  box-shadow: 0 0 14px rgba(200, 168, 75, 0.75), 0 2px 6px rgba(0,0,0,0.3);
  z-index: 15;
}

thead th.sort-asc::after  { content: ' ▲'; color: var(--gold); font-size: 0.65rem; }
thead th.sort-desc::after { content: ' ▼'; color: var(--gold); font-size: 0.65rem; }

.sort-order-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--black);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1.2;
}

tbody tr {
  border-bottom: 1px solid var(--gray-200);
  transition: all 0.15s ease;
  cursor: pointer;
}

tbody tr:nth-child(even) { background: #fafafa; }

tbody tr:hover {
  background: #fdf2f4;
  box-shadow: inset 4px 0 0 var(--red);
}

tbody tr.selected-row {
  background: rgba(157, 34, 53, 0.08) !important;
  box-shadow: inset 4px 0 0 var(--red);
  outline: 1px solid var(--red);
}

tbody td {
  padding: 10px 14px;
  color: var(--gray-800);
}

.td-name {
  font-weight: 700;
  color: var(--black);
  min-width: 160px;
}

.td-pos {
  font-weight: 700;
}

.pos-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Position color coding */
.pos-QB  { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.pos-RB  { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.pos-WR  { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.pos-TE  { background: #fce7f3; color: #be185d; border: 1px solid #fbcfe8; }
.pos-OL  { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.pos-DL  { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.pos-EDGE { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.pos-LB  { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.pos-DB  { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.pos-K   { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.pos-LS  { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }

.td-school {
  font-size: 0.82rem;
  color: var(--gray-600);
}

.composite-badge-wrap {
  display: inline-flex;
  flex-direction: column;
}

.td-rating {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.2;
}

.td-rating.rating-high {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.td-rating.rating-mid {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.td-rating.rating-low {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.rating-na    { color: var(--gray-400); font-style: italic; }

.stat-value {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.stat-highlight {
  color: var(--red);
  font-weight: 700;
}

.td-null { color: var(--gray-400); font-style: italic; font-size: 0.8rem; }

/* ── Charts ────────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.chart-card { padding: 24px; }

.chart-container {
  position: relative;
  height: 280px;
}

/* ── Comparison Section ────────────────────────────────────── */
.compare-section {}

.compare-hint {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 12px;
}

.compare-controls {
  margin-bottom: 16px;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--red);
  color: var(--red);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition), color var(--transition);
}

.btn-secondary:hover {
  background: var(--red);
  color: var(--white);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.compare-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color var(--transition);
}

.compare-card:hover { border-color: var(--red); }

.compare-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
}

.compare-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.compare-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--black);
  line-height: 1.2;
}

.compare-meta {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 2px;
}

.compare-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.82rem;
}

.compare-stat-row:last-child { border-bottom: none; }

.compare-stat-label { color: var(--gray-600); }

.compare-stat-val {
  font-weight: 700;
  color: var(--black);
  font-variant-numeric: tabular-nums;
}

.compare-empty {
  text-align: center;
  color: var(--gray-400);
  font-size: 0.9rem;
  padding: 32px;
  font-style: italic;
  grid-column: 1 / -1;
}

/* ── Spotlight ─────────────────────────────────────────────── */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.spotlight-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px;
  border-left: 5px solid var(--red);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  background: var(--white);
}

.spotlight-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--red);
}

.spotlight-card.selected-compare {
  background: rgba(157, 34, 53, 0.04);
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red);
}

.spotlight-compare-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-800);
  cursor: pointer;
  transition: all 0.2s ease;
}

.spotlight-compare-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.spotlight-compare-btn.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.spotlight-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.spotlight-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--black);
  line-height: 1.2;
}

.spotlight-pos {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  margin-top: 2px;
}

.spotlight-school {
  font-size: 0.78rem;
  color: var(--gray-600);
  margin-bottom: 10px;
}

.spotlight-school strong { color: var(--red); }

.spotlight-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.spotlight-stat-item {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}

.spotlight-stat-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--red);
  display: block;
  line-height: 1;
}

.spotlight-stat-label {
  font-size: 0.68rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
  display: block;
}

.spotlight-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--red);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  text-align: center;
  padding: 20px 24px;
  font-size: 0.78rem;
  margin-top: 12px;
}

.site-footer a { color: var(--red-light); }
.site-footer a:hover { color: var(--white); }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--gray-200); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-dark); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
  .summary-bar { flex-wrap: wrap; }
  .card-stat { min-width: 140px; }
}

@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .main-content { padding: 0 12px; }
  .controls-inner { flex-direction: column; align-items: stretch; }
  .control-group select,
  .control-group input[type="text"] { min-width: unset; width: 100%; }
  .toggle-group { width: 100%; }
  .toggle-btn { flex: 1; }
  .section-card { padding: 16px; }
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-card {
  animation: fadeIn 0.35s ease both;
}

.section-card:nth-child(2) { animation-delay: 0.05s; }
.section-card:nth-child(3) { animation-delay: 0.10s; }
.section-card:nth-child(4) { animation-delay: 0.15s; }

/* ── Composite Rating & Focus Selector Styling ───────────────── */
main:nth-of-type(1) > section:nth-of-type(1) > div:nth-of-type(2) > table#playerTable:nth-of-type(1) > thead#tableHead:nth-of-type(1) > tr:nth-of-type(1) > th:nth-of-type(4) {
  background: #7a1a28;
  color: #FFD700;
  border-bottom: 2px solid #FFC107;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.composite-badge-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: help;
}

.composite-sources-mini {
  font-size: 0.65rem;
  color: var(--gray-600);
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* ── Position Group Counts Bar ────────────────────────────── */
.position-counts-bar {
  background: var(--gray-900);
  border-bottom: 1px solid var(--gray-700);
  padding: 10px 24px;
}

.position-counts-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.position-counts-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.position-chips-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pos-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-200);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pos-chip:hover {
  background: var(--gray-700);
  border-color: var(--gray-500);
  color: #fff;
  transform: translateY(-1px);
}

.pos-chip.active {
  background: #7a1a28;
  border-color: #FFC107;
  color: #FFF;
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.3);
}

.pos-chip-label {
  letter-spacing: 0.3px;
}

.pos-chip-count {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.pos-chip.active .pos-chip-count {
  background: #FFC107;
  color: #5C0612;
}

/* ── cfbfastr Badge & Modal ───────────────────────────────── */
.badge-cfb {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.3);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.badge-cfb:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  background: var(--gray-900);
  color: var(--white);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--red);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 1.8rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
}

.modal-sub {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 2px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--gray-400);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--white);
}

.modal-body {
  padding: 24px;
}

.modal-intro {
  font-size: 0.95rem;
  color: var(--gray-800);
  margin-bottom: 20px;
  line-height: 1.6;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 16fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric-box {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.metric-box h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.metric-box p {
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.45;
}

.api-status-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #166534;
  margin-bottom: 4px;
}

.status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.status-desc {
  font-size: 0.8rem;
  color: #15803d;
  margin: 0;
}

/* ── Player Detail Analytics Modal ───────────────────────── */
.modal-content-lg {
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-content-lg .modal-body {
  overflow-y: auto;
  padding: 24px;
}

.player-overview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.player-bio-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-bio-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gray-900);
}

.player-bio-sub {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.player-ratings-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rating-chip {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-800);
}

.rating-chip.highlight {
  background: #7a1a28;
  color: #fff;
  border-color: #5C0612;
}

.analytics-section-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gray-800);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analytics-grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.analytics-metric-tile {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 3px solid #2563eb;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analytics-metric-tile.grade-tile {
  border-top-color: #10b981;
}

.analytics-metric-tile.war-tile {
  border-top-color: #8b5cf6;
}

.analytics-metric-tile.epa-tile {
  border-top-color: #f59e0b;
}

.tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tile-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.1;
}

.tile-sub {
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.percentile-container {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.percentile-row {
  margin-bottom: 12px;
}

.percentile-row:last-child {
  margin-bottom: 0;
}

.percentile-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.percentile-track {
  height: 8px;
  background: var(--gray-300);
  border-radius: 4px;
  overflow: hidden;
}

.percentile-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.percentile-fill.high {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.percentile-fill.elite {
  background: linear-gradient(90deg, #8b5cf6 0%, #6d28d9 100%);
}

.scouting-note-box {
  background: #fffbe0;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.85rem;
  color: #78350f;
  line-height: 1.5;
}

/* Clickable table rows */
#tableBody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#tableBody tr:hover {
  background-color: rgba(157, 34, 53, 0.05);
}

/* ── Live API Sources Bar & Badges ──────────────────────────── */
.badge-live-sync {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.badge-live-sync:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  transform: translateY(-1px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-sources-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 24px;
}

.live-sources-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.source-badge-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.source-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.source-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.source-title {
  font-weight: 800;
  color: var(--black);
}

.source-desc {
  color: var(--gray-600);
  font-size: 0.75rem;
}

.btn-sync-action {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-sync-action:hover {
  background: var(--red);
  transform: translateY(-1px);
}

.sync-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sync-timestamp {
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 600;
}

/* ── Live API Cards in Modal ──────────────────────────────── */
.live-api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.api-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.cfbd-card {
  border-top: 3px solid #2563eb;
}

.sr-card {
  border-top: 3px solid #16a34a;
}

.api-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

.api-card-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--black);
}

.api-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: #dcfce7;
  color: #15803d;
}

.api-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-metric-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray-700);
}

.api-metric-item strong {
  color: var(--black);
}

/* Toast */
.app-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--black);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 10000;
}

.app-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Firebase Auth Header Badge & Watchlist Controls ──────────── */
.firebase-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.auth-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  display: inline-block;
  box-shadow: 0 0 6px #f59e0b;
}

.auth-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.btn-auth-action {
  background: var(--gold);
  color: var(--black);
  border: none;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-auth-action:hover {
  transform: scale(1.05);
}

.fav-filter-btn {
  background: #fff8e1;
  border: 1.5px solid #ffb300;
  color: #8f6b00;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fav-filter-btn:hover, .fav-filter-btn.active {
  background: #ffc107;
  color: #000;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.star-fav-btn {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: #d1d5db;
  transition: transform 0.15s ease, color 0.15s ease;
  padding: 2px 4px;
  line-height: 1;
}

.star-fav-btn:hover {
  transform: scale(1.25);
  color: #f59e0b;
}

.star-fav-btn.active {
  color: #f59e0b;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5));
}

/* ── Firebase Scout Notes & Comments in Modal ────────────────── */
.firebase-section-card {
  background: #fafafa;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}

.firebase-section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scout-notes-textarea {
  width: 100%;
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  background: var(--white);
  box-sizing: border-box;
}

.scout-notes-textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(157, 34, 53, 0.15);
}

.btn-save-notes {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s ease;
}

.btn-save-notes:hover {
  background: var(--red-dark);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 4px;
}

.comment-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  color: var(--black);
}

.comment-text {
  font-size: 0.85rem;
  color: var(--gray-800);
  line-height: 1.4;
}

.comment-form {
  display: flex;
  gap: 8px;
}

.comment-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.comment-input:focus {
  outline: none;
  border-color: var(--red);
}

.btn-post-comment {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-post-comment:hover {
  background: var(--red);
}

/* ── Football Field EPA Heatmap Component ─────────────────────── */
.field-heatmap-container {
  background: #111827;
  border: 1px solid #374151;
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 16px;
  color: #f9fafb;
}

.heatmap-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.heatmap-title-box {
  display: flex;
  flex-direction: column;
}

.heatmap-main-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.heatmap-sub-title {
  font-size: 0.75rem;
  color: #9ca3af;
}

.heatmap-metric-toggle {
  display: inline-flex;
  background: #1f2937;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #4b5563;
}

.hm-toggle-btn {
  background: transparent;
  color: #9ca3af;
  border: none;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hm-toggle-btn.active {
  background: #9d2235;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Turf Field Visual Stage */
.turf-field-stage {
  position: relative;
  background: linear-gradient(180deg, #064e3b 0%, #022c22 100%);
  border: 2px solid #10b981;
  border-radius: 10px;
  padding: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
}

/* Yard Lines on Turf */
.yard-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  padding-right: 8px;
}

.yard-line span {
  font-size: 0.6rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
  transform: translateY(-50%);
}

.endzone-line { top: 12px; background: rgba(239, 68, 68, 0.4); }
.yard-20 { top: 32%; }
.yard-10 { top: 62%; }
.yard-los { top: 82%; background: #fbbf24; height: 2px; }
.yard-los span { color: #fbbf24; }

.hash-marks-center {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  border-left: 2px dashed rgba(255,255,255,0.15);
  transform: translateX(-50%);
  pointer-events: none;
}

/* 3x3 Grid of Field Zones */
.field-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
}

.field-zone-tile {
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 82px;
  backdrop-filter: blur(4px);
  position: relative;
}

.field-zone-tile:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.field-zone-tile.active {
  outline: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  transform: translateY(-2px) scale(1.03);
  z-index: 5;
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.zone-title {
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.zone-badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

.zone-metric-val {
  font-size: 1.2rem;
  font-weight: 900;
  margin: 4px 0;
  font-family: monospace;
}

.zone-metric-val small {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.85;
}

.zone-sub-info {
  font-size: 0.68rem;
  opacity: 0.9;
  font-weight: 600;
}

.backfield-strip-tile {
  grid-column: 1 / -1;
  min-height: 48px;
  flex-direction: row;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Legend */
.heatmap-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 14px 0;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: #d1d5db;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Selected Zone Breakdown Card */
.zone-breakdown-card {
  background: #1f2937;
  border: 1px solid #374151;
  border-left: 4px solid #10b981;
  border-radius: 8px;
  padding: 12px 16px;
}

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

.zcard-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
}

.zcard-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.zcard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: #111827;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.zcard-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.zcard-num {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  font-family: monospace;
}

.zcard-lbl {
  font-size: 0.65rem;
  color: #9ca3af;
  text-transform: uppercase;
}

.zcard-desc {
  font-size: 0.78rem;
  color: #d1d5db;
  line-height: 1.4;
}





