/* ═══════════ 网盘助手 · 浅色质感主题（Linear/Stripe 风） ═══════════
   暖灰底 + 纯白卡片 + 柔和双层阴影 + 单一靛蓝主色
*/
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
:root{
  --bg:#f7f8fa;
  --card:#ffffff;
  --line:#e7e9ef;
  --line-strong:#d4d8e3;
  --text:#1a1d29;
  --muted:#6f7688;
  --faint:#9ba1b0;
  --hover:#f4f5f8;
  --brand:#5e6ad2;        /* 主色：靛蓝 */
  --brand-dark:#4f5bc0;
  --brand-soft:#eef0fb;   /* 主色浅底 */
  --brand-line:#dcdff0;   /* 主色浅描边 */
  --ok:#1a9e6c;--err:#d64550;--warn:#b97d10;
  --shadow-sm:0 1px 2px rgba(18,25,38,.05);
  --shadow:0 1px 2px rgba(18,25,38,.05),0 8px 24px rgba(18,25,38,.07);
  --shadow-lg:0 2px 4px rgba(18,25,38,.06),0 16px 48px rgba(18,25,38,.12);
}
html,body{height:100%}
body{
  font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,#eef1f6 0%,var(--bg) 340px);
  -webkit-text-size-adjust:100%;
}
::selection{background:rgba(94,106,210,.18)}
.wrap{max-width:1080px;margin:0 auto;padding:0 16px 64px}
.hidden{display:none!important}

/* ===== 顶栏（白底细分割线，简洁） ===== */
header{
  height:56px;background:rgba(255,255,255,.85);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  display:flex;align-items:center;
  margin:0 -16px 26px;padding:0 18px;
}
.brand{display:flex;align-items:center;gap:10px;min-width:0}
.logo{
  width:30px;height:30px;border-radius:8px;flex:none;
  background:var(--brand);color:#fff;font-size:14px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}
header h1{font-size:15.5px;font-weight:600;letter-spacing:.2px;white-space:nowrap;color:var(--text)}
header p{display:none}

/* ===== 账号标识 ===== */
.who{display:flex;align-items:center;gap:8px;flex:none;max-width:38vw;min-width:0}
.avatar{
  width:26px;height:26px;border-radius:50%;flex:none;
  background:var(--brand);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:600;
}
.acc-text{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.acc-name{font-size:12.8px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.acc-id{font-size:10.5px;color:var(--faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ===== 首屏过渡 ===== */
.boot{
  padding:88px 16px;text-align:center;color:var(--muted);font-size:13.5px;
  display:flex;flex-direction:column;align-items:center;gap:14px;
}
.spinner{
  display:inline-block;width:16px;height:16px;
  border:2px solid var(--line-strong);border-top-color:var(--brand);
  border-radius:50%;animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== 卡片（纯白 + 柔和阴影） ===== */
.card{
  background:var(--card);border-radius:14px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  margin-bottom:16px;
}
.card.show{animation:cardIn .2s ease both}
@keyframes cardIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ===== 使用说明（三步横排，极简） ===== */
.guide{
  max-width:600px;margin:26px auto 0;
  background:var(--card);border:1px solid var(--line);border-radius:14px;
  box-shadow:var(--shadow-sm);
  padding:18px 22px 15px;text-align:left;
  animation:cardIn .22s ease both;
}
.guide-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:13px}
.guide-title{
  font-size:14px;font-weight:700;color:var(--text);letter-spacing:.2px;
}
.guide-sub{font-size:12.3px;color:var(--faint)}
.guide-steps{
  list-style:none;margin:0;padding:0;
  display:grid;grid-template-columns:repeat(3,1fr);gap:18px;
}
.guide-steps li{display:flex;gap:9px;align-items:flex-start}
.guide-steps .num{
  flex:none;width:21px;height:21px;margin-top:1px;border-radius:7px;
  background:var(--brand-soft);color:var(--brand);font-size:11.5px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}
.guide-steps strong{display:block;font-size:12.8px;font-weight:600;color:var(--text);margin-bottom:2px}
.guide-steps span{display:block;font-size:12px;line-height:1.65;color:var(--muted)}
.guide-foot{
  margin-top:13px;padding-top:11px;border-top:1px solid var(--line);
  font-size:11.8px;line-height:1.65;color:var(--faint);
}
@media (max-width:640px){
  .guide{margin-top:14px;padding:14px 16px 12px}
  .guide-steps{grid-template-columns:1fr;gap:10px}
  .guide-foot{display:none}
}

/* ===== 登录卡 ===== */
#loginCard{
  max-width:440px;margin:16px auto 0;text-align:center;
  padding:32px 28px 28px;
}
#qrBox{
  width:196px;aspect-ratio:1/1;margin:14px auto 18px;
  border-radius:12px;background:#fff;
  border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;
}
#qrImg{width:100%;height:100%;object-fit:contain;display:none}
#qrPlaceholder{
  color:var(--faint);font-size:13px;padding:0 18px;line-height:1.7;
  display:flex;flex-direction:column;align-items:center;gap:10px;
}
.status{font-size:14px;min-height:22px;font-weight:500;color:var(--text)}
.status.ok{color:var(--ok)}
.status.err{color:var(--err)}
.status.warn{color:var(--warn)}
/* 扫码区状态：胶囊标签 */
#qrPane .status{
  display:inline-flex;align-items:center;justify-content:center;
  gap:6px;padding:5px 13px;border-radius:999px;
  font-size:13px;font-weight:500;color:var(--brand);
  background:var(--brand-soft);border:1px solid var(--brand-line);
  transition:background .2s,border-color .2s,color .2s;
}
#qrPane .status.ok{background:#e9f7f0;border-color:#c4e7d6;color:var(--ok)}
#qrPane .status.err{background:#fdeeee;border-color:#f3cdcf;color:var(--err)}
#qrPane .status.warn{background:#faf3e2;border-color:#ecdcbb;color:var(--warn)}
.status .dot{
  display:inline-block;width:7px;height:7px;border-radius:50%;
  background:currentColor;margin-right:7px;vertical-align:1px;
  animation:pulse 1.4s infinite;
}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}

.hint{color:var(--muted);font-size:12.8px;margin-top:10px;line-height:1.75}
.countdown{color:var(--faint);font-size:12px;margin-top:2px;font-variant-numeric:tabular-nums}

/* ===== 登录方式切换（分段控件） ===== */
.tabs{
  display:flex;justify-content:center;gap:4px;margin:-6px auto 22px;
  width:fit-content;padding:3px;border-radius:10px;
  background:var(--hover);border:1px solid var(--line);
}
.tabs .tab{
  background:transparent;color:var(--muted);min-height:31px;padding:5px 18px;
  border-radius:8px;font-size:13.5px;
}
.tabs .tab:hover{color:var(--text)}
.tabs .tab.active{background:#fff;color:var(--brand);font-weight:600;box-shadow:var(--shadow-sm)}

/* ===== 短信登录表单 ===== */
#smsPane{text-align:left;max-width:340px;margin:0 auto}
.field{margin-bottom:12px}
.field input{
  width:100%;height:42px;padding:0 13px;border:1px solid var(--line-strong);border-radius:8px;
  font:inherit;color:var(--text);background:#fff;outline:none;
  transition:border-color .15s,box-shadow .15s;
}
.field input::placeholder{color:var(--faint)}
.field input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(94,106,210,.14)}
.code-row{display:flex;gap:8px;align-items:center}
.code-row input{flex:1;min-width:0}
.code-row button{flex:none;min-height:42px;padding:0 14px;font-size:13px;white-space:nowrap}
#smsCaptchaRow{display:flex;gap:8px;align-items:center}
#smsCaptchaRow img{
  height:42px;border-radius:8px;border:1px solid var(--line-strong);cursor:pointer;
  background:#fff;flex:none;
}
#smsCaptchaRow input{flex:1;min-width:0}

/* ===== 通用提示条（图标 + 四色，浅色淡底） ===== */
.tip{
  display:none;align-items:flex-start;gap:8px;
  margin-top:12px;padding:10px 12px;border-radius:10px;
  font-size:12.8px;line-height:1.65;color:var(--muted);text-align:left;
  background:var(--hover);border:1px solid var(--line);
}
.tip.on{display:flex;animation:tip-in .2s ease-out}

/* 批量下载工具条：文件树下方、分享链接卡片上方（勾选即现） */
.pack-bar{
  display:flex;align-items:center;gap:12px;
  width:fit-content;margin:12px 2px 0 auto;
  padding:8px 10px 8px 16px;border-radius:12px;
  background:#fff;border:1px solid var(--line);
  box-shadow:var(--shadow);
  font-size:13px;color:var(--text);
  animation:packIn .18s ease-out;
}
.pack-bar.hidden{display:none}
@keyframes packIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.pack-bar #packInfo{color:var(--muted);font-size:12.5px}
.pack-chk{margin:0;cursor:pointer;width:15px;height:15px;accent-color:var(--brand)}
/* 行首勾选列（与图标同高，thead 留等宽占位保持对齐） */
.c-chk{width:18px;flex:none;display:flex;align-items:center;justify-content:center}
@media (max-width:640px){
  .pack-bar{width:auto;margin:12px 0 0;justify-content:space-between}
}
@keyframes tip-in{
  from{opacity:0;transform:translateY(-4px)}
  to{opacity:1;transform:none}
}
.tip .ico{
  flex:none;width:16px;height:16px;margin-top:1px;
  display:flex;align-items:center;justify-content:center;color:var(--brand);
}
.tip .ico svg{width:15px;height:15px;display:block}
.tip .ico.spin svg{animation:tip-spin .9s linear infinite}
@keyframes tip-spin{to{transform:rotate(360deg)}}
.tip .txt{flex:1;min-width:0;word-break:break-word}
.tip.info{background:var(--brand-soft);border-color:var(--brand-line);color:#4550a8}
.tip.err{background:#fdeeee;border-color:#f3cdcf;color:#a63842}
.tip.err .ico{color:var(--err)}
.tip.ok{background:#e9f7f0;border-color:#c4e7d6;color:#167853}
.tip.ok .ico{color:var(--ok)}
.tip.warn{background:#faf3e2;border-color:#ecdcbb;color:#8a6410}
.tip.warn .ico{color:var(--warn)}

/* 输入框错误态 */
.field input.bad{
  border-color:#eba6ab;background:#fffafa;
  box-shadow:0 0 0 3px rgba(214,69,80,.1);
  animation:field-shake .3s ease-in-out;
}
@keyframes field-shake{
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-5px)}
  45%{transform:translateX(4px)}
  70%{transform:translateX(-2px)}
  85%{transform:translateX(1px)}
}
#smsPane .btns{justify-content:stretch;margin-top:16px}
#smsPane .btns button{width:100%}

/* ===== 按钮（实色主按钮，无渐变无发光） ===== */
.btns{margin-top:18px;display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
button{
  font:inherit;font-weight:500;border:0;border-radius:8px;padding:9px 20px;
  cursor:pointer;transition:.15s;background:var(--brand);color:#fff;min-height:38px;
  box-shadow:var(--shadow-sm);
}
button:hover{background:var(--brand-dark)}
button:active{transform:scale(.98)}
button.ghost{background:#fff;color:var(--muted);border:1px solid var(--line-strong);box-shadow:none}
button.ghost:hover{background:var(--hover);color:var(--text)}
button:disabled{opacity:.5;cursor:default;transform:none}
button.sm{padding:5px 13px;min-height:32px;font-size:13px;flex:none;border-radius:7px}

/* ===== 文件区 ===== */
#filesCard{padding:16px 18px 8px}
/* 卡片用途说明：一眼区分上方「我的网盘」与下方「分享链接下载」 */
.list-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.list-head .lh-title{font-size:13.5px;font-weight:600;color:var(--text)}
.list-head .lh-sub{font-size:12px;color:var(--faint)}
/* ===== 分享下载卡片：独立于文件树，粘贴文案 → 解析出文件树 → 勾选下载 ===== */
#shareCard{padding:0}
.share-head{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:15px 18px;
}
/* 分享卡片的用途说明（卡片自身 padding 为 0，左右留白在这里给） */
#shareCard .list-head{padding:14px 18px 0;margin-bottom:0}
#shareCard .share-head{padding-top:10px}
/* 输入组：链接 + 提取码同框（一体式），focus 时整组高亮，不再是两个各管一段的灰块 */
.share-field{
  flex:1;min-width:0;display:flex;align-items:center;
  height:38px;padding:0 4px 0 11px;
  border:1px solid var(--line);border-radius:9px;background:#fff;
  transition:border-color .15s,box-shadow .15s;
}
.share-field:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px rgba(94,106,210,.12)}
.share-field .share-ico{flex:none;font-size:14px;opacity:.5;margin-right:8px}
.share-field input{
  flex:1;min-width:0;height:100%;padding:0;
  border:0;background:transparent;outline:none;
  font-size:13px;color:var(--text);
}
.share-field input::placeholder{color:var(--faint)}
.share-field .share-sep{flex:none;width:1px;height:18px;background:var(--line);margin:0 10px}
/* 提取码：固定窄列，居中，和链接框分开看不出「抢宽度」 */
.share-field input.pwd{flex:none;width:78px;text-align:center;letter-spacing:1px}
.share-field input.pwd::placeholder{letter-spacing:0}
/* 解析按钮与输入组同高，圆角一致 */
#shareBtn{height:38px;padding:0 20px;border-radius:9px;flex:none}
@media (max-width:640px){
  .share-head{gap:8px}
  .share-field{flex:1 1 100%}
  #shareBtn{flex:1;justify-content:center}
}
/* 解析结果提示条（总数/截断说明） */
.share-tip{
  margin:0 18px 10px;padding:8px 12px;
  font-size:12.5px;color:var(--muted);
  background:var(--hover,#f6f7fb);border:1px solid var(--line);
  border-radius:8px;word-break:break-all;
}
/* 分享文件树：与网盘文件树同一套 row/c-* 样式，限高滚动 */
#shareFiles{max-height:420px;overflow:auto}
/* 面包屑/列表与卡片左右内边距（share-head 的 18px）对齐，避免分享树比网盘树「宽出去」；
   列表不加四周外框（否则与行分隔线形成双线），与网盘树同款只有顶部一条线 */
#shareBody .crumb{margin:2px 18px 6px}
#shareBody .list{margin:0 18px}
/* 底部勾选工具条：卡片内吸底 */
.share-pack{
  position:sticky;bottom:0;
  display:flex;align-items:center;gap:10px;
  padding:10px 18px;
  border-top:1px solid var(--line);
  background:#fff;
  border-radius:0 0 14px 14px;
}
.share-pack span{flex:1;min-width:0;font-size:13px;color:var(--text)}
.user-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-bottom:12px;flex-wrap:wrap}
.crumb{font-size:13px;color:var(--muted);word-break:break-all;line-height:1.9}
.user-bar .crumb{flex:1;min-width:0}
.crumb a{color:var(--brand);text-decoration:none;cursor:pointer}
.crumb a:hover{color:var(--brand-dark);text-decoration:underline}
.crumb .sep{margin:0 5px;color:var(--faint)}

.list{border-top:1px solid var(--line)}
.thead,.row{
  display:flex;align-items:center;gap:10px;padding:0 12px;
}
.thead{
  height:38px;color:var(--faint);font-size:12px;
  border-bottom:1px solid var(--line);
}
.row{
  height:50px;border-bottom:1px solid #f0f1f5;transition:background .12s;font-size:13.5px;
}
.row:last-child{border-bottom:0}
.row:hover{background:var(--hover)}
.row.dir{cursor:pointer}   /* 目录行可点进入；文件行不可整行点下载（防误触），光标保持默认 */
.c-nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.c-sz{width:88px;flex:none;color:var(--faint);font-size:12.5px;text-align:right;
  font-variant-numeric:tabular-nums}
.c-tm{width:150px;flex:none;color:var(--faint);font-size:12.5px;text-align:right;
  font-variant-numeric:tabular-nums}
.c-act{width:88px;flex:none;text-align:center;white-space:nowrap}
.thead .c-act{text-align:center}
.dl-btn,.fast-btn{
  height:27px;padding:0 10px;border-radius:999px;flex:none;
  border:1px solid var(--brand-line);background:#fff;color:var(--brand);
  font-size:12px;cursor:pointer;transition:all .15s;box-shadow:none;
}
.fast-btn{margin-left:4px;border-color:#c4e7d6;color:var(--ok)}
.dl-btn:hover{background:var(--brand);border-color:var(--brand);color:#fff}
.fast-btn:hover{background:var(--ok);border-color:var(--ok);color:#fff}
.dl-btn:active,.fast-btn:active{transform:scale(.94)}
.fast-btn:disabled{opacity:.6;cursor:default}
/* 行内「下载」按钮（文件夹行 / 文件行统一一个） */
.col-btn,.dl-one{
  height:27px;padding:0 14px;border-radius:999px;flex:none;
  border:1px solid var(--brand-line);background:#fff;color:var(--brand);
  font-size:12px;cursor:pointer;transition:all .15s;
}
.col-btn:hover,.dl-one:hover{background:var(--brand);border-color:var(--brand);color:#fff}
.col-btn:active,.dl-one:active{transform:scale(.94)}
.col-btn:disabled,.dl-one:disabled{opacity:.6;cursor:default}

/* ── 下载遮罩层：解析直链 / 生成下载器进度 ── */
.dl-mask{
  position:fixed;inset:0;z-index:300;
  display:flex;align-items:center;justify-content:center;
  background:rgba(15,23,42,.42);backdrop-filter:blur(2px);
  animation:maskIn .15s ease-out;
}
.dl-mask.hidden{display:none}
@keyframes maskIn{from{opacity:0}to{opacity:1}}
.dl-mask-box{
  width:380px;max-width:calc(100vw - 48px);
  background:#fff;border-radius:16px;padding:28px 28px 24px;
  box-shadow:0 24px 64px rgba(15,23,42,.28);text-align:center;
}
.dl-mask-title{font-size:15px;font-weight:600;color:var(--text);margin-bottom:18px}
.dl-mask-bar{height:6px;border-radius:999px;background:#eef1f7;overflow:hidden}
.dl-mask-fill{
  height:100%;width:0;border-radius:999px;
  background:linear-gradient(90deg,var(--brand),#7c8bff);
  transition:width .18s ease-out;
}
/* 不确定阶段：流动条 */
.dl-mask.busy .dl-mask-fill{width:38%!important;animation:maskSlide 1.15s ease-in-out infinite}
@keyframes maskSlide{0%{transform:translateX(-110%)}100%{transform:translateX(300%)}}
.dl-mask-text{margin-top:12px;font-size:12px;color:var(--muted,#64748b);min-height:17px;word-break:break-all}
.dl-mask.err .dl-mask-title{color:var(--err)}
.dl-mask.err .dl-mask-fill{background:var(--err)}
.thead .c-nm{font-weight:400}
.thead .c-sz,.thead .c-tm{text-align:right}

.row .c-nm{color:var(--text)}
.row.dir .c-nm{color:var(--text);font-weight:500}

/* 类型图标：文件类型 SVG 图片 */
.ficon{
  width:30px;height:30px;flex:none;
  display:flex;align-items:center;justify-content:center;
}
.ficon svg{width:24px;height:24px;display:block}

.empty{padding:46px 20px;text-align:center;color:var(--faint);font-size:13.5px}
.empty.err{color:var(--err);padding:32px 20px;line-height:1.8}

/* ===== 多端自适应 ===== */
@media (max-width:640px){
  header{margin-bottom:14px;padding:0 14px}
  .wrap{padding:0 12px 44px}
  #loginCard{margin-top:12px}
  .who{max-width:34vw}
  .acc-name{max-width:26vw}
  .acc-id{display:none}
  .btns button{flex:1 1 auto}
  .c-tm{display:none}
  .thead .c-tm{display:none}
  .c-sz{width:70px}
  .row,.thead{padding:0 8px}
  .row{height:52px}
}
@media (max-width:380px){
  .c-sz{font-size:11.5px;width:62px}
  .ficon{width:24px;height:24px;font-size:11px}
}
