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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
               'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #f5f7fa;
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: #1a1a1a;
  margin-bottom: 32px;
  padding: 24px 20px;
}

header h1 {
  font-size: 1.75rem;
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 0.95rem;
  color: #666;
}

/* 上传区域 */
.upload-section {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 6px;
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fafbfc;
}

.upload-area:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.upload-area.drag-over {
  border-color: #4b5563;
  background: #f3f4f6;
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: #6b7280;
}

.upload-text {
  font-size: 1rem;
  color: #374151;
  font-weight: 500;
  margin-bottom: 8px;
}

.upload-hint {
  color: #9ca3af;
  font-size: 0.875rem;
}

/* 进度条 */
.progress-container {
  margin-top: 20px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  text-align: center;
  color: #4b5563;
  font-size: 0.875rem;
}

/* 文件列表 */
.files-section {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.section-header h2 {
  font-size: 1.125rem;
  color: #1a1a1a;
  font-weight: 600;
}

.btn-refresh {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-refresh svg {
  width: 16px;
  height: 16px;
}

.btn-refresh:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.files-list {
  min-height: 200px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 12px;
  transition: all 0.15s ease;
  background: #fafbfc;
}

.file-item:hover {
  border-color: #d1d5db;
  background: #ffffff;
}

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

.file-icon {
  width: 40px;
  height: 40px;
  background: #f3f4f6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-icon::before {
  content: '';
  width: 20px;
  height: 24px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>') no-repeat center;
  background-size: contain;
}

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

.file-name {
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 4px;
  word-break: break-all;
  font-size: 0.9375rem;
}

.file-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8125rem;
  color: #6b7280;
}

.file-size {
  color: #9ca3af;
}

.file-time {
  color: #6b7280;
}

.expiry-warning {
  color: #dc2626;
  font-weight: 500;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 7px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  background: white;
  color: #374151;
}

.btn-download {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.btn-download:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-delete {
  background: white;
  color: #dc2626;
  border-color: #fca5a5;
}

.btn-delete:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.empty-state, .loading {
  text-align: center;
  padding: 48px 20px;
  color: #9ca3af;
  font-size: 0.9375rem;
}

/* 统计信息 */
.stats {
  background: white;
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  gap: 24px;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-label {
  color: #6b7280;
  font-size: 0.8125rem;
  display: block;
  margin-bottom: 6px;
}

.stat-value {
  color: #1a1a1a;
  font-size: 1.5rem;
  font-weight: 600;
}

/* 提示消息 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  color: #1a1a1a;
  padding: 14px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(400px);
  transition: transform 0.3s ease;
  z-index: 1000;
  max-width: 320px;
  border: 1px solid #e5e7eb;
  font-size: 0.9375rem;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.toast.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  .upload-section, .files-section, .stats {
    padding: 16px;
  }

  .upload-area {
    padding: 32px 16px;
  }

  .upload-icon {
    width: 40px;
    height: 40px;
  }

  .file-item {
    flex-direction: column;
    gap: 12px;
  }

  .file-info {
    width: 100%;
  }

  .file-actions {
    width: 100%;
    justify-content: stretch;
  }

  .btn {
    flex: 1;
  }

  .file-meta {
    flex-direction: column;
    gap: 4px;
  }

  .stats {
    gap: 16px;
  }
}
