:root {
  --bg: #0e1116;
  --card: #171b22;
  --border: #262c36;
  --text: #e7ebf0;
  --muted: #8b93a1;
  --accent: #5b8cff;
  --accent-hover: #4a7bf0;
  --error: #ff6b6b;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 45%, #0b1019 0%, #05070b 55%, #030407 100%)
    fixed;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

#blackhole {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.topbar,
.container {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 20, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.error {
  color: var(--error);
  font-size: 14px;
  margin: 8px 0 0;
}

button,
input {
  font: inherit;
}

.primary,
.ghost {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.primary {
  background: var(--accent);
  color: white;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

/* Rendered but invisible: display:none inputs won't open a native picker in
   some browsers (notably Safari/macOS). */
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}

.primary:hover {
  background: var(--accent-hover);
}

.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

.ghost:hover {
  border-color: var(--muted);
}

.ghost.small,
.small {
  padding: 6px 10px;
  font-size: 13px;
}

.wide {
  display: block;
  width: 100%;
  margin-top: 12px;
}

.link {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  padding: 0;
}

.link:hover {
  color: var(--text);
}

input[type="password"],
input[type="text"] {
  width: 100%;
  background: #0f1319;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  outline: none;
}

input[type="password"]:focus,
input[type="text"]:focus {
  border-color: var(--accent);
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(91, 140, 255, 0.06);
}

.drop-icon {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 8px;
}

.drop-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
}

.drop-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.selection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.selection-head .muted {
  margin-left: 8px;
}

.file-list,
.transfer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
}

.file-list li,
.transfer-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.file-list li:last-child,
.transfer-list li:last-child {
  border-bottom: none;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: var(--muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.transfer-list .transfer-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.transfer-list .transfer-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
}

.progress {
  height: 8px;
  background: #0f1319;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s ease;
}

.linkrow {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.linkrow input {
  flex: 1;
}

.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 0;
}
