/* ── Reset & Tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg:          #0b0c0e;
  --bg-2:        #111318;
  --bg-3:        #18191f;
  --bg-4:        #1e2028;
  --text:        #e8eaf2;
  --text-2:      #9099b0;
  --text-3:      #5a6175;
  --accent:      #f05a1a;
  --accent-h:    #cc4a12;
  --accent-glow: rgba(240, 90, 26, 0.22);
  --green:       #22c55e;
  --green-glow:  rgba(34, 197, 94, 0.15);
  --red:         #ef4444;
  --red-glow:    rgba(239, 68, 68, 0.15);
  --border:      rgba(255, 255, 255, 0.07);
  --border-2:    rgba(255, 255, 255, 0.12);
  --radius:      10px;
  --radius-lg:   16px;
  --max:         1200px;
  --nav-h:       60px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

img { display: block; max-width: 100%; }

code, kbd {
  font-family: 'Fira Code', 'Cascadia Code', 'SF Mono', monospace;
  font-size: 0.9em;
}

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(11, 12, 14, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-inline: 1.5rem;
}

.nav-inner {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-rust { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding-inline: 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); background: var(--bg-3); }

.nav-links a.active { font-weight: 600; }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
  margin-left: 0.5rem;
}
.nav-cta:hover { background: var(--accent-h) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  align-items: center;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Page wrapper ───────────────────────────────────────────────────────────── */
.page { padding: 2.5rem 1.5rem 4rem; }
.page-inner { max-width: var(--max); margin: 0 auto; }

/* ── Hero (Home) ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 1.5rem 4.5rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(240, 90, 26, 0.18) 0%, transparent 60%),
    var(--bg);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 39px,
    rgba(255,255,255,0.012) 39px,
    rgba(255,255,255,0.012) 40px
  );
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 50ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Status Widget (in hero) ─────────────────────────────────────────────────── */
.status-widget {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sw-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sw-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.sw-connect {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sw-connect-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sw-connect code {
  color: var(--accent);
  word-break: break-all;
}

.sw-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.sw-stat {
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  text-align: center;
}

.sw-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.sw-stat-key {
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sw-copy {
  width: 100%;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); }

.btn-outline {
  background: transparent;
  border-color: var(--border-2);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg-3); border-color: var(--border-2); }

.btn-ghost {
  background: var(--bg-3);
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); background: var(--bg-4); }

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }

.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Section heading ────────────────────────────────────────────────────────── */
.sec-head {
  margin-bottom: 1.75rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.sec-head h1,
.sec-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.sec-head p {
  color: var(--text-2);
  max-width: 65ch;
  line-height: 1.65;
}

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.card-p { padding: 1.25rem 1.5rem; }

/* ── Server card ─────────────────────────────────────────────────────────────── */
.server-list { display: flex; flex-direction: column; gap: 0.75rem; }

.server-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  transition: border-color 0.15s;
}

.server-card:hover { border-color: var(--border-2); }

.server-card.online { border-left: 3px solid var(--green); }
.server-card.offline { border-left: 3px solid var(--red); }

.sc-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 52px;
}

.sc-status-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sc-body { min-width: 0; }

.sc-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.82rem;
  color: var(--text-2);
  margin-bottom: 0.6rem;
}

.sc-meta span { display: flex; align-items: center; gap: 0.35rem; }

.sc-connect {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sc-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.sc-players {
  text-align: right;
}

.sc-players-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.sc-players-label {
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Tags / Badges ──────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag-orange { background: rgba(240, 90, 26, 0.15); color: #ff9966; }
.tag-green  { background: rgba(34, 197, 94, 0.12); color: #7ff3ab; }
.tag-red    { background: rgba(239, 68, 68, 0.12); color: #ff9999; }
.tag-gray   { background: var(--bg-4); color: var(--text-2); }
.tag-blue   { background: rgba(99, 179, 237, 0.12); color: #93c5fd; }

/* ── Leaderboard table ──────────────────────────────────────────────────────── */
.lb-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lb-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.lb-filter-group {
  display: flex;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}

.lb-btn {
  padding: 0.35rem 0.85rem;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.lb-btn:hover { color: var(--text); }
.lb-btn.active { background: var(--accent); color: #fff; }
.lb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lb-table { width: 100%; border-collapse: collapse; }

.lb-table thead tr {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

.lb-table th {
  padding: 0.7rem 1.25rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.lb-table td {
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.lb-table tbody tr { transition: background 0.1s; }
.lb-table tbody tr:hover { background: rgba(255,255,255,0.025); }

.lb-rank { color: var(--text-3); font-weight: 700; font-variant-numeric: tabular-nums; width: 3rem; }
.lb-rank-1 { color: #fbbf24; }
.lb-rank-2 { color: #c0c0c0; }
.lb-rank-3 { color: #cd7f32; }

.lb-placeholder {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-2);
}

.lb-placeholder-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.lb-placeholder h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.lb-placeholder p { font-size: 0.9rem; color: var(--text-3); }

/* ── Map card ────────────────────────────────────────────────────────────────── */
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.map-info { padding: 1.5rem; }

.map-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.map-name-row h2 { font-size: 1.4rem; font-weight: 800; }

.map-kv { display: flex; flex-direction: column; gap: 0.75rem; }

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.kv-row:last-child { border-bottom: none; }
.kv-key { font-size: 0.85rem; color: var(--text-2); }
.kv-val { font-size: 0.9rem; font-weight: 600; text-align: right; }

.wipe-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wipe-card h3 { font-size: 1rem; font-weight: 700; color: var(--text-2); }

.wipe-date-big {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.wipe-hint {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 840px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group.span-2 { grid-column: span 2; }

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.15s;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-3); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-textarea { resize: vertical; }

.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 0.5rem; }

.form-status {
  font-size: 0.88rem;
  font-weight: 600;
}
.form-status.success { color: #7ff3ab; }
.form-status.error   { color: #fca5a5; }

.honeypot {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
  pointer-events: none;
}

/* ── Home features ───────────────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-glow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.88rem; color: var(--text-2); line-height: 1.6; margin-bottom: 1rem; }

.feature-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.15s;
}
.feature-link:hover { gap: 0.5rem; }

/* ── Community section (home) ────────────────────────────────────────────────── */
.community-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-top: 1rem;
}

.cs-text h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }
.cs-text p  { font-size: 0.88rem; color: var(--text-2); }

.cs-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-3);
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-2); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }

/* ── Utils ───────────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-2); }
.text-sm     { font-size: 0.85rem; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mb-2  { margin-bottom: 1rem; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .status-widget { max-width: 480px; }
  .server-card { grid-template-columns: auto 1fr; }
  .sc-actions { grid-column: span 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .map-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .community-strip { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem 1rem;
    gap: 0.25rem;
  }
  .nav-links.open a { width: 100%; padding: 0.6rem 0.75rem; }
  .nav-cta { margin-left: 0 !important; }
  .hero { padding: 3rem 1.5rem 3rem; }
  .hero h1 { font-size: 2.5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }
  .feature-grid { grid-template-columns: 1fr; }
  .sw-stats { grid-template-columns: 1fr 1fr 1fr; }
}
