:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #262b36;
  --text: #e8eaed;
  --muted: #9aa3b2;
  --accent: #5b8def;
  --accent-hover: #4a78d6;
  --danger: #e05d5d;
  --ok: #4caf7d;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px;
}
.wrap.wide { max-width: 960px; }

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.topbar-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 28px;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
}
.brand-header h1 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.6rem;
  font-weight: 800;
}
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.btn-newupload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--border);
  color: var(--text);
}
.btn-newupload:hover { background: var(--muted); color: var(--bg); }
.btn-newupload svg { width: 16px; height: 16px; flex: none; }

.theme-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 0;
}
.theme-swatch.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.columns {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex: 1 1 320px;
  min-width: 280px;
}

.card-header {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 18px;
}

.card-body {
  padding: 20px;
}

.settings-card { flex: 1 1 280px; max-width: 360px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone.dragging {
  border-color: var(--accent);
  background: rgba(91, 141, 239, 0.08);
}

.dropzone.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.dropzone .plus-icon {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  margin-bottom: 6px;
}

.dropzone p { margin: 0; color: var(--accent); font-weight: 500; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.field:last-of-type { margin-bottom: 0; }

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.options label {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

input[type="text"], input[type="password"], select {
  background: #0f1115;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  width: 100%;
}

.input-with-icon {
  display: flex;
}
.input-with-icon input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}
.icon-btn {
  flex: none;
  width: 38px;
  background: var(--border);
  border: 1px solid var(--border);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { background: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.danger { background: var(--danger); }

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.file-row:last-child { border-bottom: none; }
.file-name { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--muted); font-size: 0.75rem; }

.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.1s; }

.share-link {
  display: flex;
  gap: 8px;
}
.share-link input {
  flex: 1;
  font-family: monospace;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--border);
  color: var(--muted);
}
.badge.ok { background: rgba(76, 175, 125, 0.15); color: var(--ok); }
.badge.wt { background: rgba(91, 141, 239, 0.15); color: var(--accent); }

.error-msg { color: var(--danger); font-size: 0.85rem; margin-top: 8px; }
.muted { color: var(--muted); font-size: 0.82rem; }
a { color: var(--accent); }
