/* ==========================================================================
   NBA INTELLIGENCE - SHOT CHARTS VERCEL DARK GEIST STYLESHEET
   ========================================================================== */

.shot-charts-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* Hero Section */
.shot-charts-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-title-group h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-title-group p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* View Mode Switcher */
.view-mode-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
  background: var(--bg-surface-elevated);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-medium);
}

/* Player Selector Pills */
.player-pills-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.player-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 8px;
  background: rgba(18, 18, 18, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  backdrop-filter: blur(12px);
}

.player-pill:hover {
  border-color: var(--border-active);
  transform: translateY(-1px);
  background: rgba(30, 30, 30, 0.95);
}

.player-pill.active {
  border-color: rgba(56, 189, 248, 0.6);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(15, 23, 42, 0.9));
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.player-pill-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  background: #111;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.player-pill.active .player-pill-avatar {
  border-color: #38bdf8;
}

.player-pill-info {
  display: flex;
  flex-direction: column;
}

.player-pill-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.player-pill-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Main Grid Layout */
.shot-charts-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

@media (max-width: 1080px) {
  .shot-charts-grid {
    grid-template-columns: 1fr;
  }
}

/* Court Card */
.court-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.court-header-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.court-title {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Legend */
.court-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

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

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-swatch.hot {
  background: #68b826;
}

.legend-swatch.avg {
  background: #eab308;
}

.legend-swatch.cold {
  background: #d9534f;
}

/* SVG Court Frame */
.court-svg-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 500 / 470;
  background: #deb887;
  border-radius: 8px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45), 0 12px 36px rgba(0, 0, 0, 0.6);
  border: 4px solid #5a3818;
  overflow: hidden;
}

.court-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Zones */
.court-zone {
  cursor: pointer;
  transition: filter 0.16s ease, opacity 0.16s ease;
  stroke: rgba(18, 14, 10, 0.95);
  stroke-width: 1.5;
}

.court-zone:hover,
.court-zone.active {
  filter: brightness(1.24) saturate(1.15);
}

/* Glowing outline overlay for the active hovered zone */
.court-zone-active-outline {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 12px rgba(56, 189, 248, 0.6));
  transition: opacity 0.14s ease;
}

.court-zone-active-outline.visible {
  opacity: 1;
}

/* Badges */
.shot-badge {
  cursor: pointer;
  pointer-events: all;
  transition: filter 0.15s ease;
}

.shot-badge:hover,
.shot-badge.active {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.9));
}

.badge-bg {
  fill: rgba(15, 23, 42, 0.88);
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.2;
  transition: stroke 0.15s ease, fill 0.15s ease;
}

.shot-badge:hover .badge-bg,
.shot-badge.active .badge-bg {
  fill: rgba(15, 23, 42, 0.98);
  stroke: #38bdf8;
  stroke-width: 1.8;
}

.badge-text-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  fill: #ffffff;
  text-anchor: middle;
}

.badge-text-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  fill: #f8fafc;
  text-anchor: middle;
}

/* Court Markings */
.court-line {
  stroke: #ffffff;
  stroke-width: 3.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.court-line-thin {
  stroke: #ffffff;
  stroke-width: 2;
  fill: none;
}

.court-ring {
  stroke: #ea580c;
  stroke-width: 2.8;
  fill: none;
}

.court-backboard {
  stroke: #ffffff;
  stroke-width: 4.5;
  stroke-linecap: square;
}

/* Scatter Dots */
.scatter-dot {
  transition: r 0.15s ease, opacity 0.15s ease;
  cursor: pointer;
}

.scatter-dot:hover {
  r: 4.5;
  stroke: #ffffff;
  stroke-width: 1;
}

.scatter-dot.made {
  fill: #22c55e;
}

.scatter-dot.missed {
  fill: #ef4444;
}

/* Floating Tooltip */
.court-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(10, 10, 12, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  z-index: 100;
  transform: none;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  max-width: calc(100% - 16px);
  box-sizing: border-box;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
}

.tooltip-title {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 4px;
  letter-spacing: -0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.78rem;
  margin-top: 3px;
  line-height: 1.4;
}

.tooltip-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary, #ffffff);
}

.tooltip-delta {
  font-weight: 700;
}

.tooltip-delta.hot {
  color: #4ade80;
}

.tooltip-delta.cold {
  color: #f87171;
}

.tooltip-delta.avg {
  color: #facc15;
}

/* Player Dossier Card */
.player-dossier-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dossier-header {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
}

.dossier-portrait {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #111;
  border: 2px solid var(--border-medium);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.dossier-meta h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dossier-team {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.dossier-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dossier-badge {
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
}

.dossier-badge.active-status {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
}

.dossier-badge.retired-status {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
}

/* Stat Metrics Grid */
.dossier-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dossier-stat-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.dossier-stat-box.highlight {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(0, 0, 0, 0.2));
  border-color: rgba(56, 189, 248, 0.25);
}

.stat-box-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.stat-box-val {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.stat-box-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Zones Summary Table */
.zones-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  overflow-x: auto;
}

.zones-table-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zones-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.zones-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.zones-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.zones-table tr:hover td,
.zones-table tr.active-row td {
  background: rgba(56, 189, 248, 0.12) !important;
}

.zones-table tr.active-row td:first-child {
  border-left: 3px solid #38bdf8;
}

.zone-dot-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.diff-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.diff-badge.hot {
  background: rgba(104, 184, 38, 0.18);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.diff-badge.cold {
  background: rgba(217, 83, 79, 0.18);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.diff-badge.avg {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}
