/* ============================================================
   速传 QuickSend —— 全局样式（电脑 + 手机自适应）
   ============================================================ */

:root {
  --bg: #f2f6fc;
  --card: #ffffff;
  --ink: #0b1526;
  --muted: #5b6b83;
  --line: #e4eaf5;
  --brand-1: #2563eb;
  --brand-2: #06b6d4;
  --grad: linear-gradient(120deg, #2563eb 0%, #0ea5e9 55%, #06b6d4 100%);
  --ok: #0aa874;
  --bad: #e04f3f;
  --warn: #d97706;
  --r-lg: 22px;
  --r-md: 15px;
  --r-sm: 11px;
  --sh: 0 14px 44px -14px rgba(15, 40, 90, .16);
  --sh-sm: 0 6px 18px -8px rgba(15, 40, 90, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: min(1080px, 94%); margin: 0 auto; }

/* ---------- 背景装饰 ---------- */
.bg-deco { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob-a { width: 520px; height: 520px; left: -140px; top: -160px; background: radial-gradient(circle at 30% 30%, #60a5fa, transparent 65%); animation: float-a 14s ease-in-out infinite; }
.blob-b { width: 460px; height: 460px; right: -120px; top: 120px; background: radial-gradient(circle at 60% 40%, #22d3ee, transparent 65%); animation: float-b 17s ease-in-out infinite; }
@keyframes float-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.08); } }
@keyframes float-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,50px) scale(1.06); } }

/* ---------- 顶栏 ---------- */
.top { position: relative; z-index: 1; }
.top-in { display: flex; align-items: center; justify-content: space-between; padding: 22px 0 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; background: var(--grad);
  display: grid; place-items: center; box-shadow: var(--sh-sm);
}
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: .02em; }
.brand-name em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.top-tip { font-size: 13px; color: var(--muted); }

/* ---------- Hero ---------- */
main { position: relative; z-index: 1; flex: 1; }
.hero { text-align: center; padding: 46px 0 26px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(2rem, 6.4vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.18; }
.hero .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 0 auto 26px; color: var(--muted); font-size: clamp(15px, 2.6vw, 17px); max-width: 560px; }
.hero-steps { display: flex; justify-content: center; gap: clamp(18px, 6vw, 56px); flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.step-no {
  width: 24px; height: 24px; border-radius: 50%; background: #e6edfb; color: var(--brand-1);
  font-weight: 800; font-size: 13px; display: grid; place-items: center; font-style: normal;
}

/* ---------- 页签 ---------- */
.tabs { display: flex; justify-content: center; gap: 8px; margin: 10px 0 18px; }
.tab {
  border: 0; background: #e9eef8; color: var(--muted); font-size: 15px; font-weight: 600;
  padding: 10px 26px; border-radius: 999px; cursor: pointer; transition: all .18s ease;
}
.tab:hover { color: var(--ink); }
.tab.on { background: var(--grad); color: #fff; box-shadow: var(--sh-sm); }

.panel { max-width: 820px; margin: 0 auto 26px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid rgba(228, 234, 245, .8); border-radius: var(--r-lg);
  box-shadow: var(--sh); padding: 26px; margin-bottom: 16px;
}

/* ---------- 上传区 ---------- */
.drop-card { border: 2px dashed #c8d6ee; background: linear-gradient(180deg, #fbfdff, #f5f9ff); cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.drop-card:hover, .drop-card:focus-visible { border-color: var(--brand-1); transform: translateY(-2px); }
.drop-card.drag { border-color: var(--brand-2); background: #f0fbff; transform: scale(1.005); box-shadow: 0 0 0 6px rgba(6, 182, 212, .10); }
.drop-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 12px; text-align: center; }
.drop-title { margin: 10px 0 0; font-size: 17px; font-weight: 600; }
.linkish { color: var(--brand-1); font-weight: 700; }
.drop-sub { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- 文件列表 ---------- */
.file-list { list-style: none; margin: 0; padding: 0; }
.file-row { display: flex; align-items: center; gap: 13px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-badge {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; color: #fff; text-transform: uppercase;
}
.b-img   { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.b-video { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.b-audio { background: linear-gradient(135deg, #f59e0b, #f97316); }
.b-doc   { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.b-zip   { background: linear-gradient(135deg, #10b981, #14b8a6); }
.b-code  { background: linear-gradient(135deg, #64748b, #475569); }
.b-other { background: linear-gradient(135deg, #94a3b8, #64748b); }
.file-main { flex: 1; min-width: 0; }
.file-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.progress { height: 5px; border-radius: 3px; background: #e6edf7; overflow: hidden; margin-top: 5px; width: 100%; }
.progress > i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 3px; transition: width .15s ease; }
.file-status { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.st-uploading { color: var(--brand-1); }
.st-ok { color: var(--ok); }
.st-bad { color: var(--bad); }
.file-remove {
  border: 0; background: #f1f4fa; color: var(--muted); width: 28px; height: 28px; border-radius: 8px;
  cursor: pointer; font-size: 14px; line-height: 1; flex: 0 0 auto;
}
.file-remove:hover { background: #fdecea; color: var(--bad); }

.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 16px; }
.ttl-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ttl-label { font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; background: #eef2f9; border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: all .16s ease;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-sm); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 700;
  padding: 12px 26px; border-radius: 14px; transition: all .18s ease; text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px -8px rgba(37, 99, 235, .55); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(37, 99, 235, .6); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: #c8d6ee; background: #f8fbff; }
.btn.sm { padding: 8px 15px; font-size: 13px; border-radius: 11px; }

/* ---------- 传输结果 ---------- */
.result-head { text-align: center; margin-bottom: 18px; }
.result-ok { display: inline-flex; align-items: center; gap: 7px; font-size: 18px; font-weight: 800; color: var(--ok); }
.result-sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.result-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: stretch; }
.code-box { background: #f6f9ff; border: 1px dashed #c8d6ee; border-radius: var(--r-md); padding: 20px 16px; text-align: center; }
.code-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.code {
  font-family: var(--mono); font-size: clamp(1.7rem, 6vw, 2.4rem); font-weight: 800; letter-spacing: .32em;
  color: var(--ink); user-select: all; cursor: pointer; margin: 0 0 14px; text-indent: .32em;
}
.code-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.qr-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.qr-canvas { width: 150px; height: 150px; display: grid; place-items: center; }
.qr-canvas img, .qr-canvas canvas { max-width: 100%; border-radius: 8px; }
.qr-tip { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.countdown { margin: 2px 0 0; font-size: 12.5px; font-weight: 700; color: var(--brand-1); font-variant-numeric: tabular-nums; }
.countdown.expired { color: var(--bad); }
.link-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; background: #f8fafd; border: 1px solid var(--line); border-radius: 11px; padding: 9px 13px; }
.link-label { font-size: 12.5px; color: var(--muted); flex: 0 0 auto; }
.link-text { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; color: var(--brand-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-files { margin-top: 12px; }
.result-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- 取件 ---------- */
.pickup-card { text-align: center; }
.pickup-title { margin: 0 0 18px; font-size: 17px; font-weight: 700; }
.pickup-code-row { display: flex; gap: 10px; justify-content: center; }
#code-input {
  font-family: var(--mono); font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 800; letter-spacing: .28em; text-align: center;
  width: min(320px, 100%); padding: 12px 6px; border: 2px solid #c8d6ee; border-radius: 14px; outline: none;
  background: #fbfdff; color: var(--ink); text-transform: uppercase; transition: border-color .18s, box-shadow .18s;
}
#code-input:focus { border-color: var(--brand-1); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.pickup-tip { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; }

.pickup-result { text-align: left; }
.pickup-result-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pickup-result-code { font-family: var(--mono); font-weight: 800; letter-spacing: .15em; color: var(--brand-1); font-size: 16px; }
.pickup-result-meta { color: var(--muted); font-size: 13px; }
.pickup-result .file-row { padding: 12px 4px; }
.dl-btn { flex: 0 0 auto; }
.error-box { text-align: center; padding: 26px 10px; }
.error-icon { width: 54px; height: 54px; border-radius: 50%; background: #fdecea; color: var(--bad); display: grid; place-items: center; margin: 0 auto 14px; }
.error-title { font-size: 16px; font-weight: 800; margin: 0 0 6px; }
.error-msg { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }

/* ---------- 特点 ---------- */
.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 8px auto 34px; max-width: 1080px; }
.feat {
  background: var(--card); border: 1px solid rgba(228, 234, 245, .8); border-radius: var(--r-md);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--sh-sm);
}
.feat svg { color: var(--brand-1); }
.feat b { font-size: 15px; }
.feat span { font-size: 12.5px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.foot { position: relative; z-index: 1; background: #fff; border-top: 1px solid var(--line); padding: 22px 0; text-align: center; }
.foot-name { margin: 0 0 4px; font-weight: 700; font-size: 14px; }
.foot-law { margin: 0; color: var(--muted); font-size: 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; padding: 12px 22px;
  border-radius: 12px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 99;
  max-width: 86%; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--bad); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .feats { grid-template-columns: repeat(2, 1fr); }
  .result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top-in { padding: 16px 0 4px; }
  .top-tip { display: none; }
  .hero { padding: 30px 0 18px; }
  .hero-steps { gap: 12px; }
  .card { padding: 18px 14px; border-radius: 18px; }
  .list-foot { flex-direction: column; align-items: stretch; }
  .ttl-group { justify-content: space-between; }
  .btn-upload-full { width: 100%; }
  .code-actions .btn { flex: 1; }
  .pickup-code-row { flex-direction: column; }
  #code-input { width: 100%; }
  .feats { grid-template-columns: 1fr; }
  .link-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .blob-a, .blob-b { animation: none; }
  * { transition-duration: .01ms !important; }
}
