/* ============================================================
   领先千川短视频创意系统 v10.0 — 全新精致UI设计
   设计语言：现代SaaS · 紫色主题 · 精致卡片 · 流畅动效
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 背景色系 */
  --bg: #f8f9fc;
  --bg2: #f1f3f9;
  --surface: #ffffff;
  --surface-hover: #f8f9fc;
  --surface-active: #eef0f6;
  
  /* 文字色系 */
  --ink: #1a1d2e;
  --ink2: #4a5068;
  --muted: #8b92a8;
  --placeholder: #b8bec9;
  
  /* 品牌色 - 紫色主题 */
  --accent: #7c5cfc;
  --accent-hover: #6a4ae8;
  --accent-light: #f0edff;
  --accent-gradient: linear-gradient(135deg, #7c5cfc 0%, #9d7cfe 100%);
  
  /* 边框 */
  --border: #e5e8f0;
  --border-light: #eef0f6;
  
  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  
  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
  --shadow-accent: 0 4px 14px rgba(124, 92, 252, 0.25);
  
  /* 布局 */
  --sidebar-w: 240px;
  --topbar-h: 60px;
  
  /* 过渡 */
  --t-fast: 0.15s ease;
  --t-normal: 0.25s ease;
  
  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ---------- 3. 应用布局 ---------- */
.app-layout { display: flex; min-height: 100vh; }

/* ---------- 4. 侧边栏 ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

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

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

.sidebar-logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 8px;
  transition: all var(--t-fast);
}

.sidebar-toggle:hover {
  background: var(--bg2);
  color: var(--ink);
}

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

.nav-group {
  margin-bottom: 20px;
}

.nav-group-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--ink2);
  cursor: pointer;
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  margin-bottom: 2px;
  font-weight: 500;
}

.nav-item:hover {
  background: var(--bg2);
  color: var(--ink);
}

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

.nav-icon {
  font-size: 20px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.model-selector-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg2);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
}

.model-selector-current:hover {
  background: var(--surface-active);
}

.model-selector-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.model-selector-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-selector-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.model-selector-provider {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 5. 主容器 ---------- */
.main-container {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- 6. 顶部栏 ---------- */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border-radius: var(--r-lg);
  padding: 10px 16px;
  width: 420px;
  transition: all var(--t-fast);
}

.topbar-search:focus-within {
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.topbar-search .search-icon {
  color: var(--muted);
  font-size: 20px;
}

.topbar-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--ink);
}

.topbar-search input::placeholder {
  color: var(--placeholder);
}

.topbar-search kbd {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-family: inherit;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 8px;
  border-radius: 10px;
  transition: all var(--t-fast);
}

.topbar-btn:hover {
  background: var(--bg2);
  color: var(--ink);
}

/* ---------- 7. 主内容区 ---------- */
.main-content {
  flex: 1;
  padding: 28px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  margin-bottom: 28px;
}

.view-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.view-subtitle {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 8. 表单元素 ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: all var(--t-fast);
  box-sizing: border-box;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--placeholder);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 92, 252, 0.35);
}

.btn-outline {
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
}

.btn-lg {
  padding: 13px 28px;
  font-size: 15px;
  border-radius: var(--r-lg);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--r-sm);
  background: var(--bg2);
  color: var(--ink2);
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--t-fast);
}

.btn-sm:hover {
  background: var(--surface-active);
}

.btn-danger {
  color: #ef4444;
  background: #fef2f2;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-group {
  display: flex;
  gap: 6px;
}

.btn-group .btn-sm.active {
  background: var(--accent);
  color: #fff;
}

/* ---------- 10. AI结果区域 ---------- */
.ai-result-area {
  margin-top: 24px;
  min-height: 120px;
}

.ai-result-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.ai-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.ai-result-header .material-icons-round {
  color: var(--accent);
  font-size: 22px;
}

.ai-result-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink2);
  white-space: pre-wrap;
}

.ai-result-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.ai-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.ai-empty .material-icons-round {
  display: block;
  margin: 0 auto 16px;
  font-size: 56px !important;
  opacity: 0.3;
}

/* ---------- 11. 知识库布局 ---------- */
.kb-layout {
  display: flex;
  gap: 24px;
}

.kb-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

.kb-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--ink2);
  cursor: pointer;
  border-radius: var(--r-md);
  margin-bottom: 4px;
  transition: all var(--t-fast);
  font-weight: 500;
}

.kb-cat-item:hover {
  background: var(--bg2);
}

.kb-cat-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.kb-cat-item .material-icons-round {
  font-size: 18px;
}

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

.kb-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.kb-header p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.kb-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.kb-content-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-xs);
}

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

.kb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kb-card-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  border-radius: 16px;
}

.kb-card-time {
  font-size: 12px;
  color: var(--muted);
}

.kb-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.kb-card-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink2);
}

.kb-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.kb-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

.kb-hot-topics {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  align-self: flex-start;
  box-shadow: var(--shadow-xs);
}

.kb-hot-topics h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.hot-platform {
  margin-bottom: 16px;
}

.hot-platform-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.hot-platform-name .material-icons-round {
  font-size: 18px;
  color: var(--accent);
}

.hot-tag {
  display: inline-block;
  padding: 5px 12px;
  font-size: 11px;
  background: var(--bg2);
  color: var(--ink2);
  border-radius: 16px;
  margin: 3px 4px 3px 0;
  cursor: pointer;
  transition: all var(--t-fast);
  font-weight: 500;
}

.hot-tag:hover {
  background: var(--accent);
  color: #fff;
}

/* ---------- 12. 行业分析布局 ---------- */
.industry-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.industry-controls {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.control-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.industry-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.industry-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--t-fast);
  font-weight: 500;
}

.industry-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.industry-chip .material-icons-round {
  font-size: 16px;
}

.industry-section {
  margin-top: 12px;
}

.industry-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.sub-industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.sub-industry-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  transition: all var(--t-fast);
}

.sub-industry-card:hover {
  border-color: var(--accent);
}

.sub-industry-card .material-icons-round {
  color: var(--accent);
  font-size: 20px;
}

.sub-industry-card .btn-sm {
  margin-left: auto;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  transition: all var(--t-fast);
}

.profile-card:hover {
  border-color: var(--accent);
}

.profile-card .material-icons-round {
  color: var(--accent);
  font-size: 20px;
}

.profile-card .btn-sm {
  margin-left: auto;
}

/* ---------- 13. 品牌分析布局 ---------- */
.brand-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  font-weight: 500;
}

.brand-tab:hover {
  border-color: var(--accent);
}

.brand-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.brand-tab .material-icons-round {
  font-size: 18px;
}

.brand-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

.brand-form h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.brand-form p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---------- 14. 素材创意库布局 ---------- */
.material-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.material-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.material-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  font-weight: 500;
}

.material-tab:hover {
  border-color: var(--accent);
}

.material-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.material-tab .material-icons-round {
  font-size: 18px;
}

.material-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

.material-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.material-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.material-header p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.material-card {
  background: var(--accent-gradient);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: all var(--t-normal);
  box-shadow: var(--shadow-accent);
}

.material-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124, 92, 252, 0.3);
}

.material-card-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.95);
  color: var(--accent);
  border-radius: 16px;
  margin-bottom: 10px;
}

.material-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.material-card-body {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

.material-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* ---------- 15. Brief分析布局 ---------- */
.brief-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brief-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.brief-type-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: 14px;
  font-weight: 500;
}

.brief-type-card:hover {
  border-color: var(--accent);
}

.brief-type-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.brief-type-card .material-icons-round {
  font-size: 24px;
}

.brief-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

.brief-form h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 24px;
}

/* ---------- 16. 文案创意布局 ---------- */
.copy-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.copy-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.copy-type-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: 14px;
  font-weight: 500;
}

.copy-type-card:hover {
  border-color: var(--accent);
}

.copy-type-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.copy-type-card .material-icons-round {
  font-size: 24px;
}

.copy-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

.copy-form h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.copy-subtypes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.copy-subtype-chip {
  padding: 8px 18px;
  font-size: 13px;
  background: var(--bg2);
  border-radius: 18px;
  cursor: pointer;
  transition: all var(--t-fast);
  font-weight: 500;
}

.copy-subtype-chip:hover {
  background: var(--accent);
  color: #fff;
}

/* ---------- 17. 产品内容创意布局 ---------- */
.product-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-tabs {
  display: flex;
  gap: 10px;
}

.product-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  font-weight: 500;
}

.product-tab:hover {
  border-color: var(--accent);
}

.product-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.product-tab .material-icons-round {
  font-size: 18px;
}

.product-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

.pc-form h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.pc-form p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---------- 18. 内容创意引擎布局 ---------- */
.engine-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.engine-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.engine-templates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.engine-template-card {
  padding: 20px 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t-fast);
}

.engine-template-card:hover {
  border-color: var(--accent);
}

.engine-template-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.engine-template-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.engine-template-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.engine-template-steps {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.strategy-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}

.strategy-card:hover {
  border-color: var(--accent);
}

.strategy-card .material-icons-round {
  color: var(--accent);
  font-size: 22px;
  margin-top: 2px;
}

.strategy-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.strategy-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- 19. 历史记录 ---------- */
.history-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--t-fast);
}

.history-item:hover {
  background: var(--bg2);
}

.history-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.history-item-type {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 12px;
}

.history-item-time {
  font-size: 11px;
  color: var(--muted);
}

.history-item-content {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.6;
}

/* ---------- 20. 滚动条 ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

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