/* Personal Storage Tool Specific Styles */

.user-status-bar {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-email {
  font-size: 12px;
  opacity: 0.8;
}

.login-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-menu {
  position: relative;
}

.user-menu-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.user-menu-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 150px;
  z-index: 1000;
  display: none;
}

.user-dropdown.show {
  display: block;
}

.dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s ease;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: #f8f9fa;
}

.main-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  min-height: 600px;
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .sidebar {
    height: auto;
    max-height: none;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: fit-content;
}

.storage-info {
  font-size: 11px;
  opacity: 0.8;
}

.toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.file-tree {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  background: #f8f9fa;
}

.tree-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #e9ecef;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.tree-item:last-child {
  border-bottom: none;
}

.tree-item:hover {
  background: #e9ecef;
}

.tree-item.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.tree-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tree-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-size {
  font-size: 11px;
  opacity: 0.7;
}

.storage-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.storage-bar {
  width: 100%;
  height: 8px;
  background: #e1e8ed;
  border-radius: 4px;
  overflow: hidden;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
  transition: width 0.3s ease;
}

.storage-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.stat-label {
  color: #666;
}

.stat-value {
  font-weight: 600;
  color: #333;
}

.content-area {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.view-container {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  overflow: hidden;
  height: fit-content;
}

.view-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.view-header h3 {
  margin: 0;
  font-size: 16px;
  color: #2c3e50;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-toggle {
  display: flex;
  border: 1px solid #e1e8ed;
  border-radius: 4px;
  overflow: hidden;
}

.view-toggle .btn {
  border: none;
  border-radius: 0;
  margin: 0;
}

.view-toggle .btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.file-list {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.file-list-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-list-header {
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  margin-bottom: 12px;
}

.list-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: #666;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #666;
}

.meta-type {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.meta-size {
  color: #007bff;
  font-weight: 500;
}

.meta-date {
  color: #999;
}

.file-item {
  padding: 12px;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.file-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
  transform: translateY(-1px);
}

.file-item.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, #f8f9ff, #ffffff);
}

.file-item-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.file-item-list {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.file-icon.image {
  background: linear-gradient(135deg, #e8f5e8, #d4edda);
}

.file-icon.document {
  background: linear-gradient(135deg, #e6f3ff, #cce7ff);
}

.file-icon.audio {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
}

.file-icon.video {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
}

.file-icon.archive {
  background: linear-gradient(135deg, #e2e3e5, #d6d8db);
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-name {
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 12px;
  color: #666;
  display: flex;
  gap: 12px;
}

.file-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.file-item:hover .file-actions {
  opacity: 1;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #666;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
  line-height: 1.5;
}

.editor-title {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
}

.editor-title .input-field {
  margin-bottom: 0;
}

.editor-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-controls-left,
.editor-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
}

.editor-container {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.text-editor {
  flex: 1;
  min-height: 450px;
  height: 450px;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  resize: vertical;
  transition: all 0.3s ease;
  background: white;
}

.text-editor:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.editor-footer {
  padding: 12px 20px;
  border-top: 1px solid #e1e8ed;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.editor-stats {
  display: flex;
  gap: 16px;
  color: #666;
}

.auto-save-status {
  color: #28a745;
  font-weight: 500;
}

.auto-save-status.saving {
  color: #ffc107;
}

/* 导入功能样式 */
.form-hint {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.import-preview-content {
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  padding: 12px;
  background: #f8f9fa;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 6px;
  border: 1px solid #e1e8ed;
}

.preview-info {
  flex: 1;
}

.preview-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.preview-meta {
  font-size: 12px;
  color: #666;
}

.preview-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.preview-image {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-text {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: #f8f9fa;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #e1e8ed;
}

.preview-markdown {
  line-height: 1.6;
}

.preview-markdown h1,
.preview-markdown h2,
.preview-markdown h3,
.preview-markdown h4,
.preview-markdown h5,
.preview-markdown h6 {
  margin-top: 24px;
  margin-bottom: 12px;
  color: #2c3e50;
}

.preview-markdown p {
  margin-bottom: 12px;
}

.preview-markdown code {
  background: #f8f9fa;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
}

.preview-markdown pre {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid #e1e8ed;
}

.preview-markdown blockquote {
  border-left: 4px solid #667eea;
  padding-left: 16px;
  margin: 16px 0;
  color: #666;
  font-style: italic;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e1e8ed;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #2c3e50;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid #e1e8ed;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 13px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.form-actions .btn {
  flex: 1;
}

.input-group {
  display: flex;
  gap: 8px;
}

.input-group .input-field {
  flex: 1;
  margin-bottom: 0;
  transition: color 0.3s ease;
}

.input-group .input-field[readonly] {
  background-color: #f8f9fa;
  cursor: pointer;
}

.input-group .input-field[readonly]:focus {
  background-color: #e9ecef;
}

.upload-area {
  border: 2px dashed #e1e8ed;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #667eea;
  background: #f8f9ff;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.upload-text p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #2c3e50;
}

.upload-hint {
  font-size: 12px;
  color: #666;
}

.upload-progress {
  margin-top: 20px;
}

.progress-item {
  padding: 12px;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  margin-bottom: 8px;
  background: white;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.file-name {
  font-weight: 600;
  color: #2c3e50;
}

.file-size {
  color: #666;
}

.progress-bar {
  height: 6px;
  background: #e1e8ed;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s ease;
  width: 0%;
}

.progress-status {
  font-size: 12px;
  color: #666;
  text-align: right;
}

.share-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.expire-time {
  margin-left: 24px;
  margin-top: 8px;
}

.loading {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .user-status-bar {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .login-prompt {
    flex-direction: column;
    gap: 8px;
  }
  
  .main-layout {
    height: auto;
    min-height: 500px;
  }
  
  .view-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .view-controls {
    justify-content: space-between;
  }
  
  .editor-title {
    flex-direction: column;
    gap: 8px;
  }
  
  .editor-controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .editor-container {
    min-height: 300px;
  }
  
  .text-editor {
    min-height: 250px;
    font-size: 16px; /* 移动端使用更大的字体 */
  }
  
  .editor-footer {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .editor-stats {
    justify-content: space-between;
  }
  
  .toolbar {
    justify-content: flex-start;
    margin-bottom: 12px;
  }
  
  .storage-stats {
    margin-top: 0;
    padding-top: 0;
  }
  
  .sidebar {
    max-height: none !important;
  }
  
  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

/* 暗黑模式支持 */
.dark-mode .user-status-bar {
  background: linear-gradient(135deg, #4a5568, #2d3748);
}

.dark-mode .view-container {
  background: #2d3748;
  border-color: #4a5568;
}

.dark-mode .view-header {
  background: #1a202c;
  border-color: #4a5568;
  color: #e2e8f0;
}

.dark-mode .file-tree {
  background: #2d3748;
  border-color: #4a5568;
}

.dark-mode .tree-item {
  color: #e2e8f0;
  border-color: #4a5568;
}

.dark-mode .tree-item:hover {
  background: #4a5568;
}

.dark-mode .file-item {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
}

.dark-mode .file-item:hover {
  background: #4a5568;
}

.dark-mode .text-editor {
  background: #2d3748;
  color: #e2e8f0;
  border-color: #4a5568;
}

.dark-mode .editor-footer {
  background: #1a202c;
  border-color: #4a5568;
  color: #e2e8f0;
}

.dark-mode .modal-content {
  background: #2d3748;
  color: #e2e8f0;
}

.dark-mode .modal-header {
  border-color: #4a5568;
}

.dark-mode .modal-footer {
  border-color: #4a5568;
}

.dark-mode .upload-area {
  background: #1a202c;
  border-color: #4a5568;
  color: #e2e8f0;
}

.dark-mode .upload-area:hover,
.dark-mode .upload-area.dragover {
  background: #2d3748;
}

.dark-mode .progress-item {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
}

/* 暗黑模式下的全屏编辑器 */
.dark-mode .editor-fullscreen {
  background: #2d3748 !important;
  color: #e2e8f0 !important;
}

.dark-mode .editor-fullscreen .view-header {
  background: #1a202c !important;
  border-color: #4a5568 !important;
  color: #e2e8f0 !important;
}

.dark-mode .editor-fullscreen .text-editor {
  background: #2d3748 !important;
  color: #e2e8f0 !important;
  border-color: #4a5568 !important;
}

.dark-mode .editor-fullscreen .editor-footer {
  background: #1a202c !important;
  border-color: #4a5568 !important;
  color: #e2e8f0 !important;
}

/* 编辑器增强样式 */
.text-editor::placeholder {
  color: #999;
  font-style: italic;
}

.text-editor:focus::placeholder {
  color: #ccc;
}

/* 全屏编辑模式 */
.editor-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: white !important;
  display: flex !important;
  flex-direction: column !important;
}

.editor-fullscreen .editor-container {
  height: calc(100vh - 120px) !important;
  min-height: auto !important;
  flex: 1 !important;
}

.editor-fullscreen .text-editor {
  min-height: calc(100vh - 200px) !important;
  height: calc(100vh - 200px) !important;
}

/* 编辑器工具栏增强 */
.editor-toolbar {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
  flex-wrap: wrap;
}

.editor-tool-btn {
  padding: 4px 8px;
  border: 1px solid #e1e8ed;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.editor-tool-btn:hover {
  background: #e9ecef;
  border-color: #667eea;
}

.editor-tool-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* 预览容器样式 */
.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 70vh;
  padding: 20px;
  overflow: auto;
}

/* 图片预览 */
.preview-image {
  max-width: 95%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  object-fit: contain;
  background: white;
  transition: opacity 0.3s ease;
}

/* 视频预览 */
.preview-video {
  width: 95%;
  max-width: 1200px;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 音频预览 */
.audio-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 16px;
  color: white;
  min-width: 400px;
  max-width: 600px;
}

.audio-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.audio-icon {
  font-size: 64px;
  opacity: 0.9;
}

.audio-title {
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  max-width: 350px;
  word-break: break-word;
}

.preview-audio {
  width: 100%;
  max-width: 400px;
}

/* 加载状态 */
.image-loading,
.video-loading,
.audio-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  font-size: 16px;
  color: #666;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px dashed #dee2e6;
}

/* 文本预览 */
.preview-text {
  width: 95%;
  max-width: 1000px;
  max-height: 75vh;
  padding: 24px;
  margin: 0;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Markdown预览 */
.preview-markdown {
  width: 95%;
  max-width: 1000px;
  max-height: 75vh;
  padding: 24px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview-markdown h1,
.preview-markdown h2,
.preview-markdown h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #333;
}

.preview-markdown h1 {
  font-size: 28px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 10px;
}

.preview-markdown h2 {
  font-size: 22px;
}

.preview-markdown h3 {
  font-size: 18px;
}

/* 错误状态 */
.preview-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
  text-align: center;
}

.error-icon {
  font-size: 48px;
  opacity: 0.6;
}

.error-message {
  font-size: 16px;
  color: #666;
}

/* 不支持的文件类型 */
.preview-unsupported {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px;
  text-align: center;
}

.unsupported-icon {
  font-size: 64px;
  opacity: 0.6;
}

.unsupported-message h3 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 18px;
}

.unsupported-message p {
  margin: 4px 0;
  color: #666;
  font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .preview-container {
    padding: 12px;
    min-height: 60vh;
  }
  
  .preview-image {
    max-width: 100%;
    max-height: 70vh;
  }
  
  .preview-video {
    width: 100%;
    max-height: 70vh;
  }
  
  .audio-preview {
    min-width: auto;
    width: 100%;
    padding: 30px 20px;
  }
  
  .audio-icon {
    font-size: 48px;
  }
  
  .preview-text,
  .preview-markdown {
    width: 100%;
    max-height: 60vh;
    padding: 16px;
  }
  
  .preview-text {
    font-size: 13px;
  }
}
/* 批量操作样式 */
.batch-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff3cd;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ffeaa7;
  flex-wrap: wrap;
}

.batch-info {
  font-size: 13px;
  color: #856404;
  font-weight: 500;
  margin-right: 4px;
}

.normal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 文件项选择状态 */
.file-item.batch-mode {
  cursor: pointer;
  position: relative;
}

.file-item.batch-mode::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #dee2e6;
  border-radius: 3px;
  background: white;
  z-index: 1;
}

.file-item.batch-mode.selected::before {
  background: #007bff;
  border-color: #007bff;
}

.file-item.batch-mode.selected::after {
  content: '✓';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
}

.file-item.batch-mode .file-icon {
  margin-left: 30px;
}

.file-item.batch-mode.selected {
  background: #e3f2fd;
  border-color: #2196f3;
}

/* 预览导航样式 */
.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.preview-nav:hover {
  background: rgba(0, 0, 0, 0.9);
}

.preview-nav.prev {
  left: 20px;
}

.preview-nav.next {
  right: 20px;
}

.preview-container:hover .preview-nav {
  opacity: 1;
}

/* 预览信息栏 - 移到底部中央 */
.preview-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
}

.preview-container:hover .preview-info {
  opacity: 1;
}

/* 文件夹相关样式 */
.folder-tree-container {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 10px;
}

.folder-tree-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}

.folder-tree-item:hover {
  background: #f5f7fa;
}

.folder-tree-item.active {
  background: #e3f2fd;
  color: #1976d2;
}

.folder-tree-item.dragging-over {
  background: #bbdefb;
  border: 2px dashed #1976d2;
}

.folder-tree-item.dragging {
  opacity: 0.5;
}

.folder-indent {
  width: 20px;
  flex-shrink: 0;
}

.folder-toggle {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 4px;
  font-size: 12px;
  color: #666;
  flex-shrink: 0;
}

.folder-toggle:hover {
  color: #333;
}

.folder-toggle.collapsed::before {
  content: '▶';
}

.folder-toggle.expanded::before {
  content: '▼';
}

.folder-icon {
  font-size: 18px;
  margin-right: 8px;
  flex-shrink: 0;
}

.folder-name {
  flex: 1;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-count {
  font-size: 11px;
  color: #999;
  margin-left: 8px;
  flex-shrink: 0;
}

.folder-actions {
  display: none;
  gap: 4px;
  margin-left: 8px;
}

.folder-tree-item:hover .folder-actions {
  display: flex;
}

.folder-action-btn {
  padding: 2px 6px;
  font-size: 11px;
  border: none;
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.folder-action-btn:hover {
  background: rgba(0,0,0,0.1);
}

/* 面包屑导航 */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 14px;
  color: #666;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.breadcrumb-item:hover {
  color: #1976d2;
}

.breadcrumb-item.active {
  color: #333;
  font-weight: 500;
  cursor: default;
}

.breadcrumb-separator {
  color: #ccc;
}

/* 文件夹网格视图 */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

.folder-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.folder-grid-item:hover {
  border-color: #1976d2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.folder-grid-item.selected {
  border-color: #1976d2;
  background: #e3f2fd;
}

.folder-grid-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.folder-grid-name {
  font-size: 13px;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
}

.folder-grid-meta {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

/* 右键菜单 */
.context-menu {
  position: fixed;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 4px 0;
  z-index: 10000;
  min-width: 160px;
  display: none;
}

.context-menu.show {
  display: block;
}

.context-menu-item {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.context-menu-item:hover {
  background: #f5f7fa;
}

.context-menu-item.danger {
  color: #dc3545;
}

.context-menu-item.danger:hover {
  background: #fee;
}

.context-menu-separator {
  height: 1px;
  background: #e1e8ed;
  margin: 4px 0;
}

/* 拖拽提示 */
.drag-preview {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  background: white;
  border: 1px solid #1976d2;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drag-count {
  background: #1976d2;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

/* 文件夹颜色选择器 */
.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: #333;
  box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
}

/* 图标选择器 */
.icon-picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.icon-option {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.icon-option:hover {
  background: #f5f7fa;
}

.icon-option.selected {
  border-color: #1976d2;
  background: #e3f2fd;
}

/* 空文件夹状态 */
.empty-folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #999;
}

.empty-folder-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-folder-text {
  font-size: 16px;
  margin-bottom: 8px;
}

.empty-folder-hint {
  font-size: 13px;
  color: #bbb;
}

/* 文件夹统计卡片 */
.folder-stats-card {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.folder-stats-title {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 12px;
}

.folder-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.folder-stat-item {
  display: flex;
  flex-direction: column;
}

.folder-stat-label {
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.folder-stat-value {
  font-size: 18px;
  font-weight: 600;
}

/* 文件夹路径显示 */
.folder-path-display {
  background: #f5f7fa;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.folder-path-icon {
  color: #999;
}

/* 移动文件夹对话框 */
.move-dialog-tree {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  padding: 8px;
  margin: 12px 0;
}

.move-dialog-item {
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.move-dialog-item:hover {
  background: #f5f7fa;
}

.move-dialog-item.selected {
  background: #e3f2fd;
  color: #1976d2;
}

.move-dialog-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
  }
  
  .folder-grid-icon {
    font-size: 36px;
  }
  
  .icon-picker {
    grid-template-columns: repeat(6, 1fr);
  }
}
