:root {
  color-scheme: dark;
  --forest-950: #03100a;
  --forest-900: #071a12;
  --forest-800: #0d281b;
  --forest-700: #173924;
  --grass-500: #69b63f;
  --grass-400: #85cf55;
  --honey-500: #f2bd4f;
  --honey-300: #ffd978;
  --cream-100: #fff4d6;
  --cream-300: #ddcfaa;
  --red-400: #ff756e;
  --border: rgba(255, 244, 214, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--forest-950);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream-100);
  background:
    radial-gradient(circle at 12% 0%, rgba(105, 182, 63, 0.18), transparent 30rem),
    radial-gradient(circle at 90% 20%, rgba(242, 189, 79, 0.09), transparent 26rem),
    var(--forest-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--honey-500);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0.8rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--border);
  background: rgba(3, 16, 10, 0.88);
  backdrop-filter: blur(16px);
}

.brand img {
  display: block;
  width: min(240px, 52vw);
  height: auto;
}

.home-link {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--cream-100);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.home-link:hover {
  border-color: var(--grass-500);
  background: rgba(105, 182, 63, 0.12);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(2.5rem, 6vw, 5rem);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--honey-500);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero-copy > p:last-child {
  max-width: 600px;
  margin: 1rem 0 0;
  color: var(--cream-300);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.search label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--cream-300);
  font-size: 0.9rem;
  font-weight: 700;
}

.search-row {
  display: flex;
  gap: 0.65rem;
}

.search input {
  min-width: 0;
  flex: 1;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--cream-100);
  background: rgba(3, 16, 10, 0.76);
}

.search input::placeholder {
  color: rgba(221, 207, 170, 0.55);
}

.search button,
.pagination button {
  border: 0;
  border-radius: 12px;
  color: #08200f;
  background: var(--grass-500);
  cursor: pointer;
  font-weight: 800;
}

.search button {
  padding: 0.85rem 1.15rem;
}

.search button:hover,
.pagination button:hover:not(:disabled) {
  background: var(--grass-400);
}

.demo-banner {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(242, 189, 79, 0.3);
  border-radius: 14px;
  color: var(--cream-100);
  background: rgba(242, 189, 79, 0.09);
}

.demo-banner strong {
  flex: 0 0 auto;
  color: var(--honey-300);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--cream-100);
  background: rgba(13, 40, 27, 0.7);
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(105, 182, 63, 0.5);
}

.stat-card.is-active {
  border-color: var(--grass-500);
  background: rgba(105, 182, 63, 0.13);
}

.stat-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 244, 214, 0.08);
  font-size: 1.35rem;
}

.stat-copy {
  display: flex;
  flex-direction: column;
}

.stat-copy strong {
  font-size: 1.45rem;
  line-height: 1.15;
}

.stat-copy small {
  color: var(--cream-300);
}

.records {
  margin: 1rem 0 4rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(3, 16, 10, 0.72);
  box-shadow: var(--shadow);
}

.records-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.2rem;
}

.records h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.result-count {
  margin: 0;
  color: var(--cream-300);
}

.table-wrap {
  position: relative;
  min-height: 260px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--cream-300);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  font-size: 0.94rem;
}

.player-name {
  color: var(--honey-300);
  font-weight: 800;
}

.reason {
  min-width: 220px;
  color: var(--cream-100);
}

.muted {
  color: var(--cream-300);
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.status.active {
  color: #b9f290;
  background: rgba(105, 182, 63, 0.16);
}

.status.inactive {
  color: #c9c0aa;
  background: rgba(201, 192, 170, 0.1);
}

.empty-state,
.loading-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state span {
  font-size: 2.4rem;
}

.empty-state h3,
.empty-state p {
  margin: 0.25rem 0;
}

.empty-state p,
.loading-state {
  color: var(--cream-300);
}

.loading-state {
  gap: 0.75rem;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(105, 182, 63, 0.2);
  border-top-color: var(--grass-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1.4rem;
}

.pagination button {
  min-width: 88px;
  padding: 0.6rem 0.9rem;
}

.pagination button:disabled {
  color: rgba(255, 244, 214, 0.36);
  background: rgba(255, 244, 214, 0.08);
  cursor: not-allowed;
}

#page-indicator {
  color: var(--cream-300);
  font-size: 0.9rem;
}

footer {
  padding: 2rem 1rem 3rem;
  color: var(--cream-300);
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 64px;
  }

  .brand img {
    width: min(190px, 56vw);
  }

  .home-link {
    padding: 0.45rem 0.65rem;
    font-size: 0.86rem;
  }

  .search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .stat-card {
    gap: 0.55rem;
    padding: 0.8rem;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 1.1rem;
  }

  .records-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tbody {
    display: grid;
    gap: 0.75rem;
  }

  tr {
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(13, 40, 27, 0.56);
  }

  td {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.65rem;
    padding: 0.45rem 0;
    border: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--cream-300);
    font-size: 0.78rem;
    font-weight: 700;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.scope-switch{display:flex;gap:12px;margin:24px 0}.scope-switch button{padding:12px 22px;border:1px solid #5c805e;border-radius:12px;background:#102c20;color:#e7eedf;cursor:pointer;font:inherit}.scope-switch button[aria-pressed="true"]{background:#b7d86b;color:#102013;border-color:#b7d86b}.stat-card[hidden]{display:none}
