:root {
  --bg: #050805;
  --panel: #0d130e;
  --panel-2: #111a12;
  --text: #f7fff1;
  --muted: #b9c9b0;
  --line: rgba(210, 255, 183, 0.18);
  --green: #9cff28;
  --green-2: #58d10e;
  --gold: #ffd166;
  --red: #ff7070;
  --blue: #7dd3fc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(145deg, #020302 0%, var(--bg) 54%, #09100a 100%);
  font-family: Inter, Arial, sans-serif;
}

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

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 5, 0.92);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.nav-links {
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--green);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 30px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.dashboard-hero.compact {
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  line-height: 1.03;
}

h3 {
  margin-bottom: 8px;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-text {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(1rem, 1.8vw, 1.24rem);
}

.join-box,
.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 19, 14, 0.88);
}

.join-box {
  padding: 18px;
}

.join-box span,
.metric-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.copy-ip {
  width: 100%;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 13px 16px;
  color: #071007;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  cursor: pointer;
}

.copy-ip strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.copy-ip small {
  font-weight: 800;
  opacity: 0.72;
}

.button,
.lookup-form button,
.leaderboard-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  color: #071007;
  background: var(--gold);
  font-weight: 900;
  cursor: pointer;
}

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

.metric-card {
  min-height: 126px;
  padding: 22px;
}

.metric-card strong {
  display: block;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.metric-card.is-online strong {
  color: var(--green);
}

.metric-card.is-offline strong {
  color: var(--red);
}

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

.panel {
  padding: 22px;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
  white-space: nowrap;
}

.lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.lookup-form input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: 0;
}

.lookup-result,
.player-row,
.world-row,
.integration-pill,
.leaderboard-row {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.23);
}

.lookup-result {
  min-height: 82px;
  padding: 14px;
  color: var(--muted);
}

.player-table,
.world-table,
.integration-list,
.leaderboard-list {
  display: grid;
  gap: 10px;
}

.player-row,
.world-row,
.leaderboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
}

.player-row strong,
.world-row strong,
.leaderboard-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.player-row span,
.world-row span,
.leaderboard-row span,
.lookup-result span {
  color: var(--muted);
  font-size: 0.9rem;
}

.player-rank,
.leaderboard-value {
  color: var(--green);
  font-weight: 900;
}

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

.integration-pill {
  padding: 11px 12px;
  color: var(--muted);
  font-weight: 800;
}

.integration-pill.is-on {
  color: var(--green);
}

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

code {
  display: block;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  font-family: Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.snapshot-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.leaderboard-tabs button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.leaderboard-tabs button.is-active {
  color: #071007;
  background: var(--green);
}

.leaderboard-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.leaderboard-place {
  color: var(--gold);
  font-weight: 900;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto 0;
  padding: 28px 0 44px;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer span {
  margin-right: auto;
  color: var(--text);
  font-weight: 900;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .dashboard-hero,
  .two-column {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .shell,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .status-grid,
  .command-grid,
  .integration-list {
    grid-template-columns: 1fr;
  }

  .lookup-form {
    grid-template-columns: 1fr;
  }

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

  .footer span {
    margin-right: 0;
  }
}

/* Keep the SMP landing page compact inside the Canna Network. */
.home-page .hero { min-height: 460px; padding: 52px 0 34px; }
.home-page h1 { font-size: clamp(3.1rem, 6vw, 5.2rem); }
.home-page .hero-text { font-size: 1rem; }
.home-page .hero-logo img { width: min(100%, 300px); }
.home-page .section, .home-page .split-section, .home-page .join-panel { margin: 50px 0; }
.home-page .feature-card, .home-page .crate-row article { min-height: 175px; padding: 18px; }
.home-page .feature-card span { margin-bottom: 18px; }
@media (max-width: 860px) { .home-page .hero { min-height: auto; padding: 38px 0; } .home-page .hero-logo img { width: min(58vw, 240px); } }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(5, 8, 5, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.home-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 410px);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: 54px 0 42px;
}

.home-page h1 {
  margin-bottom: 18px;
  font-size: clamp(3.8rem, 8.2vw, 7.25rem);
}

.hero-actions,
.join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.home-copy {
  min-width: min(100%, 290px);
  box-shadow: 0 18px 40px rgba(88, 209, 14, 0.22);
}

.home-copy.large {
  min-width: min(100%, 330px);
}

.hero-logo {
  display: grid;
  place-items: center;
}

.hero-logo img {
  width: min(100%, 410px);
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.62));
}

.notice,
.split-section,
.join-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 22, 16, 0.82);
}

.notice {
  display: flex;
  gap: 10px;
  padding: 18px 20px;
  color: var(--muted);
}

.notice strong {
  flex: 0 0 auto;
  color: var(--text);
}

.section,
.split-section,
.join-panel {
  margin: 72px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 26px;
}

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

.feature-card,
.crate-row article {
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 22, 16, 0.72);
}

.feature-card span {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--blue);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr);
  gap: 28px;
  padding: clamp(24px, 5vw, 42px);
}

.command-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.crate-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.join-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 5vw, 44px);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto 0;
  padding: 28px 0 44px;
  display: flex;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer span {
  margin-right: auto;
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .split-section,
  .join-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-logo {
    order: -1;
  }

  .hero-logo img {
    width: min(68vw, 320px);
  }

  .feature-grid,
  .crate-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .notice {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .home-main,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .feature-grid,
  .crate-row,
  .command-list {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .crate-row article {
    min-height: auto;
  }

  .hero-actions,
  .join-actions,
  .site-footer {
    flex-direction: column;
  }

  .button,
  .home-copy {
    width: 100%;
  }
}
