@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #07111f;
  --panel: #0d1a2b;
  --panel-2: #101f33;
  --blue: #367dff;
  --blue-light: #72a5ff;
  --text: #f3f7ff;
  --muted: #8a9bb4;
  --border: rgba(148, 177, 220, .13);
  --green: #50dfa0;
  --red: #ff727e;
  --gold: #f8ca69;
  --cyan: #70dcff;
  --cyan-border: rgba(74, 204, 255, .25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.background-glow {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 700px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(42, 106, 225, .19), transparent 65%),
    linear-gradient(180deg, rgba(7, 17, 31, .1), var(--bg));
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 14px max(20px, calc((100% - 1160px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(7, 17, 31, .88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 900;
  letter-spacing: -.7px;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  transition: transform .2s, filter .2s;
}

.brand:hover img {
  transform: rotate(-6deg) scale(1.06);
  filter: drop-shadow(0 0 10px rgba(54, 125, 255, .5));
}

.accent,
.footer-brand span {
  color: var(--blue-light);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: color .2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.main-nav a.active {
  position: relative;
}

.main-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: -29px;
  left: 0;
  height: 2px;
  background: var(--blue);
  content: "";
}

.header-button {
  padding: 11px 19px;
  border: 1px solid rgba(114, 165, 255, .35);
  border-radius: 9px;
  background: rgba(54, 125, 255, .12);
  color: var(--blue-light);
  font-size: 13px;
  font-weight: 800;
  transition: background .2s, border-color .2s;
}

.header-button:hover {
  background: rgba(54, 125, 255, .22);
  border-color: rgba(114, 165, 255, .55);
}

.menu-toggle {
  display: none;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: white;
}

/* Hero */

.hero {
  padding-top: 76px;
  padding-bottom: 46px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  color: var(--blue-light);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2.2px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(114, 165, 255, .2);
  border-radius: 100px;
  background: rgba(54, 125, 255, .08);
}

.eyebrow-dot,
.pulse-dot,
.table-title-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.hero h1 {
  margin-top: 23px;
  font-size: clamp(32px, 5.4vw, 58px);
  font-weight: 900;
  letter-spacing: -2.5px;
  line-height: 1.12;
}

.hero h1 span,
.section-heading h2 span {
  color: var(--blue-light);
}

.hero-description {
  max-width: 550px;
  margin: 17px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* Server address cards */

.server-addresses {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 29px;
}

.address-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(13, 26, 43, .85);
  color: var(--text);
  text-align: left;
  transition:
    border-color .25s,
    background .25s,
    transform .25s;
}

.address-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan-border);
  background: rgba(13, 26, 43, .98);
}

.address-card:active {
  transform: translateY(0) scale(.99);
}

/* Matching homepage Java and Bedrock icons */

.address-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--cyan-border);
  border-radius: 50%;
  background: rgba(45, 190, 255, .08);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(45, 190, 255, .06);
  transition:
    background .25s,
    border-color .25s,
    box-shadow .25s;
}

.address-icon svg {
  display: block;
  width: 27px;
  height: 27px;
  overflow: visible;
  color: inherit;
}

.java-icon,
.bedrock-icon {
  background: rgba(45, 190, 255, .08);
  border-color: var(--cyan-border);
  color: var(--cyan);
}

.address-card:hover .address-icon {
  background: rgba(45, 190, 255, .15);
  border-color: rgba(74, 204, 255, .6);
  box-shadow: 0 0 16px rgba(45, 190, 255, .15);
}

.address-info {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 0;
}

.address-info strong {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

.address-info small {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.copy-label {
  display: grid;
  width: 27px;
  height: 30px;
  flex: 0 0 27px;
  margin-left: auto;
  place-items: center;
  color: var(--muted);
  transition: color .2s;
}

.copy-label svg {
  display: block;
  width: 18px;
  height: 18px;
}

.address-card:hover .copy-label {
  color: var(--cyan);
}

/* Server overview */

.server-panel,
.leaderboard-section,
.online-section {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(13, 26, 43, .8);
}

.server-panel-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.server-panel-heading h2,
.section-heading h2 {
  margin-top: 8px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(80, 223, 160, .17);
  border-radius: 100px;
  background: rgba(80, 223, 160, .06);
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
}

.pulse-dot {
  box-shadow: 0 0 10px rgba(80, 223, 160, .5);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  50% { opacity: .35; }
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.overview-card {
  display: grid;
  gap: 10px;
  min-height: 116px;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5, 14, 27, .45);
}

.overview-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.3px;
}

.status-value,
.overview-number {
  font-size: 25px;
  font-weight: 900;
}

.status-value[data-status="online"] {
  color: var(--green);
}

.status-value[data-status="offline"] {
  color: var(--red);
}

.overview-card small {
  color: var(--muted);
  font-size: 11px;
}

.status-updated {
  margin-top: 15px;
  color: var(--muted);
  font-size: 10px;
}

/* Leaderboard */

.leaderboard-section,
.online-section {
  margin-top: 32px;
}

.section-heading h2 {
  font-size: clamp(23px, 3vw, 30px);
}

.section-heading p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.refresh-button:hover {
  border-color: var(--blue);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: .6;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--border);
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  transition: all .2s;
}

.category-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .035);
}

.category-tab.active {
  border-color: rgba(54, 125, 255, .25);
  background: rgba(54, 125, 255, .14);
  color: var(--blue-light);
}

.tab-icon {
  font-size: 15px;
}

.leaderboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 21px 0;
}

.table-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 13px;
}

.table-title-dot {
  width: 6px;
  height: 6px;
  background: var(--blue);
}

.data-badge {
  padding: 5px 7px;
  border: 1px solid rgba(80, 223, 160, .15);
  border-radius: 5px;
  background: rgba(80, 223, 160, .06);
  color: var(--green);
  font-size: 8px;
  letter-spacing: .8px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(280px, 100%);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(5, 14, 27, .55);
  color: var(--muted);
}

.search-box > span {
  font-size: 20px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.search-box input::placeholder {
  color: #71829c;
}

.search-box kbd {
  color: #6f829e;
  font-size: 8px;
}

/* Podium */

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 13px;
  margin: 30px 0 35px;
}

.podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 22px 10px 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(21, 39, 63, .9), rgba(8, 19, 33, .9));
  text-align: center;
}

.podium-card.first {
  min-height: 230px;
  border-color: rgba(248, 202, 105, .35);
  background: linear-gradient(180deg, rgba(248, 202, 105, .11), rgba(8, 19, 33, .9));
}

.podium-card.second {
  min-height: 200px;
}

.podium-card.third {
  min-height: 180px;
  border-color: rgba(205, 143, 94, .22);
}

.podium-rank {
  margin-bottom: 11px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.second .podium-rank {
  color: #c5d4e8;
}

.third .podium-rank {
  color: #dba77d;
}

.podium-avatar {
  width: 55px;
  height: 55px;
  image-rendering: pixelated;
  border: 2px solid rgba(255, 255, 255, .12);
  border-radius: 11px;
  background: var(--panel);
}

.first .podium-avatar {
  width: 65px;
  height: 65px;
  border-color: rgba(248, 202, 105, .5);
}

.podium-name {
  width: 100%;
  margin-top: 12px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-value {
  margin-top: 7px;
  color: var(--blue-light);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.first .podium-value {
  color: var(--gold);
}

.podium-placeholder {
  grid-column: 1 / -1;
  padding: 35px 10px;
  color: var(--muted);
  text-align: center;
}

/* Table */

.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

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

.leaderboard-table thead {
  background: rgba(5, 14, 27, .65);
}

.leaderboard-table th {
  padding: 15px 17px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  white-space: nowrap;
}

.leaderboard-table td {
  padding: 14px 17px;
  border-top: 1px solid var(--border);
  font-size: 11px;
}

.leaderboard-table tbody tr {
  transition: background .15s;
}

.leaderboard-table tbody tr:hover {
  background: rgba(54, 125, 255, .045);
}

.rank-cell {
  color: var(--muted);
  font-weight: 900;
}

.rank-top {
  color: var(--gold);
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 160px;
}

.player-avatar {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel-2);
}

.player-name {
  max-width: 170px;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-value {
  color: var(--blue-light);
  font-weight: 900;
  white-space: nowrap;
}

.playtime-cell {
  color: var(--muted);
  white-space: nowrap;
}

.player-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.player-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #66748b;
  content: "";
}

.player-status.online {
  color: var(--green);
}

.player-status.online::before {
  background: var(--green);
}

.table-message {
  padding: 38px 15px !important;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 18px;
}

#resultsCount,
#pageInfo {
  color: var(--muted);
  font-size: 10px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination button {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.data-notice {
  margin-top: 17px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

/* Online players */

.online-player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.online-player {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(5, 14, 27, .45);
  font-size: 11px;
  font-weight: 800;
}

.online-player img {
  width: 26px;
  height: 26px;
  image-rendering: pixelated;
}

.online-empty {
  padding: 20px 0;
  color: var(--muted);
  font-size: 12px;
}

/* Join banner and footer */

.join-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 32px;
  padding: 32px;
  border: 1px solid rgba(54, 125, 255, .22);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(54, 125, 255, .15), transparent 65%),
    var(--panel);
}

.join-banner h2 {
  margin-top: 9px;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -.8px;
}

.join-banner p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.primary-button {
  flex-shrink: 0;
  padding: 13px 19px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 7px 24px rgba(54, 125, 255, .18);
}

.primary-button:hover {
  background: #4b8aff;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 60px;
  padding: 27px max(20px, calc((100% - 1160px) / 2));
  border-top: 1px solid var(--border);
}

.footer-brand {
  font-size: 14px;
}

.site-footer p,
.site-footer > span {
  color: var(--muted);
  font-size: 10px;
}

/* Toast */

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: calc(100% - 40px);
  padding: 13px 17px;
  transform: translateY(20px);
  border: 1px solid rgba(114, 165, 255, .3);
  border-radius: 10px;
  background: #14243b;
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Tablet */

@media (max-width: 850px) {
  .site-header {
    gap: 13px;
  }

  .main-nav {
    gap: 15px;
  }

  .main-nav a {
    font-size: 11px;
  }

  .header-button {
    padding: 10px 12px;
  }

  .server-panel,
  .leaderboard-section,
  .online-section {
    padding: 21px;
  }
}

/* Mobile */

@media (max-width: 650px) {
  .container {
    width: calc(100% - 26px);
  }

  .site-header {
    min-height: 68px;
    padding: 12px 14px;
  }

  .brand img {
    width: 35px;
    height: 35px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    background: #091525;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 5px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .main-nav a.active::after {
    display: none;
  }

  .header-button {
    padding: 9px 11px;
    font-size: 11px;
  }

  .hero {
    padding-top: 52px;
    padding-bottom: 27px;
  }

  .hero h1 {
    letter-spacing: -1.5px;
  }

  .hero-description {
    font-size: 12px;
  }

  .address-card {
    width: 100%;
    min-width: 0;
  }

  .address-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .address-info strong {
    font-size: 9px;
  }

  .address-info small {
    font-size: 11px;
  }

  .server-panel,
  .leaderboard-section,
  .online-section {
    padding: 17px 13px;
    border-radius: 13px;
  }

  .server-panel-heading h2,
  .section-heading h2 {
    font-size: 21px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 17px;
  }

  .overview-card {
    min-height: auto;
    padding: 14px;
    gap: 7px;
  }

  .overview-number,
  .status-value {
    font-size: 22px;
  }

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

  .section-heading p {
    max-width: 290px;
  }

  .refresh-button {
    padding: 9px;
    font-size: 10px;
  }

  .category-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 22px;
  }

  .category-tab {
    justify-content: center;
    padding: 12px 7px;
    font-size: 11px;
  }

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

  .search-box {
    width: 100%;
  }

  .podium {
    gap: 7px;
    margin: 23px 0;
  }

  .podium-card {
    padding: 15px 5px;
  }

  .podium-card.first {
    min-height: 195px;
  }

  .podium-card.second {
    min-height: 173px;
  }

  .podium-card.third {
    min-height: 158px;
  }

  .podium-avatar {
    width: 43px;
    height: 43px;
  }

  .first .podium-avatar {
    width: 52px;
    height: 52px;
  }

  .podium-name {
    font-size: 10px;
  }

  .podium-value {
    font-size: 10px;
  }

  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .join-banner {
    align-items: flex-start;
    flex-direction: column;
    padding: 23px 17px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 40px;
    padding: 24px 16px;
  }
}

/* Small phones */

@media (max-width: 380px) {
  .brand {
    gap: 7px;
    font-size: 13px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .header-button {
    padding: 8px 9px;
    font-size: 10px;
  }

  .address-card {
    gap: 8px;
    padding: 10px;
  }

  .address-icon {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .address-icon svg {
    width: 25px;
    height: 25px;
  }

  .address-info strong {
    font-size: 8px;
    letter-spacing: .9px;
  }

  .address-info small {
    font-size: 10px;
  }

  .copy-label {
    width: 23px;
    flex-basis: 23px;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}