/* Lu盘 主页面样式 */

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

/* 中文文本显示优化 */
body, button, input, textarea {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:root {
  --primary-color: #1890FF;
  --primary-hover: #0D7EFF;
  --primary-light: rgba(24, 144, 255, 0.1);
  --success-color: #52C41A;
  --error-color: #F5222D;
  --warning-color: #FA8C16;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --bg-color: #F7F8FA;
  --card-bg: #FFFFFF;
  --border-color: #EAECEF;
  --sidebar-width: 240px;
  --toolbar-height: 56px;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.12);
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-width);
  background: var(--card-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  background: var(--bg-color);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 500;
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.storage-info {
  background: var(--bg-color);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.storage-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.storage-progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.storage-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.user-email {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.logout-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: var(--error-color);
  color: white;
  border-color: var(--error-color);
}

/* 主内容区 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 工具栏 */
.toolbar {
  height: var(--toolbar-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.batch-actions .btn {
  padding: 8px 16px;
  font-size: 14px;
}

.batch-actions .btn.danger {
  background: var(--error-color);
  color: white;
}

.batch-actions .btn.danger:hover {
  background: #d32f2f;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
}

/* 默认隐藏菜单按钮，在移动端显示 */
.toolbar-left #menuBtn {
  display: none;
}

@media (max-width: 768px) {
  .toolbar-left #menuBtn {
    display: flex !important;
  }
}

.icon-btn:hover {
  background: var(--bg-color);
  color: var(--text-primary);
}

.icon-btn:active {
  transform: scale(0.95);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-item {
  transition: color 0.2s ease;
}

.breadcrumb-item:hover {
  color: var(--primary-color);
}

.breadcrumb i {
  color: var(--primary-color);
}

.breadcrumb i.fa-chevron-right {
  color: var(--text-light);
  font-size: 12px;
}

.toolbar-center {
  flex: 1;
  max-width: 500px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border-radius: 8px;
  padding: 8px 12px;
  gap: 8px;
}

.search-box i {
  color: var(--text-light);
  font-size: 14px;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.search-box input::placeholder {
  color: var(--text-light);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-btn:hover {
  background: var(--bg-color);
  color: var(--text-primary);
  border-color: var(--text-light);
}

.toolbar-btn.primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.toolbar-btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.toolbar-btn.danger {
  background: var(--error-color);
  color: white;
  border-color: var(--error-color);
}

.toolbar-btn.danger:hover {
  background: #cf1322;
  border-color: #cf1322;
}

/* 文件内容区 */
.file-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  /* 确保中文文本正确显示 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.file-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  /* 确保中文文本正确显示 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.file-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-hover);
  border-color: var(--primary-color);
}

.file-item.selected {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.file-item-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: none;
  z-index: 1;
}

.file-item:hover .file-item-checkbox,
.file-item.selected .file-item-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.file-item-checkbox.checked::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.file-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.file-icon.folder {
  color: #FFC107;
}

.file-icon.image {
  color: #1890FF;
}

.file-icon.video {
  color: #F5222D;
}

.file-icon.audio {
  color: #52C41A;
}

.file-icon.document {
  color: #FA8C16;
}

.file-icon.archive {
  color: #722ED1;
}

.file-icon.other {
  color: var(--text-light);
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  line-height: 1.4;
  text-align: center;
}

.file-size {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.file-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
}

.file-item:hover .file-actions {
  display: flex;
  gap: 4px;
}

.file-action-btn {
  width: 28px;
  height: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.file-action-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 空状态 */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-state.show {
  display: flex;
}

.empty-state i {
  font-size: 80px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow-hover);
  z-index: 100;
  min-width: 160px;
  display: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease;
  word-break: keep-all;
  white-space: nowrap;
}

.dropdown-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item:hover {
  background: var(--bg-color);
}

.dropdown-item i {
  width: 16px;
  text-align: center;
  color: var(--text-secondary);
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 8px 32px var(--shadow-hover);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease;
}

.modal.small {
  max-width: 400px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

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

.modal-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

/* 上传区域 */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.upload-area i {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.upload-area h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.upload-area p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.upload-list {
  margin-top: 20px;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-color);
  border-radius: 8px;
  margin-bottom: 8px;
}

.upload-item-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 20px;
}

.upload-item-info {
  flex: 1;
  min-width: 0;
}

.upload-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-item-progress {
  margin-top: 4px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.upload-item-progress-bar {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.upload-item-status {
  font-size: 12px;
  color: var(--text-light);
}

/* 表单 */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-color);
  transition: all 0.2s ease;
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary-color);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* 按钮 */
.btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary {
  background: var(--primary-color);
  color: white;
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.secondary {
  background: var(--bg-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn.secondary:hover {
  background: var(--border-color);
}

/* 上下文菜单 */
.context-menu {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow-hover);
  z-index: 100;
  min-width: 200px;
  display: none;
  padding: 4px 0;
}

.context-menu.show {
  display: block;
}

.context-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease;
  height: 44px;
  word-break: keep-all;
  white-space: nowrap;
}

.context-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-item:hover {
  background: var(--bg-color);
}

.context-item i {
  width: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
}

.context-item.danger {
  color: var(--error-color);
}

.context-item.danger i {
  color: var(--error-color);
}

.context-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* 页面拖拽上传提示 */
.drag-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(24, 144, 255, 0.1);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  border: 3px dashed var(--primary-color);
}

.drag-overlay.show {
  display: flex;
}

.drag-overlay-content {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 48px 64px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  animation: bounceIn 0.3s ease;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.drag-overlay-content i {
  font-size: 64px;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.drag-overlay-content h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.drag-overlay-content p {
  font-size: 16px;
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 预览模态框 */
.preview-modal {
  max-width: 900px;
  max-height: 90vh;
}

.preview-modal .modal-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.preview-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.preview-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.preview-content video {
  max-width: 100%;
  max-height: 70vh;
}

.preview-content pre {
  width: 100%;
  max-height: 70vh;
  overflow: auto;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.preview-content pre code {
  display: block;
}

.preview-error {
  text-align: center;
  color: var(--error-color);
  padding: 40px;
}

.preview-error i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

/* 手机端侧边栏遮罩 */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

@media (max-width: 768px) {
  .sidebar-overlay.show {
    display: block;
  }
}

/* 上传进度管理器 */
.upload-progress-manager {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 350px;
  max-width: 450px;
  animation: slideUp 0.3s ease;
}

.upload-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.upload-progress-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.upload-progress-info i {
  color: var(--primary-color);
  font-size: 16px;
}

.upload-progress-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.upload-progress-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-progress-close:hover {
  background: var(--bg-color);
  color: var(--text-primary);
}

.upload-progress-list {
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.upload-progress-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  background: var(--bg-color);
  margin-bottom: 6px;
  font-size: 12px;
}

.upload-progress-item-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.upload-progress-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.upload-progress-item-percent {
  font-weight: 500;
  color: var(--primary-color);
  min-width: 40px;
  text-align: right;
}

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

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

.upload-progress-percent {
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-color);
}

/* 下载进度提示 */
.download-progress {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  min-width: 300px;
  animation: slideUp 0.3s ease;
}

.download-progress i {
  font-size: 20px;
  color: var(--primary-color);
}

.download-progress span:first-of-type {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.download-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  min-width: 80px;
}

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

.download-progress span:last-of-type {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-color);
  min-width: 45px;
  text-align: right;
}

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

/* Toast 提示 */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  word-break: keep-all;
  white-space: nowrap;
  max-width: 80vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--success-color);
  color: white;
}

.toast.error {
  background: var(--error-color);
  color: white;
}

.toast.warning {
  background: var(--warning-color);
  color: white;
}

.toast.info {
  background: var(--primary-color);
  color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -100%;
    z-index: 100;
    box-shadow: 2px 0 8px var(--shadow-color);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  /* 显示菜单按钮 */
  .toolbar-left #menuBtn {
    display: flex !important;
  }
  
  .toolbar {
    padding: 0 16px;
  }
  
  .file-content {
    padding: 16px;
  }
  
  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  
  /* 调整文件项 */
  .file-item {
    padding: 16px 8px;
  }
  
  .file-icon {
    width: 48px;
    height: 48px;
    font-size: 36px;
  }
  
  .file-name {
    font-size: 12px;
  }
  
  .file-size {
    font-size: 10px;
  }
  
  /* 调整上传和下载进度 */
  .upload-progress-manager,
  .download-progress {
    left: 16px;
    right: 16px;
    bottom: 16px;
    min-width: auto;
    max-width: none;
  }
  
  /* 调整模态框 */
  .modal {
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    margin: 16px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .modal-footer {
    padding: 12px 16px;
  }
  
  /* 隐藏批量操作的次要按钮 */
  .batch-actions .btn.secondary {
    display: none;
  }
}