:root {
  --page-radius: 0.45rem;
  --chip-padding: 0.35rem 0.6rem;
  --chip-gap: 0.35rem;
}

body {
  color: #f5f5ff;
  background: #05060a;
}

.metadata-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5ff;
}

.nav-link-group {
  display: flex;
  gap: 0.35rem;
}

.nav-link-group-database {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 0.35rem;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(123, 63, 255, 0.2);
  color: #f5f5ff;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible {
  background: rgba(123, 63, 255, 0.45);
  border-color: rgba(123, 63, 255, 0.65);
  box-shadow: 0 4px 20px rgba(123, 63, 255, 0.45);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 170px;
  padding: 0.35rem;
  background: rgba(5, 6, 10, 0.95);
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-item {
  justify-content: flex-start;
  text-align: left;
  padding: 0.45rem 0.9rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  color: #f5f5ff;
  width: 100%;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible {
  background: rgba(123, 63, 255, 0.18);
  border-color: rgba(123, 63, 255, 0.5);
  color: #fff;
  text-decoration: none;
}

.dataset-tabs-wrapper {
  background: rgba(5, 6, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 0.8rem 1.2rem 0.35rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  overflow: visible;
  padding-top: 1.2rem;
  padding-bottom: 0.8rem;
}

.dataset-tabs {
  border-bottom: none;
  margin-bottom: 0.25rem;
}

.dataset-tabs .nav-link {
  border-radius: 0.85rem;
  border: 1px solid transparent;
  margin-right: 0.4rem;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 245, 255, 0.8);
  letter-spacing: 0.04em;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  line-height: 1.5;
}

.dataset-tabs .nav-link:hover {
  background: rgba(123, 63, 255, 0.15);
  border-color: rgba(123, 63, 255, 0.4);
  color: #fff;
}

.dataset-tabs .nav-link.active {
  background: #7b3fff;
  border-color: #7b3fff;
  color: #fff;
  box-shadow: 0 10px 18px rgba(123, 63, 255, 0.35);
}

.dataset-tabs-wrapper .tab-content {
  padding-top: 0.8rem;
}

.dataset-panel {
  overflow: visible;
}

.teams-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.teams-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

.teams-header-actions .form-select {
  min-width: 100px;
}

.teams-table-wrapper {
  padding: 0.8rem;
}

.teams-table-wrapper .table {
  min-width: 720px;
}

.team-row {
  cursor: pointer;
  transition: background 0.2s ease;
}

.team-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.team-row-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.standings-columns {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.standings-column {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.standings-panel {
  padding: 0.6rem;
  background: rgba(5, 6, 10, 0.85);
  min-height: 100%;
}

.standings-panel h3 {
  font-size: 1rem;
}

.standings-panel .table-responsive {
  margin: 0;
}

.standings-panel .table th,
.standings-panel .table td {
  padding: 0.35rem 0.55rem;
  vertical-align: middle;
}

.standings-column--afc {
  border-top: 2px solid rgba(91, 149, 255, 0.7);
}

.standings-column--nfc {
  border-top: 2px solid rgba(255, 99, 132, 0.7);
}

@media (max-width: 768px) {
  .standings-columns {
    flex-direction: column;
  }
}
.team-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--team-pill-border, rgba(255, 255, 255, 0.15));
  background: var(--team-pill-bg, #7b3fff);
  color: var(--team-pill-text, #f5f5ff);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.65);
}

.team-row-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.teams-rating-cell .teams-rating-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.teams-rating-hint {
  font-size: 0.75rem;
  color: #b3b3b3;
}

.team-detail-row {
  display: none;
}

.team-detail-row.expanded {
  display: table-row;
}

.team-detail-row td {
  padding: 0.35rem 0 0.8rem;
  border-top: none;
}

.team-detail-card {
  background: rgba(18, 18, 18, 0.85);
  border: 1px solid rgba(123, 63, 255, 0.25);
  border-radius: 1rem;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.team-detail-card-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.detail-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #b3b3b3;
}

.teams-detail-meta {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.team-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.team-detail-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.team-detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.team-detail-meta-item {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b3b3b3;
}

.team-detail-meta-item strong {
  display: block;
  font-size: 1rem;
  margin-top: 0.15rem;
  color: #f5f5ff;
}

.team-color-palette {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.team-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.team-detail-history {
  padding-top: 0.35rem;
}

.team-history-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-left: 0.8rem;
}

.team-history-timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.25rem;
  left: 0.3rem;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.team-history-entry {
  position: relative;
  padding-left: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.team-history-entry::before {
  content: "";
  position: absolute;
  left: -0.35rem;
  top: 0.3rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.team-history-entry-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.team-history-entry-period {
  font-size: 0.75rem;
  color: #b3b3b3;
}

.team-history-period-missing {
  font-style: italic;
  opacity: 0.8;
}

.team-retired-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.team-retired-number-chip {
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.team-detail-history-empty {
  font-size: 0.75rem;
  color: #b3b3b3;
}

.team-detail-deep {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-detail-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.team-detail-group {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.02);
}

.group-label {
  display: block;
  font-size: 0.7rem;
  color: #b3b3b3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.group-value {
  font-weight: 600;
}

.teams-metadata-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.teams-metadata-card {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.6rem;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.teams-metadata-card .label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b3b3b3;
}

.teams-metadata-card .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f5f5ff;
}

.teams-metadata-prompt {
  font-size: 0.8rem;
  color: #b3b3b3;
}

.team-retired-numbers {
  font-size: 0.9rem;
}

.depth-chart-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.depth-chart-controls {
  gap: 0.6rem;
}

.depth-chart-actions {
  flex-wrap: wrap;
}

.depth-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(250px, 360px);
  gap: 1.2rem;
}

.depth-chart-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.depth-chart-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 0.8rem;
}

.depth-chart-section-header {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #b3b3b3;
}

.depth-chart-section-slots {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
}

.depth-chart-slot {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 180px;
}

.depth-chart-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.depth-chart-slot-body {
  flex: 1;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 0.6rem;
  padding: 0.35rem;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.01);
}

.depth-chart-slot-body.drag-over {
  border-color: rgba(123, 63, 255, 0.8);
  background: rgba(123, 63, 255, 0.08);
}

.depth-chart-slot-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: grab;
}

.depth-chart-slot-player-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.depth-chart-slot-player-actions {
  display: flex;
  gap: 0.35rem;
}

.depth-chart-icon-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #f5f5ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.depth-chart-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.depth-chart-roster {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.depth-chart-roster-list {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.02);
  min-height: 360px;
  max-height: 620px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.depth-chart-roster-list.drop-target {
  border-color: rgba(123, 63, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(123, 63, 255, 0.5);
}

.depth-chart-roster-player {
  border-radius: 0.7rem;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: grab;
}

.depth-chart-roster-player strong {
  display: block;
  font-size: 0.95rem;
}

.depth-chart-roster-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.depth-chart-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.depth-chart-slot-player-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.depth-chart-slot-player-meta .status-chip.pos-chip {
  margin-left: 0;
}

.depth-chart-roster-player-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.depth-chart-rating-stars {
  display: inline-flex;
  gap: 0.15rem;
  align-items: center;
  font-size: 0.85rem;
}

.depth-chart-rating-stars .bi {
  font-size: 1rem;
}

.depth-chart-rating-stars.depth-chart-rating-unrated .bi {
  color: rgba(255, 255, 255, 0.25);
}

.depth-chart-placeholder {
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #b3b3b3;
  font-size: 0.85rem;
}

@media (max-width: 992px) {
  .depth-chart-layout {
    grid-template-columns: 1fr;
  }
}
.player-season-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 10, 0.9);
  padding: 1.2rem;
  overflow: auto;
  backdrop-filter: blur(16px);
}

.player-season-card {
  width: min(92vw, 720px);
  max-height: calc(100vh - 3.5rem);
  background: #141414;
  color: #f5f5ff;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: auto;
  position: relative;
}

.player-season-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  padding-top: 0.35rem;
}

.player-season-card-close {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: transparent;
  color: rgba(245, 245, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.35rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.player-season-card-close:hover,
.player-season-card-close:focus-visible {
  color: #f5f5ff;
}

.player-season-card-summary {
  margin: 0;
}

.player-season-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: auto;
}

.player-season-card-seasons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.player-season-card-season {
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.player-season-card-season-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.player-season-card-season-team {
  color: #b3b3b3;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.player-season-card-stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.35rem;
  margin: 0;
  column-gap: 0.6rem;
}

.player-season-card-stat-list dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.15rem;
}

.player-season-card-stat-list dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.player-season-history-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.player-season-history-table {
  width: max-content;
  border-collapse: collapse;
  table-layout: auto;
  min-width: 100%;
}

.player-season-history-table th,
.player-season-history-table td {
  padding: 0.35rem 0.6rem;
  vertical-align: top;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.player-season-history-table tr.active {
  background: rgba(123, 63, 255, 0.15);
}

.player-season-history-year {
  font-weight: 600;
  width: 6rem;
}

.player-season-history-stat-column {
  width: 80px;
  text-align: right;
}

.player-season-history-stat-value-cell {
  font-weight: 600;
  color: #f5f5ff;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.player-season-history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.player-season-history-stat {
  display: inline-flex;
  gap: 0.25rem;
  align-items: baseline;
}

.player-season-history-stat-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
}

.player-season-history-stat-value {
  font-weight: 600;
  color: #f5f5ff;
}

@media (max-width: 576px) {
  .player-season-card {
    width: 100%;
    max-height: calc(100vh - 2rem);
  }
}
