:root {
  color-scheme: dark;
  --void: #0a0b0f;
  --ink: #12141a;
  --mist: rgba(255, 255, 255, 0.72);
  --whisper: rgba(255, 255, 255, 0.45);
  --accent: #4a9ed1;
  --accent-soft: #59c7db;
  --accent-bright: #93b5ff;
  --stroke: rgba(255, 255, 255, 0.16);
  --danger: #ed5960;
  --ok: #59d19e;
  font-family: "SF Pro Rounded", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 10%, rgba(74, 158, 209, 0.28), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(89, 199, 219, 0.16), transparent 35%),
    var(--void);
  color: white;
}

.shell {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent-soft);
  margin: 0 0 8px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 650;
}

.sub {
  color: var(--whisper);
  line-height: 1.45;
  margin: 10px 0 0;
}

.card {
  margin-top: 28px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.meta {
  font-size: 13px;
  color: var(--mist);
  margin-bottom: 14px;
  line-height: 1.4;
}

.dropzone {
  display: grid;
  gap: 8px;
  place-items: center;
  text-align: center;
  padding: 36px 18px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.dropzone input { display: none; }
.dropzone strong { font-size: 1.05rem; }
.dropzone span { color: var(--whisper); font-size: 0.92rem; line-height: 1.4; max-width: 28ch; }

#queue {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 8px;
  max-height: min(42vh, 360px);
  overflow: auto;
}

#queue li.queue-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  font-size: 13px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#queue .mark {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 1px;
  color: transparent;
  background: rgba(255, 255, 255, 0.08);
}

#queue .body {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}

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

#queue .size,
#queue .detail {
  color: var(--whisper);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#queue .queue-item.is-active {
  background: rgba(74, 158, 209, 0.14);
  border-color: rgba(89, 199, 219, 0.35);
}

#queue .queue-item.is-active .mark {
  color: var(--accent-soft);
  background: rgba(89, 199, 219, 0.18);
}

#queue .queue-item.is-ok {
  background: rgba(89, 209, 158, 0.12);
  border-color: rgba(89, 209, 158, 0.38);
}

#queue .queue-item.is-ok .mark {
  color: #041810;
  background: var(--ok);
}

#queue .queue-item.is-ok .name {
  color: #c9f5e2;
}

#queue .queue-item.is-fail {
  background: rgba(237, 89, 96, 0.12);
  border-color: rgba(237, 89, 96, 0.4);
}

#queue .queue-item.is-fail .mark {
  color: #1a0507;
  background: var(--danger);
}

#queue .queue-item.is-fail .name,
#queue .queue-item.is-fail .detail {
  color: #ffc4c7;
}

.mode-block {
  margin-bottom: 16px;
  display: grid;
  gap: 10px;
}

.mode-label {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.78);
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-btn {
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--stroke);
  font-size: 13px;
  font-weight: 650;
}

.mode-btn.is-on {
  background: linear-gradient(135deg, rgba(89, 199, 219, 0.28), rgba(74, 158, 209, 0.22));
  color: #eaf8ff;
  border-color: rgba(89, 199, 219, 0.45);
}

.mode-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.vault-pass {
  display: grid;
  gap: 8px;
}

.vault-pass label {
  font-size: 12px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.72);
}

.vault-pass input {
  appearance: none;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font: inherit;
}

.vault-pass input:focus {
  outline: 2px solid rgba(89, 199, 219, 0.45);
  outline-offset: 1px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button:disabled { opacity: 0.45; cursor: not-allowed; }
.primary { background: linear-gradient(135deg, var(--accent-soft), var(--accent)); color: #041018; flex: 1; }
.ghost { background: rgba(255, 255, 255, 0.08); color: white; border: 1px solid var(--stroke); }

.progress-panel {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--stroke);
  display: grid;
  gap: 12px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  font-weight: 650;
}

.progress-overall {
  font-variant-numeric: tabular-nums;
  color: var(--accent-soft);
  font-size: 1.15rem;
}

.progress-row {
  display: grid;
  gap: 6px;
}

.progress-row-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--mist);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.progress-track.slim { height: 8px; }

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent-soft) 45%,
    var(--accent-bright) 78%,
    var(--accent) 100%
  );
  background-size: 200% 100%;
  box-shadow: 0 0 16px rgba(89, 199, 219, 0.35);
  transition: width 0.18s ease-out;
  animation: shimmer 1.6s linear infinite;
}

.progress-fill.encrypt {
  background: linear-gradient(
    90deg,
    #3d7fd1 0%,
    #59c7db 40%,
    #93b5ff 70%,
    #4a9ed1 100%
  );
  background-size: 200% 100%;
}

.progress-fill.upload {
  background: linear-gradient(
    90deg,
    #59c7db 0%,
    #4a9ed1 35%,
    #7ec8ff 70%,
    #59c7db 100%
  );
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.progress-file {
  margin: 0;
  font-size: 12px;
  color: var(--whisper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint {
  margin: 14px 0 0;
  color: var(--whisper);
  font-size: 12px;
  line-height: 1.45;
}

.hint code {
  color: var(--accent-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

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