/* style.css — mid-light, professional, sharp */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Colors ── */
  --bg:        #f0f0ee;
  --surface:   #fafaf9;
  --surface2:  #f0f0ee;
  --border:    #d8d8d4;
  --border2:   #c8c8c4;
  --text:      #1a1a18;
  --muted:     #7a7a76;
  --accent:    #1a6b4a;
  --accent-bg: #e8f4ef;
  --danger:    #c0392b;
  --hash-clr:  #1a4a6b;
  --radius:    5px;

  /* ── Font families ── */
  --font-mono:    'Cascadia Code', 'Fira Code', 'Consolas', 'Menlo',
                  'DejaVu Sans Mono', ui-monospace, monospace;
  --font-ui:      'Segoe UI', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;

  /* ── Font sizes ── */
  --fs-base:      15px;   /* html root size — change this to scale everything */
  --fs-xs:        0.7rem; /* labels, eyebrow, badges */
  --fs-sm:        0.8rem; /* hints, secondary text, chips */
  --fs-md:        0.875rem; /* body text, file info, buttons */
  --fs-lg:        1rem;   /* drop zone main, computing text */
  --fs-h1:        1.75rem; /* page heading */
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  background: var(--bg);
  color: var(--text);
}

/* ── App shell ── */
.app {
  height: 100vh;
  display: grid;
  grid-template-columns: 50fr 1px 50fr;
  overflow: hidden;
}

.divider { background: var(--border); }

.pane {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ════════════ LEFT PANE ════════════ */
.pane-left {
  background: var(--surface);
  padding: 36px 32px 28px;
  gap: 22px;
}

/* Header */
.header { flex-shrink: 0; }

.header-eyebrow {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-eyebrow::before {
  content: '';
  width: 16px; height: 1px;
  background: var(--border2);
  display: inline-block;
}

h1 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--fs-h1);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}
h1 em { font-style: normal; color: var(--accent); }

.header-sub {
  margin-top: 7px;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.55;
}

/* Panel */
.panel {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.panel-section {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.panel-section:last-child { border-bottom: none; }

/* Drop zone */
.drop {
  position: relative;
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.drop:hover, .drop.active {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.drop-icon { font-size: 1.4rem; display: block; margin-bottom: 8px; }

.drop-main {
  font-family: var(--font-ui);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.drop-hint {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.file-info {
  display: none;
  margin-top: 12px;
  padding: 9px 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--fs-md);
  align-items: center;
  gap: 10px;
}
.file-info.visible { display: flex; }
.file-info-name { color: var(--text); font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info-size { color: var(--accent); flex-shrink: 0; font-weight: 600; }

/* Algo chips */
.section-label {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.algo-grid { display: flex; flex-wrap: wrap; gap: 7px; }

.algo-chip { position: relative; }
.algo-chip input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

.algo-chip label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px 6px 10px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
  background: var(--bg);
}
.algo-chip label .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  transition: all 0.12s;
  flex-shrink: 0;
}
.algo-chip input:checked + label {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}
.algo-chip input:checked + label .dot {
  background: var(--accent);
  border-color: var(--accent);
}
.algo-chip label:hover { border-color: var(--border2); color: var(--text); background: var(--surface2); }
.algo-chip input:checked + label:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-bg); }

/* Button */
.btn-generate {
  width: 100%;
  padding: 13px 20px;
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-generate:hover:not(:disabled) {
  background: #155c3e;
  box-shadow: 0 2px 10px rgba(26,107,74,0.2);
}
.btn-generate:active:not(:disabled) { transform: scale(0.99); }
.btn-generate:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

/* ════════════ RIGHT PANE ════════════ */
.pane-right {
  background: var(--bg);
  padding: 36px 32px 28px;
  gap: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.results-label {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.results-label::before {
  content: '';
  width: 16px; height: 1px;
  background: var(--border2);
  display: inline-block;
}

#results {
  flex: 1;
  overflow-y: visible;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
#results::-webkit-scrollbar { width: 4px; }
#results::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* Empty state */
.results-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}
.results-empty-icon { font-size: 1.6rem; opacity: 0.2; display: block; margin-bottom: 4px; }
.results-empty p { font-family: var(--font-ui); font-size: var(--fs-md); font-weight: 500; }
.results-empty-hint { font-size: var(--fs-sm) !important; opacity: 0.65; }

/* Result rows */
.result-row {
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  animation: rowIn 0.2s ease both;
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.algo-badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 7px;
  text-align: center;
  white-space: nowrap;
}

.hash-value {
  font-size: var(--fs-sm);
  color: var(--hash-clr);
  word-break: break-all;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

.btn-copy {
  padding: 6px 13px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.btn-copy:hover { border-color: var(--text); color: var(--text); }
.btn-copy.copied { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* Computing */
.computing-row {
  padding: 15px 18px;
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.spinner {
  width: 14px; height: 14px;
  border: 1.5px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-text { color: var(--danger); font-size: var(--fs-md); font-family: var(--font-ui); }

/* ════════════ MOBILE ════════════ */
@media (max-width: 700px) {
  html, body { overflow: auto; height: auto; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; overflow: visible; }
  .pane { height: auto; overflow: visible; }
  .pane-left  { padding: 24px 18px 20px; }
  .pane-right { padding: 20px 18px 32px; }
  .divider { height: 1px; width: 100%; }
  h1 { font-size: 1.5rem; }
  #results { overflow-y: visible; }
  .result-row { grid-template-columns: 64px 1fr; grid-template-rows: auto auto; gap: 8px 10px; }
  .btn-copy { grid-column: 2; justify-self: start; }
}
















/* Left pane — make panel scroll internally */
.panel {
  overflow-y: auto;
}

/* Right pane results */
#results {
  overflow-y: auto;
}

/* Hide scrollbars on both — Firefox */
.panel, #results {
  scrollbar-width: none;
}

/* Hide scrollbars on both — Chrome/Safari */
.panel::-webkit-scrollbar,
#results::-webkit-scrollbar {
  display: none;
}