
:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --background-color: #f5f7fa;
  --container-bg: #ffffff;
  --text-color: #333333;
  --border-color: #e0e0e0;
  --hover-color: #f0f0f0;
  --button-color: #3498db;
  --button-text: #ffffff;
  --header-bg: #ffffff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  --table-header-bg: #f7f7f7;
}
.dark-mode {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --background-color: #0e0f0f;
  --container-bg: #1a1a1a;
  --text-color: #e0e0e0;
  --border-color: #333333;
  --hover-color: #252525;
  --button-color: #3498db;
  --button-text: #ffffff;
  --header-bg: #0e0f0f;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  margin: 0;
  padding: 0;
}
.position-switcher-container {
  max-width: min(1380px, 96%);
  margin: 20px auto 0;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}
.season-selector {
  display: flex;
  align-items: center;
  margin-left: 3px;
  background-color: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 500;
  max-width: 280px;
}
.season-selector a {
  padding: 8px 12px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  flex: 1 0 0%;
}
.season-selector a.active {
  background-color: var(--primary-color);
  color: white;
}
.season-selector a:not(.active):hover {
  background-color: var(--hover-color);
}
.season-selector .season-divider {
  width: 1px;
  height: 16px;
  background-color: var(--border-color);
}

.custom-select-container {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--container-bg);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  position: relative;
  line-height: 1.4;
  height: 40px;
  transition: all 0.2s ease;
}
.custom-select-trigger span {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 20px);
  padding: 2px 0;
  margin-left: 8px;
}
.custom-select-option span {
  margin-left: 9px;
}
.custom-select-trigger::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1.5px solid var(--text-color);
  border-bottom: 1.5px solid var(--text-color);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.3s;
  opacity: 0.7;
  margin-right: 2px;
}
.custom-select-trigger.open::after {
  transform: rotate(-135deg) translateY(1px);
}
.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  font-size: 14px;
  display: none;
  box-shadow: var(--shadow);
}
.custom-select-option {
  padding: 8px 16px;
  cursor: pointer;
  color: var(--text-color);
  transition: background-color 0.2s ease;
  line-height: 1.4;
  display: flex;
  align-items: center;
}
.custom-select-option iconify-icon, .custom-select-trigger iconify-icon {
  transform: translateY(-1px);
}
.custom-select-option:hover {
  background-color: var(--hover-color);
}
.custom-select-option.selected {
  background-color: var(--primary-color);
  color: white;
}
.range-field {
  margin-bottom: 16px;
}
.range-slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.range-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  outline: none;
  position: relative;
  --slider-position: 0%;
}
.range-slider {
  background: linear-gradient( to right, var(--primary-color) 0%, var(--primary-color) var(--slider-position), #e0e0e0 var(--slider-position), #e0e0e0 100% );
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  margin-top: -5px;
  transform: translateY(0);
}
.range-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
}
.range-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  border-radius: 2px;
}
.range-slider::-moz-range-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  border-radius: 2px;
}
.range-value {
  min-width: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 8px;
  background-color: var(--container-bg);
  width: 35px;
  height: 15px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.range-value::-webkit-outer-spin-button, .range-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.range-value:focus {
  outline: none;
  border-color: var(--primary-color);
}
.input-group {
  margin-bottom: 16px;
}
.input-row {
  display: flex;
  gap: 8px;
}
.input-row input {
  flex: 1;
  width: 50%;
}
.container {
  display: flex;
  max-width: min(1380px, 95%);
  margin: 10px auto;
  padding: 0 5px;
  gap: 15px;
  justify-content: flex-start;
}
.inputs {
  flex: 0 0 280px;
  min-width: 280px;
  max-width: 280px;
  padding: 20.8px 17px;
  font-size: 12px;
  background-color: var(--container-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}
.inputs input[type="number"] {
  margin-bottom: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--container-bg);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: all 0.2s ease;
}
form {
  display: flex;
  flex-direction: column;
}
label {
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-color);
  font-size: 13px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button {
  height: 40px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background-color: var(--button-color);
  color: var(--button-text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}
button:hover {
  background-color: #2980b9;
}

#tableWrapper {
  flex: 1;
  position: relative;
  height: fit-content !important;
  max-height: 865px;
  overflow: auto;
  background-color: var(--container-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0;
  transition: all 0.3s ease;
  overflow-x: auto;
  min-width: 1050px;
  display: block;
}
#tableWrapper table {
  padding: 0;
  margin: 0;
  width: 100%;
  table-layout: fixed;
  height: auto !important;
}
#tableWrapper td, #tableWrapper th {
  padding: 8px 16px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tableWrapper th:first-child, #tableWrapper td:first-child {
  width: 22%;
  min-width: min(250px, 100%);
  text-align: left;
  padding-left: 16px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
#tableWrapper th:not(:first-child), #tableWrapper td:not(:first-child) {
  width: 11%;
  min-width: max-content;
}
thead {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 20;
  background-color: var(--table-header-bg);
  margin: 0;
}
thead tr {
  width: 100%;
  background-color: var(--table-header-bg);
  display: table-row;
}
th {
  height: 40px;
  min-height: 40px;
  vertical-align: middle;
  background-color: var(--table-header-bg);
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  font-weight: 600;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: normal;
  box-shadow: 0 1px 0 var(--border-color);
  padding: 8px 16px;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border-radius: 8px;
  overflow: visible;
  table-layout: fixed;
}
th:first-child {
  text-align: left;
}
th:not(:first-child) {
  position: relative;
  cursor: pointer;
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  min-width: 50px;
  line-height: 1.2;
}
th:first-child .header-content {
  justify-content: flex-start;
}
.sort-indicator {
  display: inline-block;
  font-weight: bold;
  transition: all 0.2s ease;
  font-size: 14px;
}
th, td {
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 10px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
th:first-child, td:first-child {
  width: 22%;
  min-width: 130px;
}
th:not(:first-child), td:not(:first-child) {
  width: auto;
}
tr:last-child td {
  border-bottom: none;
}
td {
  font-size: 14px;
  color: var(--text-color);
  transition: background-color 0.2s ease;
}
@media (hover: hover) {
  tr:hover td {
      background-color: var(--hover-color);
 }
}
td:not(:first-child) {
  text-align: center;
  user-select: none;
}
th {
  background-color: var(--table-header-bg);
  font-size: 12px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  font-weight: 600;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  padding-right: 24px;
}
th:first-child {
  text-align: left;
}
th:not(:first-child) {
  position: relative;
  cursor: pointer;
}
th.asc:not(:first-child)::after {
  transform: translateY(-25%) rotate(-135deg);
  opacity: 1;
}
th.desc:not(:first-child)::after {
  transform: translateY(-75%) rotate(45deg);
  opacity: 1;
}
/* Remove old sorting triangles */
th:not(:first-child)::before {
  display: none;
}
.player-info {
  font-style: italic;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}
.player-info, .player-info .age, .player-info .minutes {
  color: #777 !important;
}

.no-results-message {
  margin: 21px;
  color: var(--primary-color);
  font-weight: 500;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.inputs-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.inputs-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 0;
  background-color: var(--container-bg);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  z-index: 5;
  margin-top: -1px;
  box-sizing: border-box;
}
.inputs-toggle-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inputs-toggle-icon::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-color);
  border-bottom: 2px solid var(--text-color);
  transform: rotate(-135deg);
}
.inputs-toggle.collapsed .inputs-toggle-icon::before {
  transform: rotate(45deg);
}

@media (max-width: 1435px) {
  .inputs {
      flex: 0 0 196px;
      min-width: 196px;
 }
}


@media (min-width: 1354px) {
  .inputs {
      min-height: 824px;
      max-height: 824px;
      overflow-y: auto;
 }
}

@media (max-width: 1355px) {
  .container {
      flex-direction: row;
      flex-wrap: wrap;
      align-items: flex-start;
      padding: 0 15px;
 }

  .inputs-wrapper {
      width: 100%;
      max-width: 100%;
 }
  .inputs {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      margin-bottom: 0;
      border-radius: 12px 12px 0 0;
      padding: 16px;
      box-sizing: border-box;
 }
  .inputs.collapsed {
      display: none;
 }
  .inputs-toggle {
      display: flex;
 }
  #tableWrapper {
      margin-top: 5px;
      width: 100%;
      max-width: 100%;
      height: fit-content !important;
      max-height: 933px;
      min-width: 350px;
      overflow-x: auto;
      display: block;
 }
}

@media (max-width: 985px) {
  #tableWrapper th:not(:first-child), #tableWrapper td:not(:first-child) {
      width: auto;
      min-width: 30px;
      padding: 8px 2px;
 }
  #tableWrapper td, #tableWrapper th {
      padding: 8px 2px;
 }
  .player-info .minutes {
      display: none;
 }
  #tableWrapper th:first-child, #tableWrapper td:first-child {
      width: 18%;
 }
}
@media (max-width: 765px) {
  .player-info .age {
      display: none;
 }
}


.dark-mode-toggle {
border: 1px solid var(--border-color);
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--container-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 100;
  transition: background-color 0.2s ease-out;
}
.toggle-icon::before {
  font-family: "Ionicons";
  content: "\f467";
  font-size: 30px;
  color: var(--text-color);
}
.dark-mode .toggle-icon::before {
  content: "\f3b0";
  font-size: 20px;
}
/* Dark Mode Styles */
body.dark-mode, body.dark-mode * {
  color: var(--text-color);
}
body.dark-mode {
  background-color: var(--background-color);
}
body.dark-mode .tooltip {
  color: #000000;
  background-color: #f9f9f9;
  border: solid;
  border-width: 1px;
  border-radius: 5px;
  padding: 10px;
  font-size: 12px;
}
body.dark-mode th {
  background-color: #222222;
  color: var(--text-color);
}
body.dark-mode select {
  color: var(--text-color);
  background-color: var(--container-bg);
}
body.dark-mode input {
  color: var(--text-color);
  background-color: var(--container-bg);
}
body.dark-mode button {
  color: var(--button-text);
  background-color: var(--button-color);
}


body.dark-mode thead {
  background-color: #222222;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
body.dark-mode thead tr {
  background-color: #222222;
}
body.dark-mode th {
  background-color: #222222;
  color: var(--text-color);
  box-shadow: 0 1px 0 var(--border-color);
}


body.dark-mode button {
  color: #e0e0e0 !important;
}
.dark-mode .custom-select-trigger {
  background-color: var(--container-bg);
  border-color: var(--border-color);
}
.dark-mode .custom-select-option {
  background-color: var(--container-bg);
}
.dark-mode .custom-select-option:hover {
  background-color: var(--hover-color);
}
.dark-mode .custom-select-option.selected {
  background-color: var(--primary-color);
}
.dark-mode .range-slider {
  background: linear-gradient( to right, var(--primary-color) 0%, var(--primary-color) var(--slider-position), #333 var(--slider-position), #333 100% );
}

.dark-mode .player-info, .player-info .age, .player-info .minutes {
  color: #777 !important;
}
.dark-mode .season-selector {
  border-color: var(--border-color);
}


#SFctr {
  font-family: Arial, Helvetica, sans-serif !important;
  margin-left: -43px;
}
#SFusrlogpst strong:first-child {
  font-size: 0px;
}
#SFusrlogpst input[type="checkbox"], #SFusrlogpwd input[type="checkbox"], #SFusrlogpst i, #SFusrlogpwd i {
  display: none !important;
}
#SFctr .SFfrm input[type="text"], #SFctr .SFfrm input[type="password"], #SFctr .SFfrm button {
  border-radius: 6px;
}
#SFusrlogpwd strong {
  visibility: hidden;
  position: relative;
}
#SFusrlogpwd strong::after {
  content: "Forgot Password?";
  visibility: visible;
  position: absolute;
  font-size: 12px;
  font-weight: 400;
  left: 165px;
  white-space: nowrap;
}
body.dark-mode #SFctr {
  color: #ffffff !important 
}
#SFctr input {
  background-color: #ffffff !important;
  color:#000000 !important;
  border: 1px solid #c2c2c2 !important 
}
@media (max-width: 625px) {
  #SFctr {
      font-family: Arial, Helvetica, sans-serif !important;
      margin-left: 20px;
 }
  #SFusrlogpwd strong::after {
      left: 20px;
 }
}
