/* NBA Stats & Live Score Tracker Scoped Styles */
.nsst-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-color, #1f2937);
}

.nsst-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Stat Highlights */
.nsst-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.nsst-stat-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nsst-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1d4ed8;
}

.nsst-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tabs */
.nsst-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color, #e5e7eb);
  overflow-x: auto;
}

.nsst-tab {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nsst-tab:hover {
  color: var(--text-color, #111827);
}

.nsst-tab.active {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}

.nsst-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Card */
.nsst-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nsst-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.nsst-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted, #4b5563);
  margin: 0;
  line-height: 1.5;
}

/* Scoreboard Game Header */
.nsst-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  color: #ffffff;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  gap: 1rem;
}

.nsst-team-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.nsst-team-home {
  justify-content: flex-end;
}

.nsst-meta-right {
  text-align: right;
}

.nsst-team-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
}

.nsst-team-meta {
  display: flex;
  flex-direction: column;
}

.nsst-team-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.nsst-team-record {
  font-size: 0.75rem;
  color: #94a3b8;
}

.nsst-team-score {
  font-size: 2.25rem;
  font-weight: 900;
  font-family: ui-monospace, monospace;
}

.nsst-game-status-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 140px;
}

.nsst-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.nsst-badge-live {
  background: #dc2626;
  color: #ffffff;
}

.nsst-clock {
  font-family: ui-monospace, monospace;
  font-size: 1.25rem;
  font-weight: 700;
}

.nsst-status-desc {
  font-size: 0.75rem;
  color: #cbd5e1;
  text-align: center;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sim controls */
.nsst-sim-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nsst-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s ease;
}

.nsst-btn-primary {
  background: #1d4ed8;
  color: #ffffff;
}

.nsst-btn-primary:hover {
  opacity: 0.9;
}

.nsst-btn-secondary {
  background: var(--button-sec-bg, #f3f4f6);
  color: var(--text-color, #374151);
  border-color: var(--border-color, #d1d5db);
}

.nsst-btn-secondary:hover {
  background: var(--button-sec-hover, #e5e7eb);
}

/* Tables */
.nsst-table-wrap {
  overflow-x: auto;
}

.nsst-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.nsst-table th, .nsst-table td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.nsst-table th {
  background: var(--table-header-bg, #f9fafb);
  font-weight: 600;
  color: var(--text-color, #374151);
}

/* Performers */
.nsst-performers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.nsst-performer-card {
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.375rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.nsst-perf-team {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  font-weight: 600;
}

.nsst-perf-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.nsst-perf-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-color, #334155);
}

/* Standings */
.nsst-standings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nsst-standings-pills {
  display: flex;
  gap: 0.5rem;
}

.nsst-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.nsst-pill.active {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

/* Player Comparison */
.nsst-player-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.nsst-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.nsst-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color, #374151);
}

.nsst-select {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  background: var(--input-bg, #ffffff);
  color: inherit;
  outline: none;
}

.nsst-comparison-matrix {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.nsst-comp-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nsst-comp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
}

.nsst-comp-metric {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
}

.nsst-comp-bar-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  display: flex;
  overflow: hidden;
}

.nsst-comp-bar-a {
  background: #2563eb;
  height: 100%;
}

.nsst-comp-bar-b {
  background: #f59e0b;
  height: 100%;
}

@media (max-width: 640px) {
  .nsst-game-header {
    flex-direction: column;
  }
  .nsst-team-block {
    width: 100%;
    justify-content: space-between;
  }
  .nsst-player-selectors {
    grid-template-columns: 1fr;
  }
}

.nsst-team-away {
  justify-content: flex-start;
}
