* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0f0f23 100%);
  color: #e8e8e8;
  min-height: 100vh;
  margin: 0;
}

.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(90deg, #ff6b35, #f7931e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: #888;
  margin-top: 0.25rem;
}

/* Tab navigation */
.main-nav {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  justify-content: center;
  border-bottom: 2px solid #333;
  padding-bottom: 0;
}

.main-nav .nav-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
  -webkit-appearance: none;
  appearance: none;
}

.main-nav .nav-btn:hover {
  color: #e8e8e8;
  background: rgba(255, 255, 255, 0.05);
}

.main-nav .nav-btn.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
  background: transparent;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-desc {
  color: #888;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.teams-table-wrapper {
  margin-bottom: 1rem;
}

.teams-table th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-align: left;
}

.teams-table th:not(:first-child) {
  text-align: right;
}

.teams-table th:hover {
  color: #ff6b35;
}

.teams-table th.sorted-asc::after {
  content: " ▲";
  font-size: 0.7em;
  color: #ff6b35;
}

.teams-table th.sorted-desc::after {
  content: " ▼";
  font-size: 0.7em;
  color: #ff6b35;
}

.teams-table td {
  white-space: nowrap;
}

.teams-table td.num {
  text-align: right;
}

.teams-sub-nav {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0;
}

.teams-sub-nav .teams-sub-btn {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #888;
  cursor: pointer;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  -webkit-appearance: none;
  appearance: none;
}

.teams-sub-nav .teams-sub-btn:hover {
  color: #e8e8e8;
}

.teams-sub-nav .teams-sub-btn.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
}

.teams-sub-pane {
  display: none;
}

.teams-sub-pane.active {
  display: block;
}

/* Schedule page */
.schedule-sub-nav {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0;
}

.schedule-sub-nav .schedule-sub-btn {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #888;
  cursor: pointer;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  -webkit-appearance: none;
  appearance: none;
}

.schedule-sub-nav .schedule-sub-btn:hover {
  color: #e8e8e8;
}

.schedule-sub-nav .schedule-sub-btn.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
}

.schedule-sub-pane {
  display: none;
}

.schedule-sub-pane.active {
  display: block;
}

.schedule-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.schedule-date-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-date-nav {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.25rem;
  border: 1px solid #444;
  border-radius: 8px;
  background: #252541;
  color: #e8e8e8;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-date-nav:hover {
  background: #333355;
  border-color: #ff6b35;
  color: #ff6b35;
}

.schedule-date-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #e8e8e8;
}

.schedule-date-text {
  min-width: 12rem;
}

.schedule-date-input {
  padding: 0.35rem 0.5rem;
  font-size: 0.95rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a3e;
  color: #e8e8e8;
}

.schedule-team-picker label,
.schedule-month-nav label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: #888;
}

.schedule-team-picker select,
.schedule-month-nav select {
  min-width: 14rem;
  padding: 0.5rem;
  font-size: 0.95rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a3e;
  color: #e8e8e8;
}

.schedule-month-nav {
  margin-bottom: 1rem;
}

.schedule-games-wrapper {
  margin-bottom: 1rem;
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: fixed;
}

.schedule-table thead th {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #aaa;
  border-bottom: 1px solid #333;
}

.schedule-table thead th.schedule-col-spreads-header {
  text-align: center;
}

.schedule-table tbody td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #2a2a3e;
  vertical-align: middle;
}

.schedule-table tbody tr:hover {
  background: rgba(255, 107, 53, 0.06);
}

.schedule-table thead th.schedule-col-time,
.schedule-table thead th.schedule-col-date,
.schedule-table thead th.schedule-col-matchup {
  text-align: center;
}

.schedule-col-time {
  width: 6rem;
  white-space: nowrap;
  color: #ff6b35;
  font-weight: 500;
  text-align: center;
  border-left: 2px solid #777 !important;
}

.schedule-col-date {
  width: 8rem;
  white-space: nowrap;
  color: #ff6b35;
  font-weight: 500;
  text-align: center;
  border-left: 2px solid #777 !important;
}

.schedule-col-matchup {
  width: 28%;
  min-width: 12rem;
  color: #e8e8e8;
  white-space: nowrap;
  text-align: center;
}

.schedule-col-total-points,
.schedule-col-margin {
  width: 7rem;
  min-width: 7rem;
  text-align: center;
  color: #c8c8c8;
  white-space: nowrap;
}

.schedule-col-margin {
  border-right: 2px solid #777 !important;
}

.schedule-table thead th.schedule-col-total-points,
.schedule-table thead th.schedule-col-margin {
  text-align: center;
}

/* Section 1 (Time/Date → Margin): top and bottom border */
.schedule-table thead tr:first-child th.schedule-col-time,
.schedule-table thead tr:first-child th.schedule-col-date,
.schedule-table thead tr:first-child th.schedule-col-matchup,
.schedule-table thead tr:first-child th.schedule-col-total-points,
.schedule-table thead tr:first-child th.schedule-col-margin {
  border-top: 2px solid #777 !important;
}

.schedule-table tbody tr:last-child td.schedule-col-time,
.schedule-table tbody tr:last-child td.schedule-col-date,
.schedule-table tbody tr:last-child td.schedule-col-matchup,
.schedule-table tbody tr:last-child td.schedule-col-total-points,
.schedule-table tbody tr:last-child td.schedule-col-margin {
  border-bottom: 2px solid #777 !important;
}

.schedule-table tbody tr:last-child td.schedule-col-spread-first,
.schedule-table tbody tr:last-child td.schedule-col-spread,
.schedule-table tbody tr:last-child td.schedule-col-spread-last {
  border-bottom: 2px solid #777 !important;
}

.schedule-table tbody tr:last-child td.schedule-col-total-first,
.schedule-table tbody tr:last-child td.schedule-col-total,
.schedule-table tbody tr:last-child td.schedule-col-total-last {
  border-bottom: 2px solid #777 !important;
}

.schedule-col-spreads-header {
  text-align: center;
  color: #c8c8c8;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.5rem;
  border: 2px solid #777 !important;
}

.schedule-col-spread-first {
  border-left: 2px solid #777 !important;
}

.schedule-col-spread-last {
  border-right: 2px solid #777 !important;
}

.schedule-table tbody td.schedule-col-spread-first {
  border-left: 2px solid #777 !important;
}

.schedule-table tbody td.schedule-col-spread-last {
  border-right: 2px solid #777 !important;
}

.schedule-col-spread {
  width: 9ch;
  min-width: 9ch;
  color: #aaa;
  font-size: 0.9rem;
  white-space: nowrap;
  text-align: center;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.schedule-table thead th.schedule-col-spread {
  text-align: center;
  width: 9ch;
  min-width: 9ch;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.schedule-table thead th.schedule-col-totals-header {
  text-align: center;
}

.schedule-col-totals-header {
  text-align: center;
  color: #c8c8c8;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.5rem;
  border: 2px solid #777 !important;
}

.schedule-col-total-first {
  border-left: 2px solid #777 !important;
}

.schedule-col-total-last {
  border-right: 2px solid #777 !important;
}

.schedule-table tbody td.schedule-col-total-first {
  border-left: 2px solid #777 !important;
}

.schedule-table tbody td.schedule-col-total-last {
  border-right: 2px solid #777 !important;
}

.schedule-col-total {
  width: 7ch;
  min-width: 7ch;
  color: #aaa;
  font-size: 0.9rem;
  white-space: nowrap;
  text-align: center;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.schedule-table thead th.schedule-col-total {
  text-align: center;
  width: 7ch;
  min-width: 7ch;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.schedule-winner {
  color: #4ade80;
  font-weight: 500;
}

.schedule-loser {
  color: #f87171;
  font-weight: 500;
}

.schedule-team-link {
  cursor: pointer;
  text-decoration: none;
}
.schedule-team-link:hover {
  text-decoration: underline;
}

.teams-team-cell {
  cursor: pointer;
}
.teams-team-cell:hover {
  text-decoration: underline;
}

/* Standings page */
.standings-sub-nav {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #333;
}

.standings-sub-nav .standings-sub-btn {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #888;
  cursor: pointer;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}

.standings-sub-nav .standings-sub-btn:hover {
  color: #e8e8e8;
}

.standings-sub-nav .standings-sub-btn.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
}

.standings-sub-pane {
  display: none;
}

.standings-sub-pane.active {
  display: block;
}

.standings-sub-pane.hidden {
  display: none;
}

.standings-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.standings-page-header .standings-desc {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.standings-page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.standings-desc {
  color: #888;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.standings-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.standings-conference-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: #e8e8e8;
  letter-spacing: 0.02em;
}

.standings-conference-block:not(:first-child) {
  margin-top: 2.5rem;
}

.standings-conference-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: #e8e8e8;
}

.standings-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #333;
  background: rgba(26, 26, 46, 0.6);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.standings-table thead th {
  padding: 0.6rem 0.5rem;
  text-align: right;
  font-weight: 600;
  color: #aaa;
  border-bottom: 1px solid #333;
  white-space: nowrap;
}

.standings-table thead th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.standings-table thead th[data-sort]:hover {
  color: #e8e8e8;
}

.standings-table thead th.sorted-asc::after,
.standings-table thead th.sorted-desc::after {
  margin-left: 0.25rem;
  font-size: 0.75em;
}

.standings-table thead th.sorted-asc::after {
  content: '▲';
}

.standings-table thead th.sorted-desc::after {
  content: '▼';
}

.standings-table thead th.standings-team {
  text-align: left;
  padding-left: 0.75rem;
}

.standings-table thead th.standings-rank {
  text-align: center;
  width: 2rem;
}

.standings-table thead th.standings-record,
.standings-table thead th.standings-strk {
  text-align: center;
}

.standings-table tbody tr {
  border-bottom: 1px solid #2a2a3e;
}

.standings-table tbody tr:hover {
  background: rgba(255, 107, 53, 0.08);
}

.standings-table tbody td {
  padding: 0.5rem;
  text-align: right;
}

.standings-table tbody td.standings-rank {
  text-align: center;
  color: #888;
  font-weight: 500;
}

.standings-table tbody td.standings-team {
  text-align: left;
  padding-left: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.standings-table tbody td.standings-record,
.standings-table tbody td.standings-strk {
  text-align: center;
}

.standings-table .standings-tricode {
  font-weight: 700;
  color: #ff6b35;
  margin-right: 0.35rem;
}

.standings-table td.standings-diff {
  font-weight: 500;
}

.standings-table .standings-strk-w {
  color: #4ade80;
}

.standings-table .standings-strk-l {
  color: #f87171;
}

.teams-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.teams-page-header .page-desc {
  margin-bottom: 0;
}

.teams-page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.teams-filter-label {
  font-size: 0.9rem;
  color: #ff6b35;
}

.btn-filter {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid #444;
  border-radius: 8px;
  background: #252541;
  color: #e8e8e8;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-filter:hover {
  background: #333355;
  border-color: #ff6b35;
  color: #ff6b35;
}

.teams-filter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.teams-filter-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.teams-filter-form label span {
  font-size: 0.9rem;
  color: #c8c8c8;
}

.teams-filter-form select {
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #444;
  border-radius: 8px;
  background: #1a1a2e;
  color: #e8e8e8;
  max-width: 200px;
}

.teams-filter-form select:focus {
  outline: none;
  border-color: #ff6b35;
}

.teams-filter-form .teams-filter-last-n {
  width: 4.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #2a2a2a;
  color: #fff;
}

.teams-filter-form .teams-filter-last-n:focus {
  outline: none;
  border-color: #ff6b35;
}

.standings-role-by-wrap {
  margin-left: 0.5rem;
}

.standings-role-by-wrap.hidden {
  display: none;
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-right: 0.5rem;
  accent-color: #ff6b35;
}

.teams-filter-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn-secondary {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid #555;
  border-radius: 8px;
  background: transparent;
  color: #c8c8c8;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #888;
  color: #e8e8e8;
}

.players-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.players-filter-team {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.players-filter-team span {
  color: #888;
  font-size: 0.9rem;
  white-space: nowrap;
}

.players-filter-team select {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid #333;
  border-radius: 8px;
  background: #1a1a2e;
  color: #e8e8e8;
  min-width: 180px;
}

.players-filters .search-bar {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.search-bar {
  margin-bottom: 1.5rem;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #333;
  border-radius: 8px;
  background: #1a1a2e;
  color: #e8e8e8;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  outline: none;
  border-color: #ff6b35;
}

.search-bar input::placeholder {
  color: #666;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid #333;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
}

th {
  background: #252541;
  font-weight: 600;
  color: #c8c8c8;
  font-size: 0.85rem;
}

th:first-child {
  border-radius: 12px 0 0 0;
}

th:last-child {
  border-radius: 0 12px 0 0;
}

tbody tr {
  border-bottom: 1px solid #2a2a4a;
}

tbody tr:hover {
  background: rgba(255, 107, 53, 0.05);
}

tbody tr:last-child {
  border-bottom: none;
}

td select {
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a2e;
  color: #e8e8e8;
  min-width: 140px;
}

td select:focus {
  outline: none;
  border-color: #ff6b35;
}

td input[type="number"] {
  width: 70px;
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a2e;
  color: #e8e8e8;
}

td input[type="number"]:focus {
  outline: none;
  border-color: #ff6b35;
}

.percent-cell {
  font-weight: 500;
  min-width: 80px;
}

.percent-high {
  color: #4ade80;
}

.percent-mid {
  color: #fbbf24;
}

.percent-low {
  color: #f87171;
}

.loading, .empty-state {
  text-align: center;
  padding: 2rem;
  color: #888;
}

.hidden {
  display: none !important;
}

.player-name {
  cursor: pointer;
  color: #ff6b35;
  font-weight: 500;
  text-decoration: none;
}

.player-name:hover {
  text-decoration: underline;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.hidden {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-header {
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid #2a2a4a;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  background: linear-gradient(90deg, #ff6b35, #f7931e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-subtitle {
  margin: 0.25rem 0 0;
  color: #888;
  font-size: 0.9rem;
}

.modal-filters-universal {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #2a2a4a;
}

.modal-filters-universal .filters-section {
  margin-bottom: 0;
}

.modal-last-x-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.modal-last-x-wrap span {
  color: #888;
  font-size: 0.9rem;
}

.modal-last-x-wrap input.modal-input-dark,
.modal-filters-universal .modal-last-x-wrap input {
  width: 70px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a2e !important;
  color: #e8e8e8 !important;
  -webkit-appearance: none;
  appearance: none;
}

.modal-last-x-wrap input::placeholder {
  color: #666;
}

.modal-last-x-wrap input:focus {
  outline: none;
  border-color: #ff6b35;
}

.modal-tabs {
  display: flex;
  gap: 0;
  padding: 0 2rem;
  border-bottom: 1px solid #2a2a4a;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: #888;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: #e8e8e8;
}

.tab-btn.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
}

.modal-body {
  flex: 1;
  overflow: auto;
  padding: 1.5rem 2rem 2rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Season Averages Grid */
.averages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.average-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: rgba(42, 42, 74, 0.5);
  border-radius: 8px;
  border: 1px solid #333;
}

.average-item .label {
  color: #888;
  font-size: 0.9rem;
}

.average-item .value {
  font-weight: 600;
  color: #e8e8e8;
}

/* Game Log */
.gamelog-wrapper {
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

.gamelog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.gamelog-table th,
.gamelog-table td {
  padding: 0.5rem 0.6rem;
  text-align: right;
}

.gamelog-table th {
  background: #252541;
  color: #c8c8c8;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.gamelog-table th:nth-child(1),
.gamelog-table td:nth-child(1),
.gamelog-table th:nth-child(2),
.gamelog-table td:nth-child(2),
.gamelog-table th:nth-child(3),
.gamelog-table td:nth-child(3) {
  text-align: left;
}

.gamelog-table tbody tr {
  border-bottom: 1px solid #2a2a4a;
}

.gamelog-table tbody tr:hover {
  background: rgba(255, 107, 53, 0.05);
}

.tab-empty {
  text-align: center;
  padding: 2rem;
  color: #888;
}

/* Over % Tab */
.over-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.over-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #888;
}

.over-controls select,
.over-controls input[type="number"] {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a2e;
  color: #e8e8e8;
  min-width: 140px;
}

.over-controls input[type="number"] {
  width: 80px;
}

.over-filters-note {
  margin: 0.5rem 0 1rem;
  color: #888;
  font-size: 0.85rem;
}

/* Filters section */
.filters-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(42, 42, 74, 0.5);
  border-radius: 8px;
  border: 1px solid #333;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.filters-header span {
  font-weight: 600;
  color: #c8c8c8;
}

.add-filter-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.add-filter-row select {
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a2e;
  color: #e8e8e8;
  min-width: 180px;
}

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  background: #333;
  border: 1px solid #444;
  border-radius: 6px;
  color: #e8e8e8;
  cursor: pointer;
}

.btn-small:hover {
  background: #444;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: #252541;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 0.9rem;
}

.filter-chip select {
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #555;
  border-radius: 4px;
  background: #2a2a4a;
  color: #fff;
  min-width: 120px;
}

.filter-chip select.filter-select-team {
  min-width: 180px;
}

.filter-chip select option {
  background: #2a2a4a;
  color: #fff;
}

.filter-chip .filter-label {
  color: #888;
}

.filter-chip .filter-remove {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 0 0.25rem;
  font-size: 1.1rem;
  line-height: 1;
}

.filter-chip .filter-remove:hover {
  color: #f87171;
}

.btn-primary {
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.9;
}

.over-result {
  font-size: 1.1rem;
  font-weight: 500;
  padding: 1rem;
  background: rgba(42, 42, 74, 0.5);
  border-radius: 8px;
  white-space: pre-line;
  border: 1px solid #333;
}

/* Team Detail Modal */
.team-modal-filters {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #2a2a4a;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-modal-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.team-modal-filter-row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #888;
}

.team-modal-filter-row select {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a2e;
  color: #e8e8e8;
  min-width: 140px;
}

.team-modal-filter-row select:focus {
  outline: none;
  border-color: #ff6b35;
}

.team-modal-role-by-wrap {
  margin-left: 0.5rem;
}

.team-modal-role-by-wrap.hidden {
  display: none;
}

/* Match modal dark theme: same as other modal inputs */
.team-modal-role-by-wrap input.team-modal-role-by-input,
.team-modal-filter-row .team-modal-role-by-wrap input {
  width: 4.5rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a2e;
  color: #e8e8e8;
  -webkit-appearance: none;
  appearance: none;
}

.team-modal-role-by-wrap input::placeholder {
  color: #666;
}

.team-modal-role-by-wrap input:focus {
  outline: none;
  border-color: #ff6b35;
}

.team-gamelog-table th:nth-child(1),
.team-gamelog-table td:nth-child(1),
.team-gamelog-table th:nth-child(2),
.team-gamelog-table td:nth-child(2),
.team-gamelog-table th:nth-child(3),
.team-gamelog-table td:nth-child(3) {
  text-align: left;
}

/* Team game log: W/L and ATS highlighting */
.team-gamelog-table td.result-w {
  color: #4ade80;
  font-weight: 600;
}
.team-gamelog-table td.result-l {
  color: #f87171;
  font-weight: 600;
}
.team-gamelog-table td.spread-covered {
  color: #4ade80;
  font-weight: 500;
}
.team-gamelog-table td.spread-not-covered {
  color: #f87171;
  font-weight: 500;
}
.team-gamelog-table td.pts-over {
  color: #4ade80;
  font-weight: 500;
}
.team-gamelog-table td.pts-under {
  color: #f87171;
  font-weight: 500;
}
