:root {
  --max-width: 960px;
  --gap: 0.5rem;
  --muted: #aaa;
  --accent: #ffcc00;
}

/* Background: black base + light overlay */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  font-family: "ClashDisplay", sans-serif;
}

body {
  padding-top: 1rem;
  min-height: 100vh;
  background-color: #000;
  background-image: url("./BackgroundLight.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: #fff;
}

/* ClashDisplay variable font */
@font-face {
  font-family: "ClashDisplay";
  src: url("./fonts/ClashDisplay-Variable.woff2") format("woff2-variations"),
       url("./fonts/ClashDisplay-Variable.woff") format("woff-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

h1,
h2,
h3,
h4 {
  font-family: "ClashDisplay", sans-serif;
  margin: 0;
}

/* Navigation Tabs */
.top-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.top-nav .favicon {
  height: 1.85rem;
  width: auto;
  display: block;
  margin-right: 0.5rem;
}

.tab-btn {
    font-family: "ClashDisplay", sans-serif;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  border-radius: 8px;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: 1rem;
  display: flex;
  align-items: center;
  height: 2rem;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transform: none;
}

/* Main content */
main#tabs {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* Home leaderboard / Clans tab */
.leaderboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  padding: 0.5rem 0;
}

/* Clans tab first-place */
.first-place {
  text-align: center;
  width: 100%;
  max-width: 560px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.first-place .clan-icon {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.75rem;
}

/* Clans tab other cards */
.others {
  display: flex;
  gap: 1rem;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
  box-sizing: border-box;
  margin-top: 1.5rem;
}

.clan-card {
  text-align: center;
  flex: 1 1 200px;
  max-width: 220px;
  padding: 0.75rem;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  color: #fff;
  box-sizing: border-box;
}

.clan-card .clan-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.5rem;
}

/* Leaderboard list */
.clan-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.clan-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-amount,
.clan-members {
  margin: 0 0;
  padding: 0;
  color: var(--muted);
}

.clan-name {
  margin: 0.1em;
  color: var(--muted);
}

/* --- Home Top Clan (leave unstyled like Clans page) --- */
.home-top-clan {
  text-align: center;
  width: 100%;
  max-width: 560px;
  padding: 0;
  margin: 1rem auto 1rem;
  background: none;
  border: none;
  border-radius: 0;
  box-sizing: border-box;
}

.home-top-clan .clan-icon {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0rem;
}

.home-top-clan .clan-name {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.5rem;
}

.home-top-clan .clan-amount,
.home-top-clan .clan-members {
  color: var(--muted);
  margin: 0.25rem 0;
}

/* --- Top Minters (simple numbered list, centered) --- */
.top-minters-section {
  text-align: center; /* centers the heading/title */
  margin-bottom: 0rem;
}

.top-minters {
  display: inline-block;       /* makes the ol shrink to content width */
  list-style-type: decimal;    /* show numbers */
  padding-left: 1.5em;         /* space for numbers */
  margin: 0.5rem auto 0;       /* center the ol horizontally */
  color: var(--muted);
  white-space: nowrap;          /* prevent line breaks */
}

.top-minters li {
  display: list-item;           /* required for numbers */
  padding: 0.25rem 0;
  text-align: left;             /* align text with number inside the ol */
}


/* --- Top Users Section (leave as-is) --- */
.top-users-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.top-users {
  list-style-position: inside;
  padding-left: 0;
  margin-top: 0.5rem;
  width: 100%;
}

.top-users li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.25rem 0;
}

/* Credits tab */

/* Credits links styling */
.credits-section a {
  color: var(--muted);
  text-decoration: underline;
  font-weight: bold;
  transition: color 0.2s ease;
}

.credits-section a:hover {
  color: #bbb;
}

.credits-section,
.top-bugs-section {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0 1rem;
}

.credits-section h2,
.top-bugs-section h2 {
  margin-bottom: 0.5rem;
}

.credits-section p,
.top-bugs-section p {
  line-height: 1.6;
  color: var(--muted);
  margin: 0 auto 0rem;
}

.top-bug-hunters {
  display: inline-block;       /* shrink to content width and center as block */
  padding-left: 1.5em;         /* space for numbers */
  margin: 0.5rem auto 0;       /* horizontally center */
  color: var(--muted);
  white-space: nowrap;          /* prevent breaking onto multiple lines */
  text-align: center;             /* keep text aligned with number */
  padding-left: 0;             /* remove bullets/number spacing */
  list-style: none;            /* no bullets or numbers */
}
.top-bug-hunters li {
  padding: 0.25rem 0;
  font-weight: bold;            /* make list items bold */
}

/* Credits announcement */
.credits-announcement {
  text-align: center;
  margin: 1rem auto 2rem;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.8rem;
  letter-spacing: 0.5px;
  padding-bottom: 0;
  margin-bottom: 0;
}

.credits-announcement p {
  padding-bottom: 0;
  margin-bottom: 0;
}

.bug-emoji {
  font-size: 3rem;
  margin: 0;
}

.bottom-spacer {
  height: 3rem; /* adjust as needed for extra bottom margin */
  width: 100%;
}

/* Responsive tweaks */
@media (max-width: 500px) {
  .top-users-section {
    max-width: 90%;
  }
}

@media (max-width: 640px) {
  .first-place .clan-icon,
  .home-top-clan .clan-icon {
    width: 120px;
    height: 120px;
  }
  .clan-card {
    flex: 1 1 100%;
    max-width: none;
  }
}
