:root {
  color-scheme: light dark;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background: light-dark(#f5f5f5, #000);
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: light-dark(#fff, #050505);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.search-bar {
  padding: 20px;
  background: light-dark(#eee, #1f1f1f);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.search-input {
  width: 300px;
  padding: 10px 15px;
  border: unset;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.search-input:focus {
  border-color: light-dark(#007bff, #74c7ec);
}

.stats {
  font-size: 14px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-size-selector select {
  padding: 5px 8px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination button {
  padding: 6px 12px;
  background: light-dark(#fff, #050505);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  border: unset;
}

.pagination button:hover:not(:disabled) {
  background: light-dark(#f5f5f5, #000);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .current-page {
  background: light-dark(#007bff, #74c7ec);
  color: #000;
  border-color: light-dark(#007bff, #74c7ec);
}

.page-info {
  font-size: 14px;
  color: ligh-dark(#000, #fff);
  white-space: nowrap;
}

.table-container {
  overflow: auto;
  max-height: calc(100vh - 140px);
}

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

thead th {
  background: light-dark(#f8f9fa, #1f1f1f);
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid light-dark(#dee2e6, #1f1f1f);
  position: sticky;
  top: 0;
  z-index: 10;
}

tbody tr {
  border-bottom: 1px solid light-dark(#eee, #1f1f1f);
}

tbody tr:hover:not(.no-results) {
  color: #000;
  background: light-dark(#007bff, #74c7ec);
}

td {
  padding: 12px 15px;
  vertical-align: top;
}

.rank-cell {
  font-weight: 600;
  width: 60px;
}

.handle-cell {
  font-weight: 500;
  min-width: 150px;
}

.no-results {
  text-align: center;
  padding: 40px;
}

@media (max-width: 768px) {
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .search-input {
    width: 100%;
    margin-bottom: 10px;
  }

  .stats {
    order: 1;
  }

  .pagination-controls {
    margin-left: 0;
    flex-direction: column;
    gap: 15px;
  }

  .pagination {
    justify-content: center;
  }

  table {
    font-size: 12px;
  }

  td,
  th {
    padding: 8px 10px;
  }
}

.home {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;

  .home-container {
    text-align: center;
    padding: 2rem 3rem;
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
  }

  h1 {
    margin-bottom: 1rem;
  }

  p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
  }

  ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  li {
    margin: 0.75rem 0;
  }

  a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
    transition: background 0.2s;
    color: light-dark(#007bff, #74c7ec);
    background: light-dark(#eee, #1f1f1f);
  }

  a:hover {
    color: #000;
    background: light-dark(#007bff, #74c7ec);
  }
}
