/* ==========================================================================
   文件快传 —— 全站样式（移动优先，纯静态，无外部字体/图片）
   主色 #4f46e5 · 卡片式 · 圆角 12–16px · 系统字体栈
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-700: #3730a3;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --border: #e5e7eb;
  --border-2: #d1d5db;
  --success: #059669;
  --success-bg: #ecfdf5;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --info-bg: #eff6ff;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 10px 30px rgba(17, 24, 39, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-600);
}

img,
video,
canvas {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

svg {
  flex: none;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.svg-sprite {
  display: none;
}

.dot {
  color: var(--muted-2);
}

.link {
  color: var(--primary);
  font-weight: 600;
}

/* ---------------- 品牌 ---------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  min-width: 0;
}

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

.brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

.brand__logo svg {
  width: 20px;
  height: 20px;
}

.brand__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand--lg {
  flex-direction: column;
  gap: 12px;
}

.brand--lg .brand__logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.brand--lg .brand__logo svg {
  width: 32px;
  height: 32px;
}

.brand--lg .brand__name {
  font-size: 20px;
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.06s ease;
  -webkit-tap-highlight-color: transparent;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.btn--primary:hover {
  background: var(--primary-600);
  color: #fff;
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  color: var(--text);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
}

.btn--danger:hover {
  background: #b91c1c;
  color: #fff;
}

.btn--danger-ghost {
  background: var(--surface);
  border-color: #fecaca;
  color: var(--danger);
}

.btn--danger-ghost:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.btn--sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: var(--radius-xs);
}

.btn--sm svg {
  width: 14px;
  height: 14px;
}

.btn--lg {
  padding: 15px 22px;
  font-size: 16px;
  border-radius: 12px;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-xs);
}

/* ---------------- 加载动画 ---------------- */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------- 卡片 / 容器 ---------------- */

.page {
  min-height: 100vh;
  min-height: 100dvh;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

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

.card__head--wrap {
  flex-wrap: wrap;
}

.card__title {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__hint {
  font-size: 12px;
  color: var(--muted);
}

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-50);
  border-radius: 999px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------------- 表单 ---------------- */

.field {
  display: block;
}

.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.input::placeholder {
  color: var(--muted-2);
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap .input {
  padding-right: 48px;
}

.input-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.input-toggle:hover {
  color: var(--text);
  background: var(--surface-2);
}

.input-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.input-toggle svg {
  width: 20px;
  height: 20px;
}

.input--search {
  padding: 9px 12px 9px 36px;
  font-size: 14px;
  border-radius: var(--radius-xs);
}

.search {
  position: relative;
  display: block;
  min-width: 180px;
}

.search svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

/* ---------------- 提示条 ---------------- */

.alert {
  padding: 10px 13px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  overflow-wrap: anywhere;
}

.alert--error {
  color: #991b1b;
  background: var(--danger-bg);
  border-color: #fecaca;
}

.alert--warning {
  color: #92400e;
  background: var(--warning-bg);
  border-color: #fde68a;
}

.alert--info {
  color: #1e40af;
  background: var(--info-bg);
  border-color: #bfdbfe;
}

.alert--success {
  color: #065f46;
  background: var(--success-bg);
  border-color: #a7f3d0;
}

/* ---------------- 顶部栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.storage {
  min-width: 0;
}

.storage__text {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.storage__text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.storage__sub {
  color: var(--muted-2);
}

.storage__bar {
  width: 120px;
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  background: #eceef3;
  border-radius: 999px;
}

.storage__bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #818cf8, var(--primary));
  border-radius: inherit;
  transition: width 0.3s ease;
}

/* ---------------- 上传区 ---------------- */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 30px 18px;
  text-align: center;
  background: linear-gradient(180deg, #fbfbff, #f6f6fe);
  border: 2px dashed #c7cbe8;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.dropzone:hover {
  border-color: #a5b4fc;
  background: var(--primary-50);
}

.dropzone:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.dropzone.is-dragover {
  border-color: var(--primary);
  background: var(--primary-50);
  transform: scale(1.005);
}

.dropzone__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  color: var(--primary);
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.dropzone__icon svg {
  width: 24px;
  height: 24px;
}

.dropzone__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.dropzone__sub {
  font-size: 12px;
  color: var(--muted);
}

/* ---------------- 未完成上传提示 ---------------- */

.pending {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--warning-bg);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
}

.pending__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.pending__head strong {
  font-size: 14px;
  color: #92400e;
}

.pending__hint {
  font-size: 12px;
  color: #a16207;
}

.pending__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: var(--radius-xs);
}

.pending__info {
  flex: 1 1 200px;
  min-width: 0;
}

.pending__name {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending__meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.pending__actions {
  display: flex;
  gap: 6px;
}

/* ---------------- 上传任务队列 ---------------- */

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

.upload-item {
  padding: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.upload-item.is-done {
  background: var(--success-bg);
  border-color: #a7f3d0;
}

.upload-item.is-error {
  background: var(--danger-bg);
  border-color: #fecaca;
}

.upload-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.upload-item__info {
  flex: 1;
  min-width: 0;
}

.upload-item__name {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.upload-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.upload-item__actions {
  display: flex;
  flex: none;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-50);
}

.badge--success {
  color: #047857;
  background: #d1fae5;
}

.badge--danger {
  color: #b91c1c;
  background: #fee2e2;
}

.badge--warning {
  color: #b45309;
  background: #fef3c7;
}

.upload-item__progress {
  margin-top: 10px;
}

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

.progress__bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #6366f1, var(--primary));
  border-radius: inherit;
  transition: width 0.2s ease;
}

.upload-item.is-done .progress__bar {
  background: linear-gradient(90deg, #34d399, var(--success));
}

.upload-item.is-error .progress__bar {
  background: var(--danger);
}

.upload-item__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.upload-item__stats [data-role="percent"] {
  font-weight: 700;
  color: var(--text-2);
}

.upload-item__error {
  margin-top: 9px;
  font-size: 12px;
  color: #b91c1c;
  overflow-wrap: anywhere;
}

.upload-item__error.is-notice {
  color: #b45309;
}

.upload-item__done {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.upload-item__link {
  flex: 1 1 180px;
  min-width: 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- 文件列表 ---------------- */

.files-card .card__head {
  margin-bottom: 12px;
}

.files-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  justify-content: flex-end;
}

.files {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 13px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.file-row:hover {
  background: #fff;
  border-color: #d9dcef;
}

.file-row__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary);
}

.file-row__icon svg {
  width: 21px;
  height: 21px;
}

.file-row__icon[data-kind="image"] {
  color: #0891b2;
  background: #ecfeff;
}

.file-row__icon[data-kind="video"] {
  color: #db2777;
  background: #fdf2f8;
}

.file-row__icon[data-kind="audio"] {
  color: #d97706;
  background: #fffbeb;
}

.file-row__icon[data-kind="archive"] {
  color: #7c3aed;
  background: #f5f3ff;
}

.file-row__icon[data-kind="doc"] {
  color: #2563eb;
  background: #eff6ff;
}

.file-row__icon[data-kind="file"] {
  color: var(--muted);
  background: #f3f4f6;
}

.file-row__main {
  flex: 1;
  min-width: 0;
}

.file-row__name {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.file-row__name:hover {
  color: var(--primary);
  text-decoration: underline;
}

.file-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.file-row__meta b {
  font-weight: 700;
  color: var(--text-2);
}

.file-row__actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.files-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 4px;
  font-size: 13px;
  color: var(--muted);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 34px 16px;
  text-align: center;
}

.empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 6px;
  color: #a5b4fc;
  background: var(--primary-50);
  border-radius: 20px;
}

.empty__icon svg {
  width: 30px;
  height: 30px;
}

.empty__title {
  font-size: 15px;
  font-weight: 600;
}

.empty__sub {
  font-size: 13px;
  color: var(--muted);
}

/* ---------------- 弹窗 ---------------- */

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  animation: fade-in 0.16s ease;
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 20px;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.24);
  animation: pop-in 0.18s ease;
}

.modal__card--sm {
  max-width: 340px;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal__title {
  font-size: 17px;
  font-weight: 700;
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -4px -4px 0 0;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.modal__close:hover {
  color: var(--text);
  background: var(--surface-2);
}

.modal__filename {
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--muted);
}

.modal__message {
  margin: 12px 0 18px;
  font-size: 14px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.modal__actions .btn {
  flex: 1 1 auto;
}

.qr-box {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.qr-canvas {
  display: block;
  background: #fff;
  border-radius: 4px;
}

.qr-tip {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.qr-link {
  margin-top: 12px;
}

.qr-link .input {
  font-family: var(--mono);
  font-size: 12px;
  padding: 9px 11px;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------- Toast ---------------- */

.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: #1f2937;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow-wrap: anywhere;
}

.toast.is-show {
  opacity: 1;
  transform: none;
}

.toast--success {
  background: #047857;
}

.toast--error {
  background: #b91c1c;
}

/* ---------------- 登录页 ---------------- */

.page--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
  background: radial-gradient(1200px 600px at 50% -10%, #e6e9ff 0%, rgba(244, 245, 250, 0) 60%),
    var(--bg);
}

.login-wrap {
  width: 100%;
  max-width: 400px;
  margin: auto;
}

.login-card {
  padding: 30px 22px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.login-title {
  margin-top: 18px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.login-sub {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
}

.login-form {
  margin-top: 22px;
  text-align: left;
}

.login-form .field__label {
  text-align: left;
}

.login-form .alert {
  margin-top: 12px;
}

.login-form .btn--submit {
  margin-top: 16px;
}

.login-foot {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
}

/* ---------------- 分享页 ---------------- */

.page--share {
  display: flex;
  flex-direction: column;
  background: radial-gradient(900px 420px at 50% -8%, #e6e9ff 0%, rgba(244, 245, 250, 0) 65%),
    var(--bg);
}

.share {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 680px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 16px 26px;
}

.share-card {
  padding: 22px 18px;
  box-shadow: var(--shadow);
}

.share-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  margin-bottom: 12px;
  color: var(--primary);
  background: var(--primary-50);
  border-radius: 20px;
}

.share-icon svg {
  width: 34px;
  height: 34px;
}

.share-icon[data-kind="image"] {
  color: #0891b2;
  background: #ecfeff;
}

.share-icon[data-kind="video"] {
  color: #db2777;
  background: #fdf2f8;
}

.share-icon[data-kind="audio"] {
  color: #d97706;
  background: #fffbeb;
}

.share-icon[data-kind="archive"] {
  color: #7c3aed;
  background: #f5f3ff;
}

.share-icon[data-kind="doc"] {
  color: #2563eb;
  background: #eff6ff;
}

.share-icon[data-kind="file"] {
  color: var(--muted);
  background: #f3f4f6;
}

.share-name {
  max-width: 100%;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.share-meta {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.share-preview {
  margin-top: 16px;
}

.share-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 62vh;
  margin: 0 auto;
  border-radius: 12px;
  background: var(--surface-2);
  object-fit: contain;
}

.share-preview video {
  display: block;
  width: 100%;
  max-height: 62vh;
  background: #000;
  border-radius: 12px;
}

.share-preview audio {
  display: block;
  width: 100%;
}

.share-download {
  margin-top: 18px;
  min-height: 52px;
  font-size: 17px;
}

.share-download svg {
  width: 20px;
  height: 20px;
}

.share-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
}

.share-wechat {
  margin-top: 14px;
}

.share-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  text-align: center;
}

.share-qr__body {
  min-width: 0;
  width: 100%;
}

.share-qr__title {
  font-size: 14px;
  font-weight: 700;
}

.share-qr__sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.share-url {
  margin: 10px auto 0;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-all;
}

.share-qr .btn {
  margin-top: 10px;
}

.share-footer {
  padding: 4px 0 0;
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
}

.share-footer strong {
  font-weight: 600;
  color: var(--muted);
}

.share-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 18px;
  text-align: center;
}

.share-error__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: 20px;
}

.share-error__icon svg {
  width: 32px;
  height: 32px;
}

.share-error__title {
  font-size: 17px;
  font-weight: 700;
}

.share-error__message {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.share-error .btn {
  margin-top: 6px;
}

/* ---------------- 骨架屏 ---------------- */

.skeleton {
  position: relative;
  overflow: hidden;
  background: #eceef4;
  border-radius: 8px;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite;
  content: "";
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 18px;
}

.skeleton--icon {
  width: 66px;
  height: 66px;
  border-radius: 20px;
}

.skeleton--title {
  width: 70%;
  height: 20px;
}

.skeleton--line {
  width: 46%;
  height: 13px;
}

.skeleton--btn {
  width: 100%;
  height: 52px;
  margin-top: 8px;
  border-radius: 12px;
}

.skeleton--qr {
  width: 150px;
  height: 150px;
  margin-top: 8px;
  border-radius: 12px;
}

/* ---------------- 响应式 ---------------- */

@media (min-width: 560px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 22px 20px;
    gap: 18px;
  }

  .card {
    padding: 22px;
  }

  .dropzone {
    padding: 38px 22px;
  }

  .file-row__actions {
    flex-wrap: nowrap;
  }

  .share {
    padding: 26px 20px 34px;
  }

  .share-card {
    padding: 30px 26px;
  }

  .share-qr {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .share-qr__body {
    text-align: left;
  }

  .share-url {
    margin-left: 0;
  }

  .share-qr {
    justify-content: center;
  }
}

@media (max-width: 559px) {
  .storage__bar {
    display: none;
  }

  .storage__label {
    display: none;
  }

  .topbar .brand__name {
    font-size: 16px;
  }

  .files-tools {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .search {
    flex: 1;
    min-width: 0;
  }

  .file-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .file-row__actions {
    width: 100%;
    justify-content: flex-start;
    padding-left: 54px;
  }

  .login-card {
    padding: 26px 18px 20px;
  }
}

@media (max-width: 389px) {
  .topbar__inner {
    padding: 9px 12px;
  }

  .container {
    padding: 12px;
  }

  .card {
    padding: 14px;
  }

  .storage {
    display: none;
  }

  .file-row__actions {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
