/* ============================================
   轻量网盘 · 蓝白配色 · App 风格
   ============================================ */
:root {
  --primary: #1E6FFF;
  --primary-dark: #0E5CE0;
  --primary-light: #E8F1FF;
  --primary-grad: linear-gradient(135deg, #3D8BFF 0%, #1E6FFF 60%, #1665F0 100%);
  --bg: #F2F5F9;
  --card: #FFFFFF;
  --text: #1A2233;
  --text-2: #5A6478;
  --text-3: #98A1B3;
  --line: #E8EDF4;
  --danger: #F5493B;
  --success: #0FC38E;
  --orange: #FF8A34;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(30, 111, 255, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 46, 110, 0.12);
  --tabbar-h: 62px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #E9EEF6;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- 桌面居中壳 ---------- */
.app-shell {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(30, 60, 120, 0.10);
  overflow-x: hidden;
}

/* 主区域（移动端占满，底部给 tabbar 让位） */
.main-wrap {
  min-width: 0;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
}

/* PC 侧边栏 / PC 上传按钮：移动端隐藏 */
.sidebar { display: none; }
.pc-upload-btn { display: none; }
.ph-right { display: flex; align-items: center; gap: 12px; }

/* ---------- 页面切换 ---------- */
.page { display: none; padding: 0 16px 24px; animation: pageIn .28s ease; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================
   首页
   ============================================ */
.home-hero {
  margin: 0 -16px 20px;
  padding: 26px 20px 46px;
  background: var(--primary-grad);
  border-radius: 0 0 28px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.home-hero::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
}
.home-hero::before {
  content: '';
  position: absolute;
  left: -40px; bottom: -80px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 70%);
}

.hero-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.brand-logo svg { width: 26px; height: 26px; }
.brand-text h1 { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.brand-text p { font-size: 12px; opacity: .82; margin-top: 1px; }
.hero-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
}

.hero-slogan { margin-top: 18px; font-size: 15px; opacity: .92; position: relative; z-index: 1; }

.hero-search {
  margin-top: 12px;
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(10, 40, 100, .18);
  position: relative; z-index: 1;
}
.hero-search svg { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; }
.hero-search input {
  flex: 1; border: none; outline: none;
  font-size: 15px; color: var(--text);
  background: transparent;
}

/* ---------- 区块 ---------- */
.section { margin-bottom: 22px; }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before {
  content: ''; width: 4px; height: 16px;
  border-radius: 4px;
  background: var(--primary);
}
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head .section-title { margin-bottom: 0; }
.section-more { border: none; background: none; color: var(--text-3); font-size: 13px; cursor: pointer; }

/* ---------- 快捷入口 ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.quick-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.quick-item:active { transform: scale(.95); }
.quick-item span { font-size: 12.5px; color: var(--text-2); }
.quick-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.quick-icon svg { width: 22px; height: 22px; }
.q-blue { background: var(--primary-light); color: var(--primary); }
.q-cyan { background: #E0F5FF; color: #0BA5EC; }
.q-orange { background: #FFF1E6; color: var(--orange); }
.q-green { background: #E4F9F2; color: var(--success); }

/* ---------- 提示卡片 ---------- */
.tip-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; gap: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.tip-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.tip-icon svg { width: 20px; height: 20px; }
.tip-body b { font-size: 14px; }
.tip-body p { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

/* ============================================
   文件页
   ============================================ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 16px;
}
.page-header h2 { font-size: 21px; font-weight: 700; }
.page-sub { font-size: 12.5px; color: var(--text-3); }

.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border-radius: 14px;
  padding: 10px 10px 10px 16px;
  box-shadow: var(--shadow);
  border: 1.5px solid transparent;
  transition: border-color .2s;
}
.search-bar:focus-within { border-color: var(--primary); }
.search-bar svg { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; outline: none;
  font-size: 15px; color: var(--text); background: transparent;
  min-width: 0;
}
.search-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.search-btn:active { background: var(--primary-dark); }
.search-hint { font-size: 12px; color: var(--text-3); margin: 10px 2px 12px; }

/* 精确匹配卡片 */
.exact-card {
  background: var(--primary-light);
  border: 1px solid #C9DFFF;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  animation: pageIn .25s ease;
}
.exact-info { min-width: 0; }
.exact-info b { font-size: 14.5px; color: var(--primary-dark); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exact-info span { font-size: 12px; color: var(--text-2); }
.btn-primary {
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  display: flex; align-items: center; gap: 5px;
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
.btn-primary:active { background: var(--primary-dark); }
.btn-primary svg { width: 15px; height: 15px; }

/* ---------- 文件列表 ---------- */
.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.file-item:active { transform: scale(.98); box-shadow: none; }

.file-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.file-icon svg { width: 24px; height: 24px; }
.fi-doc { background: #E8F1FF; color: var(--primary); }
.fi-image { background: #E4F9F2; color: var(--success); }
.fi-video { background: #FFF1E6; color: var(--orange); }
.fi-audio { background: #F3EDFF; color: #8B5CF6; }
.fi-zip { background: #FFF6E0; color: #F59E0B; }
.fi-apk { background: #FFE9E7; color: var(--danger); }
.fi-file { background: #EEF1F6; color: var(--text-2); }

.file-info { flex: 1; min-width: 0; }
.file-info b { font-size: 14.5px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info p { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.file-action {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.file-action svg { width: 16px; height: 16px; }

/* 加载 / 空态 */
.list-loading, .list-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 0; gap: 10px;
  color: var(--text-3);
}
.list-empty b { font-size: 15px; color: var(--text-2); }
.list-empty p { font-size: 12.5px; }
.empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  color: #C3CBD9;
  margin-bottom: 4px;
}
.empty-icon svg { width: 30px; height: 30px; }
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   传输页
   ============================================ */
.seg-tabs {
  display: flex; gap: 8px;
  background: #E7ECF4;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}
.seg-tab {
  flex: 1; border: none;
  background: transparent;
  padding: 9px 0;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .2s;
}
.seg-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 2px 8px rgba(30,111,255,.12); }

.text-btn {
  border: none; background: none;
  color: var(--text-3); font-size: 13px;
  cursor: pointer;
}

/* 传输记录 */
.transfer-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
}
.t-status {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.t-done { background: #E4F9F2; color: var(--success); }
.t-doing { background: var(--primary-light); color: var(--primary); }
.t-re-btn {
  border: none; background: none;
  color: var(--primary); font-size: 12.5px;
  cursor: pointer; flex-shrink: 0; padding: 4px;
}

/* ============================================
   信息页
   ============================================ */
.notice-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.notice-title {
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.notice-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}
.dot-orange { background: var(--orange); box-shadow: 0 0 0 4px #FFF1E6; }
.notice-item {
  display: flex; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #F3F6FB;
}
.notice-item:last-child { border-bottom: none; padding-bottom: 4px; }
.notice-tag {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: #FFE9E7; color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-orange { background: #FFF1E6; color: var(--orange); }
.tag-green { background: #E4F9F2; color: var(--success); }
.notice-body { flex: 1; min-width: 0; }
.notice-body b { font-size: 14px; display: block; }
.notice-body p { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.notice-time { font-size: 11px; color: #B4BCCB; margin-top: 4px; display: block; }

/* ============================================
   我的页
   ============================================ */
.me-hero {
  margin: 0 -16px 20px;
  padding: 40px 20px 34px;
  background: var(--primary-grad);
  color: #fff;
  border-radius: 0 0 28px 28px;
  display: flex; align-items: center; gap: 14px;
  position: relative;
  overflow: hidden;
}
.me-hero::after {
  content: '';
  position: absolute;
  right: -50px; bottom: -70px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.15), transparent 70%);
}
.me-avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(255,255,255,.24);
  backdrop-filter: blur(6px);
  border: 2.5px solid rgba(255,255,255,.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700;
}
.me-info { flex: 1; position: relative; z-index: 1; }
.me-info h2 { font-size: 20px; }
.me-info p { font-size: 12.5px; opacity: .82; margin-top: 2px; }
.me-edit {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.2);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative; z-index: 1;
}
.me-edit svg { width: 18px; height: 18px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card {
  background: var(--primary-light);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
}
.stat-num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.space-bar {
  margin-top: 14px;
  height: 8px;
  border-radius: 999px;
  background: #E4EAF4;
  overflow: hidden;
}
.space-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary-grad);
  width: 0;
  transition: width .6s ease;
}
.space-text { font-size: 11.5px; color: var(--text-3); margin-top: 8px; text-align: right; }

.menu-list {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background .15s;
}
.menu-item:active { background: #F7FAFF; }
.menu-item + .menu-item { border-top: 1px solid #F3F6FB; }
.menu-icon {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}
.menu-icon svg { width: 18px; height: 18px; }
.m-red { background: #FFE9E7; color: var(--danger); }
.m-blue { background: var(--primary-light); color: var(--primary); }
.m-cyan { background: #E0F5FF; color: #0BA5EC; }
.menu-item > span { flex: 1; font-size: 14.5px; }
.menu-arrow { width: 16px; height: 16px; color: #C3CBD9; }
.menu-value { flex: none !important; font-size: 12.5px; color: var(--text-3); }

.footer-note { text-align: center; font-size: 12px; color: #B4BCCB; margin: 26px 0 10px; }

/* ============================================
   底部导航
   ============================================ */
.tabbar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 8px 8px var(--safe-bottom);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 100;
}
.tab {
  flex: 1;
  border: none;
  background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: #9AA3B5;
  cursor: pointer;
  transition: color .2s;
  position: relative;
}
.tab svg { width: 23px; height: 23px; }
.tab span { font-size: 11px; }
.tab.active { color: var(--primary); }
.tab.active svg { animation: tabPop .3s ease; }
@keyframes tabPop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.tab.active::before {
  content: '';
  position: absolute;
  top: -9px;
  width: 32px; height: 3px;
  border-radius: 0 0 6px 6px;
  background: var(--primary);
}

/* ============================================
   弹窗 / 提示 / 下载进度
   ============================================ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 48, .5);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}
.modal-mask.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(86%, 340px);
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  animation: popIn .25s cubic-bezier(.34,1.4,.64,1);
}
@keyframes popIn { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 17px; text-align: center; margin-bottom: 14px; }
.modal p { font-size: 13.5px; color: var(--text-2); text-align: center; line-height: 1.7; }
.modal .m-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 15px;
  outline: none;
  margin-top: 14px;
  transition: border-color .2s;
}
.modal .m-input:focus { border-color: var(--primary); }
.modal-btns { display: flex; gap: 10px; margin-top: 18px; }
.modal-btns button {
  flex: 1; border: none;
  padding: 11px 0;
  border-radius: 12px;
  font-size: 14.5px;
  cursor: pointer;
  transition: opacity .2s;
}
.mb-cancel { background: #F0F3F8; color: var(--text-2); }
.mb-ok { background: var(--primary); color: #fff; }
.mb-ok:active { opacity: .85; }

.toast {
  position: fixed;
  top: 46px; left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 30, 50, .92);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 999px;
  z-index: 300;
  white-space: nowrap;
  max-width: 82vw;
  overflow: hidden; text-overflow: ellipsis;
  animation: toastIn .25s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.toast.hidden { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

.download-progress {
  position: fixed;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: min(88%, 420px);
  background: rgba(20, 30, 50, .94);
  border-radius: 14px;
  padding: 12px 16px;
  z-index: 250;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
}
.download-progress.hidden { display: none; }
.dp-info { display: flex; justify-content: space-between; font-size: 12px; color: #fff; gap: 10px; }
.dp-info span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-info span:last-child { color: #7FB2FF; flex-shrink: 0; }
.dp-bar { margin-top: 8px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.dp-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #4D9BFF, #7FB2FF); transition: width .2s ease; }

.hidden { display: none !important; }

/* ============================================
   管理员权限：普通用户隐藏管理功能
   ============================================ */
body:not(.admin-mode) .admin-only { display: none !important; }
body.admin-mode .admin-login-item { display: none !important; }

/* ============================================
   悬浮上传按钮
   ============================================ */
.fab {
  position: fixed;
  right: max(16px, calc((100vw - 520px) / 2 + 16px));
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 22px);
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary-grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(30, 111, 255, .38);
  z-index: 90;
  transition: transform .15s ease, box-shadow .15s ease;
}
.fab svg { width: 26px; height: 26px; }
.fab:active { transform: scale(.92); box-shadow: 0 4px 12px rgba(30,111,255,.3); }

/* ============================================
   上传面板
   ============================================ */
.pd-name {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pd-code { letter-spacing: 3px; text-align: center; font-size: 18px; font-weight: 600; }

.up-pick {
  width: 100%;
  border: 1.5px dashed #B9CBEA;
  background: #F6F9FF;
  border-radius: 12px;
  padding: 22px 0;
  color: var(--primary);
  font-size: 14.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: all .2s;
}
.up-pick:hover { border-color: var(--primary); background: var(--primary-light); }
.up-pick svg { width: 20px; height: 20px; }
.up-filename {
  margin-top: 10px;
  font-size: 13px; color: var(--text-3);
  text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.up-filename.has-file { color: var(--primary-dark); font-weight: 600; }
.up-code-label { font-size: 13px; color: var(--text-2); margin: 14px 0 8px; font-weight: 600; }
.up-code-row { display: flex; gap: 8px; }
.up-code-input { flex: 1; margin-top: 0 !important; letter-spacing: 4px; text-align: center; font-size: 17px; font-weight: 600; }
.up-gen {
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  padding: 0 16px;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  font-weight: 600;
}
.up-gen:active { background: #D8E7FF; }
.up-tip { font-size: 11.5px; color: var(--text-3); margin-top: 12px; line-height: 1.6; }

/* 上传成功验证码展示 */
.code-big {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--primary-light);
  border: 1.5px dashed var(--primary);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 14px;
}
.code-big span { font-size: 30px; font-weight: 700; color: var(--primary-dark); letter-spacing: 6px; font-family: 'SF Mono', Consolas, monospace; }
.code-copy {
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.code-copy svg { width: 14px; height: 14px; }

/* ============================================
   验证码管理
   ============================================ */
.code-manage {
  max-height: 46vh;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 4px;
}
.code-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #F6F9FF;
  border: 1px solid #E6EEFB;
  border-radius: 12px;
  padding: 10px 12px;
}
.ci-info { min-width: 0; flex: 1; }
.ci-info b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-code { font-size: 16px; font-weight: 700; color: var(--primary); letter-spacing: 3px; font-family: 'SF Mono', Consolas, monospace; margin-right: 6px; }
.ci-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #E8F1FF; color: var(--primary);
  vertical-align: 2px;
}
.ci-tag.tag-manual { background: #FFF1E6; color: var(--orange); }
.ci-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ci-btn {
  width: 32px; height: 32px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s;
}
.ci-btn:active { transform: scale(.9); }
.ci-btn svg { width: 15px; height: 15px; }
.ci-btn.copy { background: var(--primary-light); color: var(--primary); }
.ci-btn.regen { background: #FFF1E6; color: var(--orange); }

/* ============================================
   PC 端（≥768px：电脑 / 平板横屏 / 大屏）
   ============================================ */
@media (min-width: 768px) {
  body { background: #E4EAF3; }

  /* 布局：侧边栏 + 主区域 */
  .app-shell {
    max-width: none;
    margin: 0;
    display: flex;
    min-height: 100vh;
    box-shadow: none;
  }
  .main-wrap { flex: 1; min-width: 0; padding-bottom: 0; }
  .pages { padding: 0 32px 48px; }
  .page { max-width: 1080px; margin: 0 auto; padding: 0 0 24px; }

  /* ---- 侧边栏 ---- */
  .sidebar {
    display: flex;
    flex-direction: column;
    width: 236px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 24px 14px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .side-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 18px;
    border-bottom: 1px solid #F0F4FA;
  }
  .side-brand .brand-logo {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--primary-grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
  }
  .side-brand .brand-logo svg { width: 22px; height: 22px; }
  .side-brand .brand-text h1 { font-size: 17px; color: var(--text); }
  .side-brand .brand-text p { font-size: 11px; color: var(--text-3); margin-top: 1px; }
  .side-nav { flex: 1; padding-top: 16px; display: flex; flex-direction: column; gap: 4px; }
  .side-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    border: none; background: none;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14.5px; color: var(--text-2);
    cursor: pointer;
    transition: all .18s;
  }
  .side-item svg { width: 20px; height: 20px; flex-shrink: 0; }
  .side-item:hover { background: #F4F8FF; color: var(--primary); }
  .side-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
  .side-foot { padding: 14px 8px 4px; border-top: 1px solid #F0F4FA; }
  .side-status { font-size: 12px; color: var(--success); display: flex; align-items: center; gap: 6px; }
  .side-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(15,195,142,.15); }
  .side-foot p { font-size: 11px; color: var(--text-3); margin-top: 6px; }

  /* ---- 隐藏移动端元素 ---- */
  .tabbar, .fab { display: none; }

  /* ---- 页面头部 / 上传按钮 ---- */
  .page-header { padding: 28px 0 20px; }
  .pc-upload-btn {
    display: flex; align-items: center; gap: 6px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 13.5px;
    padding: 9px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s, transform .15s;
    box-shadow: 0 6px 16px rgba(30,111,255,.25);
  }
  .pc-upload-btn svg { width: 16px; height: 16px; }
  .pc-upload-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

  /* ---- 首页 ---- */
  .home-hero {
    margin: 0 0 26px;
    padding: 36px;
    border-radius: 20px;
  }
  .hero-top { }
  .hero-slogan { font-size: 16px; margin-top: 16px; }
  .hero-search { max-width: 560px; margin-top: 16px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .quick-item { padding: 22px 8px; }
  .quick-item span { font-size: 13.5px; }

  /* ---- 文件网格（PC 卡片式） ---- */
  .file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
  }
  .file-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 14px 16px;
    gap: 10px;
    transition: transform .18s ease, box-shadow .18s ease;
  }
  .file-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
  .file-icon { width: 52px; height: 52px; border-radius: 15px; }
  .file-icon svg { width: 27px; height: 27px; }
  .file-info { width: 100%; }
  .file-info b {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
  }
  .file-action { width: 38px; height: 38px; }
  .file-action svg { width: 18px; height: 18px; }

  /* ---- 内容页限宽 ---- */
  #page-transfer, #page-message, #page-me { max-width: 900px; }
  .search-bar { padding: 13px 14px 13px 18px; }
  .search-bar input { font-size: 15.5px; }
  .seg-tabs { max-width: 360px; }
  .notice-card { padding: 20px; }
  .menu-list { max-width: 640px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .me-hero { margin: 0 0 24px; padding: 44px 36px; border-radius: 20px; }
  .me-avatar { width: 72px; height: 72px; font-size: 30px; }
  .footer-note { margin: 34px 0 12px; }
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #C6CFDE; border-radius: 999px; }
