@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --sidebar-bg: #0c0c0c;
  --card: #141414;
  --card-hover: #1a1a1a;
  --border: #222;
  --border-light: #2a2a2a;
  --text: #e8e8e8;
  --text-dim: #888;
  --text-muted: #444;
  --accent: #c8c8c8;
  --white: #ffffff;
  --sidebar-width: 260px;
  --topbar-height: 52px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Syne', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

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

/* ─── TOPBAR ─── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 100;
  gap: 14px;
}

.sidebar-toggle {
  width: 36px; height: 36px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.sidebar-toggle:hover {
  background: var(--card-hover);
  border-color: #3a3a3a;
}
.sidebar-toggle span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, width 0.3s;
}
.sidebar-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.sidebar-toggle.active span:nth-child(2) { opacity: 0; width: 0; }
.sidebar-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.topbar-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  text-transform: uppercase;
}
.topbar-logo span {
  color: var(--text-muted);
  font-weight: 400;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ─── LAYOUT ─── */
.layout {
  display: flex;
  padding-top: var(--topbar-height);
  min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 90;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar.hidden {
  transform: translateX(calc(-1 * var(--sidebar-width)));
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-inner { padding: 20px 0 40px; }

.sidebar-section { margin-bottom: 8px; }

.sidebar-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 20px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 2px solid transparent;
  position: relative;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.03);
  border-left-color: var(--border-light);
}
.sidebar-item.active {
  background: rgba(255,255,255,0.04);
  border-left-color: var(--accent);
}
.sidebar-item-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
}
.sidebar-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.15s;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-item:hover .sidebar-item-name,
.sidebar-item.active .sidebar-item-name {
  color: var(--text);
}
.sidebar-item-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2a2a2a;
  flex-shrink: 0;
}
.sidebar-item-dot.online { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,0.4); }
.sidebar-item-dot.offline { background: #ef4444; }

/* ─── MAIN CONTENT ─── */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: calc(100vh - var(--topbar-height));
  padding: 40px;
}
.main.expanded {
  margin-left: 0;
}

/* ─── HOME HERO ─── */
.home-hero {
  max-width: 720px;
  margin: 60px auto 0;
  text-align: center;
}
.home-hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.home-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 20px;
}
.home-hero h1 em {
  font-style: normal;
  color: var(--text-muted);
}
.home-hero p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 40px;
}

.home-stats {
  display: flex;
  justify-content: center;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
}
.home-stat {
  flex: 1;
  padding: 20px;
  background: var(--card);
  text-align: center;
}
.home-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.home-stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── PAGE HEADER ─── */
.page-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.page-header-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}
.page-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.page-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}
.page-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  text-transform: uppercase;
}
.badge.online { border-color: rgba(74,222,128,0.3); color: #4ade80; background: rgba(74,222,128,0.05); }
.badge.offline { border-color: rgba(239,68,68,0.3); color: #ef4444; background: rgba(239,68,68,0.05); }
.badge.fivem { border-color: rgba(251,191,36,0.3); color: #fbbf24; background: rgba(251,191,36,0.05); }
.badge.discord { border-color: rgba(114,137,218,0.3); color: #7289da; background: rgba(114,137,218,0.05); }

/* ─── ACTION BUTTONS ─── */
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--white);
  color: var(--bg);
  border-color: var(--white);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-secondary:hover { background: var(--card); border-color: #3a3a3a; }

/* ─── STATS GRID ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--card);
  padding: 22px 24px;
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── SECTION TITLE ─── */
.section-title {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── DESCRIPTION CARD ─── */
.desc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-dim);
}

/* ─── COMMANDS ─── */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  margin-bottom: 32px;
}
.command-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.2s, background 0.2s;
}
.command-item:hover {
  background: var(--card-hover);
  border-color: var(--border-light);
}
.command-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--white);
  margin-bottom: 4px;
  font-weight: 500;
}
.command-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── FEATURES ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-bottom: 32px;
}
.feature-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.2s;
}
.feature-item:hover { border-color: var(--border-light); }
.feature-icon { font-size: 18px; margin-bottom: 10px; }
.feature-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.feature-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ─── INFO TABLE (FiveM) ─── */
.info-table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}
.info-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.info-row:last-child { border-bottom: none; }
.info-row:hover { background: rgba(255,255,255,0.02); }
.info-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  width: 140px;
  flex-shrink: 0;
}
.info-val {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ─── BACK LINK ─── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
  transition: color 0.2s;
  cursor: pointer;
}
.back-link:hover { color: var(--text); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.fade-up:nth-child(2) { animation-delay: 0.05s; }
.fade-up:nth-child(3) { animation-delay: 0.1s; }
.fade-up:nth-child(4) { animation-delay: 0.15s; }
.fade-up:nth-child(5) { animation-delay: 0.2s; }
.fade-up:nth-child(6) { animation-delay: 0.25s; }

@keyframes slideIn {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.sidebar-item {
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.sidebar-item:nth-child(1) { animation-delay: 0.05s; }
.sidebar-item:nth-child(2) { animation-delay: 0.1s; }
.sidebar-item:nth-child(3) { animation-delay: 0.15s; }
.sidebar-item:nth-child(4) { animation-delay: 0.2s; }
.sidebar-item:nth-child(5) { animation-delay: 0.25s; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  .main { padding: 24px 16px; }
  .sidebar { z-index: 95; }
  .sidebar.hidden { transform: translateX(calc(-1 * var(--sidebar-width))); }
  .main { margin-left: 0; }
  .commands-grid { grid-template-columns: 1fr; }
}

/* ─── PAGE TRANSITIONS ─── */
html {
  opacity: 0;
  transition: opacity 0.28s ease;
}
html.page-ready {
  opacity: 1;
}
html.page-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.26s ease, transform 0.26s ease;
}
