:root {
  --bg-deep: #0a0c0f;
  --bg-primary: #0f1318;
  --bg-secondary: #151a21;
  --bg-card: #1a2028;
  --bg-card-hover: #1f2730;
  --bg-input: #111820;
  --border-color: #2a3340;
  --border-accent: #3a4a5c;
  --text-primary: #d4dbe4;
  --text-secondary: #7a8a9c;
  --text-muted: #4a5a6c;
  --accent: #c44a2a;
  --accent-glow: #e05535;
  --accent-soft: rgba(196,74,42,0.15);
  --green: #3a8a4a;
  --green-soft: rgba(58,138,74,0.15);
  --yellow: #b89a30;
  --yellow-soft: rgba(184,154,48,0.15);
  --blue: #3a6a9a;
  --blue-soft: rgba(58,106,154,0.15);
  --red: #9a3a3a;
  --red-soft: rgba(154,58,58,0.15);
  --font-mono: 'Share Tech Mono', monospace;
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Exo 2', sans-serif;
  --radius: 4px;
  --transition: 0.2s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-accent); }

/* NAV */
nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
  letter-spacing: 0.3px;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); background: var(--bg-card); }
.nav-toggle { display: none; background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1.5rem; }

/* HERO */
.hero {
  text-align: center;
  padding: 60px 24px 40px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-secondary); font-size: 1rem; font-weight: 300; }
.search-wrap {
  max-width: 500px;
  margin: 24px auto 0;
  position: relative;
}
.search-wrap input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px 10px 40px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
}
.search-wrap input:focus { border-color: var(--accent); }
.search-wrap::before {
  content: '⌕';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* MAIN CONTENT */
.main { max-width: 1200px; margin: 0 auto; padding: 32px 24px; flex: 1; width: 100%; }

/* CATEGORIES */
.category {
  margin-bottom: 40px;
}
.category-header {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-header .cat-icon {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: inline-block;
}
.cat-types .cat-icon { background: var(--accent); }
.cat-trader .cat-icon { background: var(--green); }
.cat-vehicle .cat-icon { background: var(--blue); }
.cat-zombie .cat-icon { background: var(--yellow); }
.cat-compare .cat-icon { background: #7a5ab0; }
.cat-misc .cat-icon { background: var(--text-muted); }
.cat-archive .cat-icon { background: var(--red); }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}
.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}
.tool-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tool-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.tool-card .tag-archived {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--yellow);
  border: 1px solid rgba(184,154,48,0.3);
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: 6px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  vertical-align: middle;
}

/* TOOL VIEW */
.tool-view { display: none; }
.tool-view.active { display: block; }
.tool-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 20px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  max-width: 800px;
}
.tool-back:hover { color: var(--text-primary); background: var(--bg-card); }
.tool-header { max-width: 800px; margin: 0 auto; }
.tool-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.tool-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.tool-content { max-width: 800px; margin: 0 auto; }

/* FORM ELEMENTS */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 12px;
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
  margin-bottom: 14px;
}
textarea:focus, input:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 120px; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8a9c' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 14px; }
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  margin-bottom: 0;
}
.form-check label { margin-bottom: 0; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-glow); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-full { width: 100%; }
.btn-group { display: flex; gap: 8px; margin-top: 12px; }

/* OUTPUT */
.output-area {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 16px;
  color: var(--text-primary);
}
.result-msg {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-top: 12px;
}
.result-msg.info { background: var(--blue-soft); border: 1px solid var(--blue); color: #8ab4da; }
.result-msg.success { background: var(--green-soft); border: 1px solid var(--green); color: #6aba7a; }
.result-msg.warn { background: var(--yellow-soft); border: 1px solid var(--yellow); color: #d4ba50; }
.result-msg.error { background: var(--red-soft); border: 1px solid var(--red); color: #ca6a6a; }

/* DIFF */
.diff-added { color: #5aba6a; }
.diff-removed { color: #ca5a5a; }
.diff-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 8px;
}
.diff-block strong { color: var(--text-primary); font-family: var(--font-mono); font-size: 0.85rem; }

/* FOOTER */
footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 20px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { color: var(--accent-glow); }
footer small { color: var(--text-muted); font-size: 0.78rem; }

/* PAGES (about, bot, software) */
.page-view { display: none; }
.page-view.active { display: block; }
.page-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 700px;
  margin: 0 auto;
}
.page-card p { margin-bottom: 12px; color: var(--text-secondary); font-size: 0.9rem; }
.page-card a { color: var(--accent); }
.page-card .btn { display: inline-flex; margin: 8px 0; }
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.sw-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
}
.sw-card h3 { font-family: var(--font-heading); font-size: 1.1rem; margin-bottom: 8px; }
.sw-card p { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 14px; }
.sw-card .btn { font-size: 0.8rem; padding: 7px 14px; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--bg-primary); border-bottom: 1px solid var(--border-color); flex-direction: column; padding: 12px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 2rem; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
}

/* ARCHIVE TOGGLE */
.archive-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  margin-left: auto;
}
.archive-toggle:hover { border-color: var(--border-accent); color: var(--text-primary); }

/* HIDDEN */
.hidden { display: none !important; }

/* OPTION BUTTONS */
.option-btns { display: flex; gap: 8px; margin-bottom: 16px; }
.option-btn {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.option-btn.active, .option-btn:hover { border-color: var(--accent); color: var(--text-primary); }
