:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --ink: #14191f;
  --muted: #637083;
  --line: #d9dee5;
  --accent: #0f8b8d;
  --accent-strong: #0a6f72;
  --danger: #c13b2a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(980px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.topbar,
.list-head,
.file-row,
.queue-row {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
}

p,
.dropcopy span,
.meta,
.list-head span {
  color: var(--muted);
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
}

.download,
.delete {
  height: 40px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

.download {
  background: var(--accent);
}

.download:hover,
.auth-form button:hover {
  background: var(--accent-strong);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 25, 31, 0.42);
  backdrop-filter: blur(12px);
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 80px rgba(20, 25, 31, 0.24);
}

.auth-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.auth-card h2 {
  font-size: 24px;
  line-height: 1.2;
}

.auth-card p {
  margin-top: 6px;
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.auth-form input {
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
}

.auth-form input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 139, 141, 0.18);
}

.auth-form button {
  min-width: 74px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.auth-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-message {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.locked-shell {
  pointer-events: none;
  user-select: none;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 245px;
  border: 2px dashed #a9b4c1;
  border-radius: 8px;
  background: var(--panel);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
  cursor: pointer;
}

.dropzone.dragging {
  border-color: var(--accent);
  background: #eefafa;
  transform: translateY(-1px);
}

.dropzone.locked {
  border-color: var(--line);
  background: #f9fafb;
  cursor: not-allowed;
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone input:disabled {
  cursor: not-allowed;
}

.dropcopy {
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
}

.dropcopy strong {
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: 0;
}

.queue {
  display: grid;
  gap: 8px;
  margin: 18px 0 26px;
}

.queue-row,
.file-row {
  gap: 14px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.queue-info,
.file-info {
  min-width: 0;
  flex: 1;
}

.name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.meta {
  margin-top: 4px;
  font-size: 13px;
}

.progress {
  width: min(260px, 35vw);
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5eaf0;
}

.bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 120ms linear;
}

.list-head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.file-list {
  display: grid;
  gap: 8px;
}

.actions {
  display: flex;
  gap: 8px;
}

.download,
.delete {
  min-width: 42px;
  padding: 0 12px;
}

.delete {
  background: var(--danger);
}

.empty {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none;
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 18px, 980px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .dropzone {
    min-height: 190px;
  }

  .queue-row,
  .file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .progress {
    width: 100%;
  }

  .actions {
    width: 100%;
  }

  .auth-card {
    padding: 22px;
  }

  .auth-form {
    grid-template-columns: 1fr;
  }

  .download,
  .delete {
    flex: 1;
  }
}
