/* ========== 变量 ========== */
:root {
  --primary: #4F8EF7;
  --primary-dark: #3A6FD8;
  --primary-light: #E8F0FE;
  --success: #34C759;
  --success-light: #E8F9ED;
  --warning: #FF9500;
  --warning-light: #FFF4E5;
  --danger: #FF3B30;
  --danger-light: #FFEBEA;
  --text: #1D1D1F;
  --text2: #6E6E73;
  --text3: #AEAEB2;
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --border: #E5E5EA;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 重置 ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ========== 容器 ========== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 导航栏 ========== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0 -20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #4F8EF7, #6C5CE7);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg { width: 22px; height: 22px; }

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  color: var(--text2);
  font-weight: 500;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.user-greeting {
  font-size: 14px;
  color: var(--text2);
  font-weight: 500;
}

/* ========== 主内容 ========== */
.main-content { padding: 36px 0; }

/* ========== Hero ========== */
.hero-section {
  text-align: center;
  padding: 48px 0 36px;
}

.title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #1D1D1F, #4F8EF7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.subtitle {
  font-size: 16px;
  color: var(--text3);
  margin-bottom: 32px;
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== 按钮 ========== */
.btn {
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

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

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #E0342B; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ========== 上传区 ========== */
.upload-box {
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 24px;
  text-align: center;
}

.upload-box:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.upload-box.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  border-style: solid;
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(79,142,247,0.15);
}

.upload-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #E8F0FE, #F0E6FF);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.upload-box:hover .upload-icon-wrap { transform: scale(1.08) rotate(-3deg); }
.upload-icon-wrap svg { width: 32px; height: 32px; }

.upload-text { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.upload-hint { font-size: 13px; color: var(--text3); }

/* ========== 上传选项 ========== */
.upload-options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  flex: 1;
  min-width: 140px;
}

.option-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
}

.option-group input,
.option-group select {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  transition: var(--transition);
  width: 100%;
  background: var(--card);
  color: var(--text);
}

.option-group input:focus,
.option-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,142,247,0.12);
}

/* ========== 存储空间条 ========== */
.storage-bar-wrap {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.storage-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
}

.storage-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #6C5CE7);
  width: 0%;
  transition: width 0.5s;
  border-radius: 4px;
}

/* ========== 进度条 ========== */
.progress-section { margin-bottom: 24px; text-align: center; }

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #6C5CE7);
  width: 0%;
  transition: width 0.3s;
  border-radius: 3px;
}

.progress-text { font-size: 13px; color: var(--text2); }

/* ========== 结果区域 ========== */
.result-section { margin-bottom: 28px; text-align: center; }
.result-section h2 { color: var(--success); margin-bottom: 20px; font-size: 20px; }

.file-results { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.file-result-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: left;
}

.file-result-item .file-name {
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  word-break: break-all;
}

.file-result-item .file-name svg { width: 18px; height: 18px; flex-shrink: 0; }
.file-result-item .file-links { display: flex; flex-direction: column; gap: 8px; }

.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-label {
  font-size: 12px;
  color: var(--text3);
  min-width: 56px;
  flex-shrink: 0;
}

.link-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  padding: 7px 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.copy-btn:hover { background: var(--primary-dark); }
.copy-btn.copied { background: var(--success); }

/* ========== 功能卡片 ========== */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.feature-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg { width: 26px; height: 26px; }
.feature-icon.blue { background: var(--primary-light); color: var(--primary); }
.feature-icon.green { background: var(--success-light); color: var(--success); }
.feature-icon.orange { background: var(--warning-light); color: var(--warning); }
.feature-icon.red { background: var(--danger-light); color: var(--danger); }

.feature-item h3 { font-size: 15px; margin-bottom: 4px; }
.feature-item p { font-size: 13px; color: var(--text3); }

/* ========== 分享页 ========== */
.share-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 460px;
  margin: 0 auto 24px;
}

.share-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, #E8F0FE, #F0E6FF);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.file-name { font-size: 18px; font-weight: 700; margin-bottom: 20px; word-break: break-all; }

.file-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: 13px; font-weight: 600; }

.uploader-info {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text3);
}

.uploader-info span { color: var(--text); font-weight: 500; }

.password-section { margin-bottom: 24px; }
.password-hint { color: var(--warning); margin-bottom: 12px; font-size: 14px; font-weight: 500; }

.password-input-group {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.password-input-group input {
  flex: 1;
  max-width: 200px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}

.password-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,142,247,0.12);
}

.download-section { margin-bottom: 14px; }

.btn-download {
  background: linear-gradient(135deg, var(--primary), #6C5CE7);
  color: white;
  padding: 14px 40px;
  font-size: 16px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(79,142,247,0.35);
}

.btn-download:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(79,142,247,0.45); }
.download-hint { font-size: 12px; color: var(--text3); margin-top: 8px; }

.error-section { padding: 36px; }

.error-icon-wrap {
  width: 68px; height: 68px; margin: 0 auto 14px;
  background: var(--danger-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.error-icon-wrap svg { width: 34px; height: 34px; color: var(--danger); }
.error-message { font-size: 16px; color: var(--danger); }

.copy-section { max-width: 460px; margin: 0 auto; text-align: center; }
.copy-section p { margin-bottom: 10px; color: var(--text2); font-size: 14px; }

.copy-input-group { display: flex; gap: 8px; }
.copy-input-group input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 13px; background: var(--card); min-width: 0;
}

/* ========== 管理后台 ========== */
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 24px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

#userView .stats-grid {
  grid-template-columns: repeat(2, 1fr);
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.purple { background: #F0E6FF; color: #6C5CE7; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.stat-label { font-size: 12px; color: var(--text3); }

/* ========== 操作栏 ========== */
.action-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--card);
}

.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,142,247,0.12); }

/* ========== 文件表格 ========== */
.file-list-container {
  background: var(--card);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.file-table { width: 100%; border-collapse: collapse; min-width: 700px; }

.file-table th,
.file-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.file-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-table tbody tr:hover { background: var(--bg); }
.file-table tbody tr:last-child td { border-bottom: none; }

.empty-state { text-align: center; padding: 44px 12px !important; color: var(--text3); white-space: normal !important; }

.file-name-cell {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.code-badge {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12px;
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text2);
}

.action-buttons { display: flex; gap: 5px; }

.action-btn {
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.action-btn.copy { background: var(--primary-light); color: var(--primary); }
.action-btn.copy:hover { background: var(--primary); color: white; }
.action-btn.delete { background: var(--danger-light); color: var(--danger); }
.action-btn.delete:hover { background: var(--danger); color: white; }

/* ========== 设置区 ========== */
.settings-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.settings-section h2 { margin-bottom: 18px; font-size: 17px; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.setting-item { display: flex; flex-direction: column; gap: 5px; }
.setting-item label { font-size: 13px; font-weight: 500; color: var(--text2); }

.setting-item input {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  width: 100%;
}

.setting-item input:focus { outline: none; border-color: var(--primary); }

/* ========== 弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--text3);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-card h2 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.modal-card > p[style*="text-align:center"] { margin-bottom: 18px; }

.form-group { margin-bottom: 12px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 4px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,142,247,0.12);
}

.login-error {
  background: var(--danger-light);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

.login-error.show { display: block; }

/* ========== 管理员登录覆盖层 ========== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.login-card h2 {
  text-align: center;
}

/* ========== 上传 / 下载进度面板 ========== */
.progress-panel, .pp {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: rgba(13, 17, 45, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(79, 142, 247, 0.25);
  border-radius: 16px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  z-index: 3000;
  overflow: hidden;
  animation: ppIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes ppIn {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: linear-gradient(90deg, rgba(79, 142, 247, 0.2), rgba(108, 92, 231, 0.12));
  border-bottom: 1px solid rgba(79, 142, 247, 0.18);
}

.pp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success, #34C759);
  box-shadow: 0 0 8px var(--success, #34C759);
  animation: ppBlink 1.1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes ppBlink { 50% { opacity: 0.25; } }

.pp-title { font-size: 13px; font-weight: 700; color: #fff; }

.pp-count {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-family: "SF Mono", Consolas, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
}

.pp-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  border-radius: 7px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  transition: var(--transition, all 0.25s);
  flex-shrink: 0;
}

.pp-btn:hover { background: rgba(79, 142, 247, 0.35); color: #fff; }

.pp-body {
  max-height: 272px;
  min-height: 40px;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.pp-body::-webkit-scrollbar { width: 6px; }
.pp-body::-webkit-scrollbar-track { background: transparent; }
.pp-body::-webkit-scrollbar-thumb { background: rgba(79, 142, 247, 0.35); border-radius: 3px; }

.pp-item { animation: ppItemIn 0.25s ease; }
@keyframes ppItemIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.pp-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.pp-name {
  font-size: 12.5px;
  color: #e9ecf7;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s;
}

.pp-status.run { color: #4F8EF7; }
.pp-status.ok { color: #34C759; font-weight: 600; }
.pp-status.err { color: #FF3B30; font-weight: 600; }

.pp-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.pp-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4F8EF7, #6C5CE7);
  border-radius: 3px;
  transition: width 0.25s ease;
}

.pp-download .pp-bar i { background: linear-gradient(90deg, #34C759, #00D2FF); }

.pp-item-bot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 5px;
  font-family: "SF Mono", Consolas, monospace;
}

.pp-foot {
  padding: 10px 14px;
  border-top: 1px solid rgba(79, 142, 247, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.pp-foot-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.pp-bar-total { flex: 1; height: 8px; border-radius: 4px; }
.pp-bar-total i { border-radius: 4px; }
.pp-download .pp-bar-total i { background: linear-gradient(90deg, #34C759, #00D2FF); }

.pp-total {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  min-width: 38px;
  text-align: right;
  font-family: "SF Mono", Consolas, monospace;
}

.pp-collapsed .pp-body,
.pp-collapsed .pp-foot { display: none; }

.pp-all-done .pp-dot { background: #34C759; box-shadow: 0 0 8px #34C759; animation: none; }

/* ========== 底部 ========== */
.footer {
  text-align: center;
  padding: 24px 0;
  color: var(--text3);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.tab-btn.active { pointer-events: none; }

/* ========== 文件夹管理 ========== */
.file-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  flex-wrap: wrap;
}

.crumb-link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}

.crumb-link:hover { background: var(--primary-light); text-decoration: none; }

.crumb-sep { color: var(--text3); margin: 0 2px; }
.crumb-current { color: var(--text); font-weight: 600; padding: 4px 8px; }

.folder-toolbar { display: flex; gap: 8px; }

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.folder-item {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.folder-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.folder-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FFF8E1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.folder-icon svg { width: 24px; height: 24px; color: var(--warning); }
.folder-item:hover .folder-icon { background: var(--warning-light); transform: scale(1.08); }

.folder-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.folder-count {
  font-size: 11px;
  color: var(--text3);
}

/* 右键菜单 */
.context-menu {
  position: fixed;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 2000;
  min-width: 140px;
}

.ctx-item {
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}

.ctx-item:hover { background: var(--bg); }
.ctx-danger:hover { background: var(--danger-light); color: var(--danger); }

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
  text-align: center;
}

.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

@keyframes toastIn {
  from { transform: translateX(-50%) translateY(20px) scale(0.95); opacity: 0; }
  to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

/* ============================================================
   响应式 - 平板 (<= 768px)
   ============================================================ */
@media (max-width: 768px) {
  .pp { width: calc(100vw - 24px); right: 12px; bottom: 12px; }
  .pp-body { max-height: 200px; }
  html { font-size: 15px; }

  .container { padding: 0 16px; }

  .navbar {
    padding: 12px 16px;
    margin: 0 -16px;
  }

  .nav-links { gap: 6px; }
  .nav-links a { padding: 6px 10px; font-size: 13px; }

  .hero-section { padding: 32px 0 24px; }
  .title { font-size: 28px; }
  .subtitle { font-size: 14px; margin-bottom: 24px; }

  .btn-lg { padding: 12px 24px; font-size: 15px; }

  .upload-box { padding: 36px 20px; border-radius: var(--radius); }
  .upload-icon-wrap { width: 56px; height: 56px; border-radius: 16px; }
  .upload-icon-wrap svg { width: 28px; height: 28px; }

  .upload-options { gap: 10px; }
  .option-group { min-width: 120px; }

  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 36px;
  }

  .feature-item { padding: 20px 12px; }
  .feature-item h3 { font-size: 14px; }
  .feature-item p { font-size: 12px; }

  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; border-radius: 10px; }
  .stat-icon svg { width: 20px; height: 20px; }
  .stat-value { font-size: 18px; }

  .share-card { padding: 32px 20px; margin: 0 8px 20px; }
  .file-info { gap: 10px; padding: 12px; }
  .info-label { font-size: 10px; }
  .info-value { font-size: 12px; }

  .settings-grid { grid-template-columns: 1fr; }

  .action-bar { gap: 6px; }
  .action-bar .btn { padding: 8px 12px; font-size: 13px; }

  .file-manager-header { flex-direction: column; align-items: flex-start; }
  .folder-toolbar { width: 100%; }
  .folder-toolbar .btn { flex: 1; justify-content: center; }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .folder-item { padding: 12px 8px; }
  .folder-icon { width: 38px; height: 38px; }
  .folder-icon svg { width: 20px; height: 20px; }
  .folder-name { font-size: 12px; }

  .link-row { flex-wrap: wrap; }
  .link-label { min-width: 100%; margin-bottom: -4px; }
}

/* ============================================================
   响应式 - 手机 (<= 480px)
   ============================================================ */
@media (max-width: 480px) {
  html { font-size: 14px; }

  .container { padding: 0 14px; }

  .navbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; margin: 0 -14px; }
  .logo-text { font-size: 18px; }
  .nav-links { width: 100%; justify-content: flex-end; }

  .hero-section { padding: 24px 0 16px; }
  .title { font-size: 24px; }
  .subtitle { font-size: 13px; margin-bottom: 20px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 260px; justify-content: center; }

  .upload-box { padding: 28px 16px; }
  .upload-icon-wrap { width: 48px; height: 48px; border-radius: 14px; }
  .upload-icon-wrap svg { width: 24px; height: 24px; }
  .upload-text { font-size: 14px; }
  .upload-hint { font-size: 12px; }

  .upload-options { flex-direction: column; }
  .option-group { min-width: 100%; }

  .features { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature-item { padding: 16px 10px; }
  .feature-icon { width: 40px; height: 40px; border-radius: 12px; }
  .feature-icon svg { width: 22px; height: 22px; }
  .feature-item h3 { font-size: 13px; margin-bottom: 2px; }
  .feature-item p { font-size: 11px; }

  .stats-grid { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat-card { flex-direction: column; text-align: center; padding: 12px 8px; gap: 6px; }
  .stat-icon { width: 34px; height: 34px; }
  .stat-icon svg { width: 18px; height: 18px; }
  .stat-value { font-size: 16px; }
  .stat-label { font-size: 11px; }

  .share-card { padding: 28px 16px; margin: 0 4px 16px; border-radius: var(--radius); }
  .share-icon-wrap { width: 56px; height: 56px; border-radius: 16px; }
  .share-icon-wrap svg { width: 28px; height: 28px; }
  .file-name { font-size: 16px; }
  .file-info { grid-template-columns: 1fr; gap: 8px; text-align: center; }

  .password-input-group { flex-direction: column; align-items: stretch; }
  .password-input-group input { max-width: 100%; }

  .btn-download { padding: 12px 28px; font-size: 15px; width: 100%; justify-content: center; }

  .modal-overlay { padding: 12px; }
  .modal-card { padding: 28px 20px; border-radius: var(--radius); }
  .login-overlay { padding: 16px; }
  .login-card { padding: 32px 24px; }

  .action-bar { flex-direction: column; }
  .action-bar .btn { width: 100%; justify-content: center; }
  .search-input { width: 100%; }
  .folder-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

  .copy-input-group { flex-direction: column; }

  .settings-section { padding: 18px 14px; }

  .toast { font-size: 13px; padding: 10px 16px; }
  .pp { left: 8px; right: 8px; bottom: 8px; width: auto; }
  .pp-body { max-height: 170px; padding: 10px; }
  .pp-head { padding: 9px 12px; }
  .pp-foot { padding: 8px 12px; }
  .login-card { padding: 28px 20px; max-width: 360px; }
}

/* ============================================================
   响应式 - 小手机 (<= 360px)
   ============================================================ */
@media (max-width: 360px) {
  .title { font-size: 22px; }
  .features { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { flex-direction: row; text-align: left; }
}

/* ============================================================
   横屏手机
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section { padding: 16px 0; }
  .title { font-size: 22px; }
  .subtitle { margin-bottom: 12px; }
  .modal-card { max-height: 90vh; overflow-y: auto; }
}

/* ============================================================
   内嵌 SVG 图标尺寸修正（全站仅使用 SVG 图标，不使用 emoji）
   ============================================================ */
.crumb-link svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.ctx-item svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.lock-cell { display: inline-flex; color: var(--warning); }
.lock-cell svg { width: 14px; height: 14px; }
.action-bar .btn svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.password-hint svg { vertical-align: -2px; margin-right: 4px; }
.storage-hint { margin-top: 10px; font-size: 12px; color: var(--text3); line-height: 1.7; }
.storage-stat { display: block; margin-top: 6px; font-size: 12px; color: var(--text3); }
#storagePath, #newStoragePath { font-family: Consolas, Monaco, monospace; font-size: 13px; }