/* ═══════════════════════════════════════════════════
   HashGenerator.tools — Global Stylesheet
   Theme: Dark terminal + electric green accent
   ═══════════════════════════════════════════════════ */
/* Fonts loaded via non-blocking <link rel='preload'> in HTML <head> */

:root {
  --bg:         #f0f4ff;
  --bg2:        #e8eeff;
  --bg3:        #dde4ff;
  --panel:      #ffffff;
  --panel2:     #f5f7ff;
  --border:     rgba(26,111,223,0.15);
  --border2:    rgba(26,111,223,0.08);
  --green:      #1a6fdf;
  --green2:     #1558b0;
  --green-dim:  rgba(26,111,223,0.07);
  --green-mid:  rgba(26,111,223,0.15);
  --green-glow: 0 0 20px rgba(26,111,223,0.25);
  --cyan:       #0ea5e9;
  --yellow:     #f59e0b;
  --red:        #ef4444;
  --white:      #0f172a;
  --muted:      #475569;
  --muted2:     #94a3b8;
  --text:       #1e293b;
  --mono:       'JetBrains Mono', 'Courier New', monospace;
  --sans:       'Outfit', system-ui, sans-serif;
  --display:    'Space Mono', monospace;
  --radius:     8px;
  --radius-lg:  14px;
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0 }
html { scroll-behavior:smooth }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 1rem;
  line-height: 1.7;
}

/* Bright background gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 5% 0%, rgba(26,111,223,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 95% 100%, rgba(14,165,233,0.05) 0%, transparent 60%);
}

/* ── NAV ─────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(240,244,255,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text);
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.nav-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-logo-text { color: var(--green); }
.nav-logo-domain { color: var(--muted); font-size: 0.85rem; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}
.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: 0.85rem; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  transition: all 0.2s; white-space: nowrap;
  font-family: var(--mono);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--green);
  background: var(--green-dim);
}

.nav-badge {
  font-family: var(--mono); font-size: 0.7rem;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(26,111,223,0.2);
  padding: 3px 10px; border-radius: 20px;
}

.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; color: var(--muted); padding: 4px;
}
.mobile-menu {
  display: none;
  position: fixed; inset: 64px 0 0;
  z-index: 99; background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 1.5rem; flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 16px; border-radius: 8px;
  font-family: var(--mono); font-size: 0.9rem;
  color: var(--muted); text-decoration: none; transition: all 0.2s;
}
.mobile-menu a:hover { background: var(--green-dim); color: var(--green); }

/* ── HERO ────────────────────────────────────────── */
.hero {
  max-width: 900px; margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
  text-align: center; position: relative; z-index: 1;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(0,255,136,0.2);
  padding: 5px 16px; border-radius: 20px;
  margin-bottom: 1.25rem;
}
.hero-eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}
.hero h1 .accent { color: var(--green); }
.hero h1 .dim { color: var(--muted2); }

.hero-desc {
  font-size: 1rem; color: var(--muted);
  line-height: 1.75; max-width: 580px; margin: 0 auto;
}

/* ── MAIN TOOL ───────────────────────────────────── */
.tool-container {
  max-width: 980px; margin: 2rem auto 0;
  padding: 0 2rem; position: relative; z-index: 1;
}

/* Input section */
.input-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 40px rgba(0,0,0,0.4);
}
.input-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
}
.input-title {
  font-family: var(--mono); font-size: 0.75rem;
  font-weight: 600; color: var(--green);
  letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.input-title::before {
  content: '▶';
  font-size: 0.6rem;
  color: var(--green);
}
.input-actions { display: flex; gap: 0.5rem; }

.main-input {
  width: 100%; min-height: 130px;
  background: transparent; border: none; outline: none;
  resize: vertical;
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.75;
  display: block;
}
.main-input::placeholder { color: var(--muted2); font-style: italic; }

.input-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--panel2);
  border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 0.75rem;
}
.input-stats {
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--muted2); display: flex; gap: 1rem;
}
.input-stats span { color: var(--muted); }
.input-stats strong { color: var(--green); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius);
  border: none; font-family: var(--sans);
  font-size: 0.83rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap; line-height: 1;
}
.btn-primary {
  background: var(--green); color: var(--bg);
  font-family: var(--mono); font-weight: 700;
  letter-spacing: 0.03em;
}
.btn-primary:hover {
  background: #00ff99;
  box-shadow: var(--green-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.78rem;
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-sm { padding: 5px 12px; font-size: 0.75rem; }

/* ── GENERATE button bar ─────────────────────────── */
.generate-bar {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.25rem 0; flex-wrap: wrap;
}
.generate-btn-main {
  flex: 1; min-width: 200px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: var(--bg);
  padding: 14px 28px;
  font-family: var(--mono); font-size: 0.9rem; font-weight: 700;
  border: none; border-radius: var(--radius);
  cursor: pointer; transition: all 0.25s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.generate-btn-main:hover {
  box-shadow: 0 0 30px rgba(0,255,136,0.4), 0 0 60px rgba(0,212,255,0.2);
  transform: translateY(-2px);
}
.generate-btn-main:active { transform: translateY(0); }

.encoding-opts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.enc-toggle {
  font-family: var(--mono); font-size: 0.72rem;
  padding: 6px 12px; border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: all 0.2s;
}
.enc-toggle.active {
  background: var(--green-dim);
  border-color: rgba(0,255,136,0.3);
  color: var(--green);
}

/* ── HASH RESULTS GRID ───────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 2.5rem 0 1.25rem;
  flex-wrap: wrap; gap: 0.75rem;
}
.section-title {
  font-family: var(--mono);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--green);
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--green); display: block;
}
.hash-count {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--muted2);
}
.hash-count strong { color: var(--green); }

.hash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 0.85rem;
}

.hash-card {
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}
.hash-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--green);
  opacity: 0;
  transition: opacity 0.2s;
}
.hash-card:hover {
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hash-card:hover::before { opacity: 1; }

.hash-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: var(--panel2);
  border-bottom: 1px solid var(--border2);
}
.hash-algo {
  font-family: var(--mono); font-size: 0.72rem;
  font-weight: 700; color: var(--green);
  letter-spacing: 0.08em;
}
.hash-meta {
  font-family: var(--mono); font-size: 0.65rem;
  color: var(--muted2); display: flex; gap: 10px;
}
.hash-meta .bits { color: var(--cyan); }

.hash-value {
  padding: 0.75rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  word-break: break-all;
  line-height: 1.6;
  min-height: 48px;
  display: flex; align-items: center;
  letter-spacing: 0.03em;
}
.hash-value.empty {
  color: var(--muted2); font-style: italic; font-size: 0.75rem;
}
.hash-value.computing {
  color: var(--green);
  animation: blink 0.8s step-end infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hash-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0.85rem;
  border-top: 1px solid var(--border2);
  background: var(--panel2);
}
.hash-len { font-family:var(--mono); font-size:0.65rem; color:var(--muted2); }
.copy-btn {
  font-family: var(--mono); font-size: 0.65rem;
  padding: 3px 10px; border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--green); color: var(--green); }
.copy-btn.copied { border-color: var(--green); color: var(--green); background: var(--green-dim); }

/* ── CATEGORY TABS ───────────────────────────────── */
.category-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.cat-tab {
  font-family: var(--mono); font-size: 0.72rem;
  padding: 5px 14px; border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: all 0.2s;
}
.cat-tab:hover { border-color: rgba(0,255,136,0.3); color: var(--green); }
.cat-tab.active {
  background: var(--green-dim);
  border-color: rgba(0,255,136,0.35);
  color: var(--green);
}

/* ── COPY ALL BAR ────────────────────────────────── */
.copy-all-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap; gap: 0.75rem;
}
.copy-all-label {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
}
.copy-all-label strong { color: var(--green); }

/* ── HOW IT WORKS ────────────────────────────────── */
.section {
  max-width: 980px; margin: 3rem auto 0;
  padding: 0 2rem; position: relative; z-index: 1;
}
.section-label {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  color: var(--green); letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before {
  content: ''; width: 20px; height: 1px;
  background: var(--green); display: block;
}
.section-heading {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700; color: var(--text);
  margin-bottom: 0.85rem; letter-spacing: -0.02em;
}
.section-heading .accent { color: var(--green); }
.section-sub { font-size: 0.97rem; color: var(--muted); line-height: 1.8; max-width: 620px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.info-card {
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.25s;
  position: relative; overflow: hidden;
}
.info-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--green-dim), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.info-card:hover { border-color: var(--border); transform: translateY(-2px); }
.info-card:hover::after { opacity: 1; }
.ic-icon { font-size: 1.6rem; margin-bottom: 0.75rem; }
.info-card h3 { font-size: 0.97rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.info-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

/* ── INDIVIDUAL HASH PAGES LINKS ─────────────────── */
.hash-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
}
.hash-page-link {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-decoration: none; color: var(--muted);
  font-family: var(--mono); font-size: 0.78rem;
  transition: all 0.2s;
}
.hash-page-link:hover {
  border-color: rgba(0,255,136,0.3);
  color: var(--green);
  background: var(--green-dim);
}
.hash-page-link .arrow { margin-left: auto; opacity: 0.4; }
.hash-page-link:hover .arrow { opacity: 1; }

/* ── FAQ ─────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  margin-bottom: 0.65rem;
  overflow: hidden;
}
.faq-q {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.95rem; font-weight: 600; color: var(--text);
  background: var(--panel); gap: 1rem;
  transition: background 0.2s;
}
.faq-q:hover { background: var(--panel2); }
.faq-q .arrow { color: var(--green); font-size: 0.8rem; flex-shrink: 0; }
.faq-a {
  display: block; padding: 1rem 1.25rem;
  font-size: 0.92rem; color: var(--muted);
  line-height: 1.8; background: var(--panel2);
  border-top: 1px solid var(--border2);
}
.faq-a code {
  font-family: var(--mono); font-size: 0.82rem;
  background: var(--bg3); padding: 2px 6px;
  border-radius: 4px; color: var(--green);
}

/* ── CTA ─────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, rgba(0,255,136,0.08), rgba(0,212,255,0.06));
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,255,136,0.06), transparent 70%);
  border-radius: 50%;
}
.cta-banner h3 {
  font-family: var(--display);
  font-size: 1.5rem; color: var(--text);
  margin-bottom: 0.6rem; position: relative; z-index: 1;
}
.cta-banner p {
  color: var(--muted); margin-bottom: 1.5rem;
  font-size: 0.97rem; position: relative; z-index: 1;
}
.cta-btns { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; position: relative; z-index:1; }

/* ── TOAST ───────────────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
  background: var(--panel);
  border: 1px solid var(--green);
  box-shadow: var(--green-glow);
  color: var(--green);
  font-family: var(--mono); font-size: 0.8rem;
  padding: 10px 18px; border-radius: var(--radius);
  transform: translateY(100px); opacity: 0;
  transition: all 0.3s; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── SECTION DIVIDER ─────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 3rem 0;
}

/* ── NETWORK LINKS ───────────────────────────────── */
.network-strip {
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
  flex-wrap: wrap;
}
.network-label {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--muted2); letter-spacing: 0.1em;
  text-transform: uppercase; white-space: nowrap;
}
.network-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.network-links a {
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--muted); text-decoration: none;
  padding: 3px 10px; border: 1px solid var(--border2);
  border-radius: 4px; transition: all 0.2s;
}
.network-links a:hover { color: var(--green); border-color: rgba(0,255,136,0.25); }

/* ── FOOTER ──────────────────────────────────────── */
footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 2.5rem 2rem 2rem;
  position: relative; z-index: 1;
}
.footer-inner { max-width: 980px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem; margin-bottom: 2rem;
}
.footer-brand p {
  font-size: 0.87rem; color: var(--muted);
  line-height: 1.75; margin-top: 0.75rem; max-width: 280px;
}
.footer-col h4 {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  color: var(--green); letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col ul li a {
  text-decoration: none; color: var(--muted);
  font-size: 0.87rem; transition: color 0.2s;
}
.footer-brand p { color: var(--muted); }
.footer-col ul li a:hover { color: var(--green); }
.footer-bottom {
  border-top: 1px solid var(--border2);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.75rem;
  font-size: 0.78rem; color: var(--muted2);
  font-family: var(--mono);
}
.footer-bottom a { color: var(--green); text-decoration: none; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media(max-width:900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hash-grid { grid-template-columns: 1fr; }
}
@media(max-width:640px) {
  .hero { padding: 2rem 1.25rem 1rem; }
  .tool-container, .section { padding: 0 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hash-pages-grid { grid-template-columns: repeat(2, 1fr); }
  nav { padding: 0 1.25rem; }
}

/* ═══════════════════════════════════════════════════
   ADDITIONS: Input mode tabs, file drop zone, progress
   ═══════════════════════════════════════════════════ */

/* Input mode tabs (Text / File) */
.mode-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--panel2);
  padding: 0 1.25rem;
}
.mode-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.85rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
}
.mode-tab:hover { color: var(--text); }
.mode-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
}
.mode-tab svg { width: 14px; height: 14px; }

.mode-panel { display: none; }
.mode-panel.active { display: block; }

/* File drop zone */
.file-drop {
  margin: 0;
  padding: 2.5rem 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel2);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.file-drop:hover {
  border-color: var(--green);
  background: var(--green-dim);
}
.file-drop.dragover {
  border-color: var(--green);
  background: var(--green-dim);
  transform: scale(1.005);
  box-shadow: 0 0 30px rgba(26,111,223,0.15);
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.file-drop-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.file-drop-sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.file-drop-sub strong { color: var(--green); font-weight: 700; }
.file-drop-hint {
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted2);
  letter-spacing: 0.05em;
}

/* File info card (after file selected) */
.file-info {
  display: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0.85rem 0 0;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.file-info.show { display: flex; }
.file-info-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--green-dim);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-info-meta {
  flex: 1;
  min-width: 0;
}
.file-info-name {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  word-break: break-all;
}
.file-info-stats {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted2);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.file-info-stats strong { color: var(--green); }
.file-clear-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.file-clear-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Progress bar */
.progress-wrap {
  display: none;
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.progress-wrap.show { display: block; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.progress-label strong { color: var(--green); }
.progress-bar {
  height: 6px;
  background: var(--green-dim);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: 3px;
  transition: width 0.15s ease-out;
}
.progress-bar-fill.indeterminate {
  width: 30% !important;
  animation: indeterminate 1.2s ease-in-out infinite;
}
@keyframes indeterminate {
  0%   { margin-left: -30%; }
  100% { margin-left: 100%; }
}

/* "Common hashes" pill on index */
.common-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid var(--green-mid);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 0.85rem;
}

/* Featured hash quick-pick on index */
.algo-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin: 1.5rem 0 0;
}
.algo-pick-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.algo-pick-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.algo-pick-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,111,223,0.1);
}
.algo-pick-card:hover::before { transform: scaleX(1); }
.algo-pick-name {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}
.algo-pick-bits {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted2);
  letter-spacing: 0.05em;
}
.algo-pick-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.55rem;
  line-height: 1.55;
}

/* Status badges for algorithms */
.algo-status {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 0.5rem;
}
.algo-status.recommended {
  color: #166534;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.25);
}
.algo-status.legacy {
  color: #9a3412;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
}
.algo-status.deprecated {
  color: #991b1b;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.25);
}

/* Single-page (per-algo) file hash result card tweaks */
.single-result-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0;
}

/* "View all algorithms" CTA on common-only pages */
.expand-cta {
  text-align: center;
  margin: 1.5rem auto;
  padding: 1.1rem 1.5rem;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.expand-cta p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
}
.expand-cta a {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.expand-cta a:hover { text-decoration: underline; }

/* Wider nav for new links */
@media (max-width: 1100px) {
  .nav-links li:nth-child(n+7) { display: none; }
}

/* ═══════════════════════════════════════════════════
   AD CONTAINERS — Adsterra desktop / mobile responsive
   ═══════════════════════════════════════════════════ */
.ad-bar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 90px;
}

/* Default: show desktop slot, hide mobile slot */
.ad-desktop { display: block; }
.ad-mobile  { display: none; }

#adsterra-desktop { min-height: 90px; max-width: 728px; margin: 0 auto; }
#adsterra-mobile  { min-height: 50px; max-width: 320px; margin: 0 auto; }

/* On screens 768px and below, swap to mobile slot */
@media (max-width: 768px) {
  .ad-desktop { display: none; }
  .ad-mobile  { display: block; }
  .ad-bar-wrap { min-height: 50px; }
}

/* Make sure the ad container itself is responsive */
.ad-slot.ad-leaderboard {
  overflow: hidden;
}
@media (max-width: 768px) {
  .ad-slot.ad-leaderboard {
    margin-top: 0.75rem !important;
    padding: 0 0.75rem !important;
  }
}

/* ═══════════════════════════════════════════════════
   BLOG STYLES
   ═══════════════════════════════════════════════════ */
.blog-article {
  max-width: 760px;
  margin: 2rem auto 3rem;
  padding: 0 1.25rem;
}
.article-breadcrumb {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.article-breadcrumb a {
  color: var(--green);
  text-decoration: none;
}
.article-breadcrumb a:hover { text-decoration: underline; }
.article-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
.article-hero .lede {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1rem;
}
.article-meta {
  display: flex;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted2);
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.article-body {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
}
.article-body h2 {
  font-size: 1.5rem;
  margin: 2.4rem 0 1rem;
  letter-spacing: -0.005em;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 1.6rem;
}
.article-body h2:first-child { border-top: none; padding-top: 0; }
.article-body h3 {
  font-size: 1.15rem;
  margin: 1.8rem 0 0.7rem;
  color: var(--text);
}
.article-body p { margin: 0 0 1.15rem; }
.article-body ul, .article-body ol {
  margin: 0 0 1.15rem 0;
  padding-left: 1.4rem;
}
.article-body li { margin: 0.35rem 0; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body em { color: var(--muted); font-style: italic; }
.article-body a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.article-body a:hover { text-decoration-thickness: 2px; }
.article-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--panel);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--green);
  border: 1px solid var(--border);
}
.article-body pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 1.2rem 0;
  font-size: 0.86rem;
  line-height: 1.55;
}
.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: inherit;
}
.article-body blockquote {
  border-left: 3px solid var(--green);
  padding: 0.4rem 0 0.4rem 1rem;
  margin: 1.3rem 0;
  background: var(--panel);
  color: var(--muted);
  font-style: italic;
  border-radius: 4px;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.3rem 0;
  font-size: 0.92rem;
  font-family: var(--mono);
}
.article-body th, .article-body td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.article-body th {
  color: var(--green);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}
.article-body table tr:last-child td { border-bottom: none; }
.callout {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.3rem 0;
}
.callout-warn { border-left-color: #dc2626; }
.callout-warn strong { color: #dc2626; }
.article-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.article-related h2 { font-size: 1.2rem; margin: 0 0 1rem; }
.article-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.article-related-card {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s;
}
.article-related-card:hover { border-color: var(--green); }
.article-related-card .title { font-weight: 600; font-size: 0.93rem; }
.article-related-card .excerpt { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }
@media (max-width: 640px) {
  .article-related-grid { grid-template-columns: 1fr; }
}

/* Blog index page */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.1rem;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1.25rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.3rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green);
  opacity: 0;
  transition: opacity 0.2s;
}
.blog-card:hover {
  border-color: var(--green-mid);
  transform: translateY(-2px);
}
.blog-card:hover::before { opacity: 1; }
.blog-card-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.7rem;
}
.blog-card h2 {
  font-size: 1.08rem;
  margin: 0 0 0.7rem;
  line-height: 1.35;
  color: var(--text);
}
.blog-card-excerpt {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1rem;
  flex: 1;
}
.blog-card-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted2);
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}
.blog-card-foot .read-arrow { color: var(--green); font-weight: 600; }

/* ═══════════════════════════════════════════════════
   BLOG STYLES
   ═══════════════════════════════════════════════════ */

/* Blog index — card grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.blog-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem 1.4rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--green);
  opacity: 0;
  transition: opacity 0.2s;
}
.blog-card:hover {
  border-color: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.blog-card:hover::before { opacity: 1; }
.blog-card .blog-cat {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--green);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.blog-card h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0 0 0.6rem;
  color: var(--text);
}
.blog-card h3 a {
  color: inherit;
  text-decoration: none;
}
.blog-card h3 a:hover { color: var(--green); }
.blog-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 0.9rem;
  flex: 1;
}
.blog-card .blog-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
  margin-top: 0.5rem;
}

/* Blog article — long-form layout */
.blog-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.blog-article .blog-hero {
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.blog-article .blog-cat-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--green);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.blog-article h1 {
  font-family: var(--font);
  font-size: clamp(1.75rem, 4vw, 2.3rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--text);
}
.blog-article .blog-meta-line {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted2);
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.blog-article .blog-body {
  font-size: 1.04rem;
  line-height: 1.72;
  color: var(--text);
}
.blog-article .blog-body p {
  margin: 0 0 1.15rem;
}
.blog-article .blog-body h2 {
  font-size: 1.55rem;
  line-height: 1.3;
  margin: 2.4rem 0 1rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.blog-article .blog-body h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.85rem;
  color: var(--text);
  font-weight: 600;
}
.blog-article .blog-body ul,
.blog-article .blog-body ol {
  margin: 0 0 1.2rem;
  padding-left: 1.5rem;
}
.blog-article .blog-body li {
  margin-bottom: 0.5rem;
}
.blog-article .blog-body code {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--green);
}
.blog-article .blog-body pre {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0 0 1.25rem;
  font-size: 0.86rem;
  line-height: 1.55;
}
.blog-article .blog-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}
.blog-article .blog-body blockquote {
  border-left: 3px solid var(--green);
  padding: 0.25rem 0 0.25rem 1.1rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-style: italic;
}
.blog-article .blog-body a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--green-mid);
  text-underline-offset: 3px;
}
.blog-article .blog-body a:hover {
  text-decoration-color: var(--green);
}
.blog-article .blog-body strong { color: var(--text); font-weight: 700; }
.blog-article .blog-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
}
.blog-article .blog-body th,
.blog-article .blog-body td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.85rem;
  text-align: left;
}
.blog-article .blog-body th {
  background: var(--panel);
  color: var(--green);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.blog-article .key-takeaways {
  background: rgba(34,197,94,0.05);
  border: 1px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.1rem;
  margin: 1.5rem 0 2rem;
}
.blog-article .key-takeaways h4 {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  color: var(--green);
  text-transform: uppercase;
}
.blog-article .key-takeaways ul {
  margin: 0;
  padding-left: 1.3rem;
}
.blog-article .key-takeaways li {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.blog-article .cta-box {
  background: var(--panel);
  border: 1px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin: 2rem 0;
}
.blog-article .cta-box p {
  margin: 0;
  font-size: 0.95rem;
}

/* Related articles section */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related-articles h3 {
  font-size: 1.2rem;
  margin: 0 0 1rem;
  color: var(--text);
}
.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-articles li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.related-articles a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.related-articles a:hover { color: var(--green); }

@media (max-width: 640px) {
  .blog-article {
    padding: 0 1rem;
  }
  .blog-article .blog-body {
    font-size: 0.98rem;
  }
}
