:root {
  --bg: #0d1420;
  --card: #1b2534;
  --card-border: #26334a;
  --field: #141d2b;
  --field-border: #2c3a52;
  --accent: #5aa9e6;
  --accent-strong: #7dc0f2;
  --text: #e6edf6;
  --muted: #8b9bb2;
  --danger: #ff7b72;
  --success: #6ee7a8;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.card {
  width: min(100%, 620px);
  padding: 2.5rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
}

.card__header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--accent-strong);
}

.card__header h1 .muted {
  color: var(--text);
}

.subtitle {
  margin: 0.4rem 0 2rem;
  color: var(--muted);
}

.subtitle code {
  background: var(--field);
  padding: 0.05em 0.35em;
  border-radius: 5px;
  font-size: 0.9em;
}

/* --- Dropzone --- */
.dropzone {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  padding: 3rem 1.5rem;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragover {
  background: rgba(90, 169, 230, 0.08);
  border-color: var(--accent-strong);
  outline: none;
}

.dropzone__icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
}

.dropzone__title {
  margin: 0.5rem 0 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.dropzone__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- File list --- */
.file-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.file-list:empty {
  margin: 0;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: 9px;
  font-size: 0.9rem;
}

.file-item__name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item__size {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.file-item__remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.file-item__remove:hover {
  color: var(--danger);
}

/* --- Form --- */
.field {
  display: block;
  margin: 1.75rem 0 1rem;
}

.field__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.input {
  width: 100%;
  padding: 1rem 1.15rem;
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
}

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

.input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.button {
  width: 100%;
  padding: 1.15rem;
  background: #2f3d52;
  border: none;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: not-allowed;
}

.button:not(:disabled) {
  background: var(--accent);
  color: #08111c;
  cursor: pointer;
}

.button:not(:disabled):hover {
  background: var(--accent-strong);
}

.button[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}

/* --- Status --- */
.status {
  margin: 1.25rem 0 0;
  min-height: 1.5rem;
  font-size: 0.92rem;
  text-align: center;
}

.status--error {
  color: var(--danger);
}

.status--success {
  color: var(--success);
}

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

.card__footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
}

.footer__line {
  margin: 0;
}

/* Collapses to nothing when the recipient badge fails to load, so the credit below
   does not end up with a stray gap above it. */
.footer__line:empty {
  display: none;
}

.footer__credit {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  opacity: 0.75;
}

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

@media (max-width: 480px) {
  .card {
    padding: 1.5rem;
  }
  .card__header h1 {
    font-size: 1.5rem;
  }
}
