/* ===== 全局样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --secondary-color: #95a5a6;
  --success-color: #2ecc71;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --info-color: #3498db;
  --bg-color: #f5f6fa;
  --card-bg: #ffffff;
  --text-color: #2c3e50;
  --text-muted: #7f8c8d;
  --border-color: #dcdde1;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== 导航栏 ===== */
.navbar {
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.user-info {
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== 主容器 ===== */
.container {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

/* ===== 按钮样式（简约清新） ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  background-color: transparent;
  color: var(--text-color);
}

/* 主要按钮 - 淡淡的背景色 */
.btn-primary {
  background-color: #e8f4fd;
  border-color: #bee5f8;
  color: #0c6fc7;
}

.btn-primary:hover {
  background-color: #d1e9fb;
  border-color: #9bd0f5;
}

/* 次要按钮 - 灰色背景 */
.btn-secondary {
  background-color: #f5f5f5;
  border-color: #e0e0e0;
  color: #666;
}

.btn-secondary:hover {
  background-color: #ebebeb;
  border-color: #d0d0d0;
}

/* 危险按钮 - 淡红色 */
.btn-danger {
  background-color: #fde8e8;
  border-color: #f8c9c9;
  color: #c0392b;
}

.btn-danger:hover {
  background-color: #fbd1d1;
  border-color: #f5a8a8;
}

/* 信息按钮 - 淡蓝色 */
.btn-info {
  background-color: #e8f4fd;
  border-color: #bee5f8;
  color: #2980b9;
}

.btn-info:hover {
  background-color: #d1e9fb;
  border-color: #9bd0f5;
}

/* 成功按钮 - 淡绿色 */
.btn-success {
  background-color: #e8f8f0;
  border-color: #b8ebd0;
  color: #27ae60;
}

.btn-success:hover {
  background-color: #d1f2e0;
  border-color: #8fe0b5;
}

/* 小按钮 */
.btn-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
}

/* 块级按钮 */
.btn-block {
  width: 100%;
  padding: 0.7rem;
}

/* 刷新按钮动画 */
.btn.refreshing svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== 表单样式 ===== */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"] {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.form-group small {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 150px;
}

.inline-form {
  display: inline;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ===== 认证页面 ===== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px - 60px);
  padding: 2rem;
}

.auth-box {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
}

.auth-box h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.auth-links a {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}

.auth-links a:hover {
  color: var(--primary-color);
}

.default-account {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-color);
  border-radius: 6px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== 提示框 ===== */
.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert-error {
  background-color: #fadbd8;
  color: #c0392b;
  border: 1px solid #f1948a;
}

.alert-success {
  background-color: #d5f4e6;
  color: #27ae60;
  border: 1px solid #82e0aa;
}

/* ===== 文件浏览器 ===== */
.file-browser {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.browser-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.browser-header h2 {
  font-size: 1.3rem;
  color: var(--text-color);
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background-color: var(--bg-color);
  border-radius: 6px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.breadcrumb-item {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-item:hover {
  text-decoration: underline;
}

.breadcrumb-item.current {
  color: var(--text-color);
  font-weight: 500;
}

.breadcrumb-separator {
  color: var(--text-muted);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-controls select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
}

.sort-controls button {
  min-width: 36px;
}

.back-link {
  margin-bottom: 1rem;
}

/* ===== 文件列表表格 ===== */
.file-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.file-table th,
.file-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.file-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  position: relative;
  padding-right: 24px;
}

.file-table th.sortable:hover {
  color: var(--primary-color);
  background-color: var(--bg-color);
}

.file-table th.sortable .sort-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  opacity: 0.4;
  transition: all 0.2s;
}

.file-table th.sortable:hover .sort-icon {
  opacity: 0.7;
}

.file-table th.sort-asc,
.file-table th.sort-desc {
  color: var(--primary-color);
  background-color: var(--bg-color);
}

.file-table th.sort-asc .sort-icon,
.file-table th.sort-desc .sort-icon {
  opacity: 1;
  color: var(--primary-color);
}

.file-table tr:hover {
  background-color: var(--bg-color);
}

.file-item.folder {
  background-color: #f8f9fa;
}

.col-name {
  width: 40%;
}

.col-type {
  width: 20%;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.col-size {
  width: 12%;
  color: var(--text-muted);
}

.col-date {
  width: 18%;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.col-actions {
  width: 15%;
  text-align: right;
}

.action-buttons {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.action-buttons .btn {
  white-space: nowrap;
  padding: 0.2rem 0.4rem;
  min-width: 28px;
  height: 28px;
}

.item-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 1.1rem;
}

/* ===== 文件预览 ===== */
.file-preview {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
}

.preview-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.preview-header h2 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.file-info-bar {
  padding: 0.8rem 1.5rem;
  background-color: var(--bg-color);
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.preview-content {
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* 图片预览 */
.image-preview {
  max-width: 100%;
}

.preview-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* 视频预览 */
.video-preview {
  width: 100%;
  max-width: 900px;
}

.preview-video {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* 音频预览 */
.audio-preview {
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.preview-audio {
  width: 100%;
}

/* 文本预览 */
.text-preview {
  width: 100%;
  max-width: 1000px;
}

.text-preview pre {
  background-color: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  max-height: 70vh;
  overflow-y: auto;
}

.text-preview code {
  background: none;
  padding: 0;
}

/* Markdown 预览 */
.markdown-preview-container {
  width: 100%;
  max-width: 1000px;
  height: 100%;
  overflow-y: auto;
  padding: 1rem;
}

.markdown-preview {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  line-height: 1.8;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.markdown-preview p {
  margin-bottom: 1rem;
}

.markdown-preview code {
  background-color: var(--bg-color);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.markdown-preview pre {
  background-color: var(--bg-color);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

.markdown-preview pre code {
  background: none;
  padding: 0;
}

.markdown-preview blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
}

.markdown-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.markdown-preview th,
.markdown-preview td {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  text-align: left;
}

.markdown-preview th {
  background-color: var(--bg-color);
  font-weight: 600;
}

/* Mermaid 图表预览 */
.mermaid-preview-container {
  width: 100%;
  max-width: 1200px;
}

.mermaid-preview {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  min-height: 60vh;
}

.mermaid-preview .mermaid {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
}

.mermaid-preview .mermaid svg {
  max-width: 100%;
  max-height: 70vh;
  height: auto;
}

/* 可缩放容器 */
.zoomable-container {
  width: 100%;
  max-width: 1200px;
  height: calc(100vh - 280px);
  min-height: 500px;
  position: relative;
  background-color: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.zoomable-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  will-change: transform;
}

/* Mermaid 图表时移除居中定位 */
#zoomableContent:has(.mermaid) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none !important;
}

.zoomable-content img {
  max-width: none;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Mermaid 图表容器 - 使用 panzoom 库时重新调整布局 */
.zoomable-content .mermaid {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.zoomable-content .mermaid svg {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.zoom-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.zoom-controls button {
  width: 36px;
  height: 36px;
  border: none;
  background-color: transparent;
  color: var(--text-color);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.zoom-controls button:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
}

.zoom-controls span {
  min-width: 50px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.zoom-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.zoomable-container:hover .zoom-hint {
  opacity: 1;
}

/* 无法预览 */
.no-preview {
  text-align: center;
  padding: 3rem;
}

.no-preview-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.no-preview p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.no-preview .file-type {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ===== 编辑器样式 ===== */
.editor-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 280px);
  min-height: 400px;
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.editor-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.editor-status.editing {
  color: var(--warning-color);
}

.editor-actions {
  display: flex;
  gap: 0.5rem;
}

.editor-textarea {
  flex: 1;
  width: 100%;
  height: 100%;
  padding: 1rem;
  border: none;
  outline: none;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: none;
  background-color: var(--card-bg);
  color: var(--text-color);
  overflow-y: auto;
}

.editor-textarea:focus {
  background-color: #fafafa;
}

.editor-textarea[readonly] {
  background-color: var(--bg-color);
}

/* 全屏样式 */
.file-preview.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  z-index: 9999;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.file-preview.fullscreen .preview-header {
  flex-shrink: 0;
}

.file-preview.fullscreen .preview-content {
  flex: 1;
  min-height: 0;
  padding: 1rem;
}

.file-preview.fullscreen .zoomable-container,
.file-preview.fullscreen .editor-container {
  height: calc(100vh - 120px);
  max-width: 100%;
  max-height: calc(100vh - 120px);
}

/* 旋转动画 */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* ===== 页面 Loading ===== */
.page-loading {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
}

.page-loading.show {
  display: flex;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spinner 1s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

.page-loading p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== 上传模态框 ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal[style*="flex"] {
  display: flex !important;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

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

.modal-body {
  padding: 1.5rem;
}

/* 上传进度条 */
.upload-progress {
  margin: 1rem 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
  width: 0%;
}

/* ===== 管理员页面 ===== */
.admin-container {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.create-user-section {
  background-color: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
}

.create-user-section h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.users-list-section h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.users-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.users-table tr:hover {
  background-color: var(--bg-color);
}

.badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-admin {
  background-color: #fadbd8;
  color: #c0392b;
}

.badge-user {
  background-color: #d6eaf8;
  color: #2874a6;
}

.text-muted {
  color: var(--text-muted);
}

/* ===== 错误页面 ===== */
.error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px - 60px);
  padding: 2rem;
}

.error-box {
  text-align: center;
  max-width: 500px;
}

.error-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.error-box h2 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.error-message {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ===== 页脚 ===== */
.footer {
  background-color: var(--card-bg);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }
  
  .nav-brand a {
    font-size: 1.2rem;
  }
  
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }
  
  .user-info {
    display: none;
  }
  
  .container {
    padding: 1rem;
  }
  
  .browser-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .file-table {
    font-size: 0.9rem;
  }
  
  .file-table th,
  .file-table td {
    padding: 0.6rem;
  }
  
  .col-type,
  .col-date {
    display: none;
  }
  
  .col-actions {
    width: auto;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 3px;
  }
  
  .action-buttons .btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .preview-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .file-info-bar {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-row .form-group {
    width: 100%;
  }
  
  .error-actions {
    flex-direction: column;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
