:root {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --bg-card: #1c2230;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent2: #3fb950;
  --border: #30363d;
  --danger: #f85149;
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 0.4rem; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); }
.nav-links a.active { color: var(--text); background: var(--accent); }
.nav-links a.active:hover { background: var(--accent); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* Main + tabs */
main { flex: 1; padding: 2rem 2rem 3rem; max-width: 1200px; width: 100%; margin: 0 auto; }
.tab { display: none; }
.tab.active { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

h1 { font-size: 2.6rem; line-height: 1.15; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1.25rem; }
h3 { margin-bottom: 0.5rem; color: var(--accent); }
p { color: var(--muted); line-height: 1.6; }
a { color: var(--accent); }

/* Hero */
.hero { padding: 4rem 0; max-width: 720px; }
.tagline { font-size: 1.15rem; margin-bottom: 2rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #0d1117;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.15s;
}
.btn:hover { filter: brightness(1.1); }
.btn.small { padding: 0.4rem 0.9rem; font-size: 0.9rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }

/* Mods gate */
.mods-gate { max-width: 360px; margin-top: 1.5rem; }
.mods-gate label { display: block; margin-bottom: 0.5rem; color: var(--muted); }
.mods-gate input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.mods-gate input:focus { outline: none; border-color: var(--accent); }
.down-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  max-width: 560px;
  margin-top: 1.5rem;
}
.down-name { font-weight: 600; flex: 1; }
.down-meta { color: var(--muted); font-size: 0.9rem; }
.down-item.pack { border-color: var(--accent2); }
.down-item.pack .down-name { color: var(--text); font-size: 1.05rem; }
.down-divider { border: 0; border-top: 1px solid var(--border); margin: 1.75rem 0 0; max-width: 560px; }
.note code { background: var(--bg-soft); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.85em; }
.note { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; max-width: 560px; }
.sub { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.error { color: var(--danger); margin-top: 0.5rem; font-size: 0.9rem; }

/* Footer */
footer {
  text-align: center;
  padding: 1.25rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 1rem;
    flex-direction: column;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem;
  }
  .nav-links.open { display: flex; }
  h1 { font-size: 2rem; }
}
