/**
 * NoxeAI 用户端 UI（主域 noxeai.com，对标演示站交互）
 */
body.noxeai-front {
  --spark-primary: #5147ff;
  --spark-membership: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #ea580c 100%);
}

/* 顶栏：会员 + 更新日志 */
body.noxeai-front .vip-badge {
  background: var(--spark-membership);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
}

body.noxeai-front .update-log {
  background: #eef2ff;
  color: #4338ca;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  border: 1px solid #c7d2fe;
}

body.noxeai-front .header-title-badge {
  display: none;
}

body.noxeai-front .loading-screen.fade-out {
  pointer-events: none;
}

body.noxeai-front .header-title {
  font-size: 15px;
  font-weight: 700;
}

/* 侧栏备案（演示站底部） */
.sidebar-icp-footer {
  padding: 12px 16px 16px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-icp-footer a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  margin-top: 4px;
}

.sidebar-icp-footer a:hover {
  color: var(--primary);
}

/* 侧栏历史 Tab：Grid 均分 + 内层 label 省略 */
body.noxeai-front .history-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
}

body.noxeai-front .sidebar {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.noxeai-front .nav-menu {
  flex: 0 1 auto;
  max-height: min(36vh, 280px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

body.noxeai-front .history-section {
  flex: 1 1 auto;
  min-height: 96px;
  min-width: 0;
}

body.noxeai-front .history-tab {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.noxeai-front .history-tab-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.noxeai-front .grid-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.noxeai-front .grid-btn {
  min-width: 0;
}

body.noxeai-front .grid-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 13px;
  gap: 8px;
  min-width: 0;
  word-break: break-word;
}

.history-empty-icon {
  font-size: 36px;
  opacity: 0.35;
}

/* 公告弹窗（演示站结构） */
.spark-announce-overlay {
  backdrop-filter: blur(4px);
}

.spark-announce-card {
  max-width: 620px;
  padding: 0;
  overflow: hidden;
}

.spark-announce-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
}

.spark-announce-title {
  font-size: 17px;
  margin: 0;
}

.spark-announce-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg-page);
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
}

.spark-announce-body-wrap {
  padding: 14px 22px;
}

.spark-announce-body {
  font-size: 13px;
  line-height: 1.7;
  color: #dc2626;
  font-weight: 600;
}

.spark-announce-links {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spark-announce-link-item {
  font-size: 13px;
  color: var(--text-main);
}

.spark-announce-link-item a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 600;
}

.spark-announce-preview {
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-page);
}

.spark-announce-preview img {
  width: 100%;
  display: block;
  max-height: 200px;
  object-fit: cover;
}

.spark-announce-note {
  margin: 0 22px;
  padding: 14px;
  border-left: 3px solid var(--primary);
  background: var(--bg-page);
  border-radius: 0 10px 10px 0;
}

.spark-announce-actions {
  padding: 18px 22px 22px;
}

.spark-announce-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* 浮动直播入口（演示站右下角） */
.live-stream-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.live-stream-fab.hidden {
  display: none !important;
}

.live-stream-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.5);
}

.live-stream-fab kbd {
  font-size: 10px;
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ========== 专业绘画 /painting ========== */
#panel-draw.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.draw-spark-layout {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: var(--bg-page);
  position: relative;
  overflow: hidden;
}

.draw-config-col {
  width: min(320px, 34vw);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: width 0.25s ease, margin 0.25s ease, opacity 0.25s ease;
}

.draw-spark-layout.config-collapsed .draw-config-col {
  width: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  border: none;
}

.draw-top-modes {
  display: flex;
  gap: 6px;
  background: var(--bg-page);
  padding: 4px;
  border-radius: 10px;
}

.draw-top-mode {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
}

.draw-top-mode.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.draw-welcome-banner {
  position: relative;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 10px 32px 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #c2410c;
}

.draw-welcome-banner.hidden { display: none !important; }

.draw-welcome-close {
  position: absolute;
  top: 6px;
  right: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: #9a3412;
}

.draw-model-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.draw-model-card:hover { border-color: var(--primary); }

.draw-model-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.draw-model-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.draw-model-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.draw-model-meta strong { font-size: 13px; }
.draw-model-meta span { font-size: 11px; color: var(--text-muted); }

.draw-model-check {
  color: var(--primary);
  font-weight: 800;
  display: none;
}

.draw-model-card.active .draw-model-check { display: block; }

.draw-model-more {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-muted);
}

.draw-version-toggle {
  display: flex;
  gap: 6px;
  background: var(--bg-page);
  padding: 4px;
  border-radius: 999px;
}

.draw-version-toggle button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
}

.draw-version-toggle button.active {
  background: var(--primary);
  color: #fff;
}

.draw-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.draw-size-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.draw-size-preset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-page);
  transition: var(--transition);
}

.draw-size-preset.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.draw-size-preset small {
  display: block;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.draw-size-icon { display: block; font-size: 16px; margin-bottom: 4px; }

.draw-param-chips { display: flex; flex-direction: column; gap: 10px; }

.draw-chip-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.draw-chip-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 36px;
}

.draw-chip {
  border: 1px solid var(--border);
  background: var(--bg-page);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.draw-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.draw-ref-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.draw-credits-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.draw-refresh-btn {
  border: 1px solid var(--border);
  background: var(--bg-page);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}

.draw-workspace-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #f8fafc;
}

.draw-config-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 18;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.draw-config-backdrop.visible {
  display: block;
}

.draw-collapse-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 22px;
  height: 48px;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: var(--bg-card);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.draw-canvas-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 120px;
}

.draw-canvas-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: var(--text-muted);
  gap: 10px;
  font-size: 14px;
}

.draw-canvas-empty span { font-size: 48px; opacity: 0.25; }

.draw-result-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.draw-composer-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.draw-composer-add {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--bg-page);
  font-size: 22px;
  cursor: pointer;
  flex-shrink: 0;
}

.draw-composer-main { flex: 1; min-width: 0; }

.draw-composer-textarea {
  width: 100%;
  border: none;
  resize: none;
  outline: none;
  font-size: 14px;
  line-height: 1.5;
  background: transparent;
  color: var(--text-main);
  min-height: 44px;
}

.draw-composer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.draw-composer-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.draw-composer-tools button {
  border: 1px solid var(--border);
  background: var(--bg-page);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.draw-generate-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.draw-generate-btn small {
  font-size: 10px;
  opacity: 0.9;
  font-weight: 500;
}

.draw-ref-preview-bar {
  position: absolute;
  bottom: 88px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 11;
}

.draw-ref-preview-bar img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.draw-ref-preview-bar button {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
}

.nav-see-more-toggle {
  width: 100%;
  margin-top: 4px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-more-items.collapsed { display: none; }

/* 绘画广场 — 演示站 /market */
body.noxeai-front .square-panel {
  padding: 16px 20px 24px;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}

.market-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.market-toolbar h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.market-category-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.market-category-scroll::-webkit-scrollbar {
  display: none;
}

.market-cat-chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition, 0.2s ease);
}

.market-cat-chip.active {
  background: var(--spark-primary, #5147ff);
  border-color: var(--spark-primary, #5147ff);
  color: #fff;
}

.market-masonry {
  column-count: 4;
  column-gap: 12px;
  max-width: 100%;
  width: 100%;
}

@media (max-width: 1200px) {
  body.noxeai-front .market-masonry { column-count: 3; }
}

@media (max-width: 900px) {
  body.noxeai-front .market-masonry { column-count: 2; }
}

@media (max-width: 560px) {
  body.noxeai-front .market-masonry { column-count: 1; }
}

.market-card {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.market-card img {
  width: 100%;
  display: block;
  background: var(--bg-main);
}

.market-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.market-card-video .market-card-badge {
  background: rgba(81, 71, 255, 0.9);
}

.market-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.market-card-user {
  font-weight: 600;
  color: var(--text-main);
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card-actions {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 55%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  gap: 8px;
  transition: opacity 0.2s ease;
}

.market-card:hover .market-card-actions {
  opacity: 1;
}

.market-card-prompt {
  color: #fff;
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-card-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.market-card-btns button {
  border: none;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.market-card-btns button:hover {
  background: rgba(255, 255, 255, 0.35);
}

.market-loading,
.market-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.market-skeleton {
  break-inside: avoid;
  margin-bottom: 12px;
  height: 200px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--border) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: market-shimmer 1.2s infinite;
}

@keyframes market-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 智能体应用 — 演示站 /agents */
.agents-spark-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-shrink: 0;
}

.agents-spark-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.agents-spark-robot {
  font-size: 32px;
  line-height: 1;
}

.agents-spark-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.agents-spark-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.agents-workbench-btn {
  border: 1px solid var(--spark-primary, #5147ff);
  background: transparent;
  color: var(--spark-primary, #5147ff);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.agents-workbench-btn:hover {
  background: rgba(81, 71, 255, 0.08);
}

.agents-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.agents-search-input {
  flex: 1;
  min-width: 0;
}

.agents-search-mode {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: default;
}

.agents-search-mode.active {
  border-color: var(--spark-primary, #5147ff);
  color: var(--spark-primary, #5147ff);
  background: rgba(81, 71, 255, 0.06);
}

.agents-loading-hint {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

/* iter9: /login /user-center /mind /share */
.spark-page-login {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-page);
}

.spark-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(81, 71, 255, 0.08);
  border: 1px solid var(--border);
}

.spark-login-brand { text-align: center; margin-bottom: 20px; }
.spark-login-logo {
  display: inline-flex; width: 48px; height: 48px; border-radius: 12px;
  background: var(--spark-primary, #5147ff); color: #fff; font-weight: 800;
  align-items: center; justify-content: center; font-size: 22px; margin-bottom: 10px;
}
.spark-login-brand h1 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.spark-login-brand p { font-size: 12px; color: var(--text-muted); margin: 0; }
.spark-login-submit { width: 100%; margin-top: 8px; }
.spark-login-alt { text-align: center; margin-top: 16px; font-size: 13px; }
.spark-link-btn { background: none; border: none; color: var(--spark-primary, #5147ff); cursor: pointer; font-weight: 600; }

.spark-user-center { max-width: 880px; margin: 0 auto; padding: 20px; }
.spark-uc-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(81,71,255,0.12), rgba(81,71,255,0.04));
  border-radius: 14px; padding: 20px; margin-bottom: 16px;
}
.spark-uc-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.spark-uc-hero h2 { margin: 0; font-size: 20px; font-weight: 800; }
.spark-uc-vip { font-size: 12px; color: var(--text-muted); margin: 4px 0 0; }
.spark-uc-hero .btn-buy-vip { margin-left: auto; }
.spark-uc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.spark-uc-stat { background: var(--bg-card); border-radius: 10px; padding: 14px; border: 1px solid var(--border); }
.spark-uc-stat span { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.spark-uc-stat strong { font-size: 18px; font-weight: 800; }
.spark-uc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.spark-uc-btn { padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); font-size: 13px; font-weight: 600; cursor: pointer; }
.spark-uc-btn-danger { color: #ef4444; border-color: #fecaca; }
.spark-uc-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.spark-uc-list { background: var(--bg-card); border-radius: 10px; border: 1px solid var(--border); padding: 12px; }
.spark-uc-empty { text-align: center; color: var(--text-muted); font-size: 13px; margin: 0; padding: 20px; }

.spark-mind-layout { display: flex; gap: 0; min-height: calc(100vh - 100px); }
.spark-mind-sidebar { width: 320px; flex-shrink: 0; padding: 20px; border-right: 1px solid var(--border); background: var(--bg-card); overflow-y: auto; }
.spark-mind-sidebar h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.spark-mind-tree { margin-top: 16px; font-size: 13px; line-height: 1.6; }
.spark-mind-node { padding: 6px 10px; border-radius: 6px; margin: 4px 0; background: var(--bg-page); border-left: 3px solid var(--spark-primary, #5147ff); }
.spark-mind-node.child { margin-left: 16px; border-left-color: #94a3b8; font-size: 12px; }
.spark-mind-canvas { flex: 1; padding: 24px; background: var(--bg-page); display: flex; align-items: center; justify-content: center; }
.spark-mind-canvas-empty { color: var(--text-muted); font-size: 14px; text-align: center; }
.spark-mind-map-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.spark-mind-bubble { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; font-size: 13px; font-weight: 600; max-width: 200px; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.spark-mind-bubble.root { background: var(--spark-primary, #5147ff); color: #fff; border-color: transparent; font-size: 15px; }

.spark-share-page { min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.spark-share-card { width: 100%; max-width: 480px; background: var(--bg-card); border-radius: 16px; padding: 32px 28px; border: 1px solid var(--border); text-align: center; }
.spark-share-type { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--spark-primary, #5147ff); background: rgba(81,71,255,0.1); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.spark-share-card h2 { font-size: 22px; font-weight: 800; margin: 0 0 10px; }
.spark-share-card p { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }
.spark-share-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.spark-share-loading { color: var(--text-muted); font-size: 14px; padding: 20px; }
.hidden { display: none !important; }

/* iter11: 全屏无侧栏路由 + 静态页 */
body.spark-navless-mode #leftSidebar,
body.spark-navless-mode .header,
body.spark-navless-mode .mobile-footer,
body.spark-navless-mode .live-stream-fab,
body.spark-navless-mode .sidebar-backdrop {
  display: none !important;
}
body.spark-navless-mode .main-container {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
body.spark-navless-mode .workspace-panel.active {
  min-height: 100vh;
}

.spark-page-login {
  min-height: 100vh;
}
.spark-login-qr-hint {
  font-size: 12px;
  color: var(--spark-primary, #5147ff);
  font-weight: 600;
  margin-top: 10px;
}
.spark-login-tip,
.spark-login-bonus {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.5;
}
.spark-login-bonus {
  background: rgba(81, 71, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 14px;
}

.spark-static-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-page);
}
.spark-static-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px 28px;
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: 0 8px 32px rgba(81, 71, 255, 0.06);
}
.spark-static-card-wide { max-width: 560px; text-align: left; }
.spark-static-code {
  font-size: 56px;
  font-weight: 800;
  color: var(--spark-primary, #5147ff);
  line-height: 1;
  margin-bottom: 8px;
}
.spark-static-card h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 10px;
}
.spark-static-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 20px;
}
.spark-static-list {
  margin: 0 0 20px 18px;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}
.spark-static-submit { width: 100%; margin-top: 12px; }
.spark-auth-page .form-control { margin-bottom: 4px; }

/* iter12: 首屏 boot 防闪 + Liquid Glass / API 页 */
html.spark-boot-navless #leftSidebar,
html.spark-boot-navless .header,
html.spark-boot-navless .mobile-footer,
html.spark-boot-navless .live-stream-fab,
html.spark-boot-navless .sidebar-backdrop,
html.spark-boot-navless #sparkAnnounceOverlay {
  display: none !important;
}
html.spark-boot-navless .main-container {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.spark-glass-demo-page,
.spark-api-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}
.spark-glass-demo-header h2,
.spark-api-hero h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
}
.spark-glass-toggle {
  display: inline-flex;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.spark-glass-toggle-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
}
.spark-glass-toggle-btn.active {
  background: var(--spark-primary, #5147ff);
  color: #fff;
}
.spark-glass-preview { transition: filter 0.25s ease; }
.spark-glass-preview.liquid-mode .spark-glass-user-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 16px 40px rgba(81, 71, 255, 0.12);
}
.spark-glass-user-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 24px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.spark-glass-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--spark-primary, #5147ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.spark-glass-user-card h3 { margin: 0 0 4px; font-size: 18px; }
.spark-glass-user-card p { margin: 0; font-size: 13px; color: var(--text-muted); }
.spark-glass-meta { font-size: 12px !important; margin-top: 4px !important; }

.spark-api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.spark-api-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.spark-api-card h4 { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.spark-api-card code {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin: 4px 0;
  word-break: break-all;
}
.spark-api-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
}
.spark-api-hero p,
.spark-glass-demo-header .admin-panel-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .spark-mind-layout { flex-direction: column; }
  .spark-mind-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .spark-uc-stats { grid-template-columns: 1fr; }
}
