/* ============================================================
 * Super Host v6.0 - 全局样式
 * 包含 CSS 变量、三主题、响应式、动画、微信适配
 * ============================================================ */

/* -- CSS 变量系统 -- */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #eff6ff;
  --success: #22c55e;
  --success-light: #f0fdf4;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-family: 'system-ui', -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --sidebar-width: 260px;
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 0px;
  --max-width: 1400px;
}

/* -- 极夜黑主题 -- */
[data-theme='dark'] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-light: #1e3a5f;
  --success: #34d399;
  --success-light: #064e3b;
  --warning: #fbbf24;
  --warning-light: #78350f;
  --danger: #f87171;
  --danger-light: #7f1d1d;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* -- 流光炫彩主题 -- */
[data-theme='aurora'] {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-tertiary: #1a1a3e;
  --text-primary: #e8e8ff;
  --text-secondary: #a0a0d0;
  --text-tertiary: #6060a0;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-light: #1e1040;
  --success: #10b981;
  --success-light: #022c22;
  --warning: #f59e0b;
  --warning-light: #451a03;
  --danger: #ef4444;
  --danger-light: #450a0a;
  --border-color: #2a2a5a;
  --shadow-sm: 0 1px 2px rgba(139, 92, 246, 0.1);
  --shadow-md: 0 4px 6px rgba(139, 92, 246, 0.15);
  --shadow-lg: 0 10px 25px rgba(139, 92, 246, 0.2);
  --shadow-xl: 0 20px 50px rgba(139, 92, 246, 0.25);
}

/* -- 流光炫彩背景动画 -- */
[data-theme='aurora'] body {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 25%, #0a1a2e 50%, #1a0a2e 75%, #0a0a1a 100%);
  background-size: 400% 400%;
  animation: auroraBg 15s ease infinite;
}

@keyframes auroraBg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   基础重置
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  /* 超流畅字体渲染 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

/* 微信浏览器：禁用弹性滚动 */
body.modal-open {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

code, kbd {
  font-family: var(--font-mono);
}

ul, ol {
  list-style: none;
}

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

/* ============================================================
   布局
   ============================================================ */
#app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#app-layout.layout-login {
  display: block;
  height: auto;
  overflow: visible;
}

#main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  max-width: var(--max-width);
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-anchor: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  transition: margin-left var(--transition);
  position: relative;
}

/* 页面过渡动画 */
#main-content > .page {
  animation: pageEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.layout-login #main-content {
  margin-left: 0;
  padding: 0;
  max-width: 100%;
}

/* -- 移动端汉堡按钮 -- */
#btn-hamburger {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

#btn-hamburger:hover {
  background: var(--bg-secondary);
}

#btn-hamburger svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   侧边栏
   ============================================================ */
#app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  z-index: 50;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  transition: transform var(--transition);
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* -- 导航菜单 -- */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

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

.sidebar-nav-item.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.sidebar-nav-item:hover .nav-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px var(--accent));
}

.sidebar-nav-item.active .nav-icon {
  color: var(--accent);
  animation: navIconBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 8px var(--accent));
}

@keyframes navIconBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.35) rotate(-5deg); }
  60% { transform: scale(0.9) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ============================================================
   侧边栏图标跳动动画系统（每个图标独立动画）
   ============================================================ */

/* 仪表盘 - 柱状图依次弹跳 */
.sidebar-nav-item[data-route="dashboard"] .nav-icon rect:nth-child(2) {
  animation: barBounce1 1.5s ease-in-out infinite;
  transform-origin: center bottom;
}
.sidebar-nav-item[data-route="dashboard"] .nav-icon rect:nth-child(3) {
  animation: barBounce2 1.5s ease-in-out infinite 0.2s;
  transform-origin: center bottom;
}
.sidebar-nav-item[data-route="dashboard"] .nav-icon rect:nth-child(4) {
  animation: barBounce3 1.5s ease-in-out infinite 0.4s;
  transform-origin: center bottom;
}
.sidebar-nav-item[data-route="dashboard"].active .nav-icon rect:nth-child(2),
.sidebar-nav-item[data-route="dashboard"]:hover .nav-icon rect:nth-child(2) {
  animation: barBounceActive1 0.8s ease-in-out infinite;
}
.sidebar-nav-item[data-route="dashboard"].active .nav-icon rect:nth-child(3),
.sidebar-nav-item[data-route="dashboard"]:hover .nav-icon rect:nth-child(3) {
  animation: barBounceActive2 0.8s ease-in-out infinite 0.15s;
}
.sidebar-nav-item[data-route="dashboard"].active .nav-icon rect:nth-child(4),
.sidebar-nav-item[data-route="dashboard"]:hover .nav-icon rect:nth-child(4) {
  animation: barBounceActive3 0.8s ease-in-out infinite 0.3s;
}

@keyframes barBounce1 {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.65); }
}
@keyframes barBounce2 {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.4); }
}
@keyframes barBounce3 {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.5); }
}
@keyframes barBounceActive1 {
  0%, 100% { transform: scaleY(1); }
  40% { transform: scaleY(0.4); }
  80% { transform: scaleY(1.6); }
}
@keyframes barBounceActive2 {
  0%, 100% { transform: scaleY(1); }
  40% { transform: scaleY(1.7); }
  80% { transform: scaleY(0.5); }
}
@keyframes barBounceActive3 {
  0%, 100% { transform: scaleY(1); }
  40% { transform: scaleY(0.3); }
  80% { transform: scaleY(2); }
}

/* 文件管理 - 文件夹开合动画 */
.sidebar-nav-item[data-route="files"] .nav-icon path:first-child {
  transform-origin: 12px 10px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sidebar-nav-item[data-route="files"]:hover .nav-icon path:first-child,
.sidebar-nav-item[data-route="files"].active .nav-icon path:first-child {
  animation: folderOpen 2s ease-in-out infinite;
}
.sidebar-nav-item[data-route="files"] .nav-icon path:nth-child(2) {
  animation: fileLinesPulse 3s ease-in-out infinite;
}
@keyframes folderOpen {
  0%, 100% { transform: scaleY(1); }
  40% { transform: scaleY(0.75); }
  80% { transform: scaleY(1.1); }
}
@keyframes fileLinesPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* 上传 - 箭头弹跳 + 底座波纹 */
.sidebar-nav-item[data-route="upload"] .nav-icon path:first-child {
  animation: uploadBounce 1.6s ease-in-out infinite;
}
.sidebar-nav-item[data-route="upload"]:hover .nav-icon path:first-child,
.sidebar-nav-item[data-route="upload"].active .nav-icon path:first-child {
  animation: uploadBounceActive 0.6s ease-in-out infinite;
}
.sidebar-nav-item[data-route="upload"] .nav-icon path:nth-child(3) {
  animation: uploadBasePulse 2s ease-in-out infinite;
}
@keyframes uploadBounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-5px); }
  55% { transform: translateY(-5px); }
}
@keyframes uploadBounceActive {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px) scale(1.1); }
  60% { transform: translateY(2px) scale(0.95); }
}
@keyframes uploadBasePulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; transform: translateY(0.5px); }
}

/* 分享 - 节点脉冲扩散 */
.sidebar-nav-item[data-route="shares"] .nav-icon circle:nth-child(2) {
  animation: sharePulse1 2.5s ease-in-out infinite;
  transform-origin: 17px 5px;
}
.sidebar-nav-item[data-route="shares"] .nav-icon circle:nth-child(3) {
  animation: sharePulse2 2.5s ease-in-out infinite 0.6s;
  transform-origin: 17px 17px;
}
.sidebar-nav-item[data-route="shares"]:hover .nav-icon circle:nth-child(2),
.sidebar-nav-item[data-route="shares"].active .nav-icon circle:nth-child(2) {
  animation: sharePulseActive 1s ease-in-out infinite;
}
.sidebar-nav-item[data-route="shares"]:hover .nav-icon circle:nth-child(3),
.sidebar-nav-item[data-route="shares"].active .nav-icon circle:nth-child(3) {
  animation: sharePulseActive 1s ease-in-out infinite 0.3s;
}
@keyframes sharePulse1 {
  0%, 100% { r: 2.5; opacity: 0.8; }
  50% { r: 3.2; opacity: 0.3; }
}
@keyframes sharePulse2 {
  0%, 100% { r: 2.5; opacity: 0.8; }
  50% { r: 3.2; opacity: 0.3; }
}
@keyframes sharePulseActive {
  0%, 100% { r: 2.5; opacity: 1; transform: scale(1); }
  50% { r: 4; opacity: 0.4; transform: scale(1.3); }
}

/* 访问日志 - 内容行滚动 + 时钟走动 */
.sidebar-nav-item[data-route="logs"] .nav-icon path:nth-child(2) {
  animation: logTextSlide 3s ease-in-out infinite;
}
.sidebar-nav-item[data-route="logs"] .nav-icon circle:nth-child(3) {
  animation: clockPulse 2s ease-in-out infinite;
  transform-origin: 19px 19px;
}
@keyframes logTextSlide {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}
@keyframes clockPulse {
  0%, 100% { r: 4; opacity: 0.6; }
  50% { r: 5; opacity: 1; }
}

/* 回收站 - 盖子微动 + 线条闪烁 */
.sidebar-nav-item[data-route="recycle-bin"] .nav-icon path:first-child {
  animation: lidShake 4s ease-in-out infinite;
}
.sidebar-nav-item[data-route="recycle-bin"] .nav-icon path:nth-child(3) {
  animation: trashLinesFade 2s ease-in-out infinite;
}
@keyframes lidShake {
  0%, 96%, 100% { transform: translateY(0); }
  98% { transform: translateY(-1px) rotate(-2deg); }
}
@keyframes trashLinesFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* 个人中心 - 头像光环旋转 */
.sidebar-nav-item[data-route="profile"] .nav-icon circle:first-child {
  animation: profileRingRotate 3s linear infinite;
  transform-origin: 12px 8px;
}
.sidebar-nav-item[data-route="profile"]:hover .nav-icon circle:first-child,
.sidebar-nav-item[data-route="profile"].active .nav-icon circle:first-child {
  animation: profileRingRotateFast 1.5s linear infinite;
}
@keyframes profileRingRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes profileRingRotateFast {
  from { transform: rotate(0deg) scale(1.05); }
  to { transform: rotate(360deg) scale(1.05); }
}

/* 设置 - 齿轮旋转（hover/active时激活） */
.sidebar-nav-item[data-route="settings"] .nav-icon circle:first-child {
  transform-origin: 12px 12px;
}
.sidebar-nav-item[data-route="settings"]:hover .nav-icon circle:first-child,
.sidebar-nav-item[data-route="settings"].active .nav-icon circle:first-child {
  animation: gearSpin 2s linear infinite;
}
.sidebar-nav-item[data-route="settings"] .nav-icon path:nth-child(2) {
  animation: gearRayPulse 2s ease-in-out infinite;
}
@keyframes gearSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes gearRayPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

.nav-label {
  flex: 1;
}

.nav-shortcut {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.sidebar-nav-item:hover .nav-shortcut {
  opacity: 1;
}

/* -- 侧边栏底部 -- */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-id {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.btn-logout {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.btn-logout svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   页面通用样式
   ============================================================ */
.page {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.page-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.btn:active::after {
  opacity: 1;
  transition: opacity 0s;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

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

.btn-danger:hover {
  background: #dc2626;
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

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

.btn-icon-danger:hover {
  background: var(--danger-light);
  color: var(--danger);
}

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

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

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

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

/* ============================================================
   统计卡片
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-fast);
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 0.125rem;
}

/* ============================================================
   卡片
   ============================================================ */
.dashboard-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   存储进度条
   ============================================================ */
.storage-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.storage-percent {
  font-weight: 700;
  color: var(--accent);
}

.storage-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.storage-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   文件类型标签
   ============================================================ */
.type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.type-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.type-dot.type-image { background: #3b82f6; }
.type-dot.type-video { background: #8b5cf6; }
.type-dot.type-audio { background: #ec4899; }
.type-dot.type-document { background: #f59e0b; }
.type-dot.type-code { background: #22c55e; }
.type-dot.type-archive { background: #ef4444; }
.type-dot.type-other { background: #64748b; }

/* ============================================================
   今日概览
   ============================================================ */
.today-stats {
  display: flex;
  gap: 2rem;
}

.today-item {
  display: flex;
  flex-direction: column;
}

.today-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.today-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ============================================================
   表格
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.empty-cell {
  text-align: center;
  color: var(--text-tertiary);
  padding: 2rem 1rem;
}

.file-icon-sm {
  margin-right: 0.5rem;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.file-icon-sm svg {
  width: 1.4em;
  height: 1.4em;
  transition: transform var(--transition-fast);
}

.file-icon-sm:hover svg {
  transform: scale(1.15);
}

/* 文件图标微动画 */
@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.file-grid-item:hover .file-icon-svg {
  animation: iconPulse 0.6s ease;
}

.file-name-text {
  color: var(--text-primary);
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.file-actions-cell {
  white-space: nowrap;
  display: flex;
  gap: 0.25rem;
}

.badge {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.type-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.type-badge.type-image { background: #dbeafe; color: #1d4ed8; }
.type-badge.type-video { background: #ede9fe; color: #6d28d9; }
.type-badge.type-audio { background: #fce7f3; color: #be185d; }
.type-badge.type-document { background: #fef3c7; color: #b45309; }
.type-badge.type-code { background: #d1fae5; color: #047857; }
.type-badge.type-archive { background: #fee2e2; color: #b91c1c; }
.type-badge.type-other { background: #f1f5f9; color: #475569; }

[data-theme='dark'] .type-badge.type-image { background: #1e3a5f; color: #60a5fa; }
[data-theme='dark'] .type-badge.type-video { background: #2e1065; color: #a78bfa; }
[data-theme='dark'] .type-badge.type-audio { background: #500724; color: #f472b6; }
[data-theme='dark'] .type-badge.type-document { background: #451a03; color: #fbbf24; }
[data-theme='dark'] .type-badge.type-code { background: #022c22; color: #34d399; }
[data-theme='dark'] .type-badge.type-archive { background: #450a0a; color: #f87171; }

/* ============================================================
   文件管理页
   ============================================================ */
.files-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
}

.search-input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-toggle {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

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

.view-btn.active {
  color: var(--accent);
  background: var(--accent-light);
}

.view-btn svg {
  width: 18px;
  height: 18px;
}

/* -- 文件容器 -- */
.files-container {
  min-height: 300px;
}

/* -- 批量操作工具栏 -- */
.batch-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-wrap: wrap;
}

.batch-toolbar.hidden {
  display: none;
}

.batch-count {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent);
  margin-right: 0.5rem;
}

/* 选中行样式 */
.file-table tbody tr.row-selected {
  background: var(--accent-light) !important;
  box-shadow: inset 3px 0 0 var(--accent);
}

.file-table tbody tr.row-selected:hover {
  background: var(--accent-light) !important;
}

/* 复选框样式 */
.file-checkbox,
.file-checkbox-all {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* 表格中复选框列 */
.file-table th:first-child,
.file-table td:first-child {
  width: 36px;
  text-align: center;
}

.files-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-tertiary);
}

.spinner-large {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

/* -- 网格视图 -- */
.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.file-grid-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.file-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.file-grid-preview {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  overflow: hidden;
}

.file-grid-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-grid-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.file-grid-icon svg {
  width: 48px;
  height: 48px;
  transition: transform var(--transition-fast);
}

.file-grid-item:hover .file-grid-icon svg {
  transform: scale(1.1);
}

.file-grid-info {
  padding: 0.75rem;
}

.file-grid-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-grid-size {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

/* -- 列表视图 -- */
.view-list .file-table-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ============================================================
   分页
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================================
   空状态
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.empty-state p {
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

/* ============================================================
   上传页
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  background: var(--bg-secondary);
}

.upload-zone:hover,
.upload-zone-dragover {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: var(--shadow-md);
}

.upload-zone-dragover {
  transform: scale(1.01);
}

.upload-icon {
  width: 64px;
  height: 64px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.upload-zone h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.upload-zone p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 0.75rem;
}

.file-input-hidden {
  display: none;
}

/* -- 上传队列 -- */
.upload-queue {
  margin-top: 2rem;
}

.upload-queue h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upload-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.upload-item-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 150px;
}

.upload-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-item-icon svg {
  width: 28px;
  height: 28px;
}

.upload-item-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

.upload-item-size {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.upload-item-progress {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
}

.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

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

.progress-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  display: block;
}

.upload-item-status {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ============================================================
   分享管理页
   ============================================================ */
.short-link {
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

/* ============================================================
   日志页
   ============================================================ */
.logs-toolbar {
  margin-bottom: 1.5rem;
}

.logs-toolbar .toolbar-actions {
  gap: 0.5rem;
}

/* ============================================================
   设置页
   ============================================================ */
.settings-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
  border-bottom: none;
}

.settings-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* -- 主题选择器 -- */
.theme-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.theme-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.theme-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.theme-card.active {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.theme-preview {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-preview.theme-light {
  background: #ffffff;
}

.theme-preview.theme-dark {
  background: #1e293b;
}

.theme-preview.theme-aurora {
  background: linear-gradient(135deg, #0a0a1a, #1a0a2e, #0a1a2e);
}

.theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.theme-icon svg {
  width: 32px;
  height: 32px;
}

.theme-info {
  padding: 0.75rem;
  text-align: center;
}

.theme-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.theme-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.theme-check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.25rem;
}

/* -- 字体选择器 -- */
.font-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.font-btn {
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.font-btn:hover {
  border-color: var(--accent);
}

.font-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.font-preview {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.font-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* -- 快捷键列表 -- */
.shortcuts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.5rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.shortcut-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.shortcut-item kbd {
  padding: 0.125rem 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-primary);
}

/* -- 设置操作 -- */
.settings-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.settings-action p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* -- 关于信息 -- */
.about-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.about-info strong {
  color: var(--text-primary);
}

/* ============================================================
   登录页
   ============================================================ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--bg-secondary);
}

.login-container {
  width: 100%;
  max-width: 420px;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
}

.login-logo svg {
  width: 100%;
  height: 100%;
}

.login-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.login-form {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.input-wrapper .form-input {
  flex: 1;
}

.btn-login {
  min-width: 100px;
}

/* 登录/注册标签切换 */
.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 0.25rem;
}

.login-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: transparent;
}

.login-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}

.login-tab:hover:not(.active) {
  color: var(--text-primary);
}

/* 输入框图标包装 */
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 1;
  transition: color var(--transition-fast);
}

.input-icon-wrapper .form-input {
  padding-left: 2.5rem;
}

.input-icon-wrapper .form-input:focus ~ .input-icon,
.input-icon-wrapper .form-input:focus + .input-icon {
  color: var(--accent);
}

/* 密码显示/隐藏按钮 */
.input-action {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-tertiary);
  cursor: pointer;
  z-index: 1;
  transition: all var(--transition-fast);
}

.input-action:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.input-action svg {
  width: 18px;
  height: 18px;
}

/* 标签提示 */
.label-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 400;
}

/* 全宽按钮 */
.btn-full {
  width: 100%;
}

/* 错误提示 */
.login-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--danger-light);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 0.85rem;
  animation: shake 0.4s ease;
}

/* 抖动动画 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.btn-spinner {
  display: flex;
  align-items: center;
}

.spinner {
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.login-footer p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.login-tip {
  margin-top: 0.5rem;
}

/* ============================================================
   Toast 通知
   ============================================================ */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
  width: 100%;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-exit {
  animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-info {
  border-left: 4px solid var(--accent);
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--accent); }

.toast-icon svg {
  width: 100%;
  height: 100%;
}

.toast-message {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

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

@keyframes toastSlideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* ============================================================
   右键菜单
   ============================================================ */
.context-menu {
  position: fixed;
  z-index: 9998;
  min-width: 180px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 0.375rem;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: all var(--transition-fast);
  pointer-events: none;
}

.context-menu-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

.context-menu-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.context-menu-item:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.context-menu-item-danger:hover {
  background: var(--danger-light);
  color: var(--danger);
}

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

/* ============================================================
   模态框
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-visible {
  opacity: 1;
  visibility: visible;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  z-index: 1;
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  background: var(--bg-secondary);
  transform: scale(1.1);
}

.modal-box {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  max-width: 90vw;
  max-height: 85vh;
  overflow: auto;
  box-shadow: var(--shadow-xl);
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}

.modal-visible .modal-box {
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* -- 预览内容 -- */
.modal-preview-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--bg-tertiary);
}

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

.modal-preview-video video {
  max-width: 100%;
  max-height: 70vh;
  display: block;
}

.modal-preview-audio {
  padding: 3rem;
  text-align: center;
}

.audio-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.audio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.audio-icon svg {
  width: 64px;
  height: 64px;
}

.audio-player audio {
  width: 100%;
  max-width: 400px;
}

.audio-size {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.modal-preview-pdf iframe {
  width: 80vw;
  height: 80vh;
  border: none;
}

.modal-preview-text {
  max-width: 80vw;
  max-height: 70vh;
  overflow: auto;
  padding: 1.5rem;
}

.modal-preview-text pre {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.text-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-tertiary);
}

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

.preview-binary {
  text-align: center;
  padding: 3rem;
}

.binary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.binary-icon svg {
  width: 64px;
  height: 64px;
}

.preview-binary p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

.modal-preview-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-preview-info span {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ============================================================
   骨架屏
   ============================================================ */
.skeleton {
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  animation: skeletonShimmer 1.5s ease infinite;
}

.skeleton-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  margin-bottom: 0.5rem;
}

.skeleton-text {
  height: 16px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  margin-bottom: 0.5rem;
  width: 80%;
}

.skeleton-text.short {
  width: 50%;
}

.skeleton-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  width: 100%;
}

.skeleton-tag {
  display: inline-block;
  width: 60px;
  height: 24px;
  background: var(--bg-tertiary);
  border-radius: 9999px;
  margin-right: 0.5rem;
}

.skeleton-row {
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  margin: 0.5rem 0;
}

.skeleton-table {
  min-height: 200px;
}

@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================================================
   动画关键帧
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fade-in-row {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* ============================================================
   隐藏类
   ============================================================ */
.hidden {
  display: none !important;
}

/* ============================================================
   微信浏览器适配
   ============================================================ */
/* 禁止 iOS 弹性滚动 */
@supports (-webkit-overflow-scrolling: touch) {
  body {
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-nav,
  .modal-box,
  .table-wrapper,
  .modal-preview-text {
    -webkit-overflow-scrolling: touch;
  }
}

/* 微信浏览器输入框样式修复 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .form-input:focus,
  .search-input:focus {
    font-size: 16px; /* 防止 iOS 缩放 */
  }
}

/* ============================================================
   响应式适配
   ============================================================ */

/* -- 平板端 (768-1024px) -- */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .theme-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-title {
    font-size: 1.5rem;
  }

  body {
    font-size: 15px;
  }
}

/* -- 手机端 (< 768px) -- */
@media (max-width: 767px) {
  :root {
    --sidebar-width: 0;
  }

  #btn-hamburger {
    display: flex;
  }

  #app-sidebar {
    transform: translateX(-100%);
    width: 280px;
    z-index: 60;
  }

  #app-sidebar.sidebar-mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  #main-content {
    margin-left: 0;
    padding: 1rem;
    padding-top: 3.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
    gap: 0.75rem;
  }

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

  .stat-icon svg {
    width: 20px;
    height: 20px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .page-title {
    font-size: 1.35rem;
  }

  .page-header {
    margin-bottom: 1.25rem;
  }

  .files-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  .view-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .file-grid-preview {
    height: 100px;
  }

  .theme-selector {
    grid-template-columns: 1fr;
  }

  .font-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .shortcuts-list {
    grid-template-columns: 1fr;
  }

  .today-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .modal-box {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: var(--radius-lg);
  }

  .modal-preview-pdf iframe {
    width: 90vw;
    height: 60vh;
  }

  .modal-preview-text {
    max-width: 90vw;
  }

  .upload-zone {
    padding: 2rem 1rem;
  }

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

  .upload-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .upload-item-progress {
    max-width: 100%;
  }

  .login-container {
    padding: 0 1rem;
  }

  .login-form {
    padding: 1.5rem;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    max-width: 100%;
  }

  body {
    font-size: 14px;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* -- 小屏手机端 (< 400px) -- */
@media (max-width: 399px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .view-grid {
    grid-template-columns: 1fr 1fr;
  }

  .font-selector {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   个人中心页
   ============================================================ */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.profile-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
}

.profile-card:hover {
  box-shadow: var(--shadow-md);
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.profile-card-header h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-card-icon-svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.profile-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.profile-user-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.profile-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--danger-light);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 0.85rem;
  animation: shake 0.4s ease;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.profile-stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.profile-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.profile-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-stat-info {
  display: flex;
  flex-direction: column;
}

.profile-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.profile-storage-bar {
  padding: 0.5rem 0;
}

.storage-detail-text {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* 个人中心响应式 */
@media (max-width: 1024px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .profile-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   打印样式
   ============================================================ */
@media print {
  #app-sidebar,
  #btn-hamburger,
  .toast-container,
  .context-menu,
  .modal-overlay,
  #particles-canvas {
    display: none !important;
  }

  #main-content {
    margin-left: 0;
    padding: 0;
  }
}

/* ============================================================
   回收站页
   ============================================================ */
.bin-toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.bin-checkbox-all,
.bin-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

.bin-table tbody tr {
  transition: all var(--transition-fast);
}

.bin-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.text-danger {
  color: var(--danger) !important;
  font-weight: 600;
}

.text-warning {
  color: var(--warning) !important;
  font-weight: 600;
}

.btn-icon-success {
  color: var(--success) !important;
}

.btn-icon-success:hover {
  background: var(--success-light) !important;
}

/* ============================================================
   批量操作栏
   ============================================================ */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  animation: fadeInUp 0.3s ease;
  flex-wrap: wrap;
}

.batch-count {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   活动通知面板
   ============================================================ */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  animation: fadeInUp 0.3s ease backwards;
}

.activity-item:hover {
  background: var(--bg-secondary);
  transform: translateX(4px);
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.4rem;
}

.activity-dot.upload { background: var(--accent); }
.activity-dot.access { background: var(--success); }
.activity-dot.delete { background: var(--danger); }
.activity-dot.share { background: var(--warning); }

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.activity-text strong {
  font-weight: 600;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

/* ============================================================
   增强文件缩略图
   ============================================================ */
.file-grid-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.file-grid-item:hover .file-grid-preview img {
  transform: scale(1.05);
}

.file-grid-preview {
  position: relative;
  overflow: hidden;
}

.file-grid-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.file-grid-item:hover .file-grid-preview::after {
  opacity: 1;
}

/* 文件类型覆盖层 */
.file-grid-type {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 0.7rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.file-grid-item:hover .file-grid-type {
  opacity: 1;
}

/* ============================================================
   文件夹面包屑导航
   ============================================================ */
.folder-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

.folder-crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
}

.folder-crumb:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.folder-crumb.active {
  color: var(--text-primary);
  font-weight: 600;
}

.folder-crumb-sep {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

/* ============================================================
   增强快捷键提示
   ============================================================ */
@keyframes shortcutPulse {
  0%, 100% { background: var(--accent-light); }
  50% { background: var(--accent); color: white; }
}

.nav-shortcut:active {
  animation: shortcutPulse 0.6s ease;
}

/* ============================================================
   Logo 旋转动画
   ============================================================ */
.sidebar-logo-icon {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-logo:hover .sidebar-logo-icon {
  transform: rotate(-10deg) scale(1.1);
}

/* ============================================================
   自定义滚动条（超流畅）
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
  transition: background var(--transition-fast);
}

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

/* Firefox 滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

/* ============================================================
   玻璃拟态效果（Glassmorphism）
   ============================================================ */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme='dark'] .glass {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme='aurora'] .glass {
  background: rgba(10, 10, 26, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

/* ============================================================
   增强卡片悬停效果
   ============================================================ */
.stat-card {
  will-change: transform;
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] .stat-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

[data-theme='aurora'] .stat-card:hover {
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

.dashboard-card {
  transition: all var(--transition);
  will-change: transform;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   按钮水波纹效果
   ============================================================ */
.btn {
  position: relative;
  overflow: hidden;
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ============================================================
   增强空状态
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-state p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ============================================================
   加载动画增强
   ============================================================ */
.files-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
}

.spinner-large {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.files-loading p {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* ============================================================
   文件网格项增强
   ============================================================ */
.file-grid-item {
  cursor: pointer;
  transition: all var(--transition-fast);
  will-change: transform;
}

.file-grid-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.file-grid-item:active {
  transform: scale(0.97);
}

/* ============================================================
   输入框增强
   ============================================================ */
.form-input,
.search-input {
  transition: all 0.2s ease;
}

.form-input:hover,
.search-input:hover {
  border-color: var(--text-tertiary);
}

/* ============================================================
   主题切换过渡增强
   ============================================================ */
html {
  transition: background 0.5s ease;
}

* {
  transition: background-color 0.3s ease,
              border-color 0.3s ease,
              color 0.3s ease,
              box-shadow 0.3s ease;
}

/* ============================================================
   选中文本样式
   ============================================================ */
::selection {
  background: var(--accent);
  color: white;
}

[data-theme='dark'] ::selection {
  background: #60a5fa;
  color: #0f172a;
}

[data-theme='aurora'] ::selection {
  background: #8b5cf6;
  color: white;
}

/* ============================================================
   键盘快捷键提示增强
   ============================================================ */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 0.125rem 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  line-height: 1.4;
}

/* ============================================================
   增强动画效果
   ============================================================ */

/* 侧边栏图标跳动动画 */
.sidebar-nav-item.active .nav-icon {
  animation: iconBounce 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes iconBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.25) rotate(5deg); }
  60% { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* 按钮 hover 抬起效果 */
.btn {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

/* 统计卡片数字跳动 */
.stat-value {
  display: inline-block;
  transition: all 0.3s ease;
}

.stat-card:hover .stat-value {
  transform: scale(1.05);
  color: var(--accent);
}

/* 文件类型标签 hover 动画 */
.type-tag {
  transition: all 0.25s ease;
  cursor: default;
}

.type-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* 主题卡片选择动画 */
.theme-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-card:active {
  transform: scale(0.95);
}

/* 字体按钮动画 */
.font-btn {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 上传区域呼吸动画 */
.upload-zone {
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.1); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

/* 文件拖拽悬停脉冲 */
.upload-zone-dragover {
  animation: pulsing 1s ease-in-out infinite;
}

@keyframes pulsing {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: #60a5fa; }
}

/* 表格行 hover 滑动效果 */
.data-table tbody tr {
  transition: all 0.2s ease;
  position: relative;
}

.data-table tbody tr::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.data-table tbody tr:hover::before {
  transform: scaleY(1);
}

/* 搜索框光晕 */
.search-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 0 20px rgba(59, 130, 246, 0.1);
}

/* 导航项 hover 指示器动画 */
.sidebar-nav-item {
  position: relative;
  overflow: hidden;
}

.sidebar-nav-item::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-nav-item:hover::after {
  left: 0;
}

.sidebar-nav-item.active::after {
  left: 0;
  width: 4px;
}

/* 侧边栏图标发光动画 */
.sidebar-nav-item.active .nav-icon {
  filter: drop-shadow(0 0 6px var(--accent));
  animation: iconGlowPulse 2s ease-in-out infinite;
}

@keyframes iconGlowPulse {
  0%, 100% { filter: drop-shadow(0 0 4px var(--accent)); }
  50% { filter: drop-shadow(0 0 10px var(--accent)); }
}

/* 侧边栏项背景光扫效果 */
.sidebar-nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(59, 130, 246, 0.08) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  border-radius: var(--radius-md);
}

.sidebar-nav-item:hover::before {
  transform: translateX(100%);
}

/* 导航项活跃状态增强 */
.sidebar-nav-item.active {
  background: linear-gradient(135deg, var(--accent-light), var(--bg-tertiary)) !important;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
  font-weight: 600;
}

/* 标签切换器滑动指示 */
.login-tabs {
  position: relative;
}

.login-tab {
  position: relative;
  z-index: 1;
}

/* 密码可见切换旋转动画 */
.input-action svg {
  transition: transform 0.3s ease;
}

/* 个人中心卡片入场动画 */
.profile-card {
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.profile-card:nth-child(1) { animation-delay: 0s; }
.profile-card:nth-child(2) { animation-delay: 0.1s; }
.profile-card:nth-child(3) { animation-delay: 0.2s; }
.profile-card:nth-child(4) { animation-delay: 0.3s; }

/* ============================================================
   增强动画效果 END
   ============================================================ */

/* ============================================================
   全新图标交互动画系统
   ============================================================ */

/* 仪表盘条形图跳动动画 */
.sidebar-nav-item[data-route="dashboard"] .nav-icon rect:nth-child(2) {
  animation: barJump1 2s ease-in-out infinite;
  transform-origin: bottom center;
}
.sidebar-nav-item[data-route="dashboard"] .nav-icon rect:nth-child(3) {
  animation: barJump2 2s ease-in-out infinite 0.15s;
  transform-origin: bottom center;
}
.sidebar-nav-item[data-route="dashboard"] .nav-icon rect:nth-child(4) {
  animation: barJump3 2s ease-in-out infinite 0.3s;
  transform-origin: bottom center;
}

@keyframes barJump1 {
  0%, 100% { transform: scaleY(1); }
  30% { transform: scaleY(0.6); }
  60% { transform: scaleY(1.3); }
}
@keyframes barJump2 {
  0%, 100% { transform: scaleY(1); }
  35% { transform: scaleY(1.4); }
  65% { transform: scaleY(0.7); }
}
@keyframes barJump3 {
  0%, 100% { transform: scaleY(1); }
  40% { transform: scaleY(0.5); }
  70% { transform: scaleY(1.5); }
}

/* 上传箭头弹跳 */
.sidebar-nav-item[data-route="upload"] .nav-icon path:first-child {
  animation: uploadArrowBounce 1.8s ease-in-out infinite;
}

@keyframes uploadArrowBounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
  60% { transform: translateY(0); }
  80% { transform: translateY(-1px); }
}

/* 分享节点脉冲 */
.sidebar-nav-item[data-route="shares"] .nav-icon circle:nth-child(2) {
  animation: shareNodePulse1 2.5s ease-in-out infinite;
}
.sidebar-nav-item[data-route="shares"] .nav-icon circle:nth-child(3) {
  animation: shareNodePulse2 2.5s ease-in-out infinite 0.8s;
}

@keyframes shareNodePulse1 {
  0%, 100% { r: 2.5; opacity: 1; }
  50% { r: 3.5; opacity: 0.5; }
}
@keyframes shareNodePulse2 {
  0%, 100% { r: 2.5; opacity: 1; }
  50% { r: 3.5; opacity: 0.5; }
}

/* 设置齿轮旋转 */
.sidebar-nav-item[data-route="settings"] .nav-icon circle:first-of-type {
  transform-origin: 12px 12px;
  animation: gearRotate 4s linear infinite paused;
}
.sidebar-nav-item[data-route="settings"]:hover .nav-icon circle:first-of-type {
  animation-play-state: running;
}

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

/* 文件图标展开动画 */
.sidebar-nav-item[data-route="files"] .nav-icon path:first-child {
  animation: folderOpen 3s ease-in-out infinite;
  transform-origin: 12px 10px;
}

@keyframes folderOpen {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.92); }
}

/* 个人中心头像光环 */
.sidebar-nav-item[data-route="profile"] .nav-icon circle:first-of-type {
  animation: avatarGlow 2s ease-in-out infinite;
}

@keyframes avatarGlow {
  0%, 100% { stroke-opacity: 0.6; }
  50% { stroke-opacity: 1; }
}

/* 回收站摇晃 */
.sidebar-nav-item[data-route="recycle-bin"]:hover .nav-icon {
  animation: binShake 0.5s ease-in-out;
}

@keyframes binShake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(8deg); }
  60% { transform: rotate(-5deg); }
  80% { transform: rotate(5deg); }
}

/* 日志图标扫描线 */
.sidebar-nav-item[data-route="logs"] .nav-icon rect:first-of-type {
  animation: logPulse 3s ease-in-out infinite;
}

@keyframes logPulse {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: 0.4; }
}

/* 导航项活跃时所有图标增强效果 */
.sidebar-nav-item.active .nav-icon {
  filter: drop-shadow(0 0 4px var(--accent));
  animation: activeIconPulse 2s ease-in-out infinite;
}

@keyframes activeIconPulse {
  0%, 100% { filter: drop-shadow(0 0 3px var(--accent)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 8px var(--accent)); transform: scale(1.05); }
}

/* 通用图标hover抬升 */
.sidebar-nav-item:hover .nav-icon {
  transform: translateY(-2px);
}

.sidebar-nav-item:active .nav-icon {
  transform: scale(0.9);
}

/* 图标入场动画 */
.nav-icon {
  animation: iconFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes iconFadeIn {
  from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ============================================================
   全新图标交互动画系统 END
   ============================================================ */

/* ============================================================
   通知中心
   ============================================================ */
.notification-dot {
  position: absolute;
  top: 4px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* 通知面板 */
.notif-panel {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 360px;
  max-height: 480px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  overflow: hidden;
  animation: notifSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.notif-panel-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.notif-panel-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
}

.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.notif-item:hover {
  background: var(--bg-tertiary);
}

.notif-item.unread {
  background: var(--accent-light);
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.notif-item-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-item-time {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

/* ============================================================
   文件图标增强动画
   ============================================================ */
.file-icon-svg {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
}

.file-icon-svg:hover {
  transform: scale(1.15) rotate(-5deg);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

/* 文件图标颜色动画 */
@keyframes fileIconShine {
  0%, 100% { filter: brightness(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05)); }
  50% { filter: brightness(1.1) drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3)); }
}

.file-grid-item:hover .file-icon-svg {
  animation: fileIconShine 1.5s ease-in-out infinite;
}

/* 网格视图文件项增强 */
.file-grid-item {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.file-grid-item:nth-child(1) { animation-delay: 0s; }
.file-grid-item:nth-child(2) { animation-delay: 0.05s; }
.file-grid-item:nth-child(3) { animation-delay: 0.1s; }
.file-grid-item:nth-child(4) { animation-delay: 0.15s; }
.file-grid-item:nth-child(5) { animation-delay: 0.2s; }
.file-grid-item:nth-child(6) { animation-delay: 0.25s; }
.file-grid-item:nth-child(7) { animation-delay: 0.3s; }
.file-grid-item:nth-child(8) { animation-delay: 0.35s; }

.file-grid-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.file-grid-item:active {
  transform: scale(0.97);
}

/* ============================================================
   统计卡片增强动画
   ============================================================ */
.stat-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.3s; }

/* 统计图标呼吸动画 */
@keyframes statIconBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.stat-card:hover .stat-icon {
  animation: statIconBreath 1.5s ease-in-out infinite;
}

/* 统计数字跳动 */
.stat-value {
  display: inline-block;
  transition: all 0.3s ease;
}

.stat-card:hover .stat-value {
  transform: scale(1.05);
  color: var(--accent);
}

/* ============================================================
   仪表盘卡片增强
   ============================================================ */
.dashboard-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   操作按钮微交互增强
   ============================================================ */
.btn-icon {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.btn-icon svg {
  transition: transform 0.2s ease;
}

.btn-icon:hover svg {
  transform: scale(1.2);
}

/* ============================================================
   上传区域微交互增强
   ============================================================ */
.upload-zone {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.upload-zone:active {
  transform: scale(0.98);
}

.upload-icon svg {
  transition: transform 0.3s ease;
}

.upload-zone:hover .upload-icon svg {
  transform: translateY(-4px);
  animation: uploadBounce 0.6s ease;
}

@keyframes uploadBounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
  60% { transform: translateY(0); }
  80% { transform: translateY(-3px); }
}

/* ============================================================
   全局面包屑导航增强
   ============================================================ */
.folder-crumb {
  position: relative;
}

.folder-crumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  border-radius: 1px;
}

.folder-crumb:hover::after {
  transform: scaleX(1);
}

/* ============================================================
   全局交互动画钩子
   ============================================================ */

/* 入场动画变体 */
.fade-in-up {
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.fade-in-right {
  animation: fadeInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 弹跳进入 */
.bounce-in {
  animation: bounceIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

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

/* 成功勾选动画 */
@keyframes checkmarkDraw {
  from { stroke-dashoffset: 24; }
  to { stroke-dashoffset: 0; }
}

.success-check {
  stroke-dasharray: 24;
  animation: checkmarkDraw 0.4s ease forwards;
}

/* ============================================================
   快速操作浮动按钮（FAB）
   ============================================================ */
.fab-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.75rem;
}

.fab-main {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2;
}

.fab-main:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.55);
}

.fab-main:active {
  transform: scale(0.94);
}

.fab-main-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab-open .fab-main-icon {
  transform: rotate(45deg);
}

.fab-item {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(10px) scale(0.8);
  pointer-events: none;
  position: absolute;
  bottom: 60px;
}

.fab-upload {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  transition-delay: 0s;
}
.fab-search {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transition-delay: 0.05s;
}
.fab-theme {
  background: linear-gradient(135deg, #ec4899, #db2777);
  transition-delay: 0.1s;
}

.fab-open .fab-item {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.fab-open .fab-upload {
  bottom: 130px;
}
.fab-open .fab-search {
  bottom: 182px;
}
.fab-open .fab-theme {
  bottom: 234px;
}

.fab-item:hover {
  transform: scale(1.12) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.fab-item:active {
  transform: scale(0.9) !important;
}

@media (max-width: 768px) {
  .fab-container {
    bottom: 1.25rem;
    right: 1.25rem;
  }
  .fab-main {
    width: 46px;
    height: 46px;
  }
  .fab-item {
    width: 38px;
    height: 38px;
  }
  .fab-open .fab-upload { bottom: 115px; }
  .fab-open .fab-search { bottom: 163px; }
  .fab-open .fab-theme { bottom: 211px; }
}

/* ============================================================
   深色/极光主题通知面板适配
   ============================================================ */
[data-theme='dark'] .notif-panel {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme='aurora'] .notif-panel {
  background: rgba(18, 18, 42, 0.95);
  backdrop-filter: blur(20px);
  border-color: rgba(139, 92, 246, 0.2);
}

/* ============================================================
   响应式通知面板
   ============================================================ */
@media (max-width: 767px) {
  .notif-panel {
    width: calc(100vw - 2rem);
    right: 1rem;
    left: 1rem;
    max-height: 60vh;
  }
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   响应式增强：平板端侧边栏
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar-nav-item {
    padding: 0.6rem 0.75rem;
  }

  .nav-shortcut {
    display: none;
  }
}