/* 黑色主题（默认） */
:root {
  --bg-1: #0b0e12;
  --bg-2: #0f1720;
  --card: #0f1724;
  --muted: #9aa3b2;
  --accent: #FFB81C;
  --border: #1f2933;
  --glass: rgba(255,255,255,0.03);
  --radius: 14px;
  --text-primary: #e6eef6;
  --text-secondary: #cfe6ff;
  --text-muted: #9fb8d9;
  --middle-panel-width: 320px;
}

/* 亮色主题 */
/* 移除 !important，避免与 JavaScript 直接设置的 CSS 变量冲突 */
/* JavaScript 会直接设置 inline style，优先级更高 */
:root[data-theme="light"],
html[data-theme="light"] {
  --bg-1: #f8f9fa;
  --bg-2: #ffffff;
  --card: #ffffff;
  --muted: #6c757d;
  --accent: #FFB81C;
  --border: #dee2e6;
  --glass: rgba(0,0,0,0.02);
  --radius: 14px;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #868e96;
  --middle-panel-width: 320px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* 防止水平滚动 */
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: var(--text-primary);
  padding: 18px 22px;
  padding-top: 68px; /* 为固定头部留出空间 - 根据头部高度调整 */
}

/* 全局消息提示组件（页面正上方） */
.global-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20001;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12px 20px;
  pointer-events: none;
  animation: slideDown 0.3s ease-out;
}

.global-message-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  min-height: 48px;
}

.global-message-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.global-message-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  word-break: break-word;
}

.global-message-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s;
  border-radius: 4px;
}

.global-message-close:hover {
  color: var(--text-primary);
  background: var(--glass);
}

/* 消息类型样式 */
.global-message.success .global-message-content {
  background: rgba(52, 199, 89, 0.1);
  border-color: rgba(52, 199, 89, 0.3);
}

.global-message.success .global-message-icon::before {
  content: '✅';
}

.global-message.error .global-message-content {
  background: rgba(255, 59, 48, 0.1);
  border-color: rgba(255, 59, 48, 0.3);
}

.global-message.error .global-message-icon::before {
  content: '❌';
}

.global-message.warning .global-message-content {
  background: rgba(255, 149, 0, 0.1);
  border-color: rgba(255, 149, 0, 0.3);
}

.global-message.warning .global-message-icon::before {
  content: '⚠️';
}

.global-message.info .global-message-content {
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
}

.global-message.info .global-message-icon::before {
  content: 'ℹ️';
}

/* 动画 */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

.global-message.hiding {
  animation: slideUp 0.3s ease-in forwards;
}

/* 头部样式 - 固定定位 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-1);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 12px 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* 确保头部在滚动时保持固定 */
  will-change: transform;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}


.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}
.brand-logo {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 30% 20%, rgba(255,184,28,0.35), rgba(255,184,28,0.08) 60%, transparent 100%);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(255,184,28,0.12);
}

/* 文字logo样式 */
.brand-logo-text {
  width: 42px; 
  height: 42px; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  background: #FFB81C;
  border: none; 
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(255,184,28,0.12);
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  letter-spacing: 0.5px;
}

:root[data-theme="light"] .brand-logo {
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 10px 30px rgba(255,184,28,0.2);
}

:root[data-theme="light"] .brand-logo-text {
  background: #FFB81C;
  border: none;
  box-shadow: 0 10px 30px rgba(255,184,28,0.2);
  color: #000000;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text h1 { 
  font-size: 22px; 
  margin: 0; 
  color: var(--text-primary); 
  letter-spacing: 0.4px;
  line-height: 1.2;
  font-weight: 600;
}

.brand-text .lead { 
  margin: 0; 
  font-size: 13px; 
  color: var(--muted);
  line-height: 1.3;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* 用户信息样式 */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}

.user-phone {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

:root[data-theme="light"] .user-info {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}

/* 顶部加载指示器 */
.header-loading-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 184, 28, 0.1);
  border: 1px solid rgba(255, 184, 28, 0.2);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  animation: fadeIn 0.3s ease-in;
}

.header-loading-indicator.hidden {
  display: none;
}

.loading-spinner {
  animation: spin 1s linear infinite;
  color: var(--accent);
}

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

.header-loading-text {
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

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

/* 主题切换按钮 */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,184,28,0.3);
  transform: translateY(-1px);
}

:root[data-theme="light"] .btn-icon {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}

:root[data-theme="light"] .btn-icon:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(255,184,28,0.4);
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #111;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 184, 28, 0.3);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
}

.btn.ghost:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.btn.primary {
  background: var(--accent);
  color: #111;
}

/* 亮色主题下的按钮样式 */
:root[data-theme="light"] .btn.ghost {
  border-color: rgba(0,0,0,0.1);
  color: var(--muted);
}

:root[data-theme="light"] .btn.ghost:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-primary);
}

/* 亮色主题下的卡片和边框 */
:root[data-theme="light"] .card,
:root[data-theme="light"] .preview-card,
:root[data-theme="light"] .sidebar {
  background: var(--card);
  border-color: var(--border);
}

/* 亮色主题下的输入框和选择器 */
:root[data-theme="light"] .field-select,
:root[data-theme="light"] input,
:root[data-theme="light"] select {
  background: rgba(255,255,255,0.8);
  border-color: var(--border);
  color: var(--text-primary);
}

:root[data-theme="light"] .field-select:focus,
:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus {
  background: rgba(255,255,255,0.95);
  border-color: var(--accent);
}

/* 亮色主题下的分隔线 */
:root[data-theme="light"] .section-title,
:root[data-theme="light"] .preview-header,
:root[data-theme="light"] .chart-controls {
  border-bottom-color: var(--border);
}

/* 数据分析模式中间控制面板 */
.analytics-control-panel {
  width: var(--middle-panel-width);
  min-width: var(--middle-panel-width);
  max-width: var(--middle-panel-width);
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: var(--middle-panel-width);
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border);
  background: var(--card);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.analytics-control-panel.collapsed {
  width: 0;
  min-width: 0;
  flex-basis: 0;
  padding: 0;
  overflow: visible;
}

/* 收起时隐藏所有内容，不留任何可见内容 */
.analytics-control-panel.collapsed .sidebar {
  /* 维持可见性与交互，使展开按钮不受父级影响 */
  opacity: 1;
  pointer-events: auto;
  /* 保持 overflow: visible 以确保按钮可见 */
  overflow: visible;
  /* 确保sidebar在收起状态下仍然有定位上下文 */
  position: relative;
}

/* 收起时隐藏sidebar内的所有内容，但保留按钮 */
.analytics-control-panel.collapsed .sidebar > *:not(.sidebar-toggle) {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* 收起状态下确保展开按钮可见且可点击 */
.analytics-control-panel.collapsed .sidebar-toggle {
  opacity: 1 !important;
  pointer-events: auto !important;
  display: flex !important;
  visibility: visible !important;
  z-index: 30 !important;
  /* 调整位置，确保在面板边缘可见 */
  /* 由于sidebar宽度为0，按钮需要相对于analytics-control-panel定位 */
  /* 使用 left 定位，因为 right 在宽度为0时可能不可见 */
  left: auto !important;
  right: -18px !important;
  /* 确保按钮在收起状态下仍然可见，即使父元素宽度为0 */
  position: absolute !important;
  /* 确保按钮不受父元素opacity影响，通过提升层级 */
  transform: translateZ(0) !important;
  /* 确保按钮能够超出父元素边界显示 */
  clip: unset !important;
  clip-path: none !important;
}

/* 收起状态下按钮SVG旋转180度（箭头指向右，表示可以展开） */
.analytics-control-panel.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* 会员面板样式 */
.membership-panel {
  /* 当显示时占满整个 content-wrapper */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100%;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: radial-gradient(
      140% 120% at 0% 0%,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(15, 22, 41, 0.92) 65%
    ),
    var(--card);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 20px 60px rgba(4, 9, 20, 0.35);
  transition: none;
  display: none;
  visibility: hidden;
  flex-direction: column;
  box-sizing: border-box;
  z-index: -1;
  pointer-events: none;
}

.membership-panel.active {
  display: flex !important;
  visibility: visible !important;
  z-index: 10 !important;
  pointer-events: auto !important;
}

.membership-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--card);
}

.membership-panel-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.membership-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

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

.membership-panel-content {
  flex: 1;
  padding: 24px clamp(20px, 4vw, 48px);
  overflow-y: auto;
  /* 确保内容区域占满整个面板宽度 */
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

:root[data-theme="light"] .membership-panel {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(246, 248, 255, 0.98) 100%
  );
  border-left: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(16, 24, 40, 0.05),
    0 25px 60px rgba(15, 23, 42, 0.08);
}

/* 会员英雄区域已移除 */

/* 数据分析模式右侧预览面板 - 苹果风格设计 */
.analytics-preview-panel {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  padding: 24px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.008) 0%, 
    rgba(255, 255, 255, 0.002) 100%
  );
  /* 优雅的滚动条 */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  /* 确保预览面板能够正确占满剩余空间 */
  box-sizing: border-box;
  position: relative;
  /* 强制启用滚动 */
  -webkit-overflow-scrolling: touch;
  /* 确保内容可以超出并滚动 */
  align-content: flex-start;
}

.analytics-preview-panel::-webkit-scrollbar {
  width: 8px;
}

.analytics-preview-panel::-webkit-scrollbar-track {
  background: transparent;
}

.analytics-preview-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.analytics-preview-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 侧边栏收起状态（兼容旧代码） */
.container.sidebar-collapsed {
  grid-template-columns: 60px 1fr;
}

/* 卡片样式 - 苹果风格优化 */
.card {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.025) 0%, 
    rgba(255, 255, 255, 0.015) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
  border-radius: 18px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.15),
    0 16px 48px rgba(0, 0, 0, 0.1);
  backdrop-filter: saturate(130%) blur(20px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.18),
    0 20px 56px rgba(0, 0, 0, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
}

.card.dropdown-open,
.card.dropdown-open:hover {
  transform: none !important;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.analytics-control-panel .sidebar {
  width: 100%;
  height: auto;
  min-height: auto;
  padding: 24px 20px;
}

/* 侧边栏收起状态 */
.sidebar.collapsed {
  overflow: visible;
  min-width: 0;
}

.sidebar.collapsed .chart-types-section,
.sidebar.collapsed .field-mapping-section,
.sidebar.collapsed .action-buttons {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.analytics-control-panel.collapsed .sidebar {
  padding: 24px 0;
}

.analytics-control-panel.collapsed .sidebar .chart-types-section,
.analytics-control-panel.collapsed .sidebar .field-mapping-section,
.analytics-control-panel.collapsed .sidebar .action-buttons {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

/* 通用纵向收起按钮 */
.edge-collapse-toggle {
  position: absolute;
  top: 50%;
  right: -18px;
  transform: translateY(-50%);
  width: 32px;
  height: 72px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(39, 52, 78, 0.95), rgba(24, 31, 49, 0.95));
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 20;
  padding: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.edge-collapse-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.edge-collapse-toggle:hover {
  border-color: rgba(255, 184, 28, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, rgba(55, 74, 111, 0.95), rgba(32, 41, 61, 0.95));
}

.edge-collapse-toggle:focus-visible {
  outline: 2px solid rgba(255, 184, 28, 0.8);
  outline-offset: 4px;
}

body.membership-view-active .edge-collapse-toggle {
  display: none !important;
}

.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}


/* 上传区域 */
.upload-section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.section-title:hover {
  opacity: 1;
}

.file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-2);
  transition: all 0.2s ease;
  position: relative;
}

.upload-area:hover {
  border-color: var(--primary);
  background: var(--hover-bg);
  transform: translateY(-1px);
}

.upload-area:active {
  transform: translateY(0);
}

.upload-icon {
  font-size: 20px;
  margin-bottom: 6px;
  display: block;
}

.upload-text {
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.upload-hint {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.3;
}

.file-info {
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--bg-2);
  border-radius: 6px;
  border: 1px solid var(--border);
  text-align: center;
}

.file-info #fileName {
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
}

/* 表格预览 */
.preview-section {
  margin-top: 8px;
}

.table-preview {
  max-height: 160px;
  overflow: auto;
  border-radius: 10px;
  padding: 12px;
  background: #081018;
  border: 1px solid var(--border);
}

:root[data-theme="light"] .table-preview {
  background: rgba(248, 249, 250, 0.8);
}

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

.table-preview th {
  text-align: left;
  padding: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.table-preview td {
  padding: 8px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

/* 图表类型网格 */
.chart-types-section {
  margin-top: 8px;
}

/* 图表类型下拉选择器 */
.chart-type-selector {
  position: relative;
  margin-top: 8px;
  z-index: 11;
}

.chart-type-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
  font-size: 14px;
  position: relative;
  z-index: 12;
}

.chart-type-button:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.chart-type-button:active {
  transform: scale(0.98);
}

.chart-type-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.chart-type-label {
  flex: 1;
  text-align: left;
  font-weight: 500;
}

.chart-type-arrow {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.chart-type-selector.open .chart-type-arrow {
  transform: rotate(180deg);
}

.chart-type-dropdown {
  position: fixed !important;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 10001;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: saturate(120%) blur(8px);
  pointer-events: auto;
  min-width: 280px;
  /* 清除可能的位置属性 */
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 0;
  transform: none;
}

.chart-type-selector.open .chart-type-dropdown {
  display: block;
}

.chart-type-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.chart-type-option:last-child {
  border-bottom: none;
}

.chart-type-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chart-type-option.selected {
  background: rgba(255, 184, 28, 0.1);
  color: var(--accent);
}

.chart-type-option-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chart-type-option-icon svg {
  width: 100%;
  height: 100%;
}

.chart-type-option-label {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.chart-type-option.selected .chart-type-option-label {
  color: var(--accent);
  font-weight: 500;
}

/* 字段映射 */
.field-mapping-section {
  margin-top: 8px;
}

.field-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.field-group {
  flex: 1;
}

.field-select {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  padding: 10px;
  border-radius: 8px;
  margin-top: 6px;
}

.field-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* X轴选择器按钮样式（与图表类型选择器统一） */
.field-selector-wrapper {
  position: relative;
  margin-top: 6px;
  z-index: 10;
}

.field-selector-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: all 0.2s ease;
  color: var(--text-primary);
  font-size: 14px;
  text-align: left;
}

.field-selector-button:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.field-selector-label {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

.field-selector-label:empty::before {
  content: '— 未选择 —';
  color: var(--muted);
}

.field-selector-arrow {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--muted);
}

.field-selector-wrapper.open .field-selector-arrow {
  transform: rotate(180deg);
}

.field-selector-dropdown {
  position: fixed !important;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  pointer-events: auto;
  min-width: 280px;
  /* 清除可能的位置属性 */
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 0;
  transform: none;
}

.field-selector-wrapper.open .field-selector-dropdown {
  display: block;
}

.field-selector-option {
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: var(--text-primary);
  font-size: 14px;
}

.field-selector-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.field-selector-option.active {
  background: rgba(255, 184, 28, 0.15);
  color: var(--accent);
  font-weight: 600;
}

.field-select-hidden {
  display: none !important;
}

:root[data-theme="light"] .field-selector-button {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .field-selector-button:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 184, 28, 0.3);
}

:root[data-theme="light"] .field-selector-dropdown {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Y轴checkbox列表样式 */
.y-axis-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.y-axis-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.y-axis-checkbox-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.y-axis-checkbox-item.checked {
  background: rgba(255, 184, 28, 0.15);
  border-color: rgba(255, 184, 28, 0.4);
}

.y-axis-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.y-axis-checkbox-item label {
  flex: 1;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}

.y-axis-checkbox-item.checked label {
  color: var(--accent);
  font-weight: 600;
}

:root[data-theme="light"] .y-axis-checkbox-item {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .y-axis-checkbox-item:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 184, 28, 0.3);
}

:root[data-theme="light"] .y-axis-checkbox-item.checked {
  background: rgba(255, 184, 28, 0.2);
  border-color: rgba(255, 184, 28, 0.5);
}

/* 隐藏的select样式 */
.field-select-hidden {
  display: none !important;
}

.y-fields-group {
  margin-top: 8px;
}

.y-fields-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.y-fields-chips label {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.y-fields-chips label:hover {
  border-color: var(--accent);
  background: rgba(255, 184, 28, 0.05);
}

.y-fields-chips input[type="checkbox"] {
  margin-right: 6px;
}

/* 操作按钮 */
.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 8px;
  flex-wrap: nowrap;
}

.action-buttons .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: fit-content;
}

/* 右侧预览区（保留兼容性） */
.right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.preview-card {
  min-height: 500px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.03) 0%, 
    rgba(255, 255, 255, 0.015) 100%
  );
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  flex-grow: 0;
  width: 100%;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.15),
    0 16px 48px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(20px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.preview-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 184, 28, 0.3) 20%, 
    rgba(255, 184, 28, 0.5) 50%, 
    rgba(255, 184, 28, 0.3) 80%, 
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.preview-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.18),
    0 20px 64px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.preview-card:hover::after {
  opacity: 1;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.035) 0%, 
    rgba(255, 255, 255, 0.015) 100%
  );
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.preview-header:hover {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.045) 0%, 
    rgba(255, 255, 255, 0.020) 100%
  );
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-info strong { 
  color: var(--text-primary); 
  font-size: 18px; 
  font-weight: 600;
  letter-spacing: 0.3px;
}

.preview-info .small.muted {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.preview-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.preview-actions .btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.preview-actions .btn.ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
}

.preview-actions .btn.ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,184,28,0.3);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 图表控制面板 */
.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.022) 0%, 
    rgba(255, 255, 255, 0.008) 100%
  );
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

.chart-controls:hover {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.028) 0%, 
    rgba(255, 255, 255, 0.012) 100%
  );
}

.chart-control-group {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

.chart-control-group:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

.chart-control-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
  font-weight: 500;
}

.chart-control-label input[type="checkbox"] {
  margin: 0;
  accent-color: var(--accent);
}

.control-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.aggregate-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 13px;
  min-width: 180px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.aggregate-select:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,184,28,0.4);
  transform: translateY(-1px);
}

.aggregate-select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(255,184,28,0.1);
}

.chart-control-group .btn.small {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 60px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.chart-control-group .btn.small:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 全屏图表模式 */
.fullscreen-chart {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.fullscreen-chart.hidden {
  display: none;
}

.fullscreen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.fullscreen-title h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
}

.fullscreen-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

.fullscreen-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.fullscreen-chart-controls {
  display: flex;
  align-items: center;
}

.fullscreen-zoom-controls {
  display: flex;
  gap: 8px;
}

.fullscreen-canvas {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.fullscreen-canvas canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
}

:root[data-theme="light"] .fullscreen-canvas canvas {
  background: rgba(255, 255, 255, 0.8);
}

/* 全屏模式下的按钮样式调整 */
.fullscreen-chart .btn {
  font-size: 14px;
  padding: 8px 16px;
}

.fullscreen-chart .btn.small {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 70px;
}

/* 全屏模式下的控制标签样式 */
.fullscreen-chart .chart-control-label {
  font-size: 14px;
}

.fullscreen-chart .control-text {
  font-size: 14px;
}

.preview-canvas { 
  flex: 1; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 20px; 
  min-height: 450px;
  max-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.015) 0%, 
    rgba(255, 255, 255, 0.005) 100%
  );
  border-radius: 16px;
  position: relative;
  transition: background 0.3s ease;
}

.preview-canvas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 184, 28, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.03) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.01) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
  animation: subtle-float 20s ease-in-out infinite;
}

@keyframes subtle-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2%, -2%) scale(1.02); }
  66% { transform: translate(-2%, 2%) scale(0.98); }
}

.preview-canvas canvas {
  position: relative;
  z-index: 1;
}

:root[data-theme="light"] .preview-canvas {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.012) 0%, 
    rgba(0, 0, 0, 0.004) 100%
  );
}

:root[data-theme="light"] .preview-canvas::before {
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 184, 28, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.06) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.015) 0%, transparent 70%);
}

/* 亮色主题下的卡片优化 */
:root[data-theme="light"] .analytics-control-panel {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.88) 100%
  );
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .analytics-preview-panel {
  background: linear-gradient(180deg, 
    rgba(248, 249, 250, 0.6) 0%, 
    rgba(255, 255, 255, 0.4) 100%
  );
}

:root[data-theme="light"] .card {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.90) 100%
  );
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .card::before {
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 0, 0, 0.06) 50%, 
    transparent 100%
  );
}

:root[data-theme="light"] .card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 12px 32px rgba(0, 0, 0, 0.08),
    0 20px 56px rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .preview-card {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(255, 255, 255, 0.94) 100%
  );
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .preview-card::after {
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 184, 28, 0.5) 20%, 
    rgba(255, 184, 28, 0.7) 50%, 
    rgba(255, 184, 28, 0.5) 80%, 
    transparent 100%
  );
}

:root[data-theme="light"] .preview-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.08),
    0 20px 64px rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .preview-header {
  background: linear-gradient(180deg, 
    rgba(248, 249, 250, 0.8) 0%, 
    rgba(255, 255, 255, 0.6) 100%
  );
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .chart-controls {
  background: linear-gradient(180deg, 
    rgba(248, 249, 250, 0.6) 0%, 
    rgba(255, 255, 255, 0.4) 100%
  );
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .stats-section {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.90) 100%
  );
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

#chartCanvas {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: transparent;
}

/* 空状态提示 */
.preview-canvas:empty::after,
.preview-canvas:has(canvas:not([width]))::after {
  content: '请先载入示例数据或上传 Excel 文件';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.help-text {
  margin-top: 0;
  padding: 8px 0;
}

/* 工具类 */
.small {
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

/* 统计面板 - 苹果风格优化 */
.stats-section {
  margin-top: 20px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.025) 0%, 
    rgba(255, 255, 255, 0.012) 100%
  );
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  width: 100%;
}

.stats-section:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.stats-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.stats-column-select {
  flex: 1;
}

.stats-operations {
  flex: 1;
}

.stats-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.stats-chips label {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.02);
}

.stats-chips label:hover {
  border-color: var(--accent);
  background: rgba(255, 184, 28, 0.05);
}

.stats-chips input[type="checkbox"] {
  margin-right: 4px;
}

.stats-chips label.checked {
  border-color: var(--accent);
  background: rgba(255, 184, 28, 0.1);
  color: var(--accent);
}

.stats-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.stats-actions .btn {
  flex: 1;
  font-size: 12px;
  padding: 8px 12px;
}

.stats-results {
  max-height: 200px;
  overflow-y: auto;
  border-radius: 8px;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
}

.stats-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stats-result-item:last-child {
  border-bottom: none;
}

.stats-result-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stats-result-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.stats-result-error {
  font-size: 12px;
  color: #f87171;
  font-style: italic;
}

.stats-summary {
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 184, 28, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(255, 184, 28, 0.2);
}

.stats-summary-text {
  font-size: 12px;
  color: var(--accent);
}

/* 通知组件 */
.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20001;
  max-width: 500px;
  width: 90%;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
::-webkit-scrollbar-track { background: transparent; }

/* 焦点可见性（辅助功能） */
:focus-visible {
  outline: 2px solid rgba(255,184,28,0.65);
  outline-offset: 2px;
  border-radius: 8px;
}

/* 减少动效偏好（系统设置） */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.notification.success {
  border-color: #4ade80;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(74, 222, 128, 0.05));
}

.notification.error {
  border-color: #f87171;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), rgba(248, 113, 113, 0.05));
}

.notification.warning {
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.05));
}

.notification.info {
  border-color: #60a5fa;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(96, 165, 250, 0.05));
}

.notification-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  transition: color 0.2s ease;
}

.notification-close:hover {
  color: var(--text-primary);
}

@keyframes slideIn {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  to {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
}

/* 响应式设计 */
@media (max-width: 980px) {
  .container {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  
  .container.sidebar-collapsed {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .header-left {
    width: 100%;
  }
  
  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  /* 欢迎页响应式 */
  .welcome-hero {
    padding: 40px 0 60px 0;
  }
  
  .welcome-features-section {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 0;
  }
}

@media (max-width: 768px) {
  body {
    padding: 12px;
  }
  
  .preview-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .preview-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  /* 常用网站页面响应式 */
  .collection-main-content {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  
  .collection-right-panel {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
  
  .collection-floating-actions {
    position: fixed;
    top: 90px;
    right: 16px;
    flex-direction: column;
    gap: 8px;
  }
  
  .collection-floating-actions .floating-action-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  .collection-floating-actions .floating-action-btn span {
    display: none;
  }
  
  .collection-floating-actions .floating-action-btn svg {
    width: 20px;
    height: 20px;
  }
  
  /* 欢迎页移动端优化 */
  .welcome-overlay {
    padding: 20px 16px;
  }
  
  .welcome-hero-title {
    font-size: clamp(32px, 8vw, 48px);
  }
  
  .welcome-hero-subtitle {
    font-size: clamp(16px, 3vw, 20px);
  }
  
  .start-btn.large {
    padding: 16px 40px;
    font-size: 16px;
  }
  
  .welcome-features-section {
    padding: 30px 0;
  }
  
  .feature-content h3 {
    font-size: 18px;
  }
  
  .charts-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 欢迎页样式 - 参考表答官网风格 */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255,184,28,0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,184,28,0.08), transparent 50%),
    linear-gradient(135deg, #0a0a0a 0%, #121212 50%, #0f0f0f 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 20px 40px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.welcome-overlay.hidden { display: none; }

.welcome-container {
  width: min(1200px, 95vw);
  max-width: 100%;
}

.welcome-header { 
  padding: 16px 0 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 欢迎页品牌标题样式 */
.welcome-header .brand-title {
  font-size: 28px;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  font-weight: 700;
}

/* 欢迎页中间标语样式 */
.welcome-hero-slogan {
  margin: 0 0 30px 0;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  color: #FFB81C;
  letter-spacing: 2px;
  text-shadow: 0 4px 12px rgba(255, 184, 28, 0.4);
  animation: fadeInUp 0.8s ease-out;
}

:root[data-theme="light"] .welcome-hero-slogan {
  text-shadow: 0 4px 12px rgba(255, 184, 28, 0.5);
}

.welcome-hero { 
  padding: 40px 0 60px 0;
  text-align: center;
}

.welcome-hero-title {
  font-size: clamp(42px, 8vw, 64px);
  font-weight: 700;
  margin: 0 0 24px 0;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.welcome-hero-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  font-size: clamp(18px, 3vw, 24px);
  margin: 0 auto 32px;
  max-width: 700px;
  line-height: 1.6;
}

.welcome-cta {
  margin-top: 24px;
}

.start-btn.large {
  padding: 18px 48px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFB81C 0%, #ffd54f 100%);
  color: #000;
  box-shadow: 0 8px 24px rgba(255, 184, 28, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
}

.start-btn.large:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 16px 40px rgba(255, 184, 28, 0.5);
  background: linear-gradient(135deg, #ffd54f 0%, #FFB81C 100%);
}

.start-btn.large:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 8px 20px rgba(255, 184, 28, 0.4);
}

/* 脉冲动画 */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(255, 184, 28, 0.3);
  }
  50% {
    box-shadow: 0 12px 32px rgba(255, 184, 28, 0.5);
  }
}

/* 点击波纹效果 */
.start-btn.large::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.start-btn.large:active::before {
  width: 300px;
  height: 300px;
}

.welcome-cta-hint {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

/* 功能说明区域 */
.welcome-features-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  padding: 60px 0;
  margin: 40px 0;
}

.welcome-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
}

.welcome-feature-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,184,28,0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

@media (min-width: 768px) {
  .welcome-feature-item:nth-child(1),
  .welcome-feature-item:nth-child(2) {
    margin-top: -20px;
  }
}

.feature-icon {
  font-size: 40px;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,184,28,0.1);
  border-radius: 12px;
  border: 1px solid rgba(255,184,28,0.2);
}

.feature-content h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.feature-content p {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}
.charts-preview { 
  margin: 60px auto 80px;
  max-width: 100%;
  padding: 0;
}

.charts-preview-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  margin: 0 0 40px 0;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.charts-container { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: 24px;
}

@media (min-width: 768px) { 
  .charts-container { 
    grid-template-columns: repeat(2, 1fr); 
  } 
}

@media (min-width: 1024px) { 
  .charts-container { 
    grid-template-columns: repeat(3, 1fr); 
  } 
}

.chart-card { 
  background: rgba(255,255,255,0.04); 
  border-radius: 16px; 
  padding: 24px; 
  height: 240px; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  position: relative; 
  overflow: hidden; 
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.06);
}

.chart-card:hover { 
  transform: translateY(-6px); 
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  border-color: rgba(255,184,28,0.2);
  background: rgba(255,255,255,0.06);
}

.chart-placeholder { 
  width: 100%; 
  height: 160px; 
  position: relative; 
}

.chart-label { 
  font-size: 14px; 
  color: rgba(255, 255, 255, 0.8); 
  margin-top: 12px; 
  text-align: left;
  font-weight: 500;
}

/* 用户评价区域 */
.testimonials-section {
  margin: 80px auto;
  padding: 0;
  max-width: 100%;
}

.testimonials-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  margin: 0 0 50px 0;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.testimonial-card {
  padding: 28px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.testimonial-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,184,28,0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.testimonial-content {
  margin-bottom: 20px;
}

.testimonial-text {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-style: normal !important;
}

.testimonials-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  margin: 0 0 50px 0;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-style: normal;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB81C 0%, #ffd54f 100%);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}

.author-info {
  flex: 1;
}

.author-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-style: normal;
}

.author-title {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  font-style: normal;
}

/* 底部CTA区域 */
.welcome-footer-cta {
  margin: 80px auto 60px;
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-cta-title {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  margin: 0 0 16px 0;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-cta-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 32px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonial-card {
    padding: 20px;
  }
  
  .welcome-footer-cta {
    margin: 60px auto 40px;
    padding: 40px 20px;
  }
}

/* 欢迎页动画 */
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }
.pulse { animation: pulse 2s infinite; }
@keyframes float { 0% { transform: translateY(0); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0); } }
.float { animation: float 4s ease-in-out infinite; }

/* 渐进式渐入动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 初始状态隐藏，等待滚动触发 */
.fade-in-up,
.fade-in,
.slide-in-left,
.slide-in-right {
  opacity: 0;
}

/* 已触发的动画状态 */
.fade-in-up.visible {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: inherit; /* 继承HTML中的animation-delay */
}

.fade-in.visible {
  animation: fadeIn 0.8s ease-out forwards;
}

.slide-in-left.visible {
  animation: slideInFromLeft 0.6s ease-out forwards;
}

.slide-in-right.visible {
  animation: slideInFromRight 0.6s ease-out forwards;
}

.welcome-left .welcome-title { font-size: 28px; margin: 0 0 10px 0; color: var(--text-primary); }
.welcome-left .welcome-subtitle { color: var(--text-secondary); margin: 0 0 12px 0; line-height: 1.6; }
.welcome-features { margin: 0; padding-left: 18px; color: var(--text-secondary); }
.welcome-features li { margin: 6px 0; }

.welcome-right { display: flex; align-items: center; justify-content: center; }
.welcome-right canvas { width: 100%; height: auto; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }

/* ========== 模式切换相关样式 ========== */
:root {
  --primary: #6366F1;
  --primary-hover: #818CF8;
  --primary-dark: #4F46E5;
  --card-bg: var(--card);
  --border-color: var(--border);
  --hover-bg: rgba(99, 102, 241, 0.1);
  --input-bg: rgba(255,255,255,0.05);
  --input-border: rgba(255,255,255,0.1);
  --modal-bg: var(--card);
  --scrollbar-thumb: rgba(255,255,255,0.2);
}

:root[data-theme="light"],
html[data-theme="light"] {
  --primary: #6366F1;
  --primary-hover: #818CF8;
  --primary-dark: #4F46E5;
  --card-bg: var(--card);
  --border-color: var(--border);
  --hover-bg: rgba(99, 102, 241, 0.1);
  --input-bg: rgba(0,0,0,0.05);
  --input-border: rgba(0,0,0,0.1);
  --modal-bg: var(--card);
  --scrollbar-thumb: rgba(0,0,0,0.2);
}

/* 模式切换按钮 */
.mode-switcher-fixed {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* 应用布局包装器 */
.app-layout-wrapper {
  display: flex;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  /* 确保布局包装器独立于弹窗，不受弹窗影响 */
  position: relative;
  z-index: 1;
  /* 确保flex布局正确计算，子元素能够正确占满剩余空间 */
  align-items: stretch;
  /* 确保布局从顶部开始，不被header遮挡 */
  margin-top: 0;
  /* 继承父级最小高度，允许内容超出时撑开整体高度 */
  min-height: inherit;
  height: auto;
  box-sizing: border-box;
}

/* 内容包装器 - 包含会员面板和其他内容面板 */
.content-wrapper {
  flex: 1;
  display: flex;
  position: relative;
  min-width: 0;
  overflow: hidden;
  min-height: inherit;
  height: auto;
}

/* 左侧功能切换导航栏 */
.mode-nav-sidebar {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  flex-shrink: 0;
  flex-grow: 0;
  position: relative;
  flex-basis: 160px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.mode-nav-sidebar.collapsed {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  padding: 20px 6px;
}

.sidebar-toggle-container {
  position: relative;
  height: 0;
  margin: 0;
  padding: 0;
}

.sidebar-toggle-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.sidebar-toggle-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  border-color: rgba(255, 184, 28, 0.3);
  transform: translateY(-1px);
}

.sidebar-toggle-icon {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 1;
}

.mode-nav-sidebar.collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}

/* 统一所有收起按钮的图标样式 */
.sidebar-toggle-btn svg,
.chat-sidebar-toggle svg,
.collection-center-toggle svg,
.collection-sidebar-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-nav-sidebar.collapsed .btn-label {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 12px;
  opacity: 1;
}

.mode-nav-sidebar.collapsed .mode-switcher-vertical .mode-switcher-btn {
  justify-content: center;
  padding: 12px 6px;
  min-height: 44px;
}

/* 收起状态下的提示信息 */
.mode-nav-sidebar.collapsed .mode-switcher-vertical .mode-switcher-btn {
  position: relative;
}

.mode-nav-sidebar.collapsed .mode-switcher-vertical .mode-switcher-btn:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  animation: tooltipFadeIn 0.2s ease;
}

.mode-nav-sidebar.collapsed .mode-switcher-vertical .mode-switcher-btn:hover::before {
  content: '';
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid var(--border);
  z-index: 1001;
  pointer-events: none;
}

/* 亮色主题下的切换按钮 */
:root[data-theme="light"] .sidebar-toggle-btn,
:root[data-theme="light"] .collection-sidebar-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .sidebar-toggle-btn:hover,
:root[data-theme="light"] .collection-sidebar-toggle:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(255, 184, 28, 0.4);
}

/* 亮色主题下的提示信息 */
:root[data-theme="light"] .mode-nav-sidebar.collapsed .mode-switcher-vertical .mode-switcher-btn:hover::after {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

:root[data-theme="light"] .edge-collapse-toggle {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 240, 0.95));
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

:root[data-theme="light"] .edge-collapse-toggle:hover {
  border-color: rgba(255, 184, 28, 0.4);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(230, 230, 230, 1));
}

/* 垂直模式切换器 */
.mode-switcher-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.mode-switcher-vertical .mode-switcher-btn {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  text-align: left;
  min-height: 44px;
  position: relative;
}

.mode-switcher-vertical .mode-switcher-btn .btn-label {
  font-size: 14px;
  line-height: 1.4;
  flex: 1;
  text-align: left;
}

.mode-switcher-vertical .mode-switcher-btn:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.mode-switcher-vertical .mode-switcher-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.mode-switcher-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.mode-switcher-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.mode-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 应用模式面板 */
.app-mode-panel {
  width: 100%;
  min-height: calc(100vh - 80px - 36px); /* 减去 header 高度(80px) 和 body 上下 padding(18px * 2) */
  height: auto;
  /* 确保模式面板独立于弹窗，不受弹窗影响 */
  position: relative;
  z-index: 1;
  /* 确保面板从body的padding-top之后开始，不被header遮挡 */
  margin-top: 0;
  box-sizing: border-box;
}

/* 确保隐藏的模式面板完全不可见且不占用空间 */
.app-mode-panel[style*="display: none"],
.app-mode-panel:not([style*="display: flex"]):not([style*="display: block"]) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 数据分析内容区域 */
.analytics-content-area {
  flex: 1;
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: inherit;
  height: auto;
  overflow: hidden;
  position: relative;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
}

/* AI对话内容区域 */
.chat-content-area {
  flex: 1;
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: inherit;
  height: 100%;
  overflow: hidden;
  position: relative;
  min-width: 0;
  /* 确保聊天内容区域有固定高度，防止整体滚动 */
}

/* AI对话模式样式 */
.chat-mode-container {
  flex: 1;
  display: flex;
  height: 100%;
  overflow: hidden;
}

.chat-sidebar-panel {
  width: var(--middle-panel-width);
  min-width: var(--middle-panel-width);
  max-width: var(--middle-panel-width);
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: var(--middle-panel-width);
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 16px;
  overflow: hidden; /* Changed from overflow-y: auto to hidden for fixed header */
  position: relative;
  transition: width 0.3s ease, min-width 0.3s ease;
  display: flex;
  flex-direction: column;
}

.chat-sidebar-header {
  order: 0;
  flex-shrink: 0;
}

.chat-history-header {
  order: 1;
  flex-shrink: 0;
}

.chat-list-container {
  order: 2;
  flex: 1;
  overflow-y: auto; /* Move overflow handling here */
}

.chat-sidebar-panel.collapsed {
  width: 0;
  min-width: 0;
  flex-basis: 0;
  padding: 0;
  overflow: visible;
}

.chat-sidebar-panel.collapsed .chat-sidebar-header,
.chat-sidebar-panel.collapsed .chat-list-container {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.chat-sidebar-header {
  margin-bottom: 8px; /* Reduced from 16px to account for flex gap/margin */
  order: 0;
  flex-shrink: 0;
}

.chat-history-header {
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 4px 0 8px 0; /* Reduced top margin from 12px */
  display: block;
  order: 1;
  flex-shrink: 0;
}

.chat-search-row {
  display: flex;
  align-items: center;
  gap: 8px; /* 搜索框和新建按钮之间的间距 */
  width: 100%;
  flex-wrap: nowrap; /* 强制不换行 */
}

.chat-search-row .chat-search-bar {
  flex: 1; /* 搜索框占据剩余空间 */
  min-width: 0; /* 允许搜索框收缩，防止溢出 */
}

.chat-add-btn {
  flex-shrink: 0; /* 防止新建按钮被压缩 */
}

.chat-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  position: relative;
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.chat-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  padding: 0;
}

.chat-search-input::placeholder {
  color: var(--text-muted);
}

.chat-add-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
}

.chat-add-btn:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-text {
  font-size: 14px;
  color: var(--text-muted);
}

.chat-sidebar-panel.collapsed .chat-sidebar-toggle svg {
  transform: rotate(180deg);
}

.chat-list-container {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.chat-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
}

.chat-list-item:hover {
  background: var(--hover-bg);
}

.chat-list-item.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.chat-list-item.active .chat-list-title,
.chat-list-item.active .chat-list-meta {
  color: #FFFFFF;
}

.chat-list-item-content {
  flex: 1;
  min-width: 0;
}

.chat-list-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-meta {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.chat-list-item:hover .chat-list-item-actions {
  opacity: 1;
}

.chat-list-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  transition: all 0.2s ease;
}

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

.chat-list-item.active .chat-list-btn {
  color: rgba(255, 255, 255, 0.8);
}

.chat-list-item.active .chat-list-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.chat-main-panel {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  min-width: 0;
  /* 确保聊天主面板能够正确占满剩余空间 */
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
  /* 确保只有聊天区域滚动，其他区域不滚动 */
}

.chat-header-panel {
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.chat-header-panel h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.chat-current-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

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

.chat-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.chat-action-btn:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* Markdown Styles */
.chat-text {
  line-height: 1.6;
  font-size: 15px;
}

.chat-text p {
  margin: 0 0 12px 0;
}

.chat-text p:last-child {
  margin-bottom: 0;
}

.chat-text h1, .chat-text h2, .chat-text h3, .chat-text h4 {
  margin: 20px 0 12px 0;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.chat-text h1:first-child, .chat-text h2:first-child {
  margin-top: 0;
}

.chat-text pre {
  margin: 16px 0;
  padding: 16px;
  background: #1e1e1e; /* Default dark bg for code */
  border-radius: 8px;
  overflow-x: auto;
  color: #e6edf3;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .chat-text pre {
  background: #f6f8fa;
  color: #24292f;
  border: 1px solid #d0d7de;
}

.chat-text code {
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 85%;
}

.chat-text pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  word-break: normal;
  white-space: pre;
}

/* Inline code */
.chat-text :not(pre) > code {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  background-color: rgba(110, 118, 129, 0.4);
  border-radius: 6px;
  color: inherit;
}

[data-theme="light"] .chat-text :not(pre) > code {
  background-color: rgba(175, 184, 193, 0.2);
}

.chat-text ul, .chat-text ol {
  padding-left: 2em;
  margin-bottom: 12px;
}

.chat-text li {
  margin-bottom: 4px;
}

.chat-text blockquote {
  margin: 0 0 16px 0;
  padding: 0 1em;
  color: var(--text-muted);
  border-left: 4px solid var(--border);
}

.chat-text table {
  border-spacing: 0;
  border-collapse: collapse;
  margin: 16px 0;
  width: 100%;
  display: block;
  overflow: auto;
}

.chat-text table th,
.chat-text table td {
  padding: 8px 16px;
  border: 1px solid var(--border);
}

.chat-text table tr {
  background-color: transparent;
  border-top: 1px solid var(--border);
}

.chat-text table tr:nth-child(2n) {
  background-color: rgba(127, 127, 127, 0.05);
}

.chat-text a {
  color: var(--primary);
  text-decoration: none;
}

.chat-text a:hover {
  text-decoration: underline;
}

.chat-text hr {
  height: 0.25em;
  padding: 0;
  margin: 24px 0;
  background-color: var(--border);
  border: 0;
}

.chat-message-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  position: relative;
  min-height: 0;
  /* 移除 max-height: 100%，让 flex: 1 控制高度 */
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  scroll-behavior: smooth;
  /* 防止滚动事件冒泡 */
  touch-action: pan-y;
  /* 确保只有聊天区域可以滚动 */
}

/* 美化滚动条 */
.chat-message-area::-webkit-scrollbar {
  width: 8px;
}

.chat-message-area::-webkit-scrollbar-track {
  background: transparent;
}

.chat-message-area::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.chat-message-area::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.chat-welcome-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
}

.welcome-illustration {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.chat-welcome-state.hidden {
  display: none;
}

/* 确保聊天面板使用 flex 布局，输入框固定在底部 */
.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-panel > div {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-input-area {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: white;
  position: relative;
  flex-shrink: 0;
  transition: padding 0.2s ease;
  /* 确保输入框固定在底部，不随滚动 */
  z-index: 10;
  /* 防止输入框区域滚动 */
  overflow: visible;
  /* 固定在底部，不参与滚动 */
}

.chat-textarea {
  width: 100%;
  min-height: 80px;
  max-height: 250px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: all 0.2s ease;
  line-height: 1.5;
}

.chat-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.chat-textarea::placeholder {
  color: var(--text-muted);
}

.chat-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 12px;
}

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

.chat-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-action-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  border-color: var(--primary);
}

.chat-send-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-shortcut-hint {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.chat-send-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-send-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.chat-footer-hint {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.model-select-inline {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  padding: 2px 4px;
  border-radius: 4px;
}

.model-select-inline:hover {
  background: var(--hover-bg);
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.link-btn:hover {
  color: var(--primary-hover);
}

.chat-floating-actions {
  position: absolute;
  bottom: 100px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.floating-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.floating-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.chat-subscription-section {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.3));
  border-radius: 16px;
  background: var(--card-bg, rgba(255, 255, 255, 0.9));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.subscription-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.subscription-panel-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.subscription-panel-header p {
  margin: 6px 0 0 0;
  color: var(--text-secondary, #64748b);
  font-size: 14px;
}

.subscription-form-card {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.subscription-form-header {
  margin-bottom: 16px;
}

.subscription-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.subscription-form-grid textarea {
  grid-column: 1 / -1;
}

.subscription-form-grid input,
.subscription-form-grid select,
.subscription-form-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.6));
  background: var(--card-bg, #fff);
  color: var(--text-primary, #0f172a);
  font-size: 14px;
}

.subscription-form-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.subscription-preset-section {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.4));
  border-radius: 12px;
  background: var(--card-bg, rgba(255, 255, 255, 0.8));
}

.subscription-preset-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.subscription-preset-hint {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: var(--text-secondary, #64748b);
}

.subscription-preset-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subscription-preset-sites .subscription-preset-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.5));
  background: var(--card-bg, rgba(255, 255, 255, 0.8));
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  text-align: left;
}

.subscription-preset-sites .subscription-preset-chip:hover {
  border-color: var(--primary, #6366f1);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

.subscription-preset-sites .subscription-preset-chip.selected {
  border-color: var(--primary, #6366f1);
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary, #6366f1);
}

.subscription-preset-sites .subscription-preset-chip .preset-chip-name {
  font-weight: 600;
  font-size: 13px;
}

.subscription-preset-sites .subscription-preset-chip .preset-chip-desc {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
}

.subscription-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.subscription-submit-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: var(--primary, #6366f1);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subscription-submit-btn:hover {
  background: var(--primary-hover, #4f46e5);
  transform: translateY(-1px);
}

.subscription-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.subscription-cancel-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subscription-cancel-btn:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
  color: var(--primary);
}

.subscription-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.subscription-card {
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.4));
  border-radius: 14px;
  padding: 18px;
  background: var(--card-bg, rgba(255, 255, 255, 0.9));
}

.subscription-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.subscription-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.subscription-card-meta {
  font-size: 13px;
  color: var(--text-secondary, #64748b);
}

.subscription-status-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.subscription-status-badge.paused {
  background: rgba(248, 113, 113, 0.15);
  color: #dc2626;
}

.subscription-summary-section {
  border-top: 1px solid var(--border, rgba(148, 163, 184, 0.2));
  padding-top: 16px;
}

.subscription-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.subscription-summary-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.subscription-summary-time {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
}

.subscription-summary {
  font-size: 14px;
  color: var(--text-primary, #0f172a);
  line-height: 1.7;
  white-space: pre-wrap;
  padding: 12px;
  background: var(--card-bg, rgba(255, 255, 255, 0.5));
  border-radius: 8px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.15));
}

.subscription-summary.empty {
  color: var(--text-secondary, #64748b);
  font-style: italic;
  background: transparent;
  border: 1px dashed var(--border, rgba(148, 163, 184, 0.3));
}

.subscription-sources {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.subscription-source-chip {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary, #6366f1);
}

.subscription-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.subscription-action-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.5));
  background: var(--card-bg, rgba(255, 255, 255, 0.9));
  color: var(--text-primary, #0f172a);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subscription-action-btn:hover {
  background: var(--hover-color, rgba(148, 163, 184, 0.1));
}

.subscription-action-btn.primary {
  background: var(--primary, #6366f1);
  color: white;
  border-color: var(--primary, #6366f1);
}

.subscription-action-btn.primary:hover {
  background: var(--primary-dark, #4f46e5);
  border-color: var(--primary-dark, #4f46e5);
}

.subscription-action-btn.danger {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.subscription-action-btn.danger:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
}

/* 优化后的订阅详情页面样式 */
.primary-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
}

.status-indicator {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.status-indicator.paused {
  background: rgba(248, 113, 113, 0.15);
  color: #dc2626;
}

/* 订阅信息卡片 */
.subscription-info-card {
  margin: 16px 0;
  padding: 16px;
  background: var(--card-bg-light, rgba(255, 255, 255, 0.7));
  border-radius: 8px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
}

.info-card-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
}

.info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

/* 卡片区域通用样式 */
.subscription-card-section {
  margin: 16px 0;
  padding: 16px;
  background: var(--card-bg-light, rgba(255, 255, 255, 0.7));
  border-radius: 8px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary, #0f172a);
}

.subscription-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary, #0f172a);
}

/* AI摘要增强样式 */
.summary-content {
  min-height: 100px;
}

.empty-summary {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary, #64748b);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.empty-icon {
  font-size: 32px;
}

.hint {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  margin-top: 4px;
}

.error-message {
  margin-top: 12px;
  padding: 12px;
  background-color: rgba(220, 38, 38, 0.1);
  border-left: 3px solid #dc2626;
  color: #dc2626;
  font-size: 13px;
  border-radius: 0 8px 8px 0;
}

/* 来源链接部分 */
.subscription-sources-section {
  margin: 16px 0;
}

.sources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
  background: var(--card-bg, rgba(255, 255, 255, 0.9));
  transition: all 0.2s ease;
}

.source-item:hover {
  border-color: var(--primary, #6366f1);
  background: var(--card-bg-light, rgba(255, 255, 255, 0.7));
}

.source-item.active {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.05);
}

.source-item.inactive {
  opacity: 0.7;
  border-color: var(--border, rgba(148, 163, 184, 0.2));
}

.source-icon {
  font-size: 16px;
  flex-shrink: 0;
}

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

.source-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-primary, #0f172a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-url {
  font-size: 12px;
  color: var(--primary, #6366f1);
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-url:hover {
  text-decoration: underline;
}

.source-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}

.source-status.active {
  background-color: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.source-status.inactive {
  background-color: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.empty-sources {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary, #64748b);
  background: var(--card-bg-light, rgba(255, 255, 255, 0.7));
  border-radius: 8px;
  border: 1px dashed var(--border, rgba(148, 163, 184, 0.3));
}

/* 响应式调整 */
@media (max-width: 640px) {
  .primary-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .info-card-section {
    grid-template-columns: 1fr;
  }
}

/* 订阅模式 - 三列独立滚动 */
body.subscription-mode-active {
  overflow: hidden;
}

body.subscription-mode-active #subscriptionMode {
  min-height: calc(100vh - 80px - 36px);
  height: calc(100vh - 80px - 36px);
  max-height: calc(100vh - 80px - 36px);
  display: flex;
  flex-direction: column;
}

body.subscription-mode-active #subscriptionMode .app-layout-wrapper,
body.subscription-mode-active #subscriptionMode .content-wrapper,
body.subscription-mode-active #subscriptionMode .subscription-content-area {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

body.subscription-mode-active #subscriptionMode .mode-nav-sidebar {
  overflow-y: auto;
  overflow-x: hidden;
}

body.subscription-mode-active #subscriptionMode .subscription-main-panel {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
}

/* 常用网站模式 - 三列独立滚动 */
body.collection-mode-active {
  overflow: hidden;
}

body.collection-mode-active #collectionMode {
  min-height: calc(100vh - 80px - 36px);
  height: calc(100vh - 80px - 36px);
  max-height: calc(100vh - 80px - 36px);
  display: flex;
  flex-direction: column;
}

body.collection-mode-active #collectionMode .app-layout-wrapper,
body.collection-mode-active #collectionMode .content-wrapper,
body.collection-mode-active #collectionMode .collection-content-area {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

body.collection-mode-active #collectionMode .mode-nav-sidebar {
  overflow-y: auto;
  overflow-x: hidden;
}

body.collection-mode-active #collectionMode .collection-center-panel {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.collection-mode-active #collectionMode .collection-category-section,
body.collection-mode-active #collectionMode .collection-submenu-section {
  min-height: 0;
  height: 50%;
  overflow: hidden;
}

body.collection-mode-active #collectionMode .collection-category-section .categories-container,
body.collection-mode-active #collectionMode .collection-submenu-section .collection-submenu-content {
  overflow-y: auto;
  overflow-x: hidden;
}

body.collection-mode-active #collectionMode .collection-main-panel {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.collection-mode-active #collectionMode .collection-main-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 聊天模式 - 确保高度正确，只有聊天区域滚动 */
#chatMode {
  height: calc(100vh - 80px - 36px);
  max-height: calc(100vh - 80px - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#chatMode .app-layout-wrapper {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}
  flex-direction: column;
}

body.subscription-mode-active #subscriptionMode .subscription-detail-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 订阅内容区域 - 左右布局 */
.subscription-content-area {
  flex: 1;
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: inherit;
  height: auto;
  overflow: hidden;
  position: relative;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
}

/* 订阅侧边栏面板 */
.subscription-sidebar-panel {
  width: var(--middle-panel-width);
  min-width: var(--middle-panel-width);
  max-width: var(--middle-panel-width);
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: var(--middle-panel-width);
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 16px;
  overflow: hidden;
  position: relative;
  transition: width 0.3s ease, min-width 0.3s ease;
  display: flex;
  flex-direction: column;
}

.subscription-sidebar-header {
  order: 0;
  flex-shrink: 0;
  margin-bottom: 8px;
}

.subscription-history-header {
  order: 1;
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 4px 0 8px 0;
  display: block;
}

.subscription-list-container {
  order: 2;
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.subscription-sidebar-panel.collapsed {
  width: 0;
  min-width: 0;
  flex-basis: 0;
  padding: 0;
  overflow: visible;
}

.subscription-sidebar-panel.collapsed .subscription-sidebar-header,
.subscription-sidebar-panel.collapsed .subscription-list-container {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.subscription-sidebar-panel.collapsed .subscription-sidebar-toggle svg {
  transform: rotate(180deg);
}

.subscription-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: nowrap;
}

.subscription-search-row .subscription-search-bar {
  flex: 1;
  min-width: 0;
}

.subscription-add-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
}

.subscription-add-btn:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.subscription-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  position: relative;
}

.subscription-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  padding: 0;
}

.subscription-search-input::placeholder {
  color: var(--text-muted);
}

.subscription-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
}

.subscription-list-item:hover {
  background: var(--hover-bg);
  border-color: var(--border);
}

.subscription-list-item.active {
  background: var(--primary-bg, rgba(99, 102, 241, 0.1));
  border-color: var(--primary);
}

.subscription-list-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-list-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-list-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.subscription-list-item:hover .subscription-list-item-actions {
  opacity: 1;
}

.subscription-list-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  transition: all 0.2s ease;
}

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

.subscription-list-item.active .subscription-list-btn {
  color: rgba(255, 255, 255, 0.8);
}

.subscription-list-item.active .subscription-list-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.subscription-sidebar-toggle {
  right: -18px;
}

/* 订阅主面板 */
.subscription-main-panel {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  min-width: 0;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.subscription-header-panel {
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.subscription-current-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.subscription-detail-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  position: relative;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  /* 确保滚动条显示正常 */
  scroll-behavior: smooth;
}

/* 订阅详情区域滚动条样式 */
.subscription-detail-area::-webkit-scrollbar {
  width: 8px;
}

.subscription-detail-area::-webkit-scrollbar-track {
  background: transparent;
}

.subscription-detail-area::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.subscription-detail-area::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 暗色主题下的订阅详情区域滚动条 */
:root[data-theme="dark"] .subscription-detail-area::-webkit-scrollbar-thumb,
html[data-theme="dark"] .subscription-detail-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .subscription-detail-area::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .subscription-detail-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.subscription-welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px 20px;
}

.subscription-welcome-state .welcome-text h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 8px 0;
}

.subscription-welcome-state .welcome-text p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 8px 0;
  line-height: 1.6;
}

.subscription-detail-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.subscription-detail-card {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.subscription-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.subscription-status-message {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary, #64748b);
}

.subscription-entry {
  position: relative;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
  animation: fadeInUp 0.3s ease-out;
  transition: transform 0.2s ease;
}

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

.chat-message.user {
  justify-content: flex-end;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  margin-right: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chat-avatar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  pointer-events: none;
}

.chat-message.user .chat-avatar {
  margin-right: 0;
  margin-left: 12px;
  order: 2;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chat-message.user .chat-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.chat-message.ai .chat-avatar {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.chat-message.ai .chat-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(245, 87, 108, 0.4);
}

.chat-bubble {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 20px;
  line-height: 1.6;
  position: relative;
  word-wrap: break-word;
  transition: all 0.3s ease;
}

.chat-message.ai .chat-bubble {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.chat-message.ai .chat-bubble:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3), 0 2px 4px rgba(118, 75, 162, 0.2);
}

.chat-message.user .chat-bubble:hover {
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4), 0 3px 6px rgba(118, 75, 162, 0.3);
  transform: translateY(-1px);
}

.chat-role {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  opacity: 0.85;
}

.chat-message.user .chat-role {
  display: none;
}

.chat-message.ai .chat-bubble .chat-role {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.chat-text {
  color: inherit;
  font-size: 14px;
  line-height: 1.7;
}

.chat-message.user .chat-text {
  color: rgba(255, 255, 255, 0.95);
}

.chat-text p {
  margin: 0.5em 0;
}

.chat-text p:first-child {
  margin-top: 0;
}

.chat-text p:last-child {
  margin-bottom: 0;
}

/* 链接样式美化 */
.chat-text a {
  color: #667eea;
  text-decoration: none;
  border-bottom: 1px solid rgba(102, 126, 234, 0.3);
  transition: all 0.2s ease;
}

.chat-text a:hover {
  color: #764ba2;
  border-bottom-color: rgba(118, 75, 162, 0.5);
}

.chat-message.user .chat-text a {
  color: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

.chat-message.user .chat-text a:hover {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

/* 列表样式美化 */
.chat-text ul,
.chat-text ol {
  margin: 8px 0;
  padding-left: 24px;
}

.chat-text li {
  margin: 4px 0;
  line-height: 1.6;
}

.chat-text ul li::marker {
  color: #667eea;
}

.chat-message.user .chat-text ul li::marker {
  color: rgba(255, 255, 255, 0.8);
}

/* 引用样式美化 */
.chat-text blockquote {
  border-left: 3px solid #667eea;
  padding-left: 16px;
  margin: 12px 0;
  color: var(--text-muted);
  font-style: italic;
}

.chat-message.user .chat-text blockquote {
  border-left-color: rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.85);
}

:root[data-theme="dark"] .chat-text a,
html[data-theme="dark"] .chat-text a {
  color: #8b9aff;
}

:root[data-theme="dark"] .chat-text a:hover,
html[data-theme="dark"] .chat-text a:hover {
  color: #a8b5ff;
}

:root[data-theme="dark"] .chat-text blockquote,
html[data-theme="dark"] .chat-text blockquote {
  border-left-color: #667eea;
  color: #aaa;
}

.chat-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  opacity: 0.65;
  font-weight: 400;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-message.user .chat-time {
  color: rgba(255, 255, 255, 0.75);
  justify-content: flex-end;
}

.chat-time::before {
  content: '🕐';
  font-size: 10px;
  opacity: 0.6;
}

/* 模型选择器样式 */
.model-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.model-selector label {
  font-size: 12px;
  color: #666;
}

.model-dropdown {
  position: relative;
  display: inline-block;
}

.selected-model {
  padding: 4px 10px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.selected-model:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.selected-model.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.model-options {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 200px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  margin-bottom: 4px;
}

.model-options.show {
  display: block;
}

.model-option {
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  transition: background 0.2s;
  white-space: nowrap;
  overflow: hidden;
}

.model-option:hover {
  background: #f5f5f5;
}

.model-option.active {
  background: #3b82f6;
  color: white;
  font-weight: 600;
}

.model-option.disabled {
  color: #999;
  cursor: not-allowed;
}

.model-option:last-child {
  border-bottom: none;
}

.model-tag {
  display: inline-block;
  padding: 1px 4px;
  background: #3b82f6;
  color: white;
  border-radius: 3px;
  font-size: 9px;
  margin-left: 3px;
  font-weight: 500;
  white-space: nowrap;
}

.model-option-line {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-option-line > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.model-option-desc {
  display: none;
}

/* 输入框容器样式 */
.input-container {
  position: relative;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 16px;
  background: white;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.input-container:focus-within {
  border-color: #6e8efb;
  box-shadow: 0 0 0 2px rgba(110, 142, 251, 0.1);
}

.input-container textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 16px;
  line-height: 1.5;
  min-height: 60px;
  max-height: 200px;
  padding-right: 80px;
  font-family: inherit;
  color: #333;
  background: transparent;
}

.input-container textarea::placeholder {
  color: #999;
}

.input-actions {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

.action-btn:hover {
  background: #e5e5e5;
}

.send-btn {
  background: #6e8efb;
  color: white;
}

.send-btn:hover {
  background: #5a7dfa;
}

.send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 警告信息样式 - 居中展示，无背景 */
.ai-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  color: #888;
  margin-top: 8px;
  background-color: transparent;
}

.warning-icon {
  color: #ff6b6b;
  font-size: 12px;
}

/* 暗色主题适配 */
:root[data-theme="dark"] .chat-header-panel,
html[data-theme="dark"] .chat-header-panel {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
}

:root[data-theme="dark"] .chat-message-area,
html[data-theme="dark"] .chat-message-area {
  background: linear-gradient(to bottom, #1a1a1a 0%, #1f1f1f 100%);
}

:root[data-theme="dark"] .chat-message-area::-webkit-scrollbar-thumb,
html[data-theme="dark"] .chat-message-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .chat-message-area::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .chat-message-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

:root[data-theme="dark"] .chat-input-area,
html[data-theme="dark"] .chat-input-area {
  background: #1a1a1a;
  border-top-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .input-container,
html[data-theme="dark"] .input-container {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .input-container:focus-within,
html[data-theme="dark"] .input-container:focus-within {
  border-color: #6e8efb;
  box-shadow: 0 0 0 2px rgba(110, 142, 251, 0.2);
}

:root[data-theme="dark"] .input-container textarea,
html[data-theme="dark"] .input-container textarea {
  color: #e0e0e0;
}

:root[data-theme="dark"] .input-container textarea::placeholder,
html[data-theme="dark"] .input-container textarea::placeholder {
  color: #888;
}

:root[data-theme="dark"] .action-btn,
html[data-theme="dark"] .action-btn {
  background: #3a3a3a;
  color: #e0e0e0;
}

:root[data-theme="dark"] .action-btn:hover,
html[data-theme="dark"] .action-btn:hover {
  background: #4a4a4a;
}

:root[data-theme="dark"] .selected-model,
html[data-theme="dark"] .selected-model {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

:root[data-theme="dark"] .selected-model:hover,
html[data-theme="dark"] .selected-model:hover {
  background: #3a3a3a;
  border-color: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .model-options,
html[data-theme="dark"] .model-options {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

:root[data-theme="dark"] .model-option,
html[data-theme="dark"] .model-option {
  border-bottom-color: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
}

:root[data-theme="dark"] .model-option:hover,
html[data-theme="dark"] .model-option:hover {
  background: #3a3a3a;
}

:root[data-theme="dark"] .model-option.active,
html[data-theme="dark"] .model-option.active {
  background: #60a5fa;
  color: white;
  font-weight: 600;
}

:root[data-theme="dark"] .model-selector label,
html[data-theme="dark"] .model-selector label {
  color: #aaa;
}

:root[data-theme="dark"] .model-tag,
html[data-theme="dark"] .model-tag {
  background: #60a5fa;
  color: white;
}

:root[data-theme="dark"] .ai-warning,
html[data-theme="dark"] .ai-warning {
  color: #aaa;
}

:root[data-theme="dark"] .chat-message.ai .chat-bubble,
html[data-theme="dark"] .chat-message.ai .chat-bubble {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .chat-message.ai .chat-bubble:hover,
html[data-theme="dark"] .chat-message.ai .chat-bubble:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .chat-message.user .chat-bubble,
html[data-theme="dark"] .chat-message.user .chat-bubble {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4), 0 2px 4px rgba(118, 75, 162, 0.3);
}

:root[data-theme="dark"] .chat-message.user .chat-bubble:hover,
html[data-theme="dark"] .chat-message.user .chat-bubble:hover {
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5), 0 3px 6px rgba(118, 75, 162, 0.4);
}

:root[data-theme="dark"] .chat-message.ai .chat-bubble .chat-role,
html[data-theme="dark"] .chat-message.ai .chat-bubble .chat-role {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

.streaming-indicator {
  color: var(--text-muted);
  font-style: italic;
  animation: pulse 1.5s ease-in-out infinite;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.streaming-indicator::before {
  content: '⚡';
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 代码块样式美化 */
.chat-text pre {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
  border-left: 3px solid #667eea;
}

.chat-message.user .chat-text pre {
  background: rgba(255, 255, 255, 0.15);
  border-left-color: rgba(255, 255, 255, 0.5);
}

.chat-text code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.9em;
}

.chat-message.user .chat-text code {
  background: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .chat-text pre,
html[data-theme="dark"] .chat-text pre {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: #667eea;
}

:root[data-theme="dark"] .chat-text code,
html[data-theme="dark"] .chat-text code {
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .chat-message.user .chat-text pre,
html[data-theme="dark"] .chat-message.user .chat-text pre {
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .chat-message.user .chat-text code,
html[data-theme="dark"] .chat-message.user .chat-text code {
  background: rgba(255, 255, 255, 0.15);
}

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

.chat-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.chat-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.chat-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

/* 常用网站模式样式 */
.collection-mode-container {
  flex: 1;
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* 中间面板：分类区域 */
.collection-center-panel {
  width: var(--middle-panel-width);
  min-width: var(--middle-panel-width);
  max-width: var(--middle-panel-width);
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: var(--middle-panel-width);
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
  position: relative;
  transition: width 0.3s ease, min-width 0.3s ease;
  display: flex;
  flex-direction: column;
}

.collection-center-panel.collapsed {
  width: 0;
  min-width: 0;
  flex-basis: 0;
  padding: 0;
  overflow: visible;
}

.collection-center-panel.collapsed .collection-category-section,
.collection-center-panel.collapsed .collection-submenu-section {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* 分类区域 */
.collection-category-section {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  max-height: 50%;
}

/* 子菜单区域 */
.collection-submenu-section {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  max-height: 50%;
}

/* 分隔线 */
.collection-panel-divider {
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}

/* 保留原有的侧边栏样式用于兼容 */
.collection-sidebar-panel {
  width: 320px;
  min-width: 280px;
  max-width: 450px;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: 320px;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  transition: width 0.3s ease, min-width 0.3s ease;
  display: none; /* 隐藏左侧分类栏 */
}

.collection-sidebar-panel.collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: visible;
}

.collection-sidebar-panel.collapsed .collection-sidebar-header,
.collection-sidebar-panel.collapsed .categories-container {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.collection-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.category-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.collection-sidebar-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.category-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.category-add-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.category-search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.category-search-bar .search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.category-search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.category-search-input:focus {
  border-color: var(--primary);
  background: var(--card);
}

.category-search-input::placeholder {
  color: var(--text-muted);
}

.categories-container {
  padding: 12px 20px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

/* 分类项样式 */
.category-item {
  margin-bottom: 4px;
}

.category-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  min-width: 0; /* 允许flex子元素收缩 */
}

/* 确保分类名称可以显示更多内容 */
.category-content:hover .category-name {
  overflow: visible;
  z-index: 100;
}

.category-content:hover {
  background: var(--hover-bg);
}

.category-content.active {
  background: var(--primary);
  color: #FFFFFF;
}

.category-content.active .category-name {
  color: #FFFFFF;
  font-weight: 600;
}

.category-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.category-icon.expanded {
  transform: rotate(90deg);
}

.category-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  position: relative;
  cursor: default;
}

/* 当文本被截断时，悬停显示完整tooltip */
.category-name[data-full-name] {
  position: relative;
}

.category-name.has-tooltip:hover::before {
  content: attr(data-full-name);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  white-space: normal;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  max-width: 280px;
  word-break: break-word;
  line-height: 1.4;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease forwards;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Tooltip箭头 */
.category-name.has-tooltip:hover::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 2px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--border);
  z-index: 1001;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease forwards;
}

.category-content.active .category-name {
  color: #FFFFFF;
}

.category-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.category-content:hover .category-actions {
  opacity: 1;
}

.category-action-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

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

.category-content.active .category-action-btn {
  color: rgba(255, 255, 255, 0.8);
}

.category-content.active .category-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

/* 优化子分类的缩进，减少空间占用 */
.category-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-left: 16px;
  border-left: 1px solid var(--border);
  padding-left: 8px;
  margin-top: 4px;
}

.category-children.expanded {
  max-height: 2000px;
}

.category-level-0 .category-content {
  font-weight: 500;
}

.category-level-1 .category-content {
  padding-left: 24px;
  font-size: 13px;
}

.category-level-2 .category-content {
  padding-left: 36px;
  font-size: 13px;
}

.category-level-3 .category-content {
  padding-left: 48px;
  font-size: 12px;
}

.category-level-4 .category-content {
  padding-left: 60px;
  font-size: 12px;
}

/* 优化子分类的缩进，减少空间占用 */
.category-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-left: 16px;
  border-left: 1px solid var(--border);
  padding-left: 8px;
  margin-top: 4px;
}

.category-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-icon-small {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-text-small {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.btn-link-small {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-link-small:hover {
  background: var(--hover-bg);
}

.collection-sidebar-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 20;
  padding: 0;
}

.collection-sidebar-toggle:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  border-color: rgba(255, 184, 28, 0.3);
  transform: translateY(-1px);
}

.collection-sidebar-panel.collapsed .collection-sidebar-toggle {
  right: 10px;
}

.collection-sidebar-panel.collapsed .collection-sidebar-toggle svg {
  transform: rotate(180deg);
}

/* 中间子菜单面板 */
.collection-submenu-panel {
  width: 280px;
  min-width: 240px;
  max-width: 400px;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: 280px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  transition: width 0.3s ease, min-width 0.3s ease;
}

.collection-submenu-panel.collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: visible;
}

.collection-submenu-panel.collapsed .collection-submenu-header,
.collection-submenu-panel.collapsed .collection-submenu-content {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.collection-submenu-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.collection-submenu-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.collection-submenu-content {
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.submenu-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.submenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
  background: var(--card);
  border: 1px solid var(--border);
}

.submenu-item:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
}

.submenu-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.submenu-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--bg-2);
  flex-shrink: 0;
}

.submenu-item.active .submenu-item-icon {
  background: rgba(255, 255, 255, 0.2);
}

.submenu-item-info {
  flex: 1;
  min-width: 0;
}

.submenu-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.submenu-item.active .submenu-item-name {
  color: #FFFFFF;
}

.submenu-item-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.submenu-item.active .submenu-item-count {
  color: rgba(255, 255, 255, 0.8);
}

.collection-center-panel.collapsed .collection-center-toggle svg {
  transform: rotate(180deg);
}

/* 保留原有的子菜单切换按钮样式用于兼容 */
.collection-submenu-toggle {
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none; /* 隐藏旧的切换按钮 */
}

.collection-main-panel {
  flex: 1 1 0%;
  overflow-y: auto;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  /* 确保常用网站主面板能够正确占满剩余空间 */
  min-width: 0;
  box-sizing: border-box;
  /* 确保内容不被固定header遮挡 - 添加小量padding作为保险 */
  padding-top: 0;
  margin-top: 0;
  position: relative;
}

.collection-content-area {
  flex: 1;
  display: flex;
  flex-direction: row;
  padding: 0;
  /* 确保内容区域从顶部开始，不被header遮挡 */
  margin-top: 0;
  overflow: hidden;
  gap: 0;
}

/* 主要内容区域 */
.collection-main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
  overflow: hidden;
  min-height: 0;
  gap: 20px;
}

/* 搜索区域 */
.collection-search-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  flex-shrink: 0;
}

.collection-search-section .search-bar-wrapper {
  width: 100%;
}

.collection-search-section .site-search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
}

.collection-search-section .site-search-input:focus {
  width: 100%;
}

/* 统计区域 */
.collection-stats-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  flex-shrink: 0;
}

.collection-stats-section .site-stats-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.collection-stats-section .site-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.collection-stats-section .view-options {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  width: 100%;
  justify-content: center;
}

/* 工具栏样式 */
.collection-toolbar {
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-shrink: 0;
  padding-bottom: 20px;
  margin-bottom: 0;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.breadcrumb-nav::-webkit-scrollbar {
  display: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.breadcrumb-item:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.breadcrumb-separator {
  color: var(--text-muted);
  margin: 0 4px;
  flex-shrink: 0;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.search-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar-wrapper .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.site-search-input {
  width: 240px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.site-search-input:focus {
  width: 280px;
  border-color: var(--primary);
  background: var(--card);
}

/* 工具栏中的搜索框 */
.collection-toolbar .search-bar-wrapper {
  flex-shrink: 0;
}

.site-search-input::placeholder {
  color: var(--text-muted);
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.toolbar-btn:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
}

.toolbar-btn.primary {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.toolbar-btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.toolbar-btn svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* 右上角浮动操作按钮 */
.collection-floating-actions {
  display: none; /* 隐藏浮动按钮，改为在工具栏中显示 */
}

.collection-floating-actions .floating-action-btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.collection-floating-actions .floating-action-btn:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.collection-floating-actions .floating-action-btn.primary {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.collection-floating-actions .floating-action-btn.primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.collection-floating-actions .floating-action-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* 内容区域样式 */
.content-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  min-height: 400px;
}

.placeholder-illustration {
  margin-bottom: 24px;
  opacity: 0.6;
}

.content-placeholder h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.content-placeholder p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

#contentArea {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  min-height: 0;
  overflow-x: hidden;
}

.site-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.site-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.view-options {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}

.view-option-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.view-option-btn.active {
  background: var(--primary);
  color: #FFFFFF;
}

/* 网格和卡片样式 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.grid.list-view {
  grid-template-columns: 1fr;
  gap: 12px;
}

.grid.list-view .card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 16px;
  gap: 16px;
}

.grid.list-view .card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.grid.list-view .card-title {
  margin-bottom: 4px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
  flex-shrink: 0;
  overflow: hidden;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.site-card {
  position: relative;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(100% 150% at 0% 0%, rgba(255, 255, 255, 0.06) 0%, rgba(17, 22, 33, 0.95) 45%, rgba(11, 14, 20, 0.95) 100%);
  gap: 0;
}

.site-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.site-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.site-card .card-icon {
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 20px rgba(0,0,0,0.45);
}

.site-card .card-icon img {
  border-radius: 14px;
}

.site-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.site-card-domain {
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: lowercase;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.site-card-domain::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.site-card-domain:hover {
  color: var(--text-primary);
}

.site-card .card-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root[data-theme="light"] .site-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 246, 249, 0.9));
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .site-card .card-icon {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 18px rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .site-card-domain {
  color: var(--text-secondary);
  opacity: 1;
}

:root[data-theme="light"] .site-card-domain::before {
  background: var(--primary);
}

.site-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

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

.site-card-edit-btn,
.site-card-delete-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
  padding: 0;
  backdrop-filter: blur(8px);
}

.site-card-edit-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.site-card-delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.site-card-edit-btn svg,
.site-card-delete-btn svg {
  width: 14px;
  height: 14px;
}

:root[data-theme="light"] .site-card-edit-btn,
:root[data-theme="light"] .site-card-delete-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .site-card-edit-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

:root[data-theme="light"] .site-card-delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.card-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-link:hover {
  color: var(--primary);
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  /* 确保弹窗不影响页面布局 */
  pointer-events: none;
  /* 防止弹窗影响页面滚动 */
  overflow: hidden;
}

.modal.active {
  display: flex;
  /* 激活时允许交互 */
  pointer-events: auto;
}

.modal-content {
  background: var(--modal-bg);
  border-radius: 20px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  height: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  /* 确保弹窗内容可以交互 */
  pointer-events: auto;
  /* 确保弹窗内容不影响页面布局 */
  position: relative;
  z-index: 1;
}

/* 模态框头部 */
.modal-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.modal-header-left {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

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

.modal-close-btn svg {
  width: 20px;
  height: 20px;
}

/* 模态框内容区域 - 只在内容超出时才滚动 */
.modal-content-inner {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  padding: 24px;
  padding-right: 20px;
  margin-right: 4px;
  min-height: 0;
  max-height: 100%;
  /* 确保内容可以滚动 */
  -webkit-overflow-scrolling: touch;
}

/* 自定义滚动条样式 */
.modal-content-inner::-webkit-scrollbar {
  width: 6px;
}

.modal-content-inner::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content-inner::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.modal-content-inner::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 如果内容不需要滚动，则不显示滚动条 */
.modal-content:not(.has-scroll) .modal-content-inner {
  overflow: visible;
}

/* 订阅弹窗特殊优化 - 确保内容可以滚动 */
#subscriptionModal .modal-content {
  width: min(1080px, 96vw);
  max-width: 1080px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#subscriptionModal .modal-content-inner {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  max-height: calc(90vh - 140px); /* 减去头部和底部按钮的高度 */
  padding: 28px 32px 32px;
  margin-right: 4px;
}

#subscriptionModal .modal-content-inner form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.subscription-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}

.subscription-modal-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.subscription-modal-column .form-group {
  margin-bottom: 0;
}

#subscriptionModal .error-message {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .subscription-modal-grid {
    grid-template-columns: 1fr;
  }
}

/* 模态框内容区域 */
.modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

/* 模态框底部 */
.modal-footer {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--modal-bg);
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  margin-top: 0;
  text-align: center;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* 弹窗内错误提示样式 */
.error-message {
  display: none;
  color: #ff3b30 !important;
  font-size: 14px;
  margin-bottom: 0;
  padding: 12px 16px;
  background: rgba(255, 59, 48, 0.15) !important;
  border: 1px solid rgba(255, 59, 48, 0.4) !important;
  border-radius: 10px;
  line-height: 1.5;
  word-break: break-word;
  min-height: 44px;
  align-items: center;
  position: relative;
  animation: errorShake 0.5s ease-in-out;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.2);
}

.error-message.show,
.error-message[style*="display: block"],
.error-message[style*="display:block"],
.error-message[style*="display: block;"],
.error-message[style*="display:block;"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 错误提示抖动动画 */
@keyframes errorShake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-4px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(4px);
  }
}

/* 亮色主题下的错误提示 */
:root[data-theme="light"] .error-message {
  background: rgba(255, 59, 48, 0.1) !important;
  border-color: rgba(255, 59, 48, 0.3) !important;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.15);
}

/* 字段级错误提示样式 */
.field-error-message {
  display: none;
  color: #ff3b30;
  font-size: 12px;
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 6px;
  line-height: 1.4;
  animation: fieldErrorSlide 0.3s ease-out;
}

.field-error-message.show {
  display: block !important;
}

/* 字段错误提示滑入动画 */
@keyframes fieldErrorSlide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 亮色主题下的字段错误提示 */
:root[data-theme="light"] .field-error-message {
  background: rgba(255, 59, 48, 0.08);
  border-color: rgba(255, 59, 48, 0.25);
  color: #d32f2f;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 0;
}

.btn-primary,
.btn.btn-primary {
  background: var(--accent);
  color: #111;
  padding: 12px 24px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover,
.btn.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 184, 28, 0.3);
}

.btn-primary:disabled,
.btn.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary,
.btn.btn-secondary {
  background: var(--hover-bg);
  color: var(--text-primary);
  padding: 12px 24px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover,
.btn.btn-secondary:hover {
  background: var(--card);
  border-color: var(--primary);
  color: var(--primary);
}

.icon-preview {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-top: 8px;
  overflow: hidden;
}

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

/* ========== 设置面板样式 ========== */
.settings-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

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

.settings-section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: var(--text-primary);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

.settings-item-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-item-label > span:first-child {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.settings-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.settings-item-control {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.points-value-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(255, 184, 28, 0.15);
  color: #ffb81c;
  font-weight: 600;
  font-size: 14px;
  min-width: 64px;
}

.admin-points-config {
  flex-direction: column;
  align-items: flex-start;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
  padding-top: 20px;
}

.admin-points-config .settings-item-label {
  width: 100%;
}

.points-config-control {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.points-config-control .form-input {
  max-width: 140px;
}

.points-config-meta {
  width: 100%;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.points-config-status {
  color: var(--primary);
}

.version-text {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

/* 开关样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--primary);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.switch input:focus + .slider {
  box-shadow: 0 0 1px var(--primary);
}

/* 设置模态框特定样式 - 左右布局 */
.settings-modal-content {
  max-width: 900px;
  width: 90%;
  display: flex;
  flex-direction: column;
  height: 85vh;
  max-height: 800px;
}

.settings-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.settings-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* 左侧导航菜单 */
.settings-sidebar {
  width: 200px;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  flex-shrink: 0;
  overflow-y: auto;
}

.settings-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.settings-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.settings-menu-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-right: 2px solid var(--primary);
}

.settings-menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.settings-menu-item span {
  flex: 1;
}

/* 右侧内容区域 */
.settings-content {
  flex: 1;
  overflow-y: auto;
  background: var(--modal-bg);
  min-width: 0;
}

.settings-content-inner {
  padding: 24px;
}

.settings-section-content {
  display: none;
}

.settings-section-content.active {
  display: block;
}

/* 自定义滚动条 */
.settings-sidebar::-webkit-scrollbar,
.settings-content::-webkit-scrollbar {
  width: 6px;
}

.settings-sidebar::-webkit-scrollbar-track,
.settings-content::-webkit-scrollbar-track {
  background: transparent;
}

.settings-sidebar::-webkit-scrollbar-thumb,
.settings-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.settings-sidebar::-webkit-scrollbar-thumb:hover,
.settings-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

#settingsModal .form-select {
  min-width: 150px;
}

/* 设置面板链接样式 */
.settings-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-block;
}

.settings-link:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.settings-link:active {
  transform: scale(0.95);
}

/* ========== 会员功能样式 ========== */

/* 会员徽章 */
.membership-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #FFB81C, #FFD700);
  color: #000;
  margin-right: 8px;
}

.membership-badge.active {
  background: linear-gradient(135deg, #FFB81C, #FFD700);
  box-shadow: 0 2px 8px rgba(255, 184, 28, 0.3);
}

/* 会员状态 */
.membership-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.membership-status.active {
  background: linear-gradient(135deg, rgba(255, 184, 28, 0.2), rgba(255, 215, 0, 0.2));
  color: var(--accent);
  border-color: rgba(255, 184, 28, 0.3);
}

/* 会员中心模态框 */
.membership-section {
  margin-bottom: 30px;
  /* 确保会员区域占满整个宽度 */
  width: 100%;
  box-sizing: border-box;
}

/* ===== 项目亮点区域 ===== */
.features-section {
  padding: 40px 0 30px;
  text-align: center;
  margin-bottom: 40px;
}

.features-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.features-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.features-wrap {
  max-width: 1000px;
  margin: auto;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-item {
  width: 260px;
  background: var(--card);
  padding: 24px 20px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: 0.3s;
  border: 1px solid var(--border);
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: var(--accent);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #FFB81C;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
  color: #000;
  font-weight: bold;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.membership-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* 我的会员信息 */
.my-membership-container {
  position: relative;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(120deg, rgba(16, 24, 40, 0.95), rgba(15, 21, 36, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(5, 11, 24, 0.4);
}

.my-membership-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(255, 184, 28, 0.4), transparent 55%);
  opacity: 0.6;
  pointer-events: none;
}

.my-membership-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.my-membership-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.my-membership-level {
  display: flex;
  align-items: center;
  gap: 14px;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, #FFB81C, #FFD700);
  color: #000;
  box-shadow: 0 10px 20px rgba(255, 184, 28, 0.3);
}

.level-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.level-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.my-membership-status {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.my-membership-status.active {
  background: rgba(72, 187, 120, 0.18);
  color: #68D391;
}

.my-membership-status.expired {
  background: rgba(255, 59, 48, 0.2);
  color: #ff6b6b;
}

.my-membership-expire {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  text-align: right;
}

.expire-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.expire-date {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.expired {
  color: #ff3b30;
  font-weight: 500;
}

.my-membership-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.perk-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.perk-chip.more {
  background: rgba(255, 184, 28, 0.18);
  border-color: transparent;
  color: #FFB81C;
}

.my-membership-empty {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 36px 20px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.my-membership-empty .empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 184, 28, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #FFB81C;
}

.my-membership-empty .empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.my-membership-empty .empty-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

:root[data-theme="light"] .my-membership-container {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 255, 0.95));
  border-color: rgba(16, 24, 40, 0.08);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] .my-membership-container::after {
  background: radial-gradient(circle at 80% 0%, rgba(255, 184, 28, 0.2), transparent 60%);
}

:root[data-theme="light"] .level-desc,
:root[data-theme="light"] .expire-label {
  color: rgba(16, 24, 40, 0.6);
}

:root[data-theme="light"] .my-membership-status {
  background: rgba(16, 24, 40, 0.08);
  color: var(--text-primary);
}

:root[data-theme="light"] .expire-date {
  color: var(--text-primary);
}

:root[data-theme="light"] .perk-chip {
  background: rgba(16, 24, 40, 0.05);
  border-color: rgba(16, 24, 40, 0.08);
  color: var(--text-primary);
}

:root[data-theme="light"] .my-membership-empty {
  border-color: rgba(16, 24, 40, 0.12);
  background: rgba(16, 24, 40, 0.02);
  color: var(--text-secondary);
}

/* 会员优点展示区域 */
.membership-benefits-banner {
  background: linear-gradient(135deg, rgba(255, 184, 28, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  border: 1px solid rgba(255, 184, 28, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin: 20px 0 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.membership-benefits-banner:hover {
  background: linear-gradient(135deg, rgba(255, 184, 28, 0.15) 0%, rgba(255, 215, 0, 0.08) 100%);
  border-color: rgba(255, 184, 28, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 184, 28, 0.15);
}

.benefits-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
  max-width: 100%;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: default;
}

.benefit-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 184, 28, 0.4);
  background: rgba(255, 184, 28, 0.05);
}

.benefit-icon {
  font-size: 32px;
  margin-bottom: 8px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.benefit-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.3;
}

/* 亮色主题适配 */
:root[data-theme="light"] .membership-benefits-banner {
  background: linear-gradient(135deg, rgba(255, 184, 28, 0.12) 0%, rgba(255, 215, 0, 0.06) 100%);
  border-color: rgba(255, 184, 28, 0.25);
}

:root[data-theme="light"] .membership-benefits-banner:hover {
  background: linear-gradient(135deg, rgba(255, 184, 28, 0.18) 0%, rgba(255, 215, 0, 0.1) 100%);
  border-color: rgba(255, 184, 28, 0.35);
}

:root[data-theme="light"] .benefit-item {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .benefit-item:hover {
  background: rgba(255, 184, 28, 0.08);
  border-color: rgba(255, 184, 28, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .membership-benefits-banner {
    padding: 20px 16px;
    margin: 16px 0 24px;
  }
  
  .benefits-title {
    font-size: 18px;
    margin-bottom: 16px;
  }
  
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .benefit-item {
    padding: 12px 8px;
  }
  
  .benefit-icon {
    font-size: 28px;
    margin-bottom: 6px;
  }
  
  .benefit-text {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 会员等级列表 */
.membership-levels-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  justify-content: stretch;
  align-items: stretch;
  margin-top: 20px;
  /* 确保网格容器占满整个宽度 */
  width: 100%;
  box-sizing: border-box;
}

.membership-level-card {
  width: 100%;
  min-width: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 18px 40px rgba(5, 11, 24, 0.35);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.membership-level-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 184, 28, 0.35), rgba(255, 255, 255, 0.08));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.membership-level-card > * {
  position: relative;
  z-index: 1;
}

.membership-level-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(4, 9, 20, 0.5);
  border-color: rgba(255, 184, 28, 0.6);
}

.membership-level-card:hover::before,
.membership-level-card.highlight::before {
  opacity: 1;
}

.membership-level-card.highlight {
  border: 1px solid rgba(255, 184, 28, 0.8);
  background: linear-gradient(150deg, rgba(255, 184, 28, 0.12), rgba(15, 22, 41, 0.65));
}

:root[data-theme="light"] .membership-level-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(16, 24, 40, 0.08);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] .membership-level-card::before {
  background: linear-gradient(120deg, rgba(255, 184, 28, 0.25), rgba(16, 24, 40, 0.08));
}

:root[data-theme="light"] .membership-level-card.highlight {
  background: linear-gradient(150deg, rgba(255, 234, 188, 0.9), rgba(255, 255, 255, 0.95));
}

.membership-level-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.membership-level-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.membership-level-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.membership-level-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.membership-level-card .membership-current-badge,
.membership-level-card .membership-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #FFB81C;
  color: #000;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.membership-level-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.membership-level-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-amount {
  font-size: 28px;
  font-weight: 800;
  color: #FFB81C;
}

.price-unit {
  font-size: 13px;
  color: var(--text-muted);
}

.price-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.membership-feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.feature-chip.more {
  background: rgba(255, 184, 28, 0.18);
  border-color: transparent;
  color: #FFB81C;
}

.membership-purchase-btn {
  width: 100%;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.membership-purchase-btn:hover:not(:disabled) {
  opacity: 0.85;
  transform: translateY(-1px);
}

.membership-purchase-btn.primary {
  background: #FFB81C;
  color: #000;
}

.membership-purchase-btn.primary:hover:not(:disabled) {
  background: #FFD700;
  opacity: 1;
}

.membership-purchase-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--border);
  color: var(--text-muted);
}

:root[data-theme="light"] .membership-level-subtitle {
  color: var(--text-secondary);
}

:root[data-theme="light"] .price-hint {
  color: var(--text-secondary);
}

:root[data-theme="light"] .membership-feature-grid .feature-chip {
  background: rgba(16, 24, 40, 0.05);
  border-color: rgba(16, 24, 40, 0.08);
  color: var(--text-primary);
}

/* 亮色主题适配 */
:root[data-theme="light"] .membership-status {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .membership-status.active {
  background: linear-gradient(135deg, rgba(255, 184, 28, 0.15), rgba(255, 215, 0, 0.15));
  border-color: rgba(255, 184, 28, 0.3);
}

:root[data-theme="light"] .my-membership-container,
:root[data-theme="light"] .membership-level-card {
  background: var(--card);
  border-color: var(--border);
}

/* 会员中心模态框全屏样式 */
.membership-modal-content {
  max-width: 98% !important;
  width: 98% !important;
  height: 98vh !important;
  max-height: 98vh !important;
  border-radius: 16px;
  margin: 1vh auto;
  display: flex !important;
  flex-direction: column !important;
}

.membership-modal-content .modal-header {
  flex-shrink: 0;
}

.membership-modal-content .modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  min-height: 0; /* 确保 flex 子元素可以缩小 */
}

.membership-modal-content .modal-body::-webkit-scrollbar {
  width: 8px;
}

.membership-modal-content .modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.membership-modal-content .modal-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.membership-modal-content .modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 响应式：小屏幕时使用更小的边距 */
@media (max-width: 768px) {
  .membership-modal-content {
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0;
    margin: 0;
  }
}

/* 导入书签弹窗样式 */
.import-radio-option:hover {
  background: var(--hover-bg) !important;
}

.import-option-item:hover {
  background: var(--hover-bg) !important;
}

.import-radio-option input[type="radio"]:checked + span {
  color: var(--primary) !important;
}

.import-option-item input[type="radio"]:checked ~ .html-icon {
  background: var(--primary) !important;
}

.import-option-item input[type="radio"]:checked ~ div > div:first-child {
  color: var(--primary) !important;
}

/* 小按钮样式 */
.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}