/* ===== 全局变量 - 黑色高级系 ===== */
:root {
  --bg-primary: #000000;
  --bg-secondary: #050508;
  --bg-card: #0a0a10;
  --bg-hover: #111118;
  --border: #1a1a25;
  --border-light: #252535;
  --accent: #d4a853;
  --accent-hover: #c49a42;
  --accent-light: rgba(212,168,83,0.1);
  --accent-glow: rgba(212,168,83,0.25);
  --accent2: #e8c97a;
  --accent2-light: rgba(232,201,122,0.08);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --text-primary: #eaeaea;
  --text-secondary: #8a8a9a;
  --text-muted: #4a4a56;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 32px rgba(0,0,0,0.6);
  --shadow-lg: 0 8px 64px rgba(0,0,0,0.8);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ===== 布局 ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.sidebar-logo .logo-text { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.sidebar-logo .logo-text span { color: var(--accent2); }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 20px; }
.nav-section-title {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  color: var(--text-muted); text-transform: uppercase;
  padding: 0 10px; margin-bottom: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px;
  transition: all var(--transition); cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-light); color: var(--accent); font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(212,168,83,0.2);
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto; background: var(--accent);
  color: #000; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}
.user-info {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition);
}
.user-info:hover { background: var(--bg-hover); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #b8933a);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #000; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; }
.user-email { font-size: 11px; color: var(--text-muted); }

/* ===== 主内容区 ===== */
.main-content {
  margin-left: 240px; flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.page-header {
  padding: 28px 32px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.page-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.page-body { padding: 24px 32px 40px; flex: 1; }

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-sm { padding: 16px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--text-primary); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; border: none;
  transition: all var(--transition); cursor: pointer; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #c49a42, var(--accent));
  color: #000; font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-secondary {
  background: var(--bg-hover); color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: var(--border); border-color: var(--accent); }
.btn-danger { background: rgba(248,113,113,0.1); color: var(--danger); border: 1px solid rgba(248,113,113,0.25); }
.btn-danger:hover { background: rgba(248,113,113,0.2); }
.btn-lg { padding: 12px 28px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; filter: grayscale(0.5); }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after {
  content: ''; position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 7px; }
.form-control {
  width: 100%; padding: 10px 14px;
  background: #0d0d15; color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; transition: border-color var(--transition); outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ===== 状态徽章 ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-running { color: var(--warning); background: rgba(251,191,36,0.1); }
.badge-success { color: var(--success); background: rgba(52,211,153,0.1); }
.badge-failed  { color: var(--danger);  background: rgba(248,113,113,0.1); }
.badge-pending { color: var(--text-muted); background: var(--bg-hover); }
.badge-running::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ===== 进度条 ===== */
.progress-wrap { background: var(--bg-hover); border-radius: 4px; height: 6px; overflow: hidden; }
.progress-bar {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.4s ease;
}

/* ===== 任务列表（缩略图形式） ===== */
.task-list {
  background: #0D0D0D;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}
.task-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  height: 64px;
}
.task-list-item:last-child {
  border-bottom: none;
}
.task-list-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid #3B82F6;
  padding-left: 8px;
}
.task-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #1A1A1A;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.task-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.task-thumbnail .thumb-placeholder {
  color: #6B7280;
  font-size: 14px;
}
.task-info {
  flex: 1;
  min-width: 0;
}
.task-description {
  font-size: 13px;
  color: #9CA3AF;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.task-model {
  font-size: 11px;
  color: #6B7280;
}
.task-time {
  font-size: 11px;
  color: #6B7280;
}
.task-status {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}
.status-success {
  background: #E0F2FE;
  color: #0284C7;
}
.status-failed {
  background: #FEE2E2;
  color: #DC2626;
}
.status-pending {
  background: #FEF3C7;
  color: #D97706;
}
.status-processing {
  background: #E0F2FE;
  color: #0284C7;
}

/* ===== 上传区域 ===== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px; text-align: center;
  cursor: pointer; transition: all var(--transition);
  background: var(--bg-secondary);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent); background: var(--accent-light);
}
.upload-zone .upload-icon { font-size: 36px; margin-bottom: 10px; }
.upload-zone .upload-text { font-size: 14px; color: var(--text-secondary); }
.upload-zone .upload-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.upload-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.upload-preview-item {
  position: relative; width: 80px; height: 80px;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border);
}
.upload-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview-item .remove-btn {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.8); color: #fff;
  border: none; font-size: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ===== 模型选择卡片 ===== */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.model-card {
  padding: 14px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--bg-secondary);
  cursor: pointer; transition: all var(--transition); text-align: center;
}
.model-card:hover { border-color: var(--accent); background: var(--bg-hover); }
.model-card.selected { border-color: var(--accent); background: var(--accent-light); }
.model-card .model-icon { font-size: 24px; margin-bottom: 6px; }
.model-card .model-name { font-size: 13px; font-weight: 600; }
.model-card .model-desc { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ===== Toast 通知 ===== */
.toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); min-width: 240px;
  animation: slideIn 0.3s ease;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
}
.toast-success { border-color: var(--success); color: var(--success); }
.toast-error   { border-color: var(--danger);  color: var(--danger); }
.toast-info    { border-color: var(--accent);  color: var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state .empty-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state .empty-desc { font-size: 14px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-header, .page-body { padding-left: 16px; padding-right: 16px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* ===== 登录/注册页 ===== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 30% 40%, rgba(212,168,83,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(212,168,83,0.03) 0%, transparent 40%);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 12px;
}
.auth-logo h1 { font-size: 22px; font-weight: 700; }
.auth-logo p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 13px; margin: 20px 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-footer a { color: var(--accent); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* ===== 表格 ===== */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-secondary); font-weight: 600; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
tbody tr:hover { background: var(--bg-hover); }

/* ===== 区域标题 ===== */
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ===== 统计卡片（高级版） ===== */
.stats-grid { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 12px; 
  margin-bottom: 32px; 
}
.stat-card {
  background: rgba(10, 10, 10, 0.9); 
  border: none;
  border-radius: 12px; 
  padding: 16px;
  display: flex; 
  align-items: center; 
  gap: 16px;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.stat-card:hover { 
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  background: rgba(15, 15, 15, 0.9);
}
.stat-icon {
  width: 32px; 
  height: 32px; 
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 16px; 
  flex-shrink: 0;
  color: var(--text-primary);
}
.stat-icon-purple { background: #3A3A3A; }
.stat-icon-blue   { background: #1E293B; }
.stat-icon-green  { background: #0F4C3A; }
.stat-icon-orange { background: #2D2418; }
.stat-content {
  flex: 1;
  min-width: 0;
}
.stat-value { 
  font-size: 28px; 
  font-weight: 700; 
  line-height: 1; 
  color: #FFFFFF;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.stat-label { 
  font-size: 12px; 
  color: #6B7280; 
  margin-top: 4px; 
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ===== 生成面板 ===== */
.gen-layout { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.gen-panel { position: sticky; top: 24px; }
.gen-result { min-height: 400px; }
.gen-result-img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  background: var(--bg-secondary);
  min-height: 200px;
  position: relative;
}
.gen-result-img img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.gen-result-img:hover .img-actions {
  opacity: 1;
}
.img-actions {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}
.img-actions .btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.img-actions .btn-sm:hover {
  background: rgba(0,0,0,0.85);
  border-color: rgba(255,255,255,0.3);
}
.gen-result-video { width: 100%; border-radius: var(--radius); overflow: hidden; }
.gen-result-video video { width: 100%; display: block; }
.gen-status {
  margin-top: 16px; padding: 14px 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 12px;
}
.gen-status-text { font-size: 14px; color: var(--text-secondary); flex: 1; }

@media (max-width: 1024px) {
  .gen-layout { grid-template-columns: 1fr; }
  .gen-panel { position: static; }
}

/* ===== 移动端适配 ===== */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #050508; border-top: 1px solid var(--border);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-inner { display: flex; align-items: stretch; height: 56px; }
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; border: none; background: none;
  color: var(--text-muted); font-size: 10px;
  cursor: pointer; transition: color var(--transition);
  padding: 6px 4px;
}
.bottom-nav-item .bnav-icon { font-size: 20px; line-height: 1; }
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item:active { background: var(--bg-hover); }

.mobile-header {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: 52px; z-index: 150;
  background: #050508; border-bottom: 1px solid var(--border);
  align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.mobile-header-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700;
}
.mobile-header-logo .logo-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; margin-right: 8px; flex-shrink: 0;
  color: #000;
}

@media (max-width: 768px) {
  .bottom-nav { display: block; }
  .mobile-header { display: flex; }
  .sidebar { display: none !important; }
  .main-content {
    margin-left: 0 !important;
    padding-top: 52px; padding-bottom: 72px;
  }
  .page-header { padding: 16px 16px 0; }
  .page-body { padding: 16px 16px 24px; }
  .page-title { font-size: 18px; }
  .page-subtitle { font-size: 13px; }
  .card { padding: 16px; }
  .gen-layout { grid-template-columns: 1fr !important; gap: 16px; }
  .gen-panel { position: static !important; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; font-size: 18px; }
  .stat-value { font-size: 22px; }
  .task-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .model-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .model-card { padding: 10px 8px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr !important; gap: 0; }
  .btn-lg { padding: 11px 20px; font-size: 14px; }
  .auth-card { padding: 28px 20px; margin: 16px; }
  .upload-zone { padding: 20px 16px; }
  .toast-container { top: 20px; right: 20px; left: unset; }
  .toast { min-width: 240px; width: auto; }
  input, select, textarea { font-size: 16px !important; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .task-grid { grid-template-columns: 1fr 1fr !important; }
}

.bnav-icon {
  font-size: 22px; line-height: 1;
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
}
button, a { touch-action: manipulation; }

/* ===== Lucide 图标 ===== */
.lucide-icon, i[data-lucide] {
  display: inline-block; vertical-align: middle; flex-shrink: 0;
  stroke-width: 1.75;
}
.nav-icon i[data-lucide], .nav-icon .lucide-icon { width: 18px !important; height: 18px !important; }
.bnav-icon i[data-lucide], .bnav-icon .lucide-icon { width: 22px !important; height: 22px !important; }
.stat-icon i[data-lucide] { width: 24px !important; height: 24px !important; }
.btn i[data-lucide] { width: 15px !important; height: 15px !important; }
.model-icon i[data-lucide] { width: 26px !important; height: 26px !important; }
.empty-icon i[data-lucide] { width: 48px !important; height: 48px !important; opacity: 0.4; }
.feature-icon i[data-lucide] { width: 30px !important; height: 30px !important; }
.logo-icon i[data-lucide] { width: 20px !important; height: 20px !important; }

/* ===== 金色分割线 ===== */
.divider-accent {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  margin: 16px 0;
  border: none;
}

/* ===== 右上角工具栏 ===== */
.page-header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tool-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #9CA3AF;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.tool-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: #E0E0E0;
}
/* 公告弹窗 */
.announcement-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.announcement-content {
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 24px;
}
.announcement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.announcement-title {
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}
.announcement-close {
  background: transparent;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.announcement-close:hover {
  background: rgba(255, 255, 255, 0.1);
}
.announcement-body {
  color: #E0E0E0;
  font-size: 13px;
  line-height: 1.6;
}
.announcement-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.announcement-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.announcement-date {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 4px;
}
.announcement-text {
  color: #D1D5DB;
}
/* 联系下拉菜单 */
.contact-dropdown {
  position: relative;
}
.contact-panel {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  width: 280px;
  display: none;
  z-index: 100;
  margin-top: 8px;
}
.contact-panel.show {
  display: block;
}
.qr-code {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  background: #FFFFFF;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-weight: 600;
}
.contact-tip {
  text-align: center;
  font-size: 12px;
  color: #9CA3AF;
  line-height: 1.5;
}

/* ===== 历史记录网格布局 ===== */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.task-grid-item {
  background: rgba(10, 10, 10, 0.9);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.task-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  background: rgba(15, 15, 15, 0.9);
}
.task-grid-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  background: #1A1A1A;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.task-grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.task-grid-thumb .thumb-placeholder {
  color: #6B7280;
  font-size: 24px;
}
.task-grid-info {
  padding: 8px;
}
.task-grid-model {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-grid-prompt {
  font-size: 12px;
  color: #9CA3AF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}
.task-grid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.task-grid-time {
  font-size: 10px;
  color: #6B7280;
}
.task-grid-status {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 3px;
}
.status-success { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.status-failed { background: rgba(239, 68, 68, 0.1); color: #EF4444; }
.status-running { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.status-pending { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }

/* ===== 删除确认弹窗 ===== */
.confirm-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: confirmFadeIn 0.2s ease;
}
@keyframes confirmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.confirm-dialog {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  width: 320px;
  max-width: 90vw;
  padding: 32px 24px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: confirmScaleIn 0.25s ease;
}
@keyframes confirmScaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.confirm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.confirm-icon svg {
  width: 28px; height: 28px;
  color: #ef4444;
  stroke-width: 1.5;
}
.confirm-title {
  font-size: 17px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 6px;
}
.confirm-desc {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 24px;
  line-height: 1.5;
}
.confirm-actions {
  display: flex;
  gap: 10px;
}
.confirm-actions button {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.confirm-btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}
.confirm-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
}
.confirm-btn-danger {
  background: #ef4444;
  color: #fff;
}
.confirm-btn-danger:hover {
  background: #dc2626;
}


/* 公告弹窗页脚 */
.announcement-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 后台公告管理 */
#annTable td {
  font-size: 13px;
}
#annFormCard .form-group {
  margin-bottom: 16px;
}
#annFormCard .form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #9ca3af;
}
#annFormCard .form-control {
  width: 100%;
  padding: 10px 12px;
  background: #1e1e2a;
  border: 1px solid #2a2a3a;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
}
#annFormCard .form-control:focus {
  outline: none;
  border-color: #6366f1;
}
#annFormCard textarea.form-control {
  resize: vertical;
  min-height: 80px;
}
#annFormCard .btn {
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
}
#annFormCard .btn-primary {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}


/* ===== Lightbox ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox-img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  transition: transform 0.15s ease;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-img:active {
  cursor: grabbing;
}
.lightbox-toolbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(20,20,20,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 14px;
  z-index: 10;
}
.lightbox-toolbar button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #e5e7eb;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lightbox-toolbar button:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(20,20,20,0.8);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e5e7eb;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.15);
}
.lightbox-zoom-level {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(20,20,20,0.8);
  border: 1px solid rgba(255,255,255,0.15);
  color: #9ca3af;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 10;
}
