:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #0b1220;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #60a5fa;
  --accent-2: #93c5fd;
  --border: #1f2937;
  --success: #10b981;
  --warning: #f59e0b;
}

html,
body {
  background: linear-gradient(180deg, var(--bg), #0b1020 60%, #070b16);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  margin: 0;
  padding: 0;
  min-height: 100%;
}

/*#region Filters */
.filter {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--text);
}

.filter input,
.filter select {
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  flex: 1;
  min-width: 80px;
}

.filter select {
  flex: 0 0 auto;
  color: var(--muted);
  margin-left: 4px;
}

/* Player count */
.range {
  flex: 1;
  display: flex;
  flex-wrap: nowrap;

  label {
    font-size: 2em;
    padding: 0 0.2em;
  }

  input[type="range"] {
    width: 200px;
    margin: 0;
  }

  datalist {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    writing-mode: inherit;
    width: 200px;

    option {
      padding: 0;

      &:first-of-type {
        margin-left: 5px;
      }

      &:nth-of-type(3) {
        margin-left: 3px;
      }
    }
  }
}

.pill-toggle {
  display: inline-flex;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  border: 1px solid #1f2937;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  /* margin-left: 8px; */
}

.pill-toggle .pill {
  appearance: none;
  background: transparent;
  color: #e5e7eb;
  border: 0;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.pill-toggle .pill.active {
  background: #1f2937;
  box-shadow: 0 0 0 1px #2b3a53 inset;
}

.pill-toggle .pill:focus {
  outline: 2px solid #2b3a53;
  outline-offset: 1px;
}

.gear-btn {
  /* margin-left: 10px; */
  background: transparent;
  border: 1px solid #1f2937;
  color: #9ca3af;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

.gear-btn:hover {
  background: #0f172a;
  color: #e5e7eb;
}

/*#endregion Filters */


/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

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

.modal .modal-content {
  position: relative;
  margin: 8vh auto;
  max-width: 520px;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 12px;
  color: #e5e7eb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 10px;
  border-bottom: 1px solid #1f2937;
}

.modal .modal-close {
  background: transparent;
  border: 0;
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
}

.modal .modal-body {
  padding: 12px 4px;
}

.modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #1f2937;
}

.columns-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 8px;
}

.columns-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.columns-list input[type="checkbox"] {
  accent-color: #60a5fa;
}

.muted {
  color: #9ca3af;
  margin: 0;
}



.container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px 32px;
}

.card {
  background: radial-gradient(1000px 400px at 100% -20%, rgba(96, 165, 250, 0.08), transparent 50%),
    radial-gradient(1000px 400px at 0% 120%, rgba(16, 185, 129, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}

h1 {
  margin: 0 0 8px 0;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.subtle {
  color: var(--muted);
  margin-top: 0;
}

.controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 720px) {
  .controls {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

#file-input {
  color: var(--muted);
  width: 185px;

  &::file-selector-button {
    background-color: transparent;
    color: var(--text);
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    cursor: pointer;

    /* margin-right: 20px; */
    transition: transform 0.05s ease, background 0.2s ease, border-color 0.2s ease;
  }
}

/* Doesnt like to be nested for some reason */
#file-input::file-selector-button:hover {
  border-color: #2b3a53;
}

.btn {
  background: linear-gradient(180deg, #1f2937, #111827);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: linear-gradient(180deg, #243244, #121a27);
  border-color: #2b3a53;
}

.btn:active {
  transform: translateY(1px);
}

.btn.secondary {
  background: transparent;
}

.btn.success {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2) inset;
}

.table-wrap {
  margin-top: 18px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #0b1220, #0a0f1a);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 600px;
}

thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #0f172a, #0b1220);
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 12px 10px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

thead th .sort {
  color: var(--muted);
  margin-left: 6px;
  font-size: 12px;
}

tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px;
  color: #e6ebf2;
}

tbody tr:hover {
  background: rgba(96, 165, 250, 0.06);
}


.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
}

/* #region Footer */
.footer {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
/* #endregion Footer */

.count {
  color: var(--muted);
}

/* Link styles */
a {
  color: var(--accent);
  /* #60a5fa */
  text-decoration: none;
  border-bottom: 1px dashed rgba(96, 165, 250, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

a:hover {
  color: var(--accent-2);
  /* #93c5fd */
  border-bottom-color: rgba(147, 197, 253, 0.6);
  background: rgba(96, 165, 250, 0.07);
  /* subtle glow on hover */
  border-radius: 4px;
}

a:active {
  color: #cfe3ff;
  border-bottom-color: rgba(147, 197, 253, 0.9);
}

a:focus-visible {
  outline: 2px solid #2b3a53;
  /* matches your focus tones */
  outline-offset: 2px;
  border-bottom-style: solid;
}

a.muted {
  color: var(--muted);
  /* #9ca3af */
  border-bottom-color: rgba(156, 163, 175, 0.35);
}

a.muted:hover {
  color: #c5cbd3;
  border-bottom-color: rgba(197, 203, 211, 0.6);
  background: rgba(156, 163, 175, 0.08);
}