:root {
  --bg: #080b12;
  --surface: #0f1522;
  --surface-2: #151d2e;
  --border: rgba(148, 163, 184, 0.14);
  --border-bright: rgba(56, 189, 248, 0.35);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #a855f7;
  --cyan: #22d3ee;
  --emerald: #10b981;
  --gold: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
}
.bg-glow-1 { top: -140px; left: -120px; width: 460px; height: 460px; background: var(--accent); }
.bg-glow-2 { top: 240px; right: -160px; width: 520px; height: 520px; background: var(--cyan); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(168, 85, 247, 0.14);
  color: #e9d5ff;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.88em;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(8, 11, 18, 0.82);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.brand-mark { color: var(--accent); font-size: 1.25rem; }
.brand-tag {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
}
.nav-links { display: flex; gap: 20px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 1.05rem;
  cursor: pointer;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.status-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
}
.status-pill.online { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.35); }
.status-pill.online .dot { background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }
.status-pill.offline { color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.status-pill.offline .dot { background: var(--danger); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 0.86rem; }
.btn-full { width: 100%; padding: 12px 16px; font-size: 0.95rem; }
.btn-primary {
  background: linear-gradient(135deg, #9333ea, #6366f1);
  color: #fff;
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.28);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-launch {
  padding: 14px 20px;
  background: linear-gradient(135deg, #059669, #0891b2);
  color: #fff;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.28);
  text-align: left;
}
.btn-launch:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-launch small, .btn-secondary small {
  display: block; font-size: 0.78rem; font-weight: 500; opacity: 0.88;
}
.btn-secondary {
  padding: 14px 20px;
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-bright);
  text-align: left;
}
.btn-secondary:hover { background: #1c273d; }
.btn-ghost {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-bright); }
.btn-danger-ghost {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.28);
  margin-top: 12px;
}
.btn-icon { font-size: 1.35rem; }

/* Hero */
.hero { padding: 56px 0 42px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 28px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.12;
  margin-bottom: 16px;
}
.gradient-text {
  background: linear-gradient(90deg, #c084fc, #22d3ee, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead { color: var(--muted); font-size: 1.03rem; max-width: 590px; margin-bottom: 24px; }
.hero-cta-group { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.quick-connect-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.chip-link:hover { color: var(--text); border-color: var(--border-bright); }
.chip-accent { color: #d8b4fe; border-color: rgba(168, 85, 247, 0.35); background: rgba(168, 85, 247, 0.1); }

/* Hero Status Card */
.hero-status-card {
  background: linear-gradient(180deg, rgba(21, 29, 46, 0.92), rgba(15, 21, 34, 0.95));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.card-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
.status-badge {
  font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: rgba(148, 163, 184, 0.15); color: var(--muted);
}
.status-badge.online { background: rgba(16, 185, 129, 0.16); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.status-badge.offline { background: rgba(239, 68, 68, 0.16); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.player-counter { display: flex; align-items: baseline; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.big-num { font-family: 'Space Grotesk', sans-serif; font-size: 2.8rem; font-weight: 700; color: var(--text); line-height: 1; }
.big-sep, .big-max { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; color: var(--muted); }
.counter-label { font-size: 0.88rem; color: var(--muted); margin-left: 6px; }
.status-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.metric {
  background: rgba(8, 11, 18, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.metric-label { display: block; font-size: 0.74rem; color: var(--muted); }
.metric strong { font-size: 0.9rem; color: var(--text); }
.auth-sync-box {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.84rem;
  color: #cbd5e1;
}
.auth-sync-title { font-weight: 700; color: #e9d5ff; margin-bottom: 4px; }

/* Sections */
.section { padding: 38px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.65rem;
  margin-bottom: 4px;
}
.section-head p { color: var(--muted); font-size: 0.94rem; }
.info-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
}

/* Players Grid */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
}
.player-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(34, 211, 238, 0.3));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.player-name { font-weight: 600; font-size: 0.94rem; word-break: break-all; }
.plat-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; margin-top: 2px;
}
.plat-bedrock { background: rgba(16, 185, 129, 0.16); color: #34d399; }
.plat-java { background: rgba(56, 189, 248, 0.16); color: #38bdf8; }
.empty-state {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  color: var(--muted);
}

/* Tabs & Tables */
.tab-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-pill {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
}
.tab-pill.active {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.5);
  color: #f3e8ff;
}
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(8, 11, 18, 0.4); }
tr:last-child td { border-bottom: none; }
.text-right { text-align: right; }
.empty-cell { text-align: center; color: var(--muted); padding: 28px; }
.rank-badge {
  display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  border-radius: 8px; font-weight: 700; font-size: 0.84rem;
  background: var(--surface-2); color: var(--muted);
}
.rank-1 { background: rgba(245, 158, 11, 0.22); color: #fbbf24; }
.rank-2 { background: rgba(226, 232, 240, 0.2); color: #e2e8f0; }
.rank-3 { background: rgba(217, 119, 6, 0.22); color: #fb923c; }
.mono-val { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: #34d399; }

/* Store */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 16px;
}
.store-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition: transform 0.16s, border-color 0.16s;
}
.store-card:hover { transform: translateY(-3px); border-color: var(--border-bright); }
.store-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.store-badge {
  font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(245, 158, 11, 0.16); color: #fbbf24;
}
.store-card.accent-cyan .store-badge { background: rgba(34, 211, 238, 0.16); color: var(--cyan); }
.store-card.accent-purple .store-badge { background: rgba(168, 85, 247, 0.16); color: #d8b4fe; }
.store-card.accent-emerald .store-badge { background: rgba(16, 185, 129, 0.16); color: #34d399; }
.store-price { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; color: #fff; }
.store-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; margin-bottom: 6px; }
.store-summary { font-size: 0.86rem; color: var(--muted); margin-bottom: 14px; }
.perk-list { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; flex: 1; }
.perk-list li { font-size: 0.85rem; color: #cbd5e1; padding-left: 18px; position: relative; }
.perk-list li::before { content: '✓'; position: absolute; left: 0; color: var(--emerald); font-weight: 700; }

/* Catalog */
.catalog-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.search-input {
  flex: 1;
  min-width: 240px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}
.search-input:focus { outline: none; border-color: var(--cyan); }
.search-sm { flex: 0 1 280px; }
.checkbox-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.86rem; color: var(--muted); cursor: pointer;
}
.cat-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.catalog-table-wrap { max-height: 480px; overflow-y: auto; }
.tag-yes { font-size: 0.74rem; padding: 3px 8px; border-radius: 999px; background: rgba(16, 185, 129, 0.16); color: #34d399; font-weight: 600; }
.tag-safe { font-size: 0.74rem; padding: 3px 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.15); color: var(--muted); font-weight: 600; }
.price-buy { font-family: 'JetBrains Mono', monospace; color: #fbbf24; }
.price-sell { font-family: 'JetBrains Mono', monospace; color: #34d399; font-weight: 600; }
.price-none { color: #64748b; font-size: 0.82rem; }

/* Commands */
.cmd-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
}
.cmd-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 18px;
}
.cmd-group-title {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.08rem;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.cmd-list { display: flex; flex-direction: column; gap: 8px; }
.cmd-item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(8, 11, 18, 0.45);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.14s;
}
.cmd-item:hover { border-color: var(--border-bright); }
.cmd-item code { align-self: flex-start; font-size: 0.84rem; }
.cmd-item span { font-size: 0.82rem; color: var(--muted); }

/* Rules */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
}
.rule-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
}
.rule-num {
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(168, 85, 247, 0.18); color: #d8b4fe;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; flex-shrink: 0;
}
.rule-text { font-size: 0.92rem; color: #e2e8f0; }

/* Footer */
.footer {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding: 26px 0;
  background: rgba(8, 11, 18, 0.7);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px; font-size: 0.88rem; color: var(--muted);
}
.footer-inner strong { color: var(--text); font-family: 'Space Grotesk', sans-serif; }
.footer-meta { display: flex; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; }

/* Modals */
.hidden { display: none !important; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(3, 6, 12, 0.76);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal-card {
  position: relative;
  width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 9px;
  width: 32px; height: 32px; cursor: pointer;
}
.modal-close:hover { color: #fff; }
.modal-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; margin-right: 36px; }
.modal-tab {
  padding: 9px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--muted);
  font-family: inherit; font-weight: 600; cursor: pointer;
}
.modal-tab.active { background: rgba(168, 85, 247, 0.2); border-color: var(--accent); color: #fff; }
.auth-form h3, .auth-form h4 { font-family: 'Space Grotesk', sans-serif; margin-bottom: 6px; }
.form-hint { font-size: 0.84rem; color: var(--muted); margin-bottom: 14px; }
.platform-toggle {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
  font-size: 0.84rem; color: #cbd5e1;
}
.platform-toggle label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); cursor: pointer;
}
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field span { font-size: 0.82rem; font-weight: 600; color: #cbd5e1; }
.field input {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(8, 11, 18, 0.7); border: 1px solid var(--border);
  color: #fff; font-family: inherit; font-size: 0.92rem;
}
.field input:focus { outline: none; border-color: var(--accent); }
.form-msg {
  padding: 10px 12px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 12px;
}
.form-msg.err { background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(239, 68, 68, 0.35); color: #fecaca; }
.form-msg.ok { background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.35); color: #a7f3d0; }

.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-avatar {
  width: 50px; height: 50px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700;
}
.profile-sub { font-size: 0.84rem; color: var(--cyan); }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat-box {
  background: rgba(8, 11, 18, 0.55); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
}
.stat-box span { display: block; font-size: 0.76rem; color: var(--muted); }
.stat-box strong { font-family: 'JetBrains Mono', monospace; font-size: 1.15rem; color: #34d399; }
.profile-launch { margin-bottom: 16px; }
.compact-form { border-top: 1px solid var(--border); padding-top: 14px; }
.store-modal-price { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; color: #fbbf24; margin: 6px 0 14px; }

/* Toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 100; padding: 11px 18px; border-radius: 12px;
  background: #1e293b; border: 1px solid var(--cyan);
  color: #fff; font-size: 0.88rem; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 12px;
    padding: 16px 20px;
    background: rgba(8, 11, 18, 0.97);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 520px) {
  .status-pill { display: none; }
  .hero-cta-group .btn { width: 100%; }
}
