/* BinScope — NullKit V2 Terminal Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700;800&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg: #050508;
  --surface: #0c0c12;
  --surface-2: #13131d;
  --border: #1e1e2e;
  --accent: #00ff9f;
  --accent-dim: #00cc7f;
  --text: #e0e0e8;
  --text-dim: #8888aa;
  --red: #ff4444;
  --orange: #ff9f43;
  --blue: #4a9eff;
  --font-mono: 'JetBrains Mono', monospace;
  --font-serif: 'Instrument Serif', serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  display: flex; align-items: center; justify-content: space-between;
}
.site-header .logo { font-size: 1.4rem; font-weight: 800; color: var(--accent); }
.site-header .logo span { color: var(--text-dim); font-weight: 400; }
.site-header nav a { margin-left: 1.5rem; color: var(--text-dim); font-size: 0.85rem; }
.site-header nav a:hover { color: var(--accent); }

/* Landing */
#landing { padding: 4rem 0; text-align: center; }
.hero-title { font-family: var(--font-serif); font-size: 3rem; margin-bottom: 0.5rem; color: var(--text); }
.hero-title em { color: var(--accent); font-style: italic; }
.hero-sub { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.format-badges { margin-bottom: 2rem; }
.format-badges span { display: inline-block; padding: 0.3rem 0.8rem; margin: 0.2rem; border: 1px solid var(--border); border-radius: 4px; font-size: 0.8rem; color: var(--text-dim); }

#drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 4rem 2rem;
  cursor: pointer;
  transition: all 0.2s;
  max-width: 600px;
  margin: 0 auto 2rem;
  background: var(--surface);
}
#drop-zone:hover, #drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 30px rgba(0,255,159,0.05);
}
.drop-icon { font-size: 3rem; margin-bottom: 1rem; }
.drop-text { font-size: 1.1rem; color: var(--text); }
.drop-hint { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.5rem; }

.sample-buttons { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.sample-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.sample-btn:hover { border-color: var(--accent); color: var(--accent); }
.sample-btn .icon { margin-right: 0.4rem; }

.privacy-note { color: var(--text-dim); font-size: 0.75rem; margin-top: 2rem; opacity: 0.7; }

/* Report */
#report { display: none; }
.report-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.report-header .icon { font-size: 1.8rem; }
.report-header .filename { font-size: 1.2rem; font-weight: 700; }
.report-header .meta { font-size: 0.8rem; color: var(--text-dim); }
.report-header .badge { background: var(--surface-2); padding: 0.2rem 0.6rem; border-radius: 4px; border: 1px solid var(--border); font-size: 0.75rem; margin-left: 0.5rem; }
#btn-back {
  margin-left: auto; background: none; border: 1px solid var(--border);
  color: var(--text-dim); padding: 0.4rem 1rem; border-radius: 4px;
  cursor: pointer; font-family: var(--font-mono); font-size: 0.8rem;
}
#btn-back:hover { border-color: var(--accent); color: var(--accent); }

/* Tabs */
.tab-bar {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-top: 1rem; overflow-x: auto;
}
.tab-btn {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-dim); padding: 0.7rem 1.2rem;
  cursor: pointer; font-family: var(--font-mono); font-size: 0.8rem;
  white-space: nowrap; transition: all 0.2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; padding: 1.5rem 0; }
.tab-pane.active { display: block; }

/* Info Grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}
.info-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.info-value { font-size: 1rem; font-weight: 700; }
.info-value.mono { font-size: 0.9rem; }

/* Security */
.security-section { margin-top: 1.5rem; }
.security-section h3 { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.8rem; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; }
.sec-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.badge-ok { color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.badge-fail { color: var(--red); font-weight: 700; font-size: 1.1rem; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 0.5rem 0.8rem;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-dim); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg);
}
.data-table td { padding: 0.4rem 0.8rem; border-bottom: 1px solid var(--border); font-size: 0.8rem; }
.data-table tr:hover { background: var(--surface); }
.table-scroll { max-height: 600px; overflow-y: auto; }
.mono { font-family: var(--font-mono); }

/* Flag badges */
.flag-badge { display: inline-block; padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.7rem; font-weight: 700; margin-right: 0.2rem; }
.flag-R { background: rgba(74,158,255,0.15); color: var(--blue); }
.flag-W { background: rgba(255,159,67,0.15); color: var(--orange); }
.flag-X { background: rgba(255,68,68,0.15); color: var(--red); }

/* Size bar */
.size-bar { width: 80px; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.size-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; }

/* Symbols toolbar */
.sym-toolbar, .str-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-input {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 0.5rem 0.8rem; border-radius: 6px; font-family: var(--font-mono);
  font-size: 0.85rem; width: 250px;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.filter-btns { display: flex; gap: 0.3rem; }
.filter-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  padding: 0.3rem 0.7rem; border-radius: 4px; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.75rem;
}
.filter-btn.active, .filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.count { font-size: 0.75rem; color: var(--text-dim); }

/* Imports panel */
.two-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .two-panel { grid-template-columns: 1fr; } }
.panel h3 { font-size: 0.9rem; color: var(--accent); margin-bottom: 0.8rem; }
.lib-group { margin-bottom: 1rem; }
.lib-header { font-weight: 700; font-size: 0.85rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.lib-header .count { font-weight: 400; color: var(--text-dim); }
.import-item { font-size: 0.8rem; padding: 0.15rem 0 0.15rem 1rem; color: var(--text-dim); }
.import-item:hover { color: var(--text); }
.dim { color: var(--text-dim); font-size: 0.7rem; }
.libs-section { margin-top: 1.5rem; }
.libs-section h3 { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.lib-item { font-size: 0.85rem; padding: 0.2rem 0; padding-left: 1rem; }
.fat-info { grid-column: span 2; }
.empty { color: var(--text-dim); font-style: italic; }
.loading { color: var(--accent); }
.sym-name { max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.str-val { max-width: 500px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.str-toolbar label { font-size: 0.8rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.5rem; }
.str-toolbar input[type=range] { width: 100px; }

/* Charts */
.chart-box { width: 100%; height: 400px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.chart-box.half { height: 350px; }
@media (max-width: 768px) { .chart-row { grid-template-columns: 1fr; } }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0; margin-top: 3rem;
  text-align: center; font-size: 0.75rem; color: var(--text-dim);
}
.site-footer a { color: var(--text-dim); }

/* Static pages */
.page-content { max-width: 800px; margin: 2rem auto; padding: 0 1.5rem; }
.page-content h1 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 1rem; }
.page-content h2 { font-size: 1.2rem; color: var(--accent); margin: 2rem 0 0.5rem; }
.page-content p, .page-content li { color: var(--text-dim); line-height: 1.8; margin-bottom: 0.8rem; }
.page-content ul { padding-left: 1.5rem; }
.page-content code { background: var(--surface); padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.85rem; }
