:root {
  color-scheme: dark;
  --bg: #0d1410;
  --panel: rgba(22, 31, 25, 0.92);
  --panel-edge: rgba(153, 188, 104, 0.22);
  --text: #fff9e8;
  --muted: #b7b39f;
  --leaf: #7db24f;
  --moss: #254e34;
  --gold: #e3b658;
  --discord: #5865f2;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(125, 178, 79, 0.18), transparent 34rem),
    radial-gradient(circle at 85% 16%, rgba(227, 182, 88, 0.13), transparent 30rem),
    linear-gradient(180deg, #101b14 0%, var(--bg) 36%, #090d0b 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a,
button,
input {
  font: inherit;
}

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

button {
  border: 0;
  color: inherit;
}

code {
  padding: 0.15rem 0.35rem;
  border: 1px solid rgba(153, 188, 104, 0.22);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--gold);
}

.page-shell {
  width: min(1360px, calc(100% - 160px));
  margin: 0 auto;
  padding: 34px 0 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 64px;
}

.server-ip,
.login,
.search {
  height: 74px;
  border: 2px solid var(--panel-edge);
  border-radius: 8px;
  background: var(--panel);
  box-shadow:
    inset 0 -5px rgba(0, 0, 0, 0.24),
    0 14px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.server-ip,
.login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 30px;
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.server-ip:hover,
.login:hover {
  transform: translateY(-1px);
  border-color: rgba(227, 182, 88, 0.52);
  background: rgba(34, 47, 38, 0.96);
}

.server-ip.copied {
  animation: copy-pop 360ms ease;
  border-color: rgba(227, 182, 88, 0.78);
}

.server-ip {
  min-width: min(444px, 100%);
}

.server-ip.home-link {
  min-width: 0;
}

.compact-copy {
  min-width: min(340px, 100%);
  font-size: clamp(0.95rem, 1.3vw, 1.25rem);
}

.server-ip svg,
.login svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
  flex: 0 0 auto;
}

.account-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login {
  min-width: 198px;
}

.search {
  display: flex;
  align-items: center;
  width: min(444px, 31vw);
  padding: 0 28px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(1.05rem, 1.8vw, 1.55rem);
  font-weight: 700;
}

.search input::placeholder {
  color: #767676;
  opacity: 1;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(108px, 1fr));
  gap: 16px;
  min-height: 620px;
}

.home-shell {
  width: min(1280px, calc(100% - 160px));
  padding-top: 22px;
  padding-bottom: 24px;
}

.home-shell .topbar {
  margin-bottom: 28px;
}

.home-shell .server-ip,
.home-shell .login,
.home-shell .search {
  height: 62px;
}

.home-shell .server-ip,
.home-shell .login {
  gap: 14px;
  padding: 0 22px;
  font-size: clamp(1rem, 1.7vw, 1.38rem);
}

.home-shell .server-ip svg,
.home-shell .login svg {
  width: 28px;
  height: 28px;
}

.home-shell .search {
  width: min(380px, 29vw);
  padding: 0 20px;
}

.home-shell .search input {
  font-size: clamp(0.95rem, 1.4vw, 1.22rem);
}

.leaderboard-shell .topbar {
  margin-bottom: 34px;
}

.leaderboard-hero,
.vote-hero,
.join-hero,
.leaderboard-panel,
.integration-note,
.reward-strip article,
.vote-card,
.join-card,
.connection-strip article,
.stat-grid article {
  border: 2px solid rgba(153, 188, 104, 0.18);
  border-radius: 8px;
  background: var(--panel);
  box-shadow:
    inset 0 -7px rgba(0, 0, 0, 0.24),
    0 18px 38px rgba(0, 0, 0, 0.25);
}

.vote-shell .topbar {
  margin-bottom: 34px;
}

.join-shell .topbar {
  margin-bottom: 34px;
}

.player-shell .topbar {
  margin-bottom: 34px;
}

.leaderboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.28fr);
  gap: 28px;
  align-items: end;
  min-height: 360px;
  margin-bottom: 22px;
  padding: clamp(28px, 5vw, 54px);
  background-image:
    linear-gradient(90deg, rgba(12, 20, 15, 0.94), rgba(12, 20, 15, 0.48)),
    linear-gradient(135deg, rgba(125, 178, 79, 0.28), rgba(227, 182, 88, 0.16)),
    url("assets/leaderboards.png");
  background-position: center;
  background-size: cover;
}

.vote-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.28fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
  padding: clamp(28px, 5vw, 54px);
  background-image:
    linear-gradient(90deg, rgba(12, 20, 15, 0.88), rgba(12, 20, 15, 0.58)),
    linear-gradient(135deg, rgba(227, 182, 88, 0.22), rgba(125, 178, 79, 0.16)),
    url("assets/vote.png");
  background-position: center;
  background-size: cover;
}

.join-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.28fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
  padding: clamp(28px, 5vw, 54px);
  background-image:
    linear-gradient(90deg, rgba(12, 20, 15, 0.88), rgba(12, 20, 15, 0.58)),
    linear-gradient(135deg, rgba(125, 178, 79, 0.22), rgba(88, 101, 242, 0.12)),
    url("assets/join.png");
  background-position: center;
  background-size: cover;
}

.page-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leaderboard-hero h1,
.vote-hero h1,
.join-hero h1,
.leaderboard-toolbar h2 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: 0;
}

.leaderboard-hero h1,
.vote-hero h1,
.join-hero h1 {
  font-size: clamp(3.4rem, 8vw, 7.4rem);
  font-weight: 900;
}

.leaderboard-hero p:not(.page-kicker),
.vote-hero p:not(.page-kicker),
.join-hero p:not(.page-kicker) {
  max-width: 740px;
  margin: 18px 0 0;
  color: rgba(255, 249, 232, 0.82);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  font-weight: 750;
  line-height: 1.55;
}

.sync-card {
  padding: 22px;
  border: 2px solid rgba(227, 182, 88, 0.24);
  background: rgba(9, 14, 11, 0.72);
  box-shadow:
    inset 0 -5px rgba(0, 0, 0, 0.22),
    0 16px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.sync-card span,
.sync-card small,
.stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sync-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

.sync-card small {
  margin-top: 8px;
  line-height: 1.4;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-grid article {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(37, 78, 52, 0.76), rgba(9, 14, 11, 0.92)),
    var(--panel);
}

.stat-grid article::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border: 2px solid rgba(227, 182, 88, 0.14);
  background: rgba(227, 182, 88, 0.06);
  transform: rotate(12deg);
}

.stat-grid strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1;
}

.reward-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.reward-strip article {
  padding: 22px;
}

.reward-strip span,
.vote-card small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reward-strip strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1;
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.vote-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background-image:
    linear-gradient(135deg, rgba(37, 78, 52, 0.72), rgba(10, 15, 12, 0.78)),
    url("assets/vote.png");
  background-position: center;
  background-size: cover;
  transition: transform 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.vote-card:hover {
  transform: translateY(-2px);
  border-color: rgba(227, 182, 88, 0.58);
  filter: brightness(1.08) saturate(1.08);
}

.vote-number {
  display: inline-grid;
  width: 50px;
  height: 42px;
  place-items: center;
  border-left: 4px solid var(--gold);
  background: rgba(10, 15, 12, 0.58);
  color: var(--text);
  font-weight: 900;
  box-shadow: inset 0 -4px rgba(0, 0, 0, 0.18);
}

.vote-card strong {
  display: block;
  margin-top: auto;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.05;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.85);
}

.vote-card small {
  margin-top: 10px;
  color: rgba(255, 249, 232, 0.72);
}

.join-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.join-card {
  padding: clamp(22px, 3vw, 34px);
}

.platform-label {
  display: inline-grid;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border-left: 4px solid var(--gold);
  background: rgba(10, 15, 12, 0.54);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: inset 0 -4px rgba(0, 0, 0, 0.18);
}

.join-card h2 {
  margin: 18px 0 16px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.join-card ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 1.25rem;
  color: rgba(255, 249, 232, 0.84);
  font-weight: 750;
  line-height: 1.5;
}

.join-card li::marker {
  color: var(--gold);
  font-weight: 900;
}

.connection-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.connection-strip article {
  padding: 22px;
}

.connection-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.connection-strip strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.leaderboard-panel {
  padding: clamp(18px, 2.4vw, 30px);
  background:
    linear-gradient(135deg, rgba(37, 78, 52, 0.36), rgba(9, 14, 11, 0.94)),
    var(--panel);
}

.leaderboard-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(153, 188, 104, 0.16);
}

.leaderboard-toolbar h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 900;
}

.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.leaderboard-tabs button {
  min-height: 42px;
  padding: 0 14px;
  border: 2px solid rgba(153, 188, 104, 0.18);
  border-radius: 8px;
  background: rgba(10, 15, 12, 0.48);
  color: rgba(255, 249, 232, 0.8);
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    inset 0 -4px rgba(0, 0, 0, 0.18),
    0 10px 20px rgba(0, 0, 0, 0.12);
}

.leaderboard-tabs button.active,
.leaderboard-tabs button:hover {
  border-color: rgba(227, 182, 88, 0.56);
  background: rgba(227, 182, 88, 0.18);
  color: var(--text);
}

.leaderboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 18px;
  align-items: start;
}

.leaderboard-table-wrap {
  overflow-x: auto;
  border: 2px solid rgba(153, 188, 104, 0.14);
  border-radius: 8px;
  background: rgba(8, 12, 10, 0.48);
  box-shadow: inset 0 -7px rgba(0, 0, 0, 0.18);
}

.leaderboard-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 16px 16px;
  border-bottom: 1px solid rgba(153, 188, 104, 0.12);
  text-align: left;
}

.leaderboard-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(16, 26, 19, 0.96);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-table td {
  color: rgba(255, 249, 232, 0.84);
  font-weight: 800;
}

.leaderboard-table tbody tr {
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.leaderboard-table tbody tr:nth-child(even) {
  background: rgba(255, 249, 232, 0.025);
}

.leaderboard-table tbody tr:hover {
  background: rgba(227, 182, 88, 0.08);
  box-shadow: inset 4px 0 var(--gold);
}

.rank-badge {
  display: inline-grid;
  min-width: 48px;
  height: 36px;
  place-items: center;
  border-left: 4px solid var(--gold);
  background: rgba(10, 15, 12, 0.54);
  color: var(--text);
  font-weight: 900;
}

.player-cell {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.player-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid rgba(227, 182, 88, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(125, 178, 79, 0.92), rgba(37, 78, 52, 0.96));
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: inset 0 -5px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  position: relative;
}

.player-avatar img,
.player-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.avatar-fallback {
  display: none;
}

.avatar-missing .avatar-fallback {
  display: grid;
  position: absolute;
  inset: 0;
  place-items: center;
}

.player-cell strong,
.player-cell small {
  display: block;
}

.player-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-pill {
  display: inline-grid;
  min-width: 78px;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 249, 232, 0.12);
  border-radius: 999px;
  background: rgba(255, 249, 232, 0.07);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.online {
  border-color: rgba(125, 178, 79, 0.52);
  background: rgba(125, 178, 79, 0.16);
  color: #d9f6b8;
}

.player-detail {
  position: sticky;
  top: 18px;
  padding: 22px;
  border: 2px solid rgba(227, 182, 88, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(227, 182, 88, 0.1), transparent 38%),
    linear-gradient(135deg, rgba(37, 78, 52, 0.64), rgba(9, 14, 11, 0.94)),
    rgba(9, 14, 11, 0.72);
  box-shadow:
    inset 0 -7px rgba(0, 0, 0, 0.24),
    0 18px 38px rgba(0, 0, 0, 0.22);
}

.player-detail-avatar {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin-bottom: 18px;
  border: 2px solid rgba(227, 182, 88, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(125, 178, 79, 0.94), rgba(37, 78, 52, 0.98));
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: inset 0 -7px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
}

.player-profile-avatar {
  display: grid;
  width: clamp(86px, 12vw, 132px);
  height: clamp(86px, 12vw, 132px);
  place-items: center;
  border: 3px solid rgba(227, 182, 88, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(125, 178, 79, 0.94), rgba(37, 78, 52, 0.98));
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 900;
  box-shadow:
    inset 0 -10px rgba(0, 0, 0, 0.22),
    0 18px 38px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  position: relative;
}

.player-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.player-detail h3 {
  margin: 0;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1;
}

.player-detail > span:not(.player-detail-avatar) {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 900;
}

.player-detail dl {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

.player-detail dl div {
  display: grid;
  gap: 4px;
  padding: 11px 0;
  border-top: 1px solid rgba(153, 188, 104, 0.14);
}

.player-detail dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.player-detail dd {
  min-width: 0;
  margin: 0;
  color: rgba(255, 249, 232, 0.9);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.integration-note {
  margin-top: 18px;
  padding: 18px 20px;
}

.player-profile {
  display: grid;
  gap: 22px;
}

.player-hero-card,
.player-not-found {
  border: 2px solid rgba(153, 188, 104, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(12, 20, 15, 0.94), rgba(12, 20, 15, 0.54)),
    linear-gradient(135deg, rgba(125, 178, 79, 0.28), rgba(227, 182, 88, 0.16)),
    url("assets/leaderboards.png");
  background-position: center;
  background-size: cover;
  box-shadow:
    inset 0 -7px rgba(0, 0, 0, 0.24),
    0 18px 38px rgba(0, 0, 0, 0.25);
}

.player-hero-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
  min-height: 280px;
  padding: clamp(24px, 5vw, 54px);
}

.player-hero-card h1,
.player-not-found h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
}

.profile-rank {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 900;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.profile-stat-grid article {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 22px;
  border: 2px solid rgba(153, 188, 104, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 78, 52, 0.76), rgba(9, 14, 11, 0.92)),
    var(--panel);
  box-shadow:
    inset 0 -7px rgba(0, 0, 0, 0.24),
    0 18px 38px rgba(0, 0, 0, 0.25);
}

.profile-stat-grid article::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border: 2px solid rgba(227, 182, 88, 0.14);
  background: rgba(227, 182, 88, 0.06);
  transform: rotate(12deg);
}

.profile-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-stat-grid strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  font-size: clamp(1.35rem, 2.5vw, 2.25rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.player-not-found {
  min-height: 430px;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: clamp(28px, 5vw, 54px);
}

.player-not-found p:not(.page-kicker) {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 249, 232, 0.82);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  font-weight: 750;
  line-height: 1.55;
}

.not-found-button {
  display: inline-grid;
  min-height: 48px;
  align-items: center;
  margin-top: 24px;
  padding: 0 18px;
  border: 2px solid rgba(227, 182, 88, 0.44);
  border-radius: 8px;
  background: rgba(10, 15, 12, 0.58);
  color: var(--text);
  font-weight: 900;
  box-shadow: inset 0 -4px rgba(0, 0, 0, 0.18);
}

.not-found-button:hover {
  border-color: rgba(227, 182, 88, 0.7);
}

.integration-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
}

.integration-note p {
  margin: 0;
  color: rgba(255, 249, 232, 0.78);
  font-weight: 750;
  line-height: 1.5;
}

.site-footer {
  margin-top: 34px;
  padding: 20px 6px 2px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  transform: translate(-50%, 18px);
  padding: 13px 18px;
  border: 2px solid rgba(227, 182, 88, 0.52);
  border-radius: 8px;
  background: rgba(20, 29, 23, 0.96);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  box-shadow:
    inset 0 -4px rgba(0, 0, 0, 0.24),
    0 16px 36px rgba(0, 0, 0, 0.34);
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@keyframes copy-pop {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(0.98) translateY(1px);
  }

  100% {
    transform: scale(1);
  }
}

.tile,
.discord-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid rgba(153, 188, 104, 0.18);
  background: var(--panel);
  box-shadow:
    inset 0 -7px rgba(0, 0, 0, 0.24),
    0 18px 38px rgba(0, 0, 0, 0.25);
}

.tile {
  --tile-image: url("assets/oaksmp-world.png");
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
  background-image:
    linear-gradient(180deg, rgba(8, 20, 13, 0.05) 28%, rgba(8, 20, 13, 0.5) 100%),
    linear-gradient(120deg, rgba(37, 78, 52, 0.48), transparent 52%),
    var(--tile-image);
  background-repeat: no-repeat;
  background-size: cover;
  transition: transform 180ms ease, filter 180ms ease, border-color 180ms ease;
}

.tile:hover,
.discord-card:hover {
  transform: translateY(-2px);
  border-color: rgba(227, 182, 88, 0.58);
}

.tile:hover {
  filter: brightness(1.08) saturate(1.08);
}

.tile span {
  color: #fff;
  font-size: clamp(1.2rem, 2.1vw, 1.68rem);
  font-weight: 900;
  line-height: 1;
  text-align: right;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.85);
  padding: 8px 12px 10px;
  background: rgba(10, 15, 12, 0.54);
  border-left: 4px solid var(--gold);
  box-shadow: inset 0 -4px rgba(0, 0, 0, 0.18);
}

.tile-store {
  --tile-image: url("assets/store.png");
  grid-column: span 2;
  grid-row: span 2;
  background-position: center;
}

.tile-join {
  --tile-image: url("assets/join.png");
  grid-column: span 2;
  background-position: center;
}

.discord-card {
  grid-column: span 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  align-items: center;
  column-gap: 16px;
  padding: 20px 24px;
  transition: transform 180ms ease, border-color 180ms ease;
  background-image:
    linear-gradient(90deg, rgba(10, 14, 18, 0.9), rgba(10, 14, 18, 0.58)),
    linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(37, 78, 52, 0.42)),
    url("assets/discord.png");
  background-position: center;
  background-size: cover;
}

.discord-card svg {
  grid-row: span 2;
  width: 46px;
  fill: var(--discord);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.38));
}

.discord-card strong {
  align-self: end;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 900;
  line-height: 1.1;
}

.discord-card span {
  align-self: start;
  color: var(--muted);
  font-size: clamp(0.82rem, 1.1vw, 0.96rem);
  font-weight: 800;
}

.tile-vote {
  --tile-image: url("assets/vote.png");
  grid-column: span 1;
  background-position: center;
}

.tile-map {
  --tile-image: url("assets/map.png");
  grid-column: span 2;
  background-position: center;
}

.tile-leaderboards {
  --tile-image: url("assets/leaderboards.png");
  grid-column: span 2;
  background-position: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .page-shell {
    width: min(100% - 72px, 1360px);
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 28px;
  }

  .server-ip,
  .account-tools,
  .search {
    width: 100%;
  }

  .account-tools {
    display: grid;
    grid-template-columns: minmax(150px, 0.45fr) minmax(220px, 1fr);
  }

  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    min-height: 0;
  }

  .home-shell {
    width: min(100% - 72px, 1280px);
  }

  .home-shell .topbar {
    margin-bottom: 22px;
  }

  .tile,
  .discord-card {
    min-height: 210px;
  }

  .home-shell .tile,
  .home-shell .discord-card {
    min-height: 172px;
  }

  .tile-store,
  .tile-join,
  .tile-map,
  .tile-leaderboards,
  .discord-card,
  .tile-vote {
    grid-column: span 1;
    grid-row: span 1;
  }

  .leaderboard-hero,
  .vote-hero,
  .join-hero,
  .stat-grid,
  .reward-strip,
  .vote-grid,
  .join-grid,
  .connection-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leaderboard-hero > div:first-child,
  .vote-hero > div:first-child,
  .join-hero > div:first-child {
    grid-column: span 2;
  }

  .leaderboard-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .leaderboard-tabs {
    justify-content: flex-start;
  }

  .leaderboard-layout {
    grid-template-columns: 1fr;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-hero-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .player-hero-card .status-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .player-detail {
    position: static;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 32px, 1360px);
    padding-top: 16px;
  }

  .server-ip,
  .login,
  .search {
    height: 60px;
    border-radius: 8px;
  }

  .server-ip,
  .login {
    gap: 12px;
    padding: 0 18px;
  }

  .server-ip {
    min-width: 0;
    justify-content: flex-start;
  }

  .server-ip span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .server-ip svg,
  .login svg {
    width: 26px;
    height: 26px;
  }

  .account-tools,
  .home-grid {
    grid-template-columns: 1fr;
  }

  .home-shell {
    width: min(100% - 32px, 1280px);
    padding-top: 12px;
  }

  .home-shell .topbar {
    margin-bottom: 18px;
  }

  .home-shell .server-ip,
  .home-shell .login,
  .home-shell .search {
    height: 56px;
  }

  .compact-copy {
    min-width: 0;
  }

  .search {
    padding: 0 18px;
  }

  .tile,
  .discord-card {
    min-height: 180px;
    border-radius: 8px;
  }

  .home-shell .tile,
  .home-shell .discord-card {
    min-height: 138px;
  }

  .tile {
    padding: 20px;
  }

  .home-shell .tile {
    padding: 16px;
  }

  .discord-card {
    padding: 24px;
  }

  .home-shell .discord-card {
    padding: 18px;
  }

  .site-footer {
    padding-top: 16px;
  }

  .leaderboard-hero,
  .vote-hero,
  .join-hero,
  .stat-grid,
  .reward-strip,
  .vote-grid,
  .join-grid,
  .connection-strip {
    grid-template-columns: 1fr;
  }

  .leaderboard-hero > div:first-child,
  .vote-hero > div:first-child,
  .join-hero > div:first-child {
    grid-column: span 1;
  }

  .leaderboard-panel {
    padding: 16px;
  }

  .profile-stat-grid,
  .player-hero-card {
    grid-template-columns: 1fr;
  }

  .leaderboard-tabs button {
    flex: 1 1 auto;
  }
}
