:root {
  --bg: #0f1216;
  --surface: #181c22;
  --surface-2: #20262e;
  --border: #2b323c;
  --text: #e7ecf2;
  --muted: #8a94a3;
  --accent: #4f8cff;
  --accent-hover: #3f7af0;
  --success: #2ecc71;
  --error: #ff5c5c;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 18px 64px;
}

h1 { font-size: 1.6rem; margin: 0 0 .4rem; }
h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
a { color: var(--accent); }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.brand { font-weight: 700; font-size: 1.1rem; margin-bottom: .8rem; letter-spacing: .2px; }
.big-emoji { font-size: 3rem; margin: .5rem 0; }

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.card.narrow { max-width: 420px; margin: 8vh auto 0; }

/* top bar */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.topbar-actions { display: flex; gap: 14px; align-items: center; }
.inline { display: inline; margin: 0; }

/* forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .92rem; }
input[type=text], input[type=password], select {
  width: 100%;
  padding: 11px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 1rem;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }

button, .btn-secondary {
  display: inline-block;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: .5; cursor: not-allowed; }
form button { margin-top: 18px; width: 100%; }

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  padding: 9px 14px;
  font-size: .9rem;
}
.btn-secondary:hover { background: var(--surface-2); }

.link-btn {
  background: none; border: none; color: var(--accent);
  padding: 0; width: auto; font-size: inherit; font-weight: 600;
}
.link-btn:hover { background: none; text-decoration: underline; }

.row { display: flex; gap: 10px; align-items: center; }
.row input { flex: 1; }

/* alerts */
.alert { padding: 11px 14px; border-radius: 9px; margin: 12px 0; font-size: .92rem; }
.alert.error { background: rgba(255,92,92,.12); color: #ff9a9a; border: 1px solid rgba(255,92,92,.3); }
.alert.success { background: rgba(46,204,113,.12); color: #7ee2a8; border: 1px solid rgba(46,204,113,.3); }

/* dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.dropzone.dragover { border-color: var(--accent); background: rgba(79,140,255,.08); }
.dz-icon { font-size: 2rem; }
.dropzone p { margin: .3rem 0; }

/* staged file list (during upload) */
.staged { list-style: none; padding: 0; margin: 16px 0 0; }
.staged li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.staged .file-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.staged .name { word-break: break-all; }
.progress {
  height: 6px; background: var(--surface-2); border-radius: 4px;
  margin-top: 8px; overflow: hidden;
}
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s; }
.progress.done > span { background: var(--success); }
.pct { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .82rem; min-width: 42px; text-align: right; }

/* options */
.options { margin-top: 18px; }
.options .opt { margin-bottom: 6px; }
#create-btn { margin-top: 20px; width: 100%; }

/* result */
.result .row { margin-top: 6px; }
#another-btn { margin-top: 14px; }

/* drops list */
.drop {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface-2);
}
.drop-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.drop-title { font-weight: 600; }
.drop-meta { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.drop-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.badge { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--border); color: var(--text); margin-left: 6px; }
.badge.warn { background: rgba(255,92,92,.2); color: #ff9a9a; }
.danger { color: var(--error) !important; }

/* public file list */
.filelist { list-style: none; padding: 0; margin: 18px 0 0; }
.filelist li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.filelist .fl-name { flex: 1; word-break: break-all; }

/* settings */
.settings-panel { background: var(--surface-2); }

@media (max-width: 520px) {
  .filelist li, .staged .file-row { flex-wrap: wrap; }
  .row { flex-wrap: wrap; }
  .row input { width: 100%; flex-basis: 100%; }
}
