:root {
  color-scheme: dark;
  --bg: #0e1013;
  --panel: #16191e;
  --line: #262b33;
  --text: #e8eaed;
  --muted: #9aa3af;
  --accent: #4f8cf7;
  --error: #f2777a;
  --success: #6ec18a;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#app {
  width: 100%;
  max-width: 520px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

h1 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 600;
}

p {
  margin: 0 0 14px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.hidden {
  display: none !important;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: #0e1116;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

input[type="password"]:focus,
#dropzone:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  padding: 10px 18px;
  margin-right: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

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

#dropzone {
  margin: 18px 0 14px;
  padding: 34px 18px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

#dropzone.over {
  border-color: var(--accent);
  background: #131a26;
}

.dropzone-title {
  margin: 0 0 4px;
  font-weight: 500;
}

#file-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  font-size: 13px;
}

#file-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

#file-list li span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.bar {
  height: 6px;
  margin-bottom: 8px;
  background: #0e1116;
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s;
}

.error {
  color: var(--error);
  font-size: 13px;
}

.success {
  color: var(--success);
  font-size: 13px;
}
