/* ═══════════════════════════════════════════════════
   Linux Hacker's Bible — styles.css
   ═══════════════════════════════════════════════════ */

:root {
  --bg:      #0a0c0f;
  --bg2:     #0f1215;
  --bg3:     #141820;
  --green:   #00ff88;
  --green2:  #00cc66;
  --green3:  #009944;
  --cyan:    #00e5ff;
  --amber:   #ffb300;
  --red:     #ff3c5c;
  --purple:  #b06aff;
  --blue:    #4da6ff;
  --text:    #c8d6e0;
  --text2:   #7a8f9c;
  --border:  #1e2832;
  --border2: #263040;
  --mono:    'Share Tech Mono', monospace;
  --display: 'Orbitron', monospace;
  --body:    'Exo 2', sans-serif;
}

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

/* ── Base ───────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scanlines overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 136, 0.012) 2px,
    rgba(0, 255, 136, 0.012) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Grid background */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ─────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  max-width: 1700px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Header ─────────────────────────────────────────── */
header {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.header-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  opacity: 0.8;
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: 3px;
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
  margin-bottom: 0.4rem;
}

h1 span { color: var(--green); }

.subtitle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  letter-spacing: 2px;
  margin-bottom: 1.2rem;
}

.header-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  margin: 1.5rem 0;
  position: relative;
}

.header-line::before,
.header-line::after {
  content: '◆';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-size: 8px;
}
.header-line::before { left: 0; }
.header-line::after  { right: 0; }

/* ── Stats Bar ──────────────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.stat-chip {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 0.35rem 0.9rem;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-chip strong {
  color: var(--green);
  font-size: 14px;
}

/* ── Controls ───────────────────────────────────────── */
.controls {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-family: var(--mono);
  font-size: 14px;
  pointer-events: none;
}

input[type="text"] {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 13px;
  padding: 0.5rem 0.75rem 0.5rem 2.1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: var(--green);
}

input[type="text"]::placeholder { color: #2a3540; }

input[type="text"]:focus {
  border-color: var(--green3);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.12);
}

select {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  padding: 0.5rem 0.75rem;
  outline: none;
  cursor: pointer;
  min-width: 170px;
}

.result-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
}

.result-count strong { color: var(--green); }

/* ── Category Pills ─────────────────────────────────── */
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 1.2rem;
}

.pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3px;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.pill:hover  { opacity: 0.85; }
.pill.active { box-shadow: 0 0 8px rgba(0, 255, 136, 0.25); }

/* ── Table ──────────────────────────────────────────── */
.table-wrap {
  border: 1px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

thead tr {
  background: var(--bg3);
  border-bottom: 2px solid var(--green3);
}

th {
  font-family: var(--display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--green);
  padding: 11px 13px;
  text-align: left;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:hover        { background: rgba(0, 255, 136, 0.035); }
tbody tr:last-child   { border-bottom: none; }

td {
  padding: 8px 13px;
  vertical-align: top;
  line-height: 1.5;
}

/* Column widths */
td:nth-child(1) { width: 13%; }
td:nth-child(2) { width: 12%; }
td:nth-child(3) { width: 27%; }
td:nth-child(4) { width: 48%; }

/* ── Cell content types ─────────────────────────────── */
.cmd-text {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cyan);
  word-break: break-all;
}

.cat-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

.desc-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
}

.desc-text code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--amber);
  background: rgba(255, 179, 0, 0.08);
  padding: 1px 4px;
  border-radius: 2px;
}

.usage-text {
  font-size: 11.5px;
  color: var(--text2);
  line-height: 1.65;
}

.usage-text code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--green);
  background: rgba(0, 255, 136, 0.07);
  padding: 1px 5px;
  border-radius: 2px;
  display: inline-block;
  margin: 1px 0;
  word-break: break-all;
}

/* ── Search highlight ───────────────────────────────── */
mark {
  background: rgba(0, 255, 136, 0.18);
  color: var(--green);
  border-radius: 2px;
}

/* ── No results ─────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text2);
  font-family: var(--mono);
  font-size: 13px;
}

/* ── Footer ─────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--border2);
  letter-spacing: 1px;
}

/* ── Animations ─────────────────────────────────────── */
.blink {
  animation: blink 1.1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

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