/* Scoped Dashboard Styles */
.fc-dashboard {
  /* Colors */
  --bg-deep: #0f172a;
  --bg-gradient-start: #020617;
  --bg-gradient-mid: #1e1b4b;
  --bg-gradient-end: #020617;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --color-cyan: #06b6d4;
  --color-cyan-light: #22d3ee;
  --color-cyan-bg: rgba(6, 182, 212, 0.1);
  --color-purple: #a855f7;
  --color-purple-light: #c084fc;
  --color-purple-bg: rgba(168, 85, 247, 0.1);
  --color-pink: #ec4899;
  --color-pink-light: #f472b6;
  --color-pink-bg: rgba(236, 72, 153, 0.1);
  --color-emerald: #10b981;
  --color-emerald-light: #34d399;
  --color-emerald-bg: rgba(16, 185, 129, 0.1);
  --color-red: #ef4444;
  --color-orange: #f97316;
  --color-yellow: #eab308;
  --color-violet: #8b5cf6;

  /* Glassmorphism */
  --glass-bg: rgb(166 189 245 / 3%);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: 2px;

  /* Spacing & Sizing */
  --radius-lg: 1.5em;
  --radius-md: 0.75em;
  --radius-sm: 0.5em;
  --radius-full: 9999px;
  --font-family: 'Product Sans', system-ui, -apple-system, sans-serif;

  /* Base Styles for Dashboard Context */
  font-family: var(--font-family);
  background-color: transparent;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  
  /* Layout */
  min-height: auto;
  width: 100%;
  background: none;
  position: relative;
  overflow: visible;

  /* Default Font Size (Locked to 1114px view) */
  font-size: 12.81px;
}

/* Reset & Base within Dashboard */
.fc-dashboard *, .fc-dashboard *::before, .fc-dashboard *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 
   Aggressive scaling to maintain desktop layout on all screens.
   We scale the dashboard's font-size based on viewport width (vw).
   Only applies below 1114px width.
*/
@media (max-width: 1114px) {
  .fc-dashboard {
    font-size: 1.15vw;
  }
}

.fc-main {
  position: relative;
  z-index: 10;
  padding: 0.7em 1.5em 1.5em 1.5em;
  max-width: 1114px; /* Locked width */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.95em;
}

@media (max-width: 819px) {
  .fc-main {
    gap: 1.25em;
  }
}

/* Background Blobs */
.fc-blob {
  position: absolute;
  width: 31.25em; /* 500px */
  height: 31.25em;
  border-radius: 50%;
  filter: blur(7.5em); /* 120px */
  opacity: 0.2;
  animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.fc-blob--blue {
  top: 0;
  left: 0;
  background-color: #2563eb;
  mix-blend-mode: screen;
}
.fc-blob--purple {
  bottom: 0;
  right: 0;
  background-color: #9333ea;
  mix-blend-mode: screen;
  animation-delay: 2s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.25; }
}

/* Header Styles Removed */

.fc-avatar-sm {
  width: 2.5em;
  height: 2.5em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: border-color 0.2s;
}
.fc-avatar-sm:hover {
  border-color: var(--color-cyan-light);
}

/* Icons */
.fc-icon { width: 1.5em; height: 1.5em; color: white; }
.fc-icon-sm { width: 1.25em; height: 1.25em; }
.fc-icon-xs { width: 0.75em; height: 0.75em; }

/* Grid Systems */
.fc-grid-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1em;
}

.fc-grid-charts {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr; /* Bar chart slightly wider than radar */
  gap: 1.25em;
}

/* Cards & Glassmorphism */
.fc-card {
  position: relative;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fc-glass {
  background: rgb(65 67 110 / 10%);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

.fc-card--hover,
.fc-card--hover:hover,
.fc-card--hover:focus,
.fc-card--hover:active {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0.85em rgba(56, 189, 248, 0.1);
}

/* Soft base glow per badge color */
.fc-summary-card.fc-card--cyan { box-shadow: 0 0 1em rgba(6, 182, 212, 0.26); }
.fc-summary-card.fc-card--pink { box-shadow: 0 0 1em rgba(236, 72, 153, 0.26); }
.fc-summary-card.fc-card--purple { box-shadow: 0 0 1em rgba(168, 85, 247, 0.26); }
.fc-summary-card.fc-card--emerald { box-shadow: 0 0 1em rgba(16, 185, 129, 0.26); }

/* Card Glow Effects */
.fc-card__glow {
  position: absolute;
  top: -1.5em;
  right: -1.5em;
  width: 6em;
  height: 6em;
  border-radius: 50%;
  filter: blur(2.5em);
  opacity: 0.24;
}

.fc-card--cyan .fc-card__glow { background-color: var(--color-cyan); }
.fc-card--purple .fc-card__glow { background-color: var(--color-purple); }
.fc-card--pink .fc-card__glow { background-color: var(--color-pink); }
.fc-card--emerald .fc-card__glow { background-color: var(--color-emerald); }

/* Card Content */
.fc-card__header {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}

.fc-card__subtitle-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.fc-card__title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75em;
}

.fc-card__subtitle {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  margin: 0;
}

.fc-card__title {
  font-weight: 700;
  color: white;
  margin-top: 0.1em;
  margin-bottom: 0.05em;
  margin-left: 0px;
}

/* Inline tags in summary titles */
.fc-card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.15em;
  margin-left: 0.2em;
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  background: transparent;
  border: none;
}
.fc-card-tag--cyan {color: #4ce7ffd4;}
.fc-card-tag--pink {color: #bd6694;}
.fc-card-tag--purple {color: var(--color-purple-light);} 
.fc-card-tag--emerald {color: var(--color-emerald-light);} 

.fc-card-tag--mini {
  font-size: 1em;
  margin-left: 0;
  margin-right: 0em;
}
.fc-card-tag--emerald {color: var(--color-emerald-light);} 

@media (max-width: 768px) {
  .fc-card-tag {
    padding: 0 0.15em;
    font-size: 1em;
    margin-left: 0.2em;
  }
}

.fc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5em;
  font-weight: 700;
  border: 1px solid transparent;
  line-height: 1;
  gap: 0.3em;
  flex-shrink: 0;
}
.fc-badge--cyan { background: var(--color-cyan-bg); color: var(--color-cyan-light); border-color: rgba(6, 182, 212, 0.2); }
.fc-badge--purple { background: var(--color-purple-bg); color: var(--color-purple-light); border-color: rgba(168, 85, 247, 0.2); }
.fc-badge--pink { background: var(--color-pink-bg); color: var(--color-pink-light); border-color: rgba(236, 72, 153, 0.2); }
.fc-badge--emerald { background: var(--color-emerald-bg); color: var(--color-emerald-light); border-color: rgba(16, 185, 129, 0.2); }

.fc-metric-row {
  display: flex;
  align-items: flex-end;
  gap: 1em;
  justify-content: center;
}

.fc-metric-value {
  font-weight: 700;
  color: white;
  line-height: 1;
}

.fc-text-glow {
  text-shadow: 0 0 0.625em rgba(255, 255, 255, 0.3);
}

.fc-metric-sub {
  display: flex;
  align-items: center;
}

.fc-text-cyan { color: var(--color-cyan-light); }
.fc-text-purple { color: var(--color-purple-light); }
.fc-text-pink { color: var(--color-pink-light); }
.fc-text-emerald { color: var(--color-emerald-light); }
.fc-text-pink-light { color: #f9a8d4; font-weight: 600; }
.fc-text-emerald-light { color: #6ee7b7; font-weight: 600; }

.fc-progress-bg {
  width: 100%;
  height: 0.375em;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  margin-top: 1em;
  overflow: hidden;
}

.fc-progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
}
.fc-bg-cyan { background-color: var(--color-cyan); }
.fc-bg-purple { background-color: var(--color-purple); }

.fc-card__footer {
  color: var(--text-secondary);
  margin-top: 0.6em;
  text-align: center;
}
.fc-footer-name { font-weight: 600; }

.fc-progress-accent {
  width: 100%;
  height: 0.56em;
  border-radius: var(--radius-full);
  margin-top: 0.9em;
  margin-bottom: 0em;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.fc-progress-accent--pink {
  box-shadow: 0 0 8px rgba(236,72,153,0.22);
  background-image: linear-gradient(90deg, rgba(236,72,153,0.32), rgba(236,72,153,0.06));
}
.fc-progress-accent--emerald {
  box-shadow: 0 0 8px rgba(16,185,129,0.2);
  background-image: linear-gradient(90deg, rgba(16,185,129,0.32), rgba(16,185,129,0.06));
}

.fc-icon-value {width: 1.5em;height: 1.5em;}
.fc-icon-consistency {width: 1.75em;height: 1.35em;display: inline-flex;align-items: center;justify-content: center;font-size: 1.1em;}
.fc-icon-target {width: 1.6em;height: 1.15em;display: inline-flex;align-items: center;justify-content: center;font-size: 1.3em;}
.fc-metric-sub {display: flex;align-items: center;gap: 0.35em;}

/* Charts */
.fc-chart-panel {
  min-height: 62em;
  display: flex;
  flex-direction: column;
}

.fc-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  z-index: 20;
}

.fc-chart-header--bar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35em;
}

.fc-chart-header-top--bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75em;
  width: 100%;
}

.fc-chart-subtitle {
  margin: 0;
}

.fc-chart-header--radar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.15em;
}

.fc-chart-header--scatter {
  flex-direction: column;
  align-items: stretch;
  gap: 0em;
}

.fc-chart-header-top--scatter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75em;
}

.fc-chart-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75em;
}

.fc-chart-subtitle {
  margin: 0.41em 0.61em;
  text-align: center;
}

.fc-chart-helper {
  color: #d7e2f2;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.fc-chart-helper--radar {
  text-align: center;
  margin: 0.25em 0 0.35em;
}

.fc-scatter-subline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35em;
  margin-top: 0.1em;
}

.fc-chart-helper--scatter {
  white-space: nowrap;
}

.fc-card__subtitle-text {
  color: var(--text-secondary);
}

.fc-select {
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5em;
  padding: 0.25em 0.5em;
  font-size: 0.75em;
  outline: none;
  cursor: pointer;
}
.fc-select:focus { border-color: var(--color-cyan); }

.fc-chart-container {
  flex: 1;
  width: 100%;
  min-height: 23em;
  position: relative;
}

.fc-radar-panel .fc-chart-container { min-height: 26em; }
.fc-bar-panel .fc-chart-container {min-height: 26em;}

/* Allow bar chart labels to overflow into padding */
.fc-bar-panel {
  overflow: visible;
}
.fc-bar-panel .fc-chart-container {
  overflow: visible;
}
.fc-bar-panel .fc-chart-container svg {
  overflow: visible;
}

.fc-chart-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Radar Specifics */
.fc-radar-panel {
  position: relative;
}

.fc-radar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 26em;
}

.fc-radar-center {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  pointer-events: auto; /* Changed from none to auto */
  cursor: pointer;      /* Added cursor pointer */
  transition: transform 0.2s ease;
}
.fc-radar-center:hover {
  transform: scale(1.05);
}

.fc-radar-label {
  font-size: 1.6em;
  font-weight: 700;
  color: #fe9d9d;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: -0.15em;
}

.fc-radar-score {
  font-size: 2.35em;
  font-weight: 900;
  color: white;
  line-height: 1;
  filter: drop-shadow(0 0 0.9375em rgba(255, 255, 255, 0.2));
}

.fc-radar-suffix {
  font-size: 0.6em;
  vertical-align: baseline;
  position: relative;
  top: -0.05em;
  margin-left: 0.04em;
}

.fc-radar-meta {
  font-size: 1.2em;
  color: var(--text-secondary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: -0.05em;
}

.fc-legend {
  margin-top: 0em;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  letter-spacing: 0.1em;
  color: #afb9c8;
  font-weight: 700;
  text-align: center;
  flex-shrink: 0;
  z-index: 1;
  justify-items: start;
}

.fc-legend-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
}

.fc-dot {width: 0.8em;height: 0.8em;border-radius: 14px;}
.fc-bg-red { background-color: var(--color-red); }
.fc-bg-orange { background-color: var(--color-orange); }
.fc-bg-yellow { background-color: var(--color-yellow); }
.fc-bg-emerald { background-color: var(--color-emerald); }
.fc-bg-pink { background-color: var(--color-pink); }
.fc-bg-violet { background-color: var(--color-violet); }

/* Radar legend: uniform dot sizing + new neon gradients (scoped to radar legend only) */
.fc-legend .fc-dot {
  width: 0.96em;
  height: 0.96em;
  aspect-ratio: 1;
  border-radius: 999px;
  flex: 0 0 0.96em;
  display: inline-block;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 2px rgba(255, 255, 255, 0.08);
}
.fc-legend .fc-bg-red {
  background-color: #7c5cff;
  background-image: linear-gradient(135deg, #b9a7ff, #7c5cff 55%, #3d2bff);
}
.fc-legend .fc-bg-orange {
  background-color: #4f6bff;
  background-image: linear-gradient(135deg, #a3b7ff, #4f6bff 55%, #2436ff);
}
.fc-legend .fc-bg-yellow {
  background-color: #2b97ff;
  background-image: linear-gradient(135deg, #86cfff, #2b97ff 55%, #006bff);
}
.fc-legend .fc-bg-cyan {
  background-color: #00d6ff;
  background-image: linear-gradient(135deg, #7defff, #00d6ff 55%, #009dff);
}
.fc-legend .fc-bg-violet {
  background-color: #00e6c3;
  background-image: linear-gradient(135deg, #6fffe9, #00e6c3 55%, #00b8a9);
}
.fc-legend .fc-bg-emerald {
  background-color: #32ffad;
  background-image: linear-gradient(135deg, #7dffd1, #32ffad 55%, #00d98c);
}
.fc-legend .fc-bg-pink {
  background-color: #7dffd9;
  background-image: linear-gradient(135deg, #b9fff1, #7dffd9 55%, #35f7c0);
}
.fc-legend .fc-bg-purple {
  background-color: #bff6ff;
  background-image: linear-gradient(135deg, #e6ffff, #bff6ff 55%, #8debff);
}

/* Bar Chart Filters */
.fc-filter-group {
  display: flex;
  gap: 0.5em;
  flex-wrap: nowrap;
}

.fc-filter-btn {
  padding: 0.25em 0.75em;
  border-radius: 0.5em;
  font-size: 1em;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.fc-filter-btn:hover { color: white; }
.fc-filter-btn--active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  #filter-buttons .filter-btn {
    padding: 0em 0.855em;
    font-size: 1.1em;
    min-width: 0;
    line-height: 1.1;
  }
  .fc-filter-group {
    gap: 0.35em;
  }
}

/* Table */
.fc-table-card {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.fc-table-header {
  padding: 1.5em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.05), transparent);
}

.fc-link-btn {
  font-size: 0.75em;
  color: var(--color-cyan-light);
  background: none;
  border: none;
  font-weight: 500;
  cursor: pointer;
}
.fc-link-btn:hover { color: #67e8f9; }

.fc-table-wrapper {
  overflow-x: auto;
}

.fc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.fc-th {
  padding: 1em 1.5em;
  font-size: 0.75em;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.2);
  font-weight: 600;
}

.fc-text-center { text-align: center; }
.fc-text-right { text-align: right; }

.fc-tr {
  transition: background-color 0.2s;
}
.fc-tr:hover { background-color: rgba(255, 255, 255, 0.05); }

.fc-td {
  padding: 1em 1.5em;
  color: var(--text-secondary);
  font-size: 0.875em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.fc-td-rank { font-family: monospace; color: var(--text-muted); }
.fc-td-player { display: flex; align-items: center; gap: 0.75em; }
.fc-player-name { font-weight: 500; color: white; transition: color 0.2s; }
.fc-tr:hover .fc-player-name { color: var(--color-cyan-light); }
.fc-player-team { font-size: 0.75em; color: var(--text-muted); }
.fc-td-val { font-weight: 700; color: white; }
.fc-td-sub { color: #cbd5e1; }

.fc-pos-badge {
  padding: 0.25em 0.5em;
  border-radius: 0.25em;
  font-size: 0.625em;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.fc-pos-wr { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border-color: rgba(59, 130, 246, 0.2); }
.fc-pos-rb { background: rgba(34, 197, 94, 0.1); color: #4ade80; border-color: rgba(34, 197, 94, 0.2); }
.fc-pos-qb { background: rgba(236, 72, 153, 0.1); color: #f472b6; border-color: rgba(236, 72, 153, 0.2); }
.fc-pos-te { background: rgba(249, 115, 22, 0.1); color: #fb923c; border-color: rgba(249, 115, 22, 0.2); }

/* Scrollbar */
.fc-dashboard ::-webkit-scrollbar { width: 0.5em; height: 0.5em; }
.fc-dashboard ::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
.fc-dashboard ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.25em;
}
.fc-dashboard ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

.fc-dashboard button:focus-visible, .fc-dashboard select:focus-visible {
  outline: 2px solid var(--color-cyan-light);
  outline-offset: 2px;
}

/* Scatter Plot Specifics */
.fc-scatter-panel {
  display: flex;
  flex-direction: column;
  --glass-blur: 5px;
  background: rgb(104 61 162 / 7%);
}

.fc-scatter-panel .fc-chart-container,
.fc-scatter-panel .fc-chart-container svg {
  overflow: visible;
}

.scatter-svg {
  border-radius: var(--radius-lg);
}

.fc-legend-inline {
  display: flex;
  gap: 1em;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fc-scatter-legend {
  flex-wrap: nowrap;
}

.fc-scatter-legend .fc-legend-item {
  background: transparent;
  border: none;
  padding: 0.15em 0.35em;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  cursor: pointer;
  transition: color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: none;
  opacity: 1;
}

.fc-scatter-legend .fc-legend-item.is-active {
  color: #e2e8f0;
  box-shadow: none;
  opacity: 1;
}

.fc-scatter-legend.has-filter .fc-legend-item { opacity: 0.35; }
.fc-scatter-legend.has-filter .fc-legend-item.is-active { opacity: 1; }

.fc-scatter-legend .fc-legend-item:focus-visible {
  outline: 2px solid var(--color-cyan-light);
  outline-offset: 2px;
}

.fc-pos-qb-dot { background-color: var(--color-pink-light); box-shadow: 0 0 8px var(--color-pink); }
.fc-pos-rb-dot { background-color: var(--color-emerald-light); box-shadow: 0 0 8px var(--color-emerald); }
.fc-pos-wr-dot { background-color: var(--color-cyan-light); box-shadow: 0 0 8px var(--color-cyan); }
.fc-pos-te-dot { background-color: var(--color-orange); box-shadow: 0 0 8px var(--color-orange); }

/* D3 Scatter Styles */
.scatter-grid line {
  stroke: rgba(255, 255, 255, 0.02);
}
.scatter-grid path {
  display: none;
}

.scatter-axis text {
  fill: var(--text-muted);
  font-family: var(--font-family);
  /* Font size handled by JS or specific class overrides below */
}
.scatter-axis-label {
  /* Base style for axis labels */
  font-size: 12px; 
}

.scatter-axis line, .scatter-axis path {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1px;
}

.scatter-label {
  fill: white;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  text-shadow: 0 0px 4px #000, 0 0px 3px #000, 0 0px 3px #000, 0 0px 3px #000;
}

.scatter-dot {
  transition: all 0.3s ease;
  cursor: pointer;
}
.scatter-dot:hover {
  stroke: white;
  stroke-width: 2px;
  filter: drop-shadow(0 0 8px white) !important; /* Override specific color glow on hover */
}

/* Specific Dot Styles to match Legend - glow handled by SVG filters for iOS compatibility */
.scatter-dot-qb { fill: var(--color-pink-light); }
.scatter-dot-rb { fill: var(--color-emerald-light); }
.scatter-dot-wr { fill: var(--color-cyan-light); }
.scatter-dot-te { fill: var(--color-orange); }

.scatter-tooltip {
  position: fixed;
  pointer-events: none;
  background: linear-gradient(145deg, #346e, #457e, #567e);
  color: #e5e7eb;
  padding: 6px 8px;
  border: 1px solid #4b5563;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  z-index: 9999;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.scatter-tooltip-label { font-weight: 800; letter-spacing: 0.03em; }

/* =========================================
   RESPONSIVE SIZING & LAYOUT RULES
   Separated for thorough implementation
   ========================================= */

/* Keep side-by-side layout; no column stacking */

.fc-legend-abbr { display: none; } /* Default hidden */

/* --- GLOBAL HEADINGS (Desktop) --- */
@media (min-width: 769px) {
  /* .fc-title removed */
}

/* --- GLOBAL HEADINGS (Mobile) --- */
@media (max-width: 768px) {
  /* .fc-title removed */
}

/* --- SUMMARY CARDS (Desktop) --- */
@media (min-width: 769px) {
  .fc-summary-card {padding: 0.71em 1.25em 0.6em;backdrop-filter: blur(0px);}
  .fc-summary-card .fc-card__header {margin-bottom: 0.6em;}
  .fc-summary-card .fc-card__title {font-size: 1.45em;margin-left: 4px;}
  .fc-summary-card .fc-card__subtitle {font-size: 0.95em;}
  .fc-summary-card .fc-badge {padding: 0.25em 0.5em;font-size: 0.85em;}
  .fc-summary-card .fc-metric-value { font-size: 2.25em; }
  .fc-summary-card .fc-metric-sub {margin-bottom: 0.025em;font-size: 1.2em;}
  .fc-summary-card .fc-card__footer {margin-top: 1em;font-size: 1.15em;}

  .fc-chart-helper { font-size: 0.95em; }
  .fc-chart-helper--scatter {font-size: 1em;align-self: end;font-weight: 400;font-style: italic;}
  .fc-chart-helper--radar {font-size: 0.92em;font-style: italic;text-shadow: 0 0 6px #7310ff;}
  .fc-scatter-subline {gap: 0em;}
}

/* --- SUMMARY CARDS (Mobile) --- */
@media (max-width: 768px) {
  .fc-summary-card {padding: 0.8em 0.5em 0.3em 0.5em;}
  .fc-summary-card .fc-card__header {margin-bottom: 0.25em;}
  .fc-summary-card .fc-card__title {font-size: 1.8em;margin-left: 4px;}
  .fc-summary-card .fc-card__subtitle {font-size: 1.55em;text-wrap-mode: nowrap;}
  .fc-summary-card .fc-badge {padding: 0.3em 0.5em;font-size: 1.35em;}
  .fc-summary-card .fc-metric-value { font-size: 2.75em; }
  .fc-summary-card .fc-metric-sub {margin-bottom: 0em;font-size: 1.5em;}
  .fc-summary-card .fc-card__footer {margin-top: 0.07em;font-size: 1.7em;}
}

/* --- CHART PANELS (Desktop) --- */
@media (min-width: 769px) {
  .fc-chart-panel {padding: 1em 1.25em;}
  .fc-chart-panel .fc-card__title {font-size: 1.5em;}
  .fc-chart-panel .fc-card__subtitle-text {}
  .fc-subtitle-radar {font-size: 1.2em;}
  .fc-subtitle-bar {font-size: 1.2em;}
  .fc-subtitle-scatter {font-size: 1.2em;}

  .fc-radar-label {
    font-size: 1.1em;
    font-weight: 700;
    color: #fe9d9d;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: -0.15em;
  }
  .fc-radar-meta {
    font-size: 0.8em;
    color: var(--text-secondary);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: -0.05em;
  }

  /* Legends */
  .fc-legend { font-size: 0.9em; gap: 0.5em; }
  .fc-legend-inline { font-size: 1.2em; }
  
  /* Scatter Panel */
  .fc-scatter-panel {min-height: 45em;backdrop-filter: blur(3px);-webkit-backdrop-filter: blur(3px);}
}

/* --- CHART PANELS (Mobile) --- */
@media (max-width: 768px) {
  .fc-chart-panel {padding: 1.15em 1.15em 0.05em 1.15em;}
  .fc-chart-panel .fc-card__title {font-size: 2.1em;align-self: center;}
  .fc-chart-panel .fc-card__subtitle-text {}
  .fc-subtitle-radar {font-size: 1.85em !important;}
  .fc-subtitle-bar {font-size: 1.85em !important;padding: 0px !important;margin: 0px -2px -2px -2px;}
  .fc-subtitle-scatter {font-size: 1.65em;}

  /* Radial dropdown sizing */
  .fc-custom-select { width: 14em; }
  .fc-select-dropdown { width: 90vw; max-width: 22em; }
  .fc-search-wrapper { padding: 1em; }
  .fc-search-icon { width: 1.1em; height: 1.1em; left: 1em; }
  .fc-select-search { font-size: 16px; padding: 0.8em 0.8em 0.8em 2.7em; }

  /* Keep dropdown to the right of the title on mobile */
  .fc-chart-header-top {flex-direction: row;align-items: center;justify-content: space-between;gap: 0.2em;}
  .fc-chart-header-top .fc-custom-select {min-width: 19em;}
  /* PPG bar panel header: stack filter buttons below title on mobile */
  .fc-chart-header-top--bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3em;
    margin-left: 0px;
  }
  /* Hide the PPG subtitle on mobile to save vertical space */
  .fc-subtitle-bar { display: none !important; }

  /* Grid ratio: give radar panel more horizontal space, shrink bar panel */
  .fc-grid-charts {
    grid-template-columns: 1.15fr 0.95fr;
  }

  /* Radar panel: taller container to match wider panel */
  .fc-radar-panel .fc-chart-container { min-height: 38em; }
  .fc-radar-container { min-height: 38em; }
  .fc-bar-panel .fc-chart-container { min-height: 28em; }

  .fc-chart-panel.fc-radar-panel {
    padding: 1.05em 0.45em 0.75em;
  }

  /* Radar center content: proportionally larger to match bigger chart */
  .fc-radar-label {
    font-size: 2.1em;
  }
  .fc-radar-score {
    font-size: 3.1em;
  }
  .fc-radar-suffix {
    font-size: 0.6em;
  }
  .fc-radar-meta {
    font-size: 1.55em;
  }

  .fc-bar-panel .fc-chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3em;
    width: 100%;
    margin-top: -4px;
  }
  .fc-bar-panel .fc-filter-group {
    width: auto;
    flex-wrap: wrap;
    gap: 0.05em;
    flex: 0 0 auto;
    background: #dddded05;
    border: 1px solid #ffffff05;
    border-radius: 1.2em;
    padding: 0.01em 0.01em;
    margin-right: -6px;
  }
  .fc-bar-panel .filter-btn {
    padding: 0.22em 0.55em !important;
    font-size: 2.4em !important;
    height: auto !important;
    min-height: 0 !important;
    border-radius: 0.45em;
    font-weight: 600;
  }

  /* Scatter Panel: Tall on mobile */
  .fc-scatter-panel {min-height: 68em;backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);}


  /* Radar Legend: Bigger & Abbreviated */
  .fc-legend {
    font-size: 1.8em;
    gap: 0.6em;
    margin: 1px 2px 1px 4px;
  }
  .fc-legend-full { display: none; }
  .fc-legend-abbr { display: inline; }

  /* Scatter Legend: Bigger */
  .fc-legend-inline {
    font-size: 1.9em;
  }

  .fc-chart-helper {font-size: 1.25em;}
  .fc-chart-helper--scatter {white-space: normal;line-height: 1.35;align-self: end;color: #abd;font-weight: 400;font-style: italic;font-size: 1.35em;}
  .fc-chart-helper--radar {font-size: 1.8em;margin: 0.15em 0 0.45em;margin-top: 0.5em;font-weight: 400;font-style: italic;text-shadow: 0 0 4px #7310ffdd;color: #ff4b4b;}
  .fc-scatter-subline {gap: 0;}

  /* Scatter Data Labels: Smaller */
  .scatter-label {
    font-size: 8px !important;
  }

  /* Scatter Axis Labels: Smaller */
  .scatter-axis-label {
    font-size: 7px !important;
  }
}

/* Custom Select Styles */
.fc-custom-select {
  position: relative;
  width: 12em; /* Default width */
  font-family: var(--font-family);
}

.fc-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5em;
  padding: 0.5em 0.75em;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.fc-select-trigger:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.fc-select-trigger.is-open {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.fc-select-dropdown {
  position: absolute;
  top: calc(100% + 0.5em);
  right: 0; /* Align right to prevent overflow on mobile */
  width: 18em; /* Wider than trigger for better search experience */
  background: #3b3d5a; /* Solid background to cover content */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5em;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5em);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fc-custom-select.is-open .fc-select-dropdown {
  opacity: 0.97;
  visibility: visible;
  transform: translateY(0);
}

.fc-search-wrapper {
  padding: 0.25em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  display: flex;
  align-items: center;
}

.fc-search-icon {
  position: absolute;
  left: 0.3em;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1.62em;
  padding: 0px 1px 2px 1px;
}

.fc-select-search {
  width: 100%;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.25em;
  padding: 0.05em 0.5em 0.05em 1.5em; /* Space for icon */
  color: white;
  font-size: 16px;
  font-weight: 200;
  outline: none;
  font-family: inherit;
}
.fc-select-search::placeholder { color: rgba(255,255,255,0.35); }

.fc-select-search:focus {
  border-color: var(--color-cyan);
}

.fc-select-options {
  list-style: none;
  max-height: 38em;
  overflow-y: auto;
  padding: 0.25em 0.05em 0.25em 0.5em;
}

/* Custom Scrollbar for options */
.fc-select-options::-webkit-scrollbar {
  width: 4px;
}
.fc-select-options::-webkit-scrollbar-track {
  background: transparent;
}
.fc-select-options::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.fc-option {
  padding: 0.5em 0.75em;
  font-size: 0.85em;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 0.25em;
  transition: background 0.1s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #abc2;
  margin: 1px;
}

.fc-option:hover, .fc-option.is-focused {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.fc-option.is-selected {
  background: rgb(93 98 129);
  color: #33ccff;
  font-weight: 700;
}

.fc-option-team {
  font-size: 1em;
  color: var(--text-muted);
  margin-left: 0.5em;
}

/* Position accent colors for custom select */
.fc-option-pos {font-weight: 400;}
.fc-option-pos-qb { color: var(--color-pink-light); }
.fc-option-pos-rb { color: var(--color-emerald-light); }
.fc-option-pos-wr { color: var(--color-cyan-light); }
.fc-option-pos-te { color: var(--color-orange); }

/* Mobile Adjustments for Dropdown */
@media (max-width: 768px) {
  .fc-custom-select {
    width: auto; /* Let it shrink/grow */
    min-width: 10em;
  }
  
  .fc-select-dropdown {
    width: 97vw; /* Wide on mobile */
    max-width: 35em;
    right: -6px; /* Align with right edge */
    border-radius: 4px;
  }
  
  .fc-select-trigger {
    padding: 0.05rem 0.4em 0.05rem;
    font-size: 2.2em;
  }

  .fc-search-icon {
    position: absolute;
    left: 0.5em;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 3em;
    padding-bottom: 1px;
  }

  .fc-search-icon {
    position: absolute;
    left: 0.5em;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 3em;
    padding-bottom: 1px;
  }
  
  .fc-option {
    padding: 0.15em 0.3em;
    font-size: 2.2em;
    border: 1px solid #fff1;
  }
}

/* Radar Modal Styles - Page-relative positioning (scrolls with content) */
.fc-modal {
  position: absolute;   /* Relative to the document/page, NOT viewport */
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  /* Horizontal position set via JS to center over radar chart */
  top: 745px;           /* Distance from TOP of the page */
  left: 0;              /* Will be set by JS */
  transform: translateX(-50%); /* Center the modal on the left position */
}
.fc-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.fc-modal-overlay {
  display: none;  /* No overlay needed for inline modal */
}

.fc-modal-content {
  position: relative;
  width: auto;
  max-width: 400px;
  background: rgb(57 66 86 / 95%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5em;
  padding: 1em 1.5em 0.8em;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.fc-modal.is-visible .fc-modal-content {
  transform: scale(1);
}

/* Desktop-only: Make modal wider */
@media (min-width: 769px) {
  .fc-modal-content {
    min-width: 350px;
  }
}

.fc-modal-close {
  position: absolute;
  top: 0.75em;
  right: 0.75em;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5em;
  cursor: pointer;
  line-height: 1;
  padding: 0.2em;
  transition: color 0.2s;
}
.fc-modal-close:hover {
  color: white;
}

/* New Modal Title Styles */
#radar-modal-title {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 300;
    color: white;
    letter-spacing: 0.05em;
}

.fc-modal-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    margin-left: 10px;
}

/* Position Tags - Inherited from global styles.css */
/* .player-tag styles removed to use global definition */

.fc-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5em 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.fc-stat-row:last-child {
  border-bottom: none;
}

.fc-stat-label {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 1em;
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.fc-stat-dot {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  flex-shrink: 0;
}

.fc-stat-values {
  display: flex;
  align-items: center;
  gap: 1em;
}

.fc-stat-val {
  color: white;
  font-weight: 400;
  font-size: 1.1em;
}

.fc-stat-rank {
  font-size: 0.85em;
  font-weight: 600;
  padding: 0.15em 0.5em;
  border-radius: 0.25em;
  background: rgba(255, 255, 255, 0.05);
  min-width: 3em;
  text-align: center;
}

.fc-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 0.2em; /* Avoid scrollbar overlap */
}

/* Mobile Modal Optimizations */
@media (max-width: 768px) {
  /* Mobile: Horizontal position still set by JS, just adjust top */
  .fc-modal {
    top: 474px;         /* Distance from TOP of page */
    /* left is set by JS for centering over radar chart */
    /* translateX(-50%) is inherited from base styles for centering */
    width: 12rem;
  }

  .fc-modal-content {
    padding: 0.5em 0.58em 0.19em 0.8em;
    border-radius: 1em;
    max-width: 221px;
    transform: scale(0.8);
    transform-origin: top center;
  }
  
  .fc-modal.is-visible .fc-modal-content {
    transform: scale(0.9);
  }
  
  #radar-modal-title {
    font-size: 0.8em;
    margin-bottom: 0.1em;
    padding-right: 2.5em; /* Space for close button */
    padding-bottom: 0.4em;
    border-bottom: 1px solid #FFF2;
  }

  .fc-modal-close {
    font-size: 1.5em;
    top: -0.2em;
    right: 0em;
    color: var(--text-secondary);
  }

  .fc-stat-row {
    padding: 0.25em 0;
  }

  .fc-stat-label {
    font-size: 0.75em;
  }

  .fc-stat-val {
    font-size: 0.8em;
    margin-right: 1px;
  }

  .fc-stat-rank {
    font-size: 0.6em;
    min-width: 3.4em;
    max-width: 3.4em;
    min-height: 2.1em;
    max-height: 2.1em;
    padding: 0.15em 0.5em;
    border-radius: 5px;
  }
  
  .fc-modal-body {
    max-height: 40.6vh;
  }
}

/* Radar Modal Position Tags - Ported from styles.css */
.fc-modal-pos-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    position: relative;
    line-height: 0.5rem;
    font-size: 0.8rem;
    padding: 6px 5px;
    background: rgba(255, 255, 255, 0.005);
    backdrop-filter: blur(1px) saturate(180%);
    border: 1px solid rgba(250, 250, 250, 0.12);
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2), inset 0 4px 20px rgba(255, 255, 255, 0.05);
}

.fc-modal-pos-tag::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 7px;
    backdrop-filter: blur(1px);
    box-shadow: inset 11px 8px 0px -10px rgba(255, 255, 255, .1),
    inset 0px 8px 0px -5px rgba(255, 255, 255, .1);
    opacity: 0.34;
    z-index: -1;
    filter: blur(1px) drop-shadow(10px 4px 6px black) brightness(115%);
    pointer-events: none;
}

.fc-modal-pos-tag.QB {
    color: #FF3A75c0;
    box-shadow: inset 0 0 11px #ff3a7529;
}

.fc-modal-pos-tag.RB {
    color: #00EBC7c0;
    box-shadow: inset 0 0 6px #00EBC715;
}

.fc-modal-pos-tag.WR {
    color: #58A7FFca;
    box-shadow: inset 0 0 4px #58A7FF25;
}

.fc-modal-pos-tag.TE {
    color: #B469FFca;
    box-shadow: inset 0 0 10px #B469FF26;
}
