/* ============================================================
   Hash Generator — hash-generator.css
   Chedders Tools
   ============================================================ */

:root {
  --primary: #0b1f3a;
  --primary-light: #16345f;
  --background: #ffffff;
  --surface: #f8f9fa;
  --text: #111111;
  --muted: #6c757d;
  --border: #e5e7eb;
  --shadow: rgba(0,0,0,0.05);
  --accent: #e8edf3;
}
[data-theme="dark"] {
  --background: #081120;
  --surface: #0f1c2e;
  --text: #ffffff;
  --muted: #b0b7c3;
  --border: rgba(255,255,255,0.08);
  --shadow: rgba(0,0,0,0.3);
  --accent: rgba(255,255,255,0.04);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
  margin: 0;
  transition: background .25s ease, color .25s ease;
}

.container-xl {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navbar --- */
.navbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background .25s ease, border-color .25s ease;
}
.navbar .container-xl { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.navbar-brand { text-decoration: none; font-size: 16px; }
.brand-text { font-weight: 700; color: var(--primary); }
.brand-dot  { font-weight: 700; color: var(--primary); }
.brand-tools{ font-weight: 400; color: var(--muted); }
.nav-right  { display: flex; align-items: center; gap: 16px; }
.nav-back   { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav-back:hover { color: var(--primary); }
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; cursor: pointer; font-size: 14px; transition: border-color .2s; }
.theme-toggle:hover { border-color: var(--primary); }

/* --- Header --- */
.tool-header { padding: 40px 0 24px; }
.tool-title { font-size: 28px; font-weight: 700; color: var(--primary); margin: 0; transition: color .25s; }
[data-theme="dark"] .tool-title { color: #fff; }
.tool-description { font-size: 15px; color: var(--muted); margin: 6px 0 0; }

/* --- Main --- */
.tool-main { padding: 0 0 80px; }

/* --- Card --- */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow);
  max-width: 760px;
  transition: background .25s ease, border-color .25s ease;
}

/* --- Controls --- */
.control-row { margin-bottom: 18px; }
.control-row > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.text-area {
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
  transition: border-color .2s, background .25s ease;
}
.text-area:focus { outline: 2px solid var(--primary); outline-offset: 0; }

/* Checkboxes */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.check-label input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; }

/* --- Buttons --- */
.btn-primary-chedders {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
  min-height: 44px;
}
.btn-primary-chedders:hover { background: var(--primary-light); }

.btn-secondary-chedders {
  background: var(--background);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  min-height: 44px;
}
.btn-secondary-chedders:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.btn-copy-sm {
  background: var(--accent);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-copy-sm:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-copy-sm.copied { background: #198754; color: #fff; border-color: #198754; }

.btn-group-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

/* --- Inline error --- */
.inline-error { font-size: 13px; color: #dc3545; margin: 6px 0 0; }

/* --- Results --- */
.results-list { display: flex; flex-direction: column; gap: 12px; }

.hash-row {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  transition: background .25s ease, border-color .25s ease;
}

.hash-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.hash-algo-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--accent);
  padding: 2px 9px;
  border-radius: 4px;
}
[data-theme="dark"] .hash-algo-label { color: var(--muted); }

.hash-value {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.6;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 12px;
  transition: background .25s ease;
}

.hash-note {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

/* --- Footer --- */
.site-footer { padding: 24px 0; border-top: 1px solid var(--border); transition: border-color .25s ease; }
.footer-text { font-size: 13px; color: var(--muted); text-align: center; margin: 0; }
.footer-text a { color: var(--primary); text-decoration: none; }
.footer-text a:hover { text-decoration: underline; }

/* --- Dark overrides --- */
[data-theme="dark"] .tool-card { background: var(--surface); }
[data-theme="dark"] .btn-secondary-chedders { background: var(--surface); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn-secondary-chedders:hover { background: var(--primary); color: #fff; }
[data-theme="dark"] .text-area { background: var(--surface); }
[data-theme="dark"] .hash-row { background: var(--surface); }
[data-theme="dark"] .hash-value { background: var(--background); }
[data-theme="dark"] .btn-copy-sm { background: var(--surface); color: var(--muted); }

/* --- Responsive --- */
@media (max-width: 575px) {
  .tool-card { padding: 16px; }
  .tool-title { font-size: 22px; }
  .btn-primary-chedders, .btn-secondary-chedders { width: 100%; text-align: center; }
  .btn-group-row { flex-direction: column; }
  .hash-row-header { flex-wrap: wrap; }
}
