:root {
  --bg: #0f1115;
  --card: #171a21;
  --border: #262b36;
  --text: #e6e9ef;
  --muted: #8b93a7;
  --accent: #4f8cff;
  --accent-hover: #3d78e8;
  --danger: #e5484d;
  --ok: #46a758;
  --warn: #f5a524;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.shell { width: 100%; max-width: 640px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.topbar h1 {
  font-size: 1.35rem;
  margin: 0;
  letter-spacing: 0.02em;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }

.hidden { display: none !important; }

input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.75rem;
  background: #0f1218;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
}

input[type="password"]:focus { outline: 2px solid var(--accent); border-color: transparent; }

button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
  cursor: pointer;
}

button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled { opacity: 0.5; cursor: default; }

button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

button.ghost:hover:not(:disabled) { background: #1e222c; color: var(--text); }
button.small { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
button.danger { background: var(--danger); }
button.danger:hover:not(:disabled) { background: #c93a3f; }

button.link {
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
  font-size: inherit;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--danger); margin: 0.5rem 0 0; }

.drop {
  text-align: center;
  padding: 2.5rem 1.25rem;
  border-style: dashed;
  transition: border-color 0.15s, background 0.15s;
}

.drop.dragover { border-color: var(--accent); background: #1a2233; }
.drop-title { font-size: 1.05rem; margin: 0 0 0.5rem; }

.file-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.file-name { font-weight: 600; overflow-wrap: anywhere; }

.row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: #2a2410;
  border: 1px solid #4d3f14;
  color: #f0d080;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.bar {
  height: 10px;
  background: #0f1218;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f8cff, #7fb0ff);
  transition: width 0.2s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.hash {
  background: #0f1218;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--muted);
}

.result-ok { color: var(--ok); }
.result-fail { color: var(--danger); }
