/* ============================================================
   百度网盘移动端 — 全局CSS框架
   版本: 1.0.0
   主色: #1677ff · 背景: #f5f5f5
   字体: PingFang SC, -apple-system, BlinkMacSystemFont, sans-serif
   ============================================================ */

/* ===== 1. CSS Reset + 全局变量 ===== */

:root {
  --bd-primary: #1677ff;
  --bd-primary-hover: #4096ff;
  --bd-primary-active: #0958d9;
  --bd-bg: #f5f5f5;
  --bd-card-bg: #ffffff;
  --bd-text: #333333;
  --bd-text-secondary: #666666;
  --bd-text-muted: #999999;
  --bd-border: #e5e5e5;
  --bd-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --bd-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --bd-radius: 8px;
  --bd-radius-lg: 12px;
  --bd-radius-xl: 20px;
  --bd-font-size-sm: 12px;
  --bd-font-size-md: 14px;
  --bd-font-size-lg: 16px;
  --bd-font-size-xl: 17px;
  --bd-font-size-xxl: 20px;
  --bd-header-height: 44px;
  --bd-tabbar-height: 83px;
  --bd-safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
  --bd-primary: #1677ff;
  --bd-primary-hover: #4096ff;
  --bd-primary-active: #0958d9;
  --bd-bg: #1a1a1a;
  --bd-card-bg: #2a2a2a;
  --bd-text: #e0e0e0;
  --bd-text-secondary: #b0b0b0;
  --bd-text-muted: #808080;
  --bd-border: #3a3a3a;
  --bd-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --bd-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
}

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

*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding-bottom: var(--bd-tabbar-height);
  background: var(--bd-bg);
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  display: none;
}

a {
  color: var(--bd-primary);
  text-decoration: none;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

input, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
  border: none;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}

button {
  cursor: pointer;
  padding: 0;
}

/* ===== 2. 顶部导航栏 bd-header ===== */

.bd-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bd-header-height);
  background: var(--bd-card-bg);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 0.5px solid var(--bd-border);
}

.bd-header-back {
  width: 36px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.bd-header-back svg,
.bd-header-back img {
  width: 24px;
  height: 24px;
  display: block;
}

.bd-header-title {
  flex: 1;
  text-align: center;
  font-size: var(--bd-font-size-lg);
  font-weight: 600;
  color: var(--bd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.bd-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.bd-header-icon {
  width: 24px;
  height: 24px;
  display: block;
  cursor: pointer;
  padding: 2px;
}

.bd-header-search {
  flex: 1;
  height: 32px;
  background: var(--bd-bg);
  border-radius: var(--bd-radius);
  border: none;
  padding: 0 12px;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text);
  display: flex;
  align-items: center;
  margin: 0 8px;
}

.bd-header-search input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text);
}

.bd-header-search input::placeholder {
  color: var(--bd-text-muted);
}

/* ===== 3. 搜索框组件 bd-search ===== */

.bd-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bd-card-bg);
  z-index: 200;
  display: none;
  flex-direction: column;
  animation: bd-slideDown 0.25s ease-out;
}

.bd-search-overlay.active {
  display: flex;
}

.bd-search-header {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  height: 56px;
  border-bottom: 0.5px solid var(--bd-border);
}

.bd-search-bar {
  flex: 1;
  height: 44px;
  background: var(--bd-bg);
  border-radius: var(--bd-radius);
  padding-left: 36px;
  padding-right: 12px;
  display: flex;
  align-items: center;
  border: none;
  position: relative;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text);
}

.bd-search-bar-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.4;
}

.bd-search-bar input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text);
}

.bd-search-bar input::placeholder {
  color: var(--bd-text-muted);
}

.bd-search-cancel {
  flex-shrink: 0;
  padding: 0 12px;
  font-size: var(--bd-font-size-lg);
  color: var(--bd-primary);
  cursor: pointer;
  white-space: nowrap;
}

.bd-search-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.bd-search-history {
  margin-bottom: 24px;
}

.bd-search-section-title {
  font-size: var(--bd-font-size-lg);
  font-weight: 600;
  color: var(--bd-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bd-search-section-title .bd-search-clear {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-muted);
  font-weight: 400;
  cursor: pointer;
}

.bd-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bd-search-tag {
  padding: 6px 14px;
  background: var(--bd-bg);
  border-radius: 16px;
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-secondary);
  cursor: pointer;
}

.bd-search-hot {
  margin-bottom: 24px;
}

.bd-search-hot-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bd-search-hot-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--bd-border);
}

.bd-search-hot-rank {
  width: 24px;
  font-size: var(--bd-font-size-sm);
  font-weight: 600;
  color: var(--bd-text-muted);
  text-align: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.bd-search-hot-rank.top-1,
.bd-search-hot-rank.top-2,
.bd-search-hot-rank.top-3 {
  color: var(--bd-primary);
}

.bd-search-hot-text {
  flex: 1;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-search-hot-number {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-muted);
  flex-shrink: 0;
  margin-left: 8px;
}

.bd-search-suggest {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bd-card-bg);
  z-index: 201;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bd-search-suggest.active {
  display: block;
}

.bd-search-suggest-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--bd-border);
  font-size: var(--bd-font-size-md);
  color: var(--bd-text);
  cursor: pointer;
}

.bd-search-suggest-icon {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  opacity: 0.4;
  flex-shrink: 0;
}

.bd-search-suggest-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-search-suggest-highlight {
  color: var(--bd-primary);
}

/* ===== 4. 底部固定导航栏 bd-tabbar ===== */

.bd-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bd-tabbar-height) + var(--bd-safe-area-bottom));
  padding-bottom: var(--bd-safe-area-bottom);
  background: var(--bd-card-bg);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  border-top: 0.5px solid var(--bd-border);
}

.bd-tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding-top: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
  transition: transform 0.15s ease;
}

.bd-tabbar-item:active {
  transform: scale(0.92);
}

.bd-tabbar-icon-wrap {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bd-tabbar-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  transition: all 0.2s ease;
}

.bd-tabbar-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: #ff4d4f;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  padding: 0 4px;
  font-weight: 500;
  line-height: 1;
}

.bd-tabbar-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 6px;
  background: #ff4d4f;
  border-radius: 50%;
}

.bd-tabbar-label {
  font-size: 10px;
  color: var(--bd-text-muted);
  margin-top: 2px;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.bd-tabbar-item.active .bd-tabbar-icon {
  filter: brightness(0) saturate(100%) invert(33%) sepia(71%) saturate(4093%) hue-rotate(209deg) brightness(102%) contrast(107%);
  /* #1677ff via filter */
}

.bd-tabbar-item.active .bd-tabbar-label {
  color: var(--bd-primary);
}

/* ===== 5. Tab切换页面容器 ===== */

.bd-page {
  display: none;
  padding-bottom: 0;
  position: relative;
}

.bd-page.active {
  display: block;
  min-height: calc(100vh - var(--bd-header-height) - var(--bd-tabbar-height));
}

.bd-page.slide-in-right {
  animation: bd-slideInRight 0.3s ease-out;
}

.bd-page.slide-in-left {
  animation: bd-slideInLeft 0.3s ease-out;
}

.bd-page.slide-out-right {
  animation: bd-slideOutRight 0.3s ease-out;
}

.bd-page.slide-out-left {
  animation: bd-slideOutLeft 0.3s ease-out;
}

/* ===== 6. 分类标签栏 bd-cat-bar ===== */

.bd-cat-bar {
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  white-space: nowrap;
  padding: 0 8px;
  background: var(--bd-card-bg);
  border-bottom: 0.5px solid var(--bd-border);
  position: relative;
}

.bd-cat-bar::-webkit-scrollbar {
  display: none;
}

.bd-cat-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text-secondary);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  user-select: none;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.bd-cat-tab.active {
  color: var(--bd-primary);
  font-weight: 500;
}

.bd-cat-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--bd-primary);
  border-radius: 1px;
}

.bd-cat-tab:active {
  opacity: 0.7;
}

/* ===== 7. 文件列表 bd-file-list ===== */

.bd-file-list {
  background: var(--bd-card-bg);
}

.bd-file-item {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 64px;
  background: var(--bd-card-bg);
  border-bottom: 0.5px solid var(--bd-border);
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}

.bd-file-item:active {
  background: rgba(0, 0, 0, 0.03);
}

.bd-file-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--bd-border);
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 12px;
  transition: all 0.2s ease;
  background: var(--bd-card-bg);
}

.bd-file-item.selecting .bd-file-checkbox {
  display: flex;
}

.bd-file-checkbox.checked {
  background: var(--bd-primary);
  border-color: var(--bd-primary);
}

.bd-file-checkbox.checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.bd-file-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--bd-radius);
  background: var(--bd-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 12px;
  font-size: 22px;
}

.bd-file-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.bd-file-name {
  font-size: 15px;
  color: var(--bd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.bd-file-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.bd-file-more {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  margin-left: 8px;
  padding: 8px;
}

.bd-file-more img,
.bd-file-more svg {
  width: 20px;
  height: 20px;
  opacity: 0.5;
}

/* ===== 8. 空状态 bd-empty ===== */

.bd-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.bd-empty-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 16px;
}

.bd-empty-title {
  font-size: var(--bd-font-size-xl);
  color: var(--bd-text);
  font-weight: 500;
  margin-bottom: 8px;
}

.bd-empty-desc {
  font-size: 13px;
  color: var(--bd-text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.bd-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background: var(--bd-primary);
  color: #fff;
  border-radius: var(--bd-radius-xl);
  font-size: var(--bd-font-size-md);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.bd-empty-btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}

/* ===== 9. 悬浮按钮 bd-fab ===== */

.bd-fab {
  position: fixed;
  bottom: calc(var(--bd-tabbar-height) + 24px);
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bd-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4);
  z-index: 50;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.bd-fab::before {
  content: "+";
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.bd-fab:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.bd-fab-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 49;
  display: none;
  animation: bd-fadeIn 0.2s ease;
}

.bd-fab-overlay.active {
  display: block;
}

.bd-fab-menu {
  position: fixed;
  bottom: calc(var(--bd-tabbar-height) + 88px);
  right: 24px;
  min-width: 160px;
  background: var(--bd-card-bg);
  border-radius: var(--bd-radius-lg);
  box-shadow: var(--bd-shadow-lg);
  z-index: 51;
  display: none;
  overflow: hidden;
  animation: bd-scaleIn 0.2s ease;
  transform-origin: bottom right;
}

.bd-fab-menu.active {
  display: block;
}

.bd-fab-menu-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--bd-border);
  font-size: var(--bd-font-size-md);
  color: var(--bd-text);
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.bd-fab-menu-item:last-child {
  border-bottom: none;
}

.bd-fab-menu-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.bd-fab-menu-item-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

/* ===== 10. 个人中心页面 ===== */

.bd-profile-section {
  padding: 0 16px;
  margin-bottom: 20px;
}

.bd-profile-section-title {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-muted);
  padding: 12px 0 8px;
  font-weight: 400;
}

.bd-profile-header {
  display: flex;
  align-items: center;
  padding: 20px 16px;
  background: var(--bd-card-bg);
  border-radius: var(--bd-radius-lg);
  margin: 16px;
}

.bd-profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
  overflow: hidden;
  font-size: 28px;
  color: var(--bd-text-muted);
}

.bd-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bd-profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bd-profile-name {
  font-size: var(--bd-font-size-xl);
  font-weight: 600;
  color: var(--bd-text);
  margin-bottom: 4px;
}

.bd-profile-desc {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-muted);
}

.bd-profile-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.3;
  margin-left: 8px;
}

.bd-storage-card {
  background: var(--bd-card-bg);
  border-radius: var(--bd-radius-lg);
  margin: 0 16px 20px;
  padding: 16px;
}

.bd-storage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.bd-storage-label {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-muted);
}

.bd-storage-text {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-secondary);
}

.bd-storage-bar {
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
}

.bd-storage-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bd-primary), #69b1ff);
  transition: width 0.5s ease;
}

.bd-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--bd-card-bg);
  border-radius: var(--bd-radius-lg);
  padding: 16px;
  margin: 0 16px 20px;
}

.bd-profile-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.bd-profile-cell:active {
  opacity: 0.6;
}

.bd-profile-cell-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--bd-radius);
  background: var(--bd-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  font-size: 18px;
  color: #fff;
}

.bd-profile-cell-icon.secondary {
  background: #ff9800;
}

.bd-profile-cell-icon.tertiary {
  background: #52c41a;
}

.bd-profile-cell-icon.quaternary {
  background: #ff4d4f;
}

.bd-profile-cell-label {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-secondary);
  text-align: center;
}

.bd-profile-list {
  background: var(--bd-card-bg);
  border-radius: var(--bd-radius-lg);
  margin: 0 16px 20px;
  overflow: hidden;
}

.bd-profile-row {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  cursor: pointer;
  user-select: none;
  border-bottom: 0.5px solid var(--bd-border);
}

.bd-profile-row:last-child {
  border-bottom: none;
}

.bd-profile-row:active {
  background: rgba(0, 0, 0, 0.03);
}

.bd-profile-row-icon {
  width: 22px;
  height: 22px;
  margin-right: 12px;
  flex-shrink: 0;
  opacity: 0.5;
}

.bd-profile-row-label {
  flex: 1;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text);
}

.bd-profile-row-value {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-muted);
  margin-right: 8px;
}

.bd-profile-row-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.25;
}

/* ===== 11. 传输页面 ===== */

.bd-transfer-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bd-card-bg);
  border-bottom: 0.5px solid var(--bd-border);
}

.bd-transfer-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.bd-transfer-tabs .bd-transfer-tab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  user-select: none;
}

.bd-transfer-tabs .bd-transfer-tab.active {
  color: var(--bd-primary);
  font-weight: 500;
}

.bd-transfer-tabs .bd-transfer-tab.active::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--bd-primary);
  border-radius: 1px;
}

.bd-transfer-list {
  background: var(--bd-card-bg);
}

.bd-transfer-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--bd-border);
  min-height: 72px;
}

.bd-transfer-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--bd-radius);
  background: var(--bd-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 12px;
  font-size: 22px;
}

.bd-transfer-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.bd-transfer-name {
  font-size: 15px;
  color: var(--bd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.bd-transfer-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bd-transfer-progress {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #f0f0f0;
  overflow: hidden;
}

.bd-transfer-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--bd-primary), #69b1ff);
  transition: width 0.3s ease;
}

.bd-transfer-progress-fill.paused {
  background: var(--bd-text-muted);
}

.bd-transfer-percent {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.bd-transfer-status {
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-muted);
  margin-top: 2px;
}

.bd-transfer-status.success {
  color: #52c41a;
}

.bd-transfer-status.error {
  color: #ff4d4f;
}

.bd-transfer-status.paused {
  color: var(--bd-text-muted);
}

.bd-transfer-action {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 8px;
  cursor: pointer;
}

.bd-transfer-action img,
.bd-transfer-action svg {
  width: 20px;
  height: 20px;
  opacity: 0.45;
}

.bd-transfer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.bd-transfer-empty-icon {
  width: 80px;
  height: 80px;
  opacity: 0.3;
  margin-bottom: 12px;
}

.bd-transfer-empty-text {
  font-size: var(--bd-font-size-md);
  color: var(--bd-text-muted);
}

/* ===== 12. 吐司提示 bd-toast ===== */

.bd-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border-radius: var(--bd-radius);
  padding: 10px 20px;
  font-size: var(--bd-font-size-md);
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  display: none;
  max-width: 80%;
  text-align: center;
  line-height: 1.5;
}

.bd-toast.show {
  display: block;
  animation: bd-fadeIn 0.2s ease;
}

.bd-toast.hide {
  animation: bd-fadeOut 0.2s ease;
}

.bd-toast-icon {
  display: block;
  margin: 0 auto 6px;
  width: 36px;
  height: 36px;
}

/* ===== 13. 弹窗组件 ===== */

.bd-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  animation: bd-fadeIn 0.2s ease;
}

.bd-modal {
  background: var(--bd-card-bg);
  border-radius: var(--bd-radius-lg);
  max-width: 320px;
  width: 85%;
  overflow: hidden;
  animation: bd-bounceIn 0.3s ease;
}

.bd-modal-title {
  padding: 20px 20px 8px;
  font-size: var(--bd-font-size-xl);
  font-weight: 600;
  color: var(--bd-text);
  text-align: center;
  line-height: 1.4;
}

.bd-modal-body {
  padding: 8px 20px 20px;
  font-size: var(--bd-font-size-md);
  color: var(--bd-text-secondary);
  text-align: center;
  line-height: 1.6;
}

.bd-modal-footer {
  display: flex;
  align-items: center;
  border-top: 0.5px solid var(--bd-border);
}

.bd-modal-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  font-size: var(--bd-font-size-lg);
  color: var(--bd-primary);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.bd-modal-btn:active {
  background: rgba(0, 0, 0, 0.04);
}

.bd-modal-btn + .bd-modal-btn {
  border-left: 0.5px solid var(--bd-border);
}

.bd-modal-btn.danger {
  color: #ff4d4f;
}

.bd-action-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bd-card-bg);
  border-radius: var(--bd-radius-lg) var(--bd-radius-lg) 0 0;
  z-index: 5001;
  overflow: hidden;
  animation: bd-slideUp 0.3s ease;
}

.bd-action-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
  margin: 8px auto;
}

.bd-action-sheet-title {
  padding: 12px 20px;
  font-size: var(--bd-font-size-sm);
  color: var(--bd-text-muted);
  text-align: center;
  border-bottom: 0.5px solid var(--bd-border);
}

.bd-action-sheet-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  font-size: var(--bd-font-size-lg);
  color: var(--bd-text);
  cursor: pointer;
  text-align: center;
  border-bottom: 0.5px solid var(--bd-border);
  transition: background 0.15s ease;
}

.bd-action-sheet-item:last-child {
  border-bottom: none;
}

.bd-action-sheet-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.bd-action-sheet-item.danger {
  color: #ff4d4f;
}

.bd-action-sheet-cancel {
  margin-top: 8px;
  border-radius: var(--bd-radius-lg) var(--bd-radius-lg) 0 0;
  background: var(--bd-card-bg);
  padding: 16px 20px;
  font-size: var(--bd-font-size-lg);
  color: var(--bd-text-secondary);
  cursor: pointer;
  text-align: center;
  font-weight: 500;
}

/* ===== 14. 按钮体系 ===== */

.bd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  height: 40px;
  border-radius: var(--bd-radius);
  font-size: var(--bd-font-size-md);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
  border: 1px solid transparent;
}

.bd-btn:active {
  transform: scale(0.96);
}

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

.bd-btn-primary:active {
  opacity: 0.9;
}

.bd-btn-plain {
  background: var(--bd-card-bg);
  color: var(--bd-primary);
  border-color: var(--bd-primary);
}

.bd-btn-plain:active {
  background: rgba(22, 119, 255, 0.04);
}

.bd-btn-danger {
  background: #ff4d4f;
  color: #fff;
  border-color: #ff4d4f;
}

.bd-btn-danger:active {
  opacity: 0.9;
}

.bd-btn-disabled,
.bd-btn[disabled] {
  background: #d9d9d9;
  color: #bfbfbf;
  border-color: #d9d9d9;
  cursor: not-allowed;
  pointer-events: none;
}

.bd-btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: var(--bd-font-size-sm);
}

.bd-btn-lg {
  height: 48px;
  padding: 0 28px;
  font-size: var(--bd-font-size-lg);
}

.bd-btn-block {
  display: flex;
  width: 100%;
}

/* ===== 15. 响应式 ===== */

/* 跟随系统暗色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --bd-bg: #1a1a1a;
    --bd-card-bg: #2a2a2a;
    --bd-text: #e0e0e0;
    --bd-text-secondary: #b0b0b0;
    --bd-text-muted: #808080;
    --bd-border: #3a3a3a;
    --bd-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --bd-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  .bd-fab {
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
  }
}

/* PWA 独立模式 */
@media (display-mode: standalone) {
  .bd-header {
    padding-top: env(safe-area-inset-top, 20px);
    height: calc(var(--bd-header-height) + env(safe-area-inset-top, 20px));
  }

  .bd-page.active {
    min-height: calc(100vh - var(--bd-header-height) - var(--bd-tabbar-height) - env(safe-area-inset-top, 20px));
  }

  .bd-search-overlay {
    padding-top: env(safe-area-inset-top, 20px);
  }

  .bd-search-header {
    height: calc(56px + env(safe-area-inset-top, 20px));
    padding-top: env(safe-area-inset-top, 20px);
  }

  .bd-search-suggest {
    top: calc(56px + env(safe-area-inset-top, 20px));
  }
}

/* ===== 16. 动画 ===== */

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

@keyframes bd-fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes bd-slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes bd-slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes bd-bounceIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  60% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bd-slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0.5;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bd-slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0.5;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bd-slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0.5;
  }
}

@keyframes bd-slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0.5;
  }
}

@keyframes bd-scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.bd-animate-fadeIn {
  animation: bd-fadeIn 0.3s ease;
}

.bd-animate-fadeOut {
  animation: bd-fadeOut 0.3s ease;
}

.bd-animate-slideUp {
  animation: bd-slideUp 0.3s ease;
}

.bd-animate-slideDown {
  animation: bd-slideDown 0.3s ease;
}

/* 点击涟漪效果 */
.bd-ripple {
  position: relative;
  overflow: hidden;
}

.bd-ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.bd-ripple:active::after {
  width: 200%;
  padding-bottom: 200%;
  transition: width 0.4s ease, padding-bottom 0.4s ease;
}

.bd-ripple-light::after {
  background: rgba(255, 255, 255, 0.2);
}