/* ============================================================
   外链网盘 · 前台样式（水彩画风）
   纸张底色 + 柔和晕染 + 流动感水彩元素
   ============================================================ */

:root {
  --paper: #f9f6f0;
  --ink: #33424e;
  --ink-2: #62727e;
  --ink-3: #94a2ab;
  --line: #e6dfd3;
  --card: #fffdf8;
  --brand: #4e8d8c;
  --brand-deep: #3d7271;
  --brand-2: #6fb3a8;
  --rose: #c97d7d;
  --apricot: #e0a878;
  --gold: #d4a373;
  --ok: #5f9e6e;
  --err: #c96a6a;
  --shadow: 0 14px 36px -16px rgba(80, 98, 105, .25);
  --radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

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

body {
  min-height: 100vh;
  color: var(--ink);
  font: 14px/1.7 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  background: var(--paper);
  background-image:
    radial-gradient(52% 42% at 6% 4%, rgba(133, 205, 202, .20), transparent 70%),
    radial-gradient(46% 40% at 95% 3%, rgba(232, 168, 124, .15), transparent 70%),
    radial-gradient(55% 46% at 94% 95%, rgba(195, 141, 148, .11), transparent 72%),
    radial-gradient(50% 42% at 3% 95%, rgba(78, 141, 140, .10), transparent 72%);
  background-attachment: fixed;
}

a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--ink-3); font-size: 13px; }

/* ---------------- 背景音乐按钮 ---------------- */
.bgm-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: var(--brand-deep);
  font-size: 19px;
  background: rgba(255, 253, 248, .9);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(228, 221, 208, .9);
  backdrop-filter: blur(6px);
  transition: transform .25s, box-shadow .25s;
}
.bgm-btn:hover { transform: translateY(-2px); }
.bgm-btn.playing {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 10px 26px -8px rgba(78, 141, 140, .65);
  animation: bgm-pulse 2.4s ease-in-out infinite;
}
@keyframes bgm-pulse {
  0%, 100% { box-shadow: 0 10px 26px -8px rgba(78, 141, 140, .65), 0 0 0 0 rgba(111, 179, 168, .45); }
  50% { box-shadow: 0 10px 26px -8px rgba(78, 141, 140, .65), 0 0 0 12px rgba(111, 179, 168, 0); }
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(78, 141, 140, .65);
}
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .55); }
.btn-sm { font-size: 12.5px; padding: 6px 14px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(249, 246, 240, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(133, 205, 202, .95), rgba(78, 141, 140, .75) 62%, transparent 74%),
    radial-gradient(circle at 68% 72%, rgba(232, 168, 124, .8), transparent 62%);
  box-shadow: 0 4px 12px -4px rgba(78, 141, 140, .55);
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.member-badge {
  font-size: 12px;
  padding: 4px 13px;
  border-radius: 999px;
  color: var(--ink-2);
  background: rgba(148, 162, 171, .16);
}
.member-badge.is-vip {
  color: #fff;
  background: linear-gradient(135deg, #e8a87c, var(--gold));
  box-shadow: 0 6px 14px -6px rgba(212, 163, 115, .7);
}

/* ---------------- 主容器 ---------------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}
.wrap-narrow { max-width: 720px; }
.footer {
  text-align: center;
  padding: 22px 16px 90px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 1px;
}

/* ---------------- 游客登录 / 注册页 ---------------- */
.hero-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  animation: drift 18s ease-in-out infinite alternate;
}
.hero-blobs span:nth-child(1) { width: 40vw; height: 40vw; left: -10vw; top: -8vw; background: rgba(133, 205, 202, .55); }
.hero-blobs span:nth-child(2) { width: 34vw; height: 34vw; right: -8vw; top: 18vh; background: rgba(232, 168, 124, .45); animation-delay: -6s; }
.hero-blobs span:nth-child(3) { width: 36vw; height: 36vw; left: 22vw; bottom: -12vw; background: rgba(195, 141, 148, .4); animation-delay: -12s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4vw, 3vw) scale(1.12); }
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 40px 24px 60px;
  max-width: 980px;
  margin: 0 auto;
}
.auth-hero { max-width: 380px; }
.auth-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(133, 205, 202, .95), rgba(78, 141, 140, .78) 60%, transparent 72%),
    radial-gradient(circle at 70% 74%, rgba(232, 168, 124, .85), transparent 60%);
  box-shadow: 0 10px 24px -8px rgba(78, 141, 140, .6);
  margin-bottom: 18px;
}
.auth-hero h1 { font-size: 27px; letter-spacing: 1px; margin-bottom: 10px; }
.auth-slogan { color: var(--ink-2); margin-bottom: 22px; }
.auth-points { list-style: none; }
.auth-points li {
  position: relative;
  padding: 7px 0 7px 26px;
  color: var(--ink-2);
  font-size: 13.5px;
}
.auth-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(133, 205, 202, .95), rgba(78, 141, 140, .8));
  box-shadow: 0 0 0 4px rgba(133, 205, 202, .18);
}

.auth-card { width: 100%; max-width: 360px; padding: 16px 18px 14px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.auth-tab {
  flex: 1;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 0;
  border: none;
  border-radius: 10px;
  background: rgba(148, 162, 171, .10);
  color: var(--ink-2);
  cursor: pointer;
  transition: all .2s;
}
.auth-tab.active {
  color: var(--brand-deep);
  background: linear-gradient(120deg, rgba(133, 205, 202, .28), rgba(78, 141, 140, .14));
  box-shadow: inset 0 0 0 1px rgba(78, 141, 140, .2);
}
.auth-form .btn { margin-top: 2px; }
.auth-note { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); text-align: center; }

/* ---------------- 表单字段 ---------------- */
.field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 0; }
input[type="text"], input[type="password"], input[type="email"], select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 12px;
  outline: none;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(78, 141, 140, .15);
}
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; margin-top: 8px; }
.chk input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.form-help { font-size: 12.5px; color: #a3b0c2; margin: 4px 0 2px; line-height: 1.6; }

.alert { padding: 11px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13px; }
.alert-err { background: rgba(201, 106, 106, .10); color: var(--err); box-shadow: inset 0 0 0 1px rgba(201, 106, 106, .25); }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.card-empty { text-align: center; color: var(--ink-2); padding: 34px 24px; }

/* 会员开通提示条 */
.vip-nudge {
  display: block;
  margin-bottom: 18px;
  padding: 12px 18px;
  border-radius: 14px;
  color: #8c5a4a;
  font-size: 13.5px;
  background: linear-gradient(120deg, rgba(232, 168, 124, .22), rgba(195, 141, 148, .16));
  box-shadow: inset 0 0 0 1px rgba(224, 168, 120, .35), var(--shadow);
  text-decoration: none;
  transition: transform .2s;
}
.vip-nudge:hover { transform: translateY(-1px); text-decoration: none; }

/* ---------------- 上传区 ---------------- */
.upload-tips { font-size: 12.5px; color: var(--ink-3); margin: -6px 0 16px; }
.upload-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: stretch; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 170px;
  border: 2px dashed rgba(78, 141, 140, .4);
  border-radius: 16px;
  background:
    radial-gradient(46% 46% at 30% 26%, rgba(133, 205, 202, .16), transparent 70%),
    radial-gradient(40% 40% at 76% 80%, rgba(232, 168, 124, .14), transparent 70%),
    rgba(255, 255, 255, .5);
  cursor: pointer;
  text-align: center;
  padding: 18px;
  transition: border-color .2s, background .2s, transform .2s;
}
.dropzone:hover { border-color: var(--brand); transform: translateY(-2px); }
.dz-icon { font-size: 30px; color: var(--brand); line-height: 1; }
.dz-text { font-weight: 600; color: var(--ink-2); }
.dz-name {
  font-size: 12.5px;
  color: var(--ink-3);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}

.upload-opts .btn { width: 100%; }

.progress-wrap { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.progress { flex: 1; height: 10px; border-radius: 999px; background: rgba(148, 162, 171, .16); overflow: hidden; }
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  box-shadow: 0 0 10px rgba(111, 179, 168, .7);
  transition: width .25s ease;
}
.progress-text { font-size: 12.5px; color: var(--brand-deep); font-variant-numeric: tabular-nums; min-width: 38px; }

.up-result { margin-top: 16px; }
.up-ok { font-size: 13.5px; color: var(--ok); margin-bottom: 10px; }
.up-link-row { display: flex; gap: 10px; }
.up-link-row input { flex: 1; min-width: 0; font-size: 13px; color: var(--brand-deep); }
.up-link-row .btn { flex-shrink: 0; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: 8px; margin: 4px 0 16px; overflow-x: auto; }
.tab {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line), 0 4px 12px -8px rgba(80, 98, 105, .3);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 8px 18px -8px rgba(78, 141, 140, .7);
}

/* ---------------- 文件表格 ---------------- */
.file-panel { padding: 6px 6px 2px; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.file-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; }
.file-table th, .file-table td { text-align: left; padding: 11px 12px; white-space: nowrap; border-bottom: 1px solid rgba(230, 223, 211, .7); }
.file-table th { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: 1px; }
.file-table tbody tr:hover { background: rgba(133, 205, 202, .06); }
.file-table .empty-row td { text-align: center; color: var(--ink-3); padding: 30px 0; }
.cell-name { max-width: 300px; }
.ext-badge {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-deep);
  background: rgba(133, 205, 202, .18);
  border-radius: 7px;
  padding: 2px 6px;
  margin-right: 8px;
}
.fname { font-weight: 500; }
.cell-date, .cell-size, .cell-dl { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cell-owner { color: var(--ink-2); }
.th-ops, .cell-ops { text-align: right; }
.cell-ops { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }

.op {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.op:hover { border-color: var(--brand); color: var(--brand-deep); background: rgba(78, 141, 140, .06); }
.op-del:hover { border-color: var(--err); color: var(--err); background: rgba(201, 106, 106, .06); }
.op-replace:hover { border-color: #4a6fa5; color: #4a6fa5; background: rgba(74, 111, 165, .06); }

.tag { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px; margin-right: 4px; }
.tag-lock { background: rgba(232, 168, 124, .16); color: #9a6f3f; }
.tag-public { background: rgba(78, 141, 140, .12); color: var(--brand-deep); }

/* ---------------- 弹层 ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(51, 66, 78, .35);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-mask.show { display: flex; }
.modal-mask[hidden] { display: none; }
.modal {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 26px 60px -22px rgba(51, 66, 78, .45);
  padding: 26px 24px;
  max-height: 88vh;
  overflow-y: auto;
}
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; }
.modal-ops { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ---------------- 会员中心 ---------------- */
.vip-status {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
}
.vip-status.is-vip {
  background:
    radial-gradient(60% 120% at 88% 10%, rgba(232, 168, 124, .25), transparent 70%),
    linear-gradient(150deg, rgba(255, 253, 248, .96), rgba(232, 168, 124, .12));
}
.vip-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 8px 18px -8px rgba(78, 141, 140, .7);
}
.vip-status.is-vip .vip-avatar { background: linear-gradient(135deg, #e8a87c, var(--gold)); box-shadow: 0 8px 18px -8px rgba(212, 163, 115, .8); }
.vip-info { min-width: 0; }
.vip-identity { font-size: 17px; font-weight: 700; }
.vip-expire { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.vip-ribbon {
  position: absolute;
  right: -30px;
  top: 16px;
  transform: rotate(35deg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(135deg, #e8a87c, var(--gold));
  padding: 4px 40px;
}

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, .6);
  cursor: pointer;
  text-align: center;
  transition: all .2s;
}
.plan-card:hover { border-color: rgba(78, 141, 140, .5); transform: translateY(-2px); }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card.active {
  border-color: var(--brand);
  background: linear-gradient(150deg, rgba(133, 205, 202, .16), rgba(78, 141, 140, .06));
  box-shadow: 0 10px 24px -12px rgba(78, 141, 140, .55);
}
.plan-name { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.plan-card.active .plan-name { color: var(--brand-deep); }
.plan-price { font-size: 24px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan-price em { font-style: normal; font-size: 14px; margin-right: 2px; }
.plan-card.active .plan-price { color: var(--brand-deep); }
.plan-days { font-size: 12px; color: var(--ink-3); }

.pay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
.pay-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, .6);
  cursor: pointer;
  transition: all .2s;
}
.pay-card:hover { border-color: rgba(78, 141, 140, .5); }
.pay-card input { position: absolute; opacity: 0; pointer-events: none; }
.pay-card.active {
  border-color: var(--brand);
  background: linear-gradient(150deg, rgba(133, 205, 202, .16), rgba(78, 141, 140, .06));
  box-shadow: 0 10px 24px -12px rgba(78, 141, 140, .55);
}
.pay-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.pay-alipay { background: linear-gradient(135deg, #6fb3a8, #1677a3); box-shadow: 0 6px 14px -6px rgba(22, 119, 163, .6); }
.pay-epay { background: linear-gradient(135deg, #e8a87c, #d4803f); box-shadow: 0 6px 14px -6px rgba(212, 128, 63, .6); }
.pay-name { font-size: 14px; font-weight: 600; display: block; }
.pay-sub { font-size: 11.5px; color: var(--ink-3); display: block; margin-top: 2px; }
.buy-note { margin-top: 14px; font-size: 12px; color: var(--ink-3); text-align: center; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  color: #fff;
  background: rgba(51, 66, 78, .88);
  box-shadow: 0 10px 26px -10px rgba(51, 66, 78, .5);
  animation: toast-in .25s ease;
}
.toast-ok { background: rgba(78, 141, 140, .94); }
.toast-err { background: rgba(180, 90, 90, .94); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .auth-wrap { flex-direction: column; gap: 22px; padding: 24px 18px 40px; text-align: center; }
  .auth-hero .auth-logo { margin: 0 auto 12px; }
  .auth-hero h1 { font-size: 24px; margin-bottom: 8px; }
  .auth-slogan { margin-bottom: 16px; }
  .auth-points { text-align: left; }
  .auth-points li { padding: 5px 0 5px 26px; }
  .upload-grid { grid-template-columns: 1fr; }
  .dropzone { min-height: 140px; }
  .plan-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .plan-card { padding: 12px 6px; }
  .plan-price { font-size: 20px; }
}

@media (max-width: 560px) {
  .wrap { padding: 18px 12px 48px; }
  .topbar-inner { padding: 10px 12px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 26px; height: 26px; }
  .card { padding: 18px 14px; border-radius: 16px; }
  .file-table { font-size: 12.5px; }
  .cell-name { max-width: 180px; }
  .op { padding: 4px 9px; font-size: 11.5px; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-card { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; padding: 13px 16px; }
  .plan-price { font-size: 19px; }
  .pay-grid { grid-template-columns: 1fr; }
  .up-link-row { flex-direction: column; }
  .up-link-row .btn { width: 100%; }
  .bgm-btn { right: 12px; bottom: 12px; width: 42px; height: 42px; }
  .vip-status { padding: 18px 16px; }
  .vip-ribbon { right: -34px; }
}


/* ============================================================
   v2 修复与增强：弹窗开关 / 类型折叠 / 验证码 / 在线预览
   ============================================================ */
.modal { position: relative; }
.modal-close {
  position: absolute;
  right: 14px;
  top: 13px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(148, 162, 171, .12);
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s;
}
.modal-close:hover { background: rgba(201, 106, 106, .12); color: var(--err); }

/* ---------------- 上传类型折叠 ---------------- */
.upload-types { margin: 0 0 16px; }
.types-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-deep);
  background: rgba(133, 205, 202, .12);
  border: 1px solid rgba(78, 141, 140, .22);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all .2s;
}
.types-toggle:hover { background: rgba(133, 205, 202, .22); }
.types-toggle .arrow { transition: transform .2s; }
.types-toggle.open .arrow { transform: rotate(180deg); }
.types-body { padding: 10px 2px 2px; }
.ext-chip {
  display: inline-block;
  font-size: 11.5px;
  color: var(--ink-2);
  background: rgba(148, 162, 171, .10);
  box-shadow: inset 0 0 0 1px rgba(228, 221, 208, .9);
  border-radius: 7px;
  padding: 2px 8px;
  margin: 0 6px 6px 0;
}

/* ---------------- 邮箱验证码行 ---------------- */
.code-row { display: flex; align-items: stretch; gap: 10px; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { flex-shrink: 0; white-space: nowrap; align-self: stretch; }
.code-row .btn:disabled { opacity: .6; }
.auth-links { text-align: center; margin-top: 12px; font-size: 12.5px; }

/* ---------------- 在线预览弹窗 ---------------- */
.modal-preview { max-width: 880px; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  font-size: 15px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-head .modal-close { position: static; margin-left: auto; flex-shrink: 0; }
.modal-head .pv-meta { font-size: 11.5px; color: var(--ink-3); flex-shrink: 0; }
.preview-body {
  min-height: 180px;
  max-height: 66vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(51, 66, 78, .04);
}
.preview-body img { max-width: 100%; max-height: 62vh; border-radius: 10px; box-shadow: var(--shadow); }
.preview-body video { max-width: 100%; max-height: 62vh; border-radius: 10px; background: #000; }
.preview-body audio { width: 100%; }
.preview-body iframe { width: 100%; height: 62vh; border: none; border-radius: 10px; background: #fff; }
.preview-text {
  width: 100%;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
  font: 12.5px/1.7 "SFMono-Regular", Consolas, Menlo, monospace;
  color: var(--ink);
  max-height: 62vh;
  overflow: auto;
}
.preview-fallback { text-align: center; color: var(--ink-2); font-size: 13.5px; padding: 26px 10px; }
.preview-loading { color: var(--ink-3); font-size: 13px; }
.modal-foot { padding: 13px 20px 17px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------------- 微信 / QQ 支付图标 ---------------- */
.pay-wxpay { background: linear-gradient(135deg, #7ed99a, #2eae63); box-shadow: 0 6px 14px -6px rgba(46, 174, 99, .6); }
.pay-qqpay { background: linear-gradient(135deg, #7eb8e8, #2f8fd6); box-shadow: 0 6px 14px -6px rgba(47, 143, 214, .6); }

@media (max-width: 560px) {
  .modal-preview { max-width: 100%; }
  .preview-body { padding: 10px; max-height: 58vh; }
  .preview-body img, .preview-body video, .preview-body iframe { max-height: 52vh; }
  .code-row { flex-direction: column; }
}


/* ============================================================
   v3 新增：会员徽章按钮化 / 会员信息弹层 / 手动复制兜底弹层
   ============================================================ */
button.member-badge {
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}
button.member-badge:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(80, 98, 105, .45); }
button.member-badge:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.modal-sm { max-width: 400px; }
.member-info { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.mi-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; background: rgba(78, 141, 140, .06); border-radius: 12px; font-size: 13.5px; }
.mi-row span { color: var(--ink-3); }
.mi-row b { color: var(--ink); font-weight: 600; }
.mi-row b.is-vip { color: var(--gold); }
.copy-tip { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; margin-bottom: 12px; }
#copy-text { width: 100%; font-size: 13px; color: var(--brand-deep); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .85); word-break: break-all; }

/* ===================== v4：登录页 API 文档按钮 + 站点公告弹窗 ===================== */
.auth-doc-btn{display:flex;align-items:center;justify-content:center;height:40px;margin:14px 0 2px;border:1px dashed #a8c3dd;border-radius:10px;color:#4a6fa5;font-size:14px;font-weight:600;text-decoration:none;transition:background .18s,border-color .18s}
.auth-doc-btn:hover{background:rgba(74,111,165,.08);border-color:#4a6fa5}
.notice-body{max-height:56vh;overflow-y:auto;padding:0 2px}
.notice-pic{margin-bottom:14px;text-align:center}
.notice-pic img{max-width:100%;max-height:300px;border-radius:12px;display:inline-block}
.notice-text{font-size:14.5px;line-height:1.95;word-break:break-word}
.notice-ops{display:flex;gap:10px}
.notice-ops .btn{flex:1}

/* ========== 我的订单（会员中心） ========== */
.orders-entry { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.orders-body { max-height: 60vh; overflow-y: auto; padding: 4px 0; }
.orders-empty { font-size: 13px; color: var(--ink-3); text-align: center; padding: 28px 0; }
.orders-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.orders-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 12.5px; }
.orders-table th { text-align: left; white-space: nowrap; padding: 8px 10px; color: var(--ink-2); font-weight: 600; border-bottom: 1px solid rgba(74, 111, 165, .16); background: rgba(133, 205, 202, .1); }
.orders-table td { white-space: nowrap; padding: 8px 10px; border-bottom: 1px solid rgba(74, 111, 165, .1); color: #33465e; }
.orders-table tr:last-child td { border-bottom: none; }
.order-status { font-weight: 600; }
.order-status.paid { color: #2f8f6b; }
.order-status.unpaid { color: var(--err); }

/* ========== 存储空间进度条 ========== */
.space-bar { margin: 12px 0 8px; }
.space-bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.space-bar-head b { color: var(--ink); font-weight: 600; text-align: right; }
.space-bar-track { height: 8px; border-radius: 999px; background: rgba(74, 111, 165, .12); overflow: hidden; }
.space-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); transition: width .4s ease; }
.space-bar-fill.hot { background: linear-gradient(90deg, #e8a87c, var(--err)); }
