/* ============================================
   FengYun Cloud - 深色玻璃态 2.0
   Dark Glassmorphism v2 — 精致升级版
   ============================================ */

:root {
  /* —— 主色调（更现代的靛蓝紫渐变） —— */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --primary-violet: #8b5cf6;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --primary-glow: rgba(99, 102, 241, 0.35);
  --primary-glow-strong: rgba(99, 102, 241, 0.55);

  /* —— 背景色（更深邃） —— */
  --bg: rgba(255, 255, 255, 0.035);
  --bg-light: rgba(255, 255, 255, 0.055);
  --bg-input: rgba(0, 0, 0, 0.35);
  --bg-card: rgba(255, 255, 255, 0.045);
  --bg-hover: rgba(255, 255, 255, 0.085);

  /* —— 卡片毛玻璃 —— */
  --card-bg: rgba(255, 255, 255, 0.045);
  --card-hover-bg: rgba(255, 255, 255, 0.1);
  --card-blur: 32px;
  --card-blur-hover: 40px;

  /* —— 文字 —— */
  --text: #f1f5f9;
  --text-primary: #f1f5f9;
  --text-secondary: rgba(241, 245, 249, 0.72);
  --text-light: rgba(241, 245, 249, 0.42);
  --text-muted: rgba(241, 245, 249, 0.28);

  /* —— 边框 —— */
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.17);
  --border-glow: rgba(99, 102, 241, 0.35);

  /* —— 状态色 —— */
  --success: #34d399;
  --success-dark: #10b981;
  --error: #f87171;
  --error-dark: #ef4444;
  --warning: #fbbf24;
  --warning-dark: #f59e0b;
  --info: #60a5fa;

  /* —— 圆角（统一化 + 更柔和） —— */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* —— 阴影（多层玻璃态） —— */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.2), 0 8px 28px rgba(99, 102, 241, 0.25);
  --shadow-glow-strong: 0 0 0 1px rgba(99, 102, 241, 0.4), 0 12px 40px rgba(99, 102, 241, 0.4);

  /* —— 过渡（更丝滑的贝塞尔） —— */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: all 0.25s var(--ease);
  --transition-fast: all 0.15s var(--ease);
  --transition-slow: all 0.4s var(--ease);
}

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

html, body {
  height: 100%;
  font-family: "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background: #0a0a1a;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(ellipse 1000px 600px at 10% -10%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 800px 500px at 90% 10%, rgba(139, 92, 246, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 600px 400px at 50% 120%, rgba(236, 72, 153, 0.18) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a1a 0%, #111128 100%);
  background-attachment: fixed;
}

body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  opacity: .28;
  pointer-events: none;
  z-index: 0;
}
body::before { width: 520px; height: 520px; background: var(--primary-gradient); top: -160px; left: -120px; animation: floatGlow 18s ease-in-out infinite alternate; }
body::after  { width: 460px; height: 460px; background: radial-gradient(circle, #ec4899, transparent 70%); bottom: -160px; right: -120px; animation: floatGlow 22s ease-in-out infinite alternate-reverse; }

@keyframes floatGlow {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.08); }
}

/* —— 全局滚动条现代化 —— */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background var(--transition-fast);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: padding-box; border: 2px solid transparent; }

/* ============================================
   通用按钮（更精致 + 微动效）
   ============================================ */
.btn {
  padding: 9px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--primary-glow);
  font-weight: 600;
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px var(--primary-glow-strong); }
.btn.primary:active { transform: translateY(0); box-shadow: 0 2px 10px var(--primary-glow); }
.btn.danger { background: rgba(248, 113, 113, 0.15); border-color: rgba(248, 113, 113, 0.3); color: var(--error); }
.btn.danger:hover { background: rgba(248, 113, 113, 0.25); box-shadow: 0 4px 14px rgba(248, 113, 113, 0.3); }

/* ============================================
   主应用布局
   ============================================ */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: rgba(17, 17, 40, 0.6);
  backdrop-filter: blur(32px) saturate(140%); -webkit-backdrop-filter: blur(32px) saturate(140%);
  border-right: 1px solid var(--border);
  color: var(--text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

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

.sidebar-logo { display: flex; align-items: center; gap: 12px; }

.sidebar-logo-icon {
  width: 42px; height: 42px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px var(--primary-glow-strong);
  position: relative;
}
.sidebar-logo-icon::after {
  content: '';
  position: absolute; inset: -2px;
  border-radius: inherit;
  background: var(--primary-gradient);
  filter: blur(8px);
  opacity: 0.4;
  z-index: -1;
}
.sidebar-logo-icon svg { width: 24px; height: 24px; color: white; }

.sidebar-logo-text { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .3px; }

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

.nav-group-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3); padding: 14px 12px 6px; letter-spacing: 0.8px;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; margin-bottom: 3px;
  border-radius: var(--radius); cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
  color: #fff;
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: inset 2px 0 0 0 var(--primary), 0 2px 10px rgba(99, 102, 241, 0.2);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item-text { font-size: 14px; font-weight: 500; }

.sidebar-footer {
  padding: 14px; border-top: 1px solid var(--border);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.user-card:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--border-strong); transform: translateY(-1px); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.user-info { flex: 1; overflow: hidden; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.user-storage { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.storage-bar { height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.storage-bar-fill { height: 100%; background: linear-gradient(90deg, var(--success), var(--success-dark)); border-radius: 2px; transition: width .3s var(--ease); }
.storage-bar-fill.warning { background: linear-gradient(90deg, var(--warning), var(--warning-dark)); }
.storage-bar-fill.danger { background: linear-gradient(90deg, var(--error), var(--error-dark)); }

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

/* 顶部工具栏 */
.toolbar {
  height: 60px;
  padding: 0 24px;
  background: rgba(17, 17, 40, 0.5);
  backdrop-filter: blur(32px) saturate(140%); -webkit-backdrop-filter: blur(32px) saturate(140%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
}
.toolbar-left { display: flex; align-items: center; gap: 14px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.breadcrumb-item { cursor: pointer; transition: color var(--transition-fast); }
.breadcrumb-item:hover { color: var(--primary-light); }
.breadcrumb-item.current { color: var(--text); font-weight: 600; }
.breadcrumb-separator { color: var(--text-muted); }
.toolbar-center { flex: 1; max-width: 400px; margin: 0 24px; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }

/* 内容区 */
.content-area {
  flex: 1; padding: 28px; overflow-y: auto; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.action-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

/* ============================================
   文件列表 - 图标视图（更有层次）
   ============================================ */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.file-card {
  position: relative;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 16px; cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  overflow: hidden;
}
.file-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-glow);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(99, 102, 241, 0.15);
}
.file-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.28), 0 8px 28px rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.08);
}
.file-icon {
  width: 72px; height: 72px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md); font-size: 32px; color: white;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 14px rgba(0,0,0,0.3);
}
.file-icon.folder { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.file-icon.image { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.file-icon.video { background: linear-gradient(135deg, #f87171, #dc2626); }
.file-icon.audio { background: linear-gradient(135deg, #34d399, #059669); }
.file-icon.document { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.file-icon.archive { background: linear-gradient(135deg, #f97316, #ea580c); }
.file-icon.application { background: linear-gradient(135deg, #22c55e, #15803d); }
.file-icon.file { background: linear-gradient(135deg, #94a3b8, #475569); }

.file-info { text-align: center; }
.file-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* 分享角标 */
.file-share-badge {
  position: absolute;
  top: 8px; right: 8px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(102,126,234,.5);
  z-index: 2;
  pointer-events: none;
}
.file-share-badge svg { width: 14px; height: 14px; }

/* 列表视图 */
.file-list {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto; overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}
.file-list-header {
  display: grid;
  grid-template-columns: 40px 1fr 120px 120px 180px 140px 80px;
  padding: 12px 16px;
  background: rgba(255,255,255,.04);
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  min-width: 760px; white-space: nowrap;
}
.file-list-item {
  display: grid;
  grid-template-columns: 40px 1fr 120px 120px 180px 140px 80px;
  padding: 12px 16px;
  align-items: center; cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid rgba(255,255,255,.05);
  min-width: 760px; white-space: nowrap;
}
.file-list-item:hover { background: rgba(255,255,255,.05); }
.file-list-item.selected { background: rgba(102,126,234,.12); }
.file-hash { font-size: 11px; font-family: 'Consolas', 'Menlo', monospace; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px;
  background: rgba(255,255,255,.1);
}
.file-list-name { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text); }

/* ============================================
   右键菜单
   ============================================ */
.context-menu {
  position: fixed; z-index: 1000;
  background: rgba(40,36,70,.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 24px rgba(102,126,234,.15);
  min-width: 180px;
  animation: fadeIn .15s ease-out;
}
.context-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  cursor: pointer; font-size: 13px; color: rgba(255,255,255,.85);
  transition: all .12s;
}
.context-menu-item:hover { background: rgba(102,126,234,.2); color: #fff; }
.context-menu-item.danger:hover { background: rgba(231,76,60,.2); color: #ff8f8f; }
.context-menu-item svg { width: 15px; height: 15px; }
.context-menu-divider { height: 1px; background: var(--border); margin: 6px 8px; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

/* ============================================
   模态框
   ============================================ */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn .2s ease-out;
}
.modal {
  background: rgba(35,32,60,.95);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 28px;
  min-width: 400px; max-width: 90vw; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 72px rgba(0,0,0,.55), 0 0 40px rgba(102,126,234,.15);
  animation: modalIn .25s cubic-bezier(.34,1.56,.64,1);
  color: var(--text);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all .15s;
}
.modal-close:hover { background: rgba(231,76,60,.2); color: #ff8f8f; border-color: rgba(231,76,60,.3); }
.modal-body { margin-bottom: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; }

/* ============================================
   上传进度
   ============================================ */
.upload-queue { position: fixed; bottom: 24px; right: 24px; z-index: 900; max-width: 380px; width: 100%; }
.upload-item {
  background: rgba(35,32,60,.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-bottom: 10px;
  box-shadow: 0 10px 32px rgba(0,0,0,.4);
  animation: slideIn .3s ease-out;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
.upload-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.upload-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
}
.upload-icon svg { width: 18px; height: 18px; color: white; }
.upload-info { flex: 1; min-width: 0; }
.upload-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-status-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.upload-status { font-size: 11px; color: var(--text-light); }
.upload-meta { font-size: 11px; color: var(--primary-light); font-weight: 500; font-variant-numeric: tabular-nums; background: rgba(102,126,234,.15); padding: 1px 6px; border-radius: 8px; }
.upload-close { width: 24px; height: 24px; border-radius: 50%; border: none; background: transparent; cursor: pointer; color: var(--text-light); display: flex; align-items: center; justify-content: center; }
.upload-close:hover { background: rgba(231,76,60,.2); color: #ff8f8f; }
.progress-bar { height: 6px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--primary)); border-radius: 3px; transition: width .3s ease; }
.progress-bar-fill.success { background: linear-gradient(90deg, #2ecc71, #27ae60); }
.progress-bar-fill.error { background: linear-gradient(90deg, #e74c3c, #c0392b); }

/* ============================================
   空状态 / Toast / 任务
   ============================================ */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon {
  width: 100px; height: 100px; margin: 0 auto 20px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.empty-icon svg { width: 48px; height: 48px; color: var(--text-light); }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-desc { font-size: 13px; color: var(--text-secondary); }

.toast-container { position: fixed; top: 24px; right: 24px; z-index: 1100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: rgba(35,32,60,.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 18px;
  box-shadow: 0 10px 32px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 10px; min-width: 260px;
  animation: slideIn .3s ease-out;
}
.toast-icon { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast-icon.success { background: rgba(46,204,113,.15); color: var(--success); }
.toast-icon.error { background: rgba(231,76,60,.15); color: var(--error); }
.toast-icon.warning { background: rgba(243,156,18,.15); color: var(--warning); }
.toast-icon.info { background: rgba(102,126,234,.15); color: var(--primary); }
.toast-message { font-size: 13px; color: var(--text); }

.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-item {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
}
.task-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.task-name { font-size: 14px; font-weight: 600; color: var(--text); }
.task-status { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.task-status.waiting { background: rgba(255,255,255,.1); color: var(--text-secondary); }
.task-status.downloading { background: rgba(102,126,234,.15); color: var(--primary-light); }
.task-status.completed { background: rgba(46,204,113,.15); color: var(--success); }
.task-status.failed { background: rgba(231,76,60,.15); color: var(--error); }
.task-url { font-size: 11px; color: var(--text-light); margin-bottom: 10px; word-break: break-all; }
.task-progress { display: flex; align-items: center; gap: 10px; }
.task-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.task-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--primary)); border-radius: 3px; transition: width .5s ease; }
.task-progress-text { font-size: 11px; color: var(--text-secondary); min-width: 55px; text-align: right; }

/* ============================================
   管理后台
   ============================================ */
.admin-page { padding: 20px; }
.admin-header { margin-bottom: 20px; }
.admin-header h2 { margin: 0 0 14px 0; font-size: 22px; color: var(--text); background: linear-gradient(135deg,#fff,rgba(255,255,255,.6)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tab {
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text-secondary);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .15s;
}
.admin-tab:hover { background: rgba(255,255,255,.08); color: var(--text); }
.admin-tab.active {
  background: var(--primary-gradient);
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(102,126,234,.4);
}
.admin-card {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 22px;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; padding: 10px 12px;
  background: rgba(255,255,255,.04);
  color: var(--text-secondary); font-weight: 600;
  border-bottom: 1px solid var(--border); font-size: 12px;
}
.admin-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--text); }
.admin-table tbody tr:hover { background: rgba(255,255,255,.03); }
.admin-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.admin-actions .btn { padding: 4px 10px; font-size: 12px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge.admin { background: linear-gradient(135deg,#ff7e5f,#feb47b); color: #fff; }
.badge.user { background: rgba(102,126,234,.2); color: var(--primary-light); }
.badge.ok { background: rgba(46,204,113,.15); color: var(--success); }
.badge.stop { background: rgba(255,255,255,.1); color: var(--text-secondary); }

.admin-user-edit { width: 460px; max-width: 90vw; }
.admin-user-edit h3 { margin: 0 0 14px; color: var(--text); }
.admin-user-edit label { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--text-secondary); }
.admin-user-edit input[type="text"], .admin-user-edit input[type="email"], .admin-user-edit input[type="number"],
.admin-user-edit input:not([type]), .admin-user-edit select {
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px; background: var(--bg-input); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.admin-user-edit input:focus, .admin-user-edit select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102,126,234,.2);
}
.admin-user-edit input[type="checkbox"] { margin-right: 6px; }
.admin-toggle { display: flex; gap: 20px; margin-bottom: 12px; font-size: 13px; color: var(--text); }
.admin-hr { border: none; border-top: 1px dashed var(--border); margin: 22px 0; }

.aria2-section h3 { margin: 0 0 12px; font-size: 16px; color: var(--text); }
.aria2-section label { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--text-secondary); }
.aria2-section label input[type="text"], .aria2-section label input:not([type]) {
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px; background: var(--bg-input); color: var(--text);
}
.aria2-binary-info { background: rgba(102,126,234,.1); border: 1px solid rgba(102,126,234,.2); border-radius: 10px; padding: 12px 16px; margin: 8px 0; font-size: 13px; }
.aria2-binary-info p { margin: 4px 0; }
.aria2-binary-info code { background: rgba(0,0,0,.3); padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.aria2-btns { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.aria2-section .hint { font-size: 12px; color: #f39c12; background: rgba(243,156,18,.1); border-radius: 8px; padding: 10px 14px; border-left: 3px solid #f39c12; margin-top: 12px; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; animation: pulse 1.5s infinite; }
.status-dot.ok { background: #4caf50; box-shadow: 0 0 8px #4caf50; }
.status-dot.stop { background: #9e9e9e; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

.about-box { text-align: center; padding: 30px 20px; }
.about-box h2 { margin: 0; font-size: 28px; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.about-box .version { color: var(--text-secondary); margin: 4px 0 16px; }
.about-box p { color: var(--text-secondary); margin: 6px 0; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 12px; margin-top: 20px; }
.about-grid > div { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 14px; font-size: 13px; text-align: left; }

/* ============================================
   滚动条
   ============================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.25); }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.mobile-open {
    display: flex; position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 200; width: 260px;
  }
  .file-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .toolbar-center { display: none; }
  .content-area { padding: 16px; }
  .modal { min-width: 0; width: 100%; padding: 22px; border-radius: 16px; }
  .toolbar { padding: 0 14px; height: 54px; }
  .admin-card { padding: 16px; border-radius: 14px; }
  .admin-page { padding: 14px; }
}

/* ============================================
   拖拽上传
   ============================================ */
.drop-zone {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(102,126,234,.1);
  border: 3px dashed var(--primary);
  border-radius: 20px; margin: 20px;
  z-index: 500; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  animation: pulse-border 1.5s ease-in-out infinite;
}
@keyframes pulse-border { 0%,100% { border-color: var(--primary); } 50% { border-color: var(--primary-light); } }
.drop-zone-content {
  text-align: center;
  background: rgba(35,32,60,.95);
  backdrop-filter: blur(20px);
  padding: 36px 56px; border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(102,126,234,.3);
}
.drop-zone-content svg { width: 56px; height: 56px; color: var(--primary); margin-bottom: 14px; }
.drop-zone-content h3 { font-size: 22px; color: var(--primary-light); margin-bottom: 8px; }
.drop-zone-content p { color: var(--text-secondary); }

/* 图标按钮（mobile hamburger） */
.neu-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  cursor: pointer; color: var(--text-secondary);
  transition: all .15s;
}
.neu-icon-btn:hover { background: rgba(255,255,255,.12); color: var(--text); }

/* ======= 工具栏按钮 & 搜索框 ======= */
.neu-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .18s ease;
  backdrop-filter: blur(8px);
}
.neu-btn:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.25);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.neu-btn:active { transform: translateY(0); }
.neu-btn svg { flex-shrink: 0; }
.neu-btn-primary {
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 4px 14px rgba(102,126,234,.35);
  color: #fff;
}
.neu-btn-primary:hover {
  box-shadow: 0 8px 28px rgba(102,126,234,.55);
  border-color: transparent;
  transform: translateY(-1px);
}
.neu-input {
  width: 280px; padding: 9px 14px; border-radius: 10px;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--border);
  color: var(--text); font-size: 13px;
  outline: none; transition: all .18s ease;
  backdrop-filter: blur(8px);
}
.neu-input::placeholder { color: var(--text-muted); }
.neu-input:focus {
  border-color: rgba(102,126,234,.7);
  background: rgba(0,0,0,.5);
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
  width: 320px;
}

/* ======= 分享下载独立页面 ======= */
.share-container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  position: relative; overflow: hidden;
}
.share-container::before {
  content: ''; position: absolute;
  width: 550px; height: 550px; border-radius: 50%;
  background: #667eea; top: -180px; left: -120px;
  filter: blur(100px); opacity: .35; z-index: 0;
}
.share-container::after {
  content: ''; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: #f093fb; bottom: -180px; right: -120px;
  filter: blur(100px); opacity: .30; z-index: 0;
}
.share-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  background: rgba(35,32,60,.75);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 28px;
  box-shadow: 0 24px 72px rgba(0,0,0,.55);
}
.share-header {
  text-align: center; margin-bottom: 28px;
}
.share-file-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 18px;
  font-size: 32px; margin-bottom: 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  box-shadow: 0 8px 24px rgba(102,126,234,.4);
}
.share-file-name {
  font-size: 18px; font-weight: 600;
  color: #fff; word-break: break-all;
  margin-bottom: 6px;
}
.share-file-size {
  font-size: 13px;
  color: rgba(255,255,255,.55);
}
.share-body { margin-top: 8px; }
.share-actions {
  display: flex; flex-direction: column; gap: 12px;
  align-items: center; margin-top: 12px;
}
.share-actions .neu-btn {
  padding: 12px 32px; font-size: 14px;
  width: 100%; max-width: 280px; justify-content: center;
}
.share-password-form {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 12px;
}
.share-password-form .form-group {
  display: flex; flex-direction: column; gap: 6px;
}
.share-password-form .form-label {
  font-size: 12px; color: rgba(255,255,255,.55);
}
.share-password-form .form-group .neu-input {
  width: 100%;
  text-align: center; letter-spacing: 8px;
  font-size: 18px; padding: 12px 14px;
}
.share-password-form .neu-btn {
  width: 100%; justify-content: center; padding: 12px;
}

/* 分享页链接（控制台里） */
.share-link-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  word-break: break-all;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 12px; color: #a8b8ff;
}

/* ======= 登录/注册独立页面 ======= */
.auth-container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  position: relative; overflow: hidden;
}
.auth-container::before {
  content: ''; position: absolute;
  width: 550px; height: 550px; border-radius: 50%;
  background: #667eea; top: -180px; left: -120px;
  filter: blur(100px); opacity: .35; z-index: 0;
}
.auth-container::after {
  content: ''; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: #f093fb; bottom: -180px; right: -120px;
  filter: blur(100px); opacity: .30; z-index: 0;
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: rgba(35,32,60,.75);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 32px;
  box-shadow: 0 24px 72px rgba(0,0,0,.55);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(102,126,234,.4);
}
.auth-logo-icon svg { width: 32px; height: 32px; }
.auth-title {
  font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 13px; color: rgba(255,255,255,.5);
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .form-group {
  display: flex; flex-direction: column; gap: 6px;
}
.auth-form .form-label {
  font-size: 12px; color: rgba(255,255,255,.55);
}
.auth-form .neu-input {
  width: 100%;
}
.auth-form .neu-btn-primary {
  width: 100%; justify-content: center; padding: 12px; font-size: 14px;
}
.auth-switch {
  text-align: center; margin-top: 18px; font-size: 13px;
  color: rgba(255,255,255,.5);
}
.auth-switch a {
  color: #a8b8ff; cursor: pointer; text-decoration: none; font-weight: 500;
}
.auth-switch a:hover { color: #c8d8ff; text-decoration: underline; }

/* ======= 公开目录浏览独立页面 ======= */
.pubdir-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  padding: 24px; color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.pubdir-wrap {
  max-width: 900px; margin: 0 auto;
}
.pubdir-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.pubdir-header .pubdir-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid var(--border);
  color: #fff; cursor: pointer; text-decoration: none; transition: all .15s;
}
.pubdir-header .pubdir-back:hover {
  background: rgba(255,255,255,.15); transform: translateX(-2px);
}
.pubdir-title {
  font-size: 20px; font-weight: 600; color: #fff;
}
.pubdir-content {
  background: rgba(35,32,60,.6);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
}
.pubdir-empty {
  text-align: center; padding: 60px 20px; color: rgba(255,255,255,.4);
}
.pubdir-file-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; margin-bottom: 8px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer;
  transition: all .15s;
}
.pubdir-file-item:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.25);
  transform: translateY(-1px);
}
.pubdir-file-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.pubdir-file-name {
  flex: 1; font-size: 14px; color: #fff; word-break: break-all;
}
.pubdir-file-size {
  font-size: 12px; color: rgba(255,255,255,.45); flex-shrink: 0;
}
.pubdir-pager {
  display: flex; justify-content: center; gap: 10px; margin-top: 16px;
}
.pubdir-pager button {
  padding: 6px 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: rgba(255,255,255,.6);
  cursor: pointer; font-size: 13px; transition: all .15s;
}
.pubdir-pager button:hover:not(:disabled) {
  background: rgba(255,255,255,.15); color: #fff;
}
.pubdir-pager button:disabled {
  opacity: .3; cursor: not-allowed;
}

/* ============ translate.js 语言选择器美化 ============ */
#translate-lang-host {
  display: inline-flex !important;
  align-items: center;
}
#translate-lang-host select,
#translate-lang-host select#translate-lang-hostSelectLanguage,
#translate-lang-host select.translateSelectLanguage {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-radius: 10px !important;
  padding: 7px 34px 7px 14px !important;
  color: #e2e8f0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
  min-width: 130px;
  transition: all .2s ease;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 10 13 14 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
#translate-lang-host select:hover {
  background: rgba(255,255,255,0.15) !important;
  border-color: rgba(139,92,246,0.6) !important;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
#translate-lang-host select:focus {
  outline: none !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.25);
}
/* 下拉选项面板 */
#translate-lang-host select option {
  background: #1e1e2e !important;
  color: #e2e8f0 !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
}
#translate-lang-host select option:hover,
#translate-lang-host select option:checked {
  background: rgba(139,92,246,0.25) !important;
  color: #fff !important;
}
