:root {
  --page-bg: #f5f6f7;
  --card-bg: #ffffff;
  --soft-bg: #f7f9fc;
  --banner-bg: #f7f7f8;
  --border: #e3e5ec;
  --text: #21293a;
  --muted: #9095a2;
  --blue: #3370ff;
  --green: #20b875;
  --red: #fb4f4f;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 1100px;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  font-family: inherit;
}

.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e5e6eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 500;
  color: #232324;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fc1e1e;
  flex: 0 0 30px;
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 2px;
  transform: skew(-13deg);
}

.brand-mark::before {
  width: 5px;
  height: 16px;
  left: 8px;
  top: 7px;
  box-shadow: 7px 0 0 #fff;
}

.brand-mark::after {
  width: 17px;
  height: 3px;
  left: 6px;
  top: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #394051;
}

.top-link:hover,
.text-link:hover {
  color: var(--blue);
}

.login-btn {
  min-width: 72px;
  height: 34px;
  padding: 0 18px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  color: var(--blue);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-btn:hover,
.btn-outline:hover {
  background: #f2f6ff;
}

.page-main {
  padding: 24px 0 44px;
}

.download-card {
  width: 1000px;
  min-height: 598px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 800px 200px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.left-panel {
  padding: 24px 20px 22px;
}

.user-row {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-block {
  display: flex;
  align-items: center;
  min-width: 0;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 40px;
  background: #d9dde5;
}

.user-copy {
  margin-left: 12px;
  min-width: 0;
}

.user-name {
  max-width: 470px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #394051;
  font-size: 14px;
  line-height: 22px;
}

.user-phone {
  margin-top: 1px;
  color: #585e6d;
  font-size: 13px;
  line-height: 20px;
}

.user-tools {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  white-space: nowrap;
}

.tool-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tool-icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tool-icon svg {
  display: block;
  width: 15px;
  height: 15px;
}

.member-banner {
  height: 38px;
  margin-top: 13px;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--banner-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #394051;
  font-size: 13px;
}

.member-copy {
  display: flex;
  align-items: center;
  min-width: 0;
}

.member-badge {
  flex: 0 0 auto;
  height: 20px;
  padding: 0 8px;
  margin-right: 8px;
  border-radius: 10px;
  background: linear-gradient(90deg, #ff674e, #fb4f4f);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
}

.member-link {
  color: var(--blue);
  white-space: nowrap;
}

.file-box {
  height: 421px;
  margin-top: 20px;
  padding: 0 0 24px;
  border-radius: 4px;
  background: var(--soft-bg);
  overflow: hidden;
}

.file-box-title {
  height: 39px;
  padding: 10px 4px 0;
  color: var(--blue);
  font-size: 13px;
  line-height: 22px;
}

.file-center {
  text-align: center;
  padding-top: 27px;
}

.file-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 8px;
  background: linear-gradient(160deg, #f26342, #ee4d2d);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.file-name {
  width: 680px;
  margin: 24px auto 0;
  color: #21293a;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  margin-top: 3px;
  color: #6b7280;
  font-size: 13px;
  line-height: 20px;
}

.progress-wrap {
  width: 600px;
  margin: 21px auto 0;
}

.progress-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 4px;
  background: #e6e9ee;
}

.progress-value {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: var(--green);
}

.progress-info {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #68707f;
  font-size: 13px;
  line-height: 20px;
}

.complete {
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.complete-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
}

.download-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.btn {
  height: 34px;
  padding: 0 17px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-outline {
  color: var(--blue);
  background: #fff;
  border-color: var(--blue);
}

.btn-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.btn-primary:hover {
  background: #245fe9;
  border-color: #245fe9;
}

.survey {
  margin-top: 15px;
  text-align: center;
  color: #737b88;
  font-size: 13px;
}

.survey a {
  margin-left: 4px;
  color: var(--blue);
}

.right-panel {
  border-left: 1px solid #eceef2;
  padding-top: 123px;
  display: flex;
  justify-content: center;
}

.app-card {
  width: 152px;
  text-align: center;
}

.qr-frame {
  width: 128px;
  height: 128px;
  padding: 8px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.qr-frame img {
  width: 110px;
  height: 110px;
  display: block;
  image-rendering: auto;
}

.app-title {
  margin-top: 12px;
  color: #394051;
  font-size: 14px;
  line-height: 22px;
}

.app-desc {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}

.privileges {
  margin-top: 19px;
  text-align: left;
}

.privilege {
  height: 50px;
  display: flex;
  align-items: center;
  border-top: 1px dashed #e7e9ee;
  color: #6f7683;
  font-size: 13px;
}

.privilege:first-child {
  border-top: 0;
}

.privilege-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 50%;
  color: var(--red);
  background: rgba(251, 79, 79, 0.07);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: 0 0 24px;
}

@media (max-width: 1120px) {
  html,
  body {
    min-width: 760px;
  }

  .download-card {
    width: calc(100% - 32px);
    grid-template-columns: minmax(0, 1fr) 200px;
  }

  .file-name,
  .progress-wrap {
    width: calc(100% - 80px);
  }
}

@media (max-width: 820px) {
  html,
  body {
    min-width: 0;
  }

  .topbar {
    padding: 0 12px;
  }

  .brand {
    font-size: 17px;
  }

  .top-link {
    display: none;
  }

  .page-main {
    padding-top: 12px;
  }

  .download-card {
    width: calc(100% - 20px);
    display: block;
  }

  .left-panel {
    padding: 16px 12px 20px;
  }

  .right-panel {
    display: none;
  }

  .user-tools {
    gap: 10px;
  }

  .user-tools .tool-item:first-child {
    display: none;
  }

  .member-banner {
    padding: 0 10px;
  }

  .member-banner .member-copy > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .file-name,
  .progress-wrap {
    width: calc(100% - 24px);
  }
}

/* ---------- 下载进度交互（download.js） ---------- */
[hidden] {
  display: none !important;
}

.btn-download {
  min-width: 108px;
}

.progress-value {
  width: 0;
  transition: width 0.15s linear;
}

.progress-track.is-indeterminate .progress-value {
  width: 32%;
  animation: progress-indeterminate 1.2s ease-in-out infinite;
}

@keyframes progress-indeterminate {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(330%);
  }
}

.download-error {
  margin-top: 8px;
  color: #f04b4b;
  font-size: 13px;
  line-height: 20px;
  text-align: left;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}


/* ---------- 双下载按钮样式（仿网易超大附件下载） ---------- */
.dual-download-actions {
  margin-top: 26px;
  gap: 14px;
}

.speed-btn {
  min-width: 104px;
  height: 36px;
  padding: 0 26px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 34px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 1px solid transparent;
  background: #fff;
  transition: all 0.15s ease;
}

.speed-btn-normal {
  color: #4b4f57;
  background: #ffffff;
  border-color: #7f8794;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}

.speed-btn-normal:hover {
  background: #f7f8fa;
}

.speed-btn-fast {
  color: #ffffff;
  background: linear-gradient(180deg, #4f8bf7 0%, #3575ef 100%);
  border-color: #3575ef;
  box-shadow: 0 1px 0 rgba(255,255,255,0.24) inset;
}

.speed-btn-fast:hover {
  background: linear-gradient(180deg, #5a93f8 0%, #2f6ce6 100%);
  border-color: #2f6ce6;
}

.speed-btn:focus-visible {
  outline: 2px solid rgba(51, 112, 255, 0.22);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .dual-download-actions {
    gap: 10px;
    flex-wrap: wrap;
  }

  .speed-btn {
    min-width: 96px;
    padding: 0 20px;
  }
}
