:root {
  --primary: #f5f5f5;
  --secondary: #e0e0e0;
  --accent: #424242;
  --neutral: #ffffff;
  --text: #424242;
  --radius: 10px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 18px;
  background: var(--primary);
  font-family: Arial, sans-serif;
  color: var(--text);
}

.hidden {
  display: none;
}

#main {
  max-width: 900px;
  margin: 0 auto;
  padding: 6px;
}

#seasonHeader {
  background: var(--accent);
  color: var(--neutral);
  text-align: center;
  padding: 18px 18px;
  font-size: 20px;
  font-weight: 600;
  border-radius: var(--radius);
  margin: 0 0 20px 0;
}

#viewTabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.leftTabs,
.rightTabs {
  display: flex;
  gap: 8px;
}

button {
  padding: 11px 14px;
  border-radius: var(--radius);
  border: none;
  background: var(--secondary);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

button.active {
  background: var(--accent);
  color: var(--neutral);
}

h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

#overallControls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tableWrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
}

.leaderTable {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--neutral);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.leaderTable th {
  background: var(--secondary);
  padding: 12px;
  text-align: left;
  font-weight: bold;
}

.leaderTable td {
  padding: 12px;
  border-bottom: 1px solid var(--secondary);
  vertical-align: top;
}

.leaderTable tr:last-child td {
  border-bottom: none;
}

#monthSelectWrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

#monthSelectWrap label {
  font-weight: 600;
  font-size: 18px;
}

#monthSelect {
  min-width: 220px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: none;
  background: var(--secondary);
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  text-align-last: center;
}

.timestamp {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
}

@media (max-width: 760px) {
  body {
    padding: 14px;
  }

  #seasonHeader {
    font-size: 17px;
  }

  #viewTabs {
    flex-direction: column;
    align-items: stretch;
  }

  .leftTabs,
  .rightTabs {
    width: 100%;
  }

  .leftTabs button,
  .rightTabs button {
    flex: 1;
  }

  #monthSelectWrap {
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  #monthSelect {
    width: min(100%, 320px);
  }

  .leaderTable {
    min-width: 420px;
  }
}
