
:root {
  --background: #f7f7f4;
  --surface: #ffffff;
  --text: #252724;
  --muted: #85877f;
  --border: #e7e7e1;
  --accent: #a68142;
  --accent-light: #f2ebdf;
  --row-hover: #f8f7f2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */

.header {
  min-height: 68px;
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text);
}

.navigation {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navigation a {
  font-size: 13px;
  color: #686a63;
  transition: color 0.15s ease;
}

.navigation a:hover,
.navigation a.active {
  color: var(--accent);
}

/* Main content */

.container {
  width: min(1400px, 88%);
  margin: 0 auto;
}

.intro {
  padding: 65px 0 38px;
}

.intro h1 {
  font-size: clamp(32px, 5vw, 46px);
  letter-spacing: -1.8px;
  line-height: 1.15;
  margin: 0;
  font-weight: 750;
}

/* Overview statistics */

.stats-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 65px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 23px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 9px;
}

.stat-card strong {
  display: block;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -1px;
}

/* Leaderboard */

.leaderboard-section {
  margin-bottom: 75px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: 26px;
  letter-spacing: -0.7px;
  margin: 0 0 5px;
}

.section-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.top-label {
  background: var(--accent-light);
  color: #87632c;
  padding: 7px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Loading status */

.table-status {
  padding: 13px 15px;
  background: #f0efe9;
  color: #75756d;
  font-size: 12px;
  border-radius: 5px;
  margin-bottom: 12px;
}

/* Table */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
}

table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  text-align: left;
}

thead {
  background: #f6f6f2;
}

th {
  padding: 15px 13px;
  font-size: 11px;
  white-space: nowrap;
  color: #74766e;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

th button {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}

th button:hover {
  color: var(--accent);
}

td {
  padding: 15px 13px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  white-space: nowrap;
}

tbody tr:hover {
  background: var(--row-hover);
}

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

.table-footer {
  color: var(--muted);
  font-size: 11px;
  margin-top: 12px;
}

/* MVP page */

.mvp-section {
  margin-bottom: 75px;
}

.mvp-empty {
  min-height: 200px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}

/* Mobile layout */

@media (max-width: 650px) {
  .header {
    min-height: 65px;
    padding: 12px 5%;
    gap: 12px;
  }

  .brand {
    font-size: 15px;
  }

  .navigation {
    gap: 17px;
  }

  .navigation a {
    font-size: 12px;
  }

  .container {
    width: 92%;
  }

  .intro {
    padding: 45px 0 30px;
  }

  .stats-overview {
    gap: 9px;
    margin-bottom: 48px;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-card strong {
    font-size: 23px;
  }

  .stat-card span {
    font-size: 10px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 22px;
  }

  .top-label {
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .header {
    flex-wrap: wrap;
  }

  .navigation {
    gap: 13px;
  }

  .navigation a {
    font-size: 11px;
  }
}


/* Player profiles */

.profile-intro {
  padding-bottom: 30px;
}

.profile-back {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}

.profile-back:hover {
  color: var(--accent);
}

.profile-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 9px 0 14px;
}

.profile-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.team-chip {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--accent-light);
  color: #87632c;
  font-size: 11px;
  font-weight: 650;
}

.profile-error {
  color: #a33d36;
  font-size: 13px;
  margin-top: 15px;
}

.profile-stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 55px;
}

.profile-section {
  margin-bottom: 55px;
}

.profile-section h2 {
  font-size: 24px;
  letter-spacing: -0.6px;
  margin-bottom: 18px;
}

.profile-description {
  font-size: 13px;
  color: var(--muted);
  margin: -9px 0 18px;
}

.profile-table {
  min-width: 760px;
}

.player-link {
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.player-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 650px) {
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-section h2 {
    font-size: 21px;
  }
}
