:root {
  color-scheme: light dark;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
}

body {
  margin: 0;
  padding: 2rem;
  background: #0f172a;
  color: #e2e8f0;
}

main {
  max-width: 760px;
  margin: 0 auto;
  background: #111827;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h1,
h2 {
  margin-top: 0;
}

h2 {
  margin-bottom: 0.75rem;
}

fieldset {
  border: 1px solid #374151;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.operation-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  min-width: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.45);
}

.status-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  flex: 0 0 auto;
}

.status-message {
  margin: 0;
  min-width: 0;
  width: 100%;
  font-size: 0.875rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #e2e8f0;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
}

input,
select,
button {
  width: 100%;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #4b5563;
  background: #0b1220;
  color: #e5e7eb;
  box-sizing: border-box;
}

input,
select {
  margin-top: 0;
}

.options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.options input {
  width: auto;
  margin: 0;
}

button {
  margin-top: 0.75rem;
  cursor: pointer;
  background: #2563eb;
  border: none;
  font-weight: 600;
}

.action-button {
  flex: 1 1 12rem;
  margin-top: 0;
}

.action-button:disabled {
  background: #0f766e;
  color: #ecfeff;
  cursor: default;
  opacity: 1;
}

.action-button.secondary-button:disabled {
  background: #166534;
}

.secondary-button {
  background: #1f2937;
  border: 1px solid #4b5563;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.form-field input {
  width: 100%;
}

input[type="file"] {
  min-height: 2.5rem;
}

.passhash-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

.passhash-status {
  margin: 0;
}

.passhash-row .passhash-status {
  flex: 1 1 14rem;
}

.link-button {
  width: auto;
  margin-top: 0;
  margin-left: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: #93c5fd;
  text-decoration: underline;
}

.link-button:hover:not(:disabled) {
  color: #bfdbfe;
}

.link-button:disabled {
  color: #64748b;
  cursor: default;
  text-decoration: none;
}

pre {
  background: #020617;
  border-radius: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
}

#result {
  white-space: pre-wrap;
}
