/* drop — design system */
:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-glow: radial-gradient(700px 320px at 50% -140px, rgba(91, 140, 255, .13), transparent 70%);
  --surface: #12151c;
  --surface-2: #171b24;
  --border: #222836;
  --border-strong: #343d52;
  --text: #e8ebf2;
  --muted: #8d95a6;
  --faint: #626b7d;
  --accent: #5b8cff;
  --accent-2: #7aa2ff;
  --accent-soft: rgba(91, 140, 255, .12);
  --danger: #ff6b62;
  --danger-soft: rgba(255, 107, 98, .12);
  --ok: #41d392;
  --ok-soft: rgba(65, 211, 146, .12);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .28);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f5f9;
    --bg-glow: radial-gradient(700px 320px at 50% -140px, rgba(91, 140, 255, .10), transparent 70%);
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --border: #e4e8f0;
    --border-strong: #d3d9e4;
    --text: #131722;
    --muted: #4e5869;
    --faint: #79839a;
    --accent: #3a6df0;
    --accent-2: #5b8cff;
    --accent-soft: rgba(58, 109, 240, .09);
    --danger: #d9382f;
    --danger-soft: rgba(217, 56, 47, .08);
    --ok: #0f9d63;
    --ok-soft: rgba(15, 157, 99, .10);
    --shadow: 0 10px 28px rgba(20, 30, 60, .07);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-glow);
  background-repeat: no-repeat;
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 720px; margin: 0 auto; padding: 30px 20px 90px; }

/* header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 26px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-size: 19px; font-weight: 650; letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(180deg, var(--accent), #3f6fe0);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 14px rgba(91, 140, 255, .35);
}
.logo-mark svg { width: 15px; height: 15px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  font-size: 13.5px; color: var(--muted);
  padding: 7px 11px; border-radius: 9px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card h2 { font-size: 15.5px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.count { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* typography */
h1 { margin: 0 0 8px; font-size: 26px; font-weight: 650; letter-spacing: -0.025em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 0; }
.err { color: var(--danger); font-size: 13.5px; margin: 10px 0 0; }
.ok { color: var(--ok); font-size: 13.5px; margin: 0 0 10px; font-weight: 600; }
code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 7px;
}

/* forms */
.form { display: flex; flex-direction: column; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
input[type=text], input[type=password], input[type=number], select, .input {
  width: 100%; font: inherit; font-size: 14px;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

/* buttons */
button, .btn {
  font: inherit; font-size: 14px; font-weight: 550;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 15px; cursor: pointer;
  transition: border-color .15s, background .15s, transform .05s, filter .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--accent); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn-primary, .primary {
  width: 100%; padding: 11px 16px;
  background: linear-gradient(180deg, var(--accent), #4677e8);
  border: 1px solid transparent; color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(91, 140, 255, .28);
}
.btn-primary:hover, .primary:hover { filter: brightness(1.07); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn-icon { padding: 8px; width: 34px; height: 34px; }

/* auth pages */
.auth { max-width: 420px; margin: 7vh auto 0; }
.auth .logo-mark { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 20px; }
.auth .logo-mark svg { width: 22px; height: 22px; }
.auth h1 { font-size: 28px; }
.auth .hint { margin: 0 0 22px; }
.auth .card { padding: 22px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 16px; }

/* usage strip */
.usage-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 650; font-size: 16px;
  border: 1px solid rgba(91, 140, 255, .25);
}
.usage-main { flex: 1; min-width: 0; }
.usage-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.usage-title strong { font-size: 14.5px; font-weight: 600; }
.usage-title span { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.meter {
  height: 6px; margin-top: 9px; border-radius: 999px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border);
}
.meter > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s ease;
}

/* dropzone */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.dropzone:hover, .dropzone.hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 34px; height: 34px; color: var(--muted); }
.dropzone .big { font-size: 15.5px; font-weight: 600; margin: 12px 0 3px; }
.dropzone .sub { color: var(--muted); font-size: 12.5px; margin: 0; }

.fileinfo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 10px 13px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13.5px; word-break: break-all;
}
.fileinfo strong { font-weight: 550; }

.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.options .field > span { font-size: 12px; }

/* progress */
.progress {
  margin-top: 14px; position: relative; height: 30px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden;
}
#progressBar {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .15s;
}
#progressText {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--text);
  mix-blend-mode: normal; text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

/* result */
.result { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.result-head { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.result-head svg { width: 17px; height: 17px; }
.linkrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.linkrow input {
  flex: 1; min-width: 0; font-size: 12.5px; padding: 8px 11px;
  color: var(--muted); font-family: var(--mono);
}

/* file list */
.row { padding: 14px 0; border-top: 1px solid var(--border); }
.row:first-of-type { border-top: none; padding-top: 6px; }
.filehead { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.filename { font-weight: 600; font-size: 14.5px; word-break: break-all; letter-spacing: -0.01em; }
.filemeta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted); font-weight: 500;
  padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.chip.ok, .chip.bad { gap: 6px; }
.chip.ok::before, .chip.bad::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.chip.ok { color: var(--ok); border-color: rgba(65, 211, 146, .35); background: var(--ok-soft); }
.chip.ok::before { background: var(--ok); }
.chip.bad { color: var(--danger); border-color: rgba(255, 107, 98, .30); background: var(--danger-soft); }
.chip.bad::before { background: var(--danger); }
.chip.admin { color: var(--accent); border-color: rgba(91, 140, 255, .32); background: var(--accent-soft); }
.actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* misc */
.empty {
  display: flex; align-items: center; gap: 10px;
  color: var(--faint); font-size: 13.5px; padding: 22px 0 12px;
}
.empty svg { width: 20px; height: 20px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.inlineform { display: inline-flex; gap: 6px; align-items: center; }
.inlineform input, .inlineform select { width: auto; padding: 6px 9px; font-size: 13px; }
.wraprow { flex-wrap: wrap; }

/* download page */
.download-wrap { max-width: 520px; margin: 9vh auto 0; }
.download-card { text-align: center; padding: 34px 26px; }
.fileicon {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 18px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(91, 140, 255, .25);
}
.fileicon svg { width: 28px; height: 28px; }
.download-card .filename { font-size: 18px; font-weight: 650; word-break: break-all; }
.download-card .chips { justify-content: center; margin: 12px 0 22px; }
.downloadform { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.download-note { color: var(--faint); font-size: 12.5px; margin: 14px 0 0; }
.gone { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

/* admin */
.admin-section + .admin-section { margin-top: 16px; }
.invite-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.invite-row:first-of-type { border-top: none; }
.invite-code { font-family: var(--mono); font-size: 12.5px; }
.userrow { padding: 14px 0; border-top: 1px solid var(--border); }
.userrow:first-of-type { border-top: none; padding-top: 6px; }
.userrow .rowmain { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .wrap { padding: 22px 14px 70px; }
  .card { padding: 18px; }
  .options { grid-template-columns: 1fr; }
  .auth, .download-wrap { margin-top: 4vh; }
  .logo { font-size: 17px; }
  .nav a { padding: 6px 8px; }
}

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--faint); }
