/* ==========================================================================
   乐拓智造 Lotelf PackFab - 乐拓安全箱官方产品数据库 (48款全系)
   Design System: Clean B2B Industrial Tech (Aligned with Lotelf Official Portal)
   ========================================================================== */

:root {
  /* 品牌与工业色系 (与乐拓智造 clean-b2b.css 完全一致) */
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-tint: rgba(30, 64, 175, 0.08);
  --primary-border: rgba(30, 64, 175, 0.22);
  
  --accent-teal: #0d9488;
  --accent-cyan: #0284c7;
  --accent-amber: #d97706;

  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #f1f5f9;

  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-medium: #cbd5e1;
  --border-focus: #1e40af;

  --text-primary: #0f172a;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 10px 25px -4px rgba(15, 23, 42, 0.10);
  --shadow-dock: 0 8px 30px rgba(0, 0, 0, 0.12);

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

button, input, select, textarea {
  font-family: var(--font-sans);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 英文排版微调 */
body.lang-en {
  letter-spacing: -0.01em;
}

/* ==========================================================================
   SITE TOPBAR HEADER (官网风格顶部全局导航栏)
   ========================================================================== */
.site-topbar {
  height: 54px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex: 0 0 54px;
  z-index: 100;
  gap: 16px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e40af, #0284c7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
  user-select: none;
  line-height: 1;
  flex-shrink: 0;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title-main {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-subtitle-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.topbar-link {
  text-decoration: none;
  color: var(--text-body);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.topbar-link:hover,
.topbar-link.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

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

.lang-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-body);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #ffffff;
}

.topbar-phone {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-body);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.topbar-phone:hover {
  color: var(--primary);
}

.topbar-phone svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* 通用按钮样式 (统一官网规范) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-blue {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.2);
}

.btn-blue:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-body);
  border-color: var(--border-light);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-primary {
  background: linear-gradient(135deg, #1e40af, #0284c7);
  color: #ffffff !important;
}

.btn-primary:hover {
  opacity: 0.95;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* ==========================================================================
   APP SHELL & WORKBENCH BODY (保持双栏布局不变)
   ========================================================================== */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.workbench-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - 54px);
  overflow: hidden;
}

/* ==========================================================================
   LEFT SIDEBAR (B2B 产品型号分类树导航)
   ========================================================================== */
#sidebar {
  width: 280px;
  min-width: 260px;
  max-width: 300px;
  height: 100%;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  user-select: none;
  z-index: 10;
}

.sidebar-header {
  padding: 16px 18px 14px 18px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

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

.brand-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--primary);
}

.total-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 2px 8px;
  border-radius: 12px;
}

/* 搜索框 */
.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  height: 34px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0 30px 0 30px;
  font-size: 12.5px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  opacity: 0.5;
  pointer-events: none;
}

.search-input:focus {
  background-color: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--border-subtle);
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
}

/* 分类目录滚动区 */
.tree-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.tree-scroll::-webkit-scrollbar {
  width: 5px;
}

.tree-scroll::-webkit-scrollbar-thumb {
  background-color: var(--border-subtle);
  border-radius: 3px;
}

.cat-group {
  margin-bottom: 12px;
}

.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: var(--transition);
}

.cat-header:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.cat-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-arrow {
  font-size: 8px;
  transition: transform 0.2s ease;
  color: var(--text-tertiary);
}

.cat-group.collapsed .cat-arrow {
  transform: rotate(-90deg);
}

.cat-group.collapsed .model-list {
  display: none;
}

.cat-count {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.model-list {
  margin-top: 3px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-body);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.model-item:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.model-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 700;
}

.model-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 400;
}

.model-item.active .model-sub {
  color: var(--primary);
  opacity: 0.85;
}

/* ==========================================================================
   RIGHT MAIN AREA (产品展示区 · 极简工业质感)
   ========================================================================== */
#main {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  background-color: var(--bg-app);
  padding: 22px 76px 60px 28px;
  scroll-behavior: smooth;
}

#main::-webkit-scrollbar {
  width: 6px;
}

#main::-webkit-scrollbar-thumb {
  background-color: var(--border-subtle);
  border-radius: 3px;
}

/* 顶部型号与操作栏 */
.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.model-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-cat {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge-wheel-yes {
  background-color: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.25);
  color: var(--accent-teal);
}

.badge-wheel-no {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-tertiary);
}

.badge-cert {
  background-color: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--accent-cyan);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* 双栏网格主体 */
.content-grid {
  display: grid;
  grid-template-columns: minmax(320px, 400px) 1fr 280px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1120px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* 左列：产品视觉 */
.visual-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 主图正方形卡片 (严格正方形 1:1) */
.hero-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  overflow: hidden;
  transition: var(--transition);
}

.hero-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.25s ease, opacity 0.2s ease;
  user-select: none;
}

.hero-card:hover .hero-image {
  transform: scale(1.02);
}

.zoom-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 通用内容卡片 */
.content-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 缩略图画廊 */
.gallery-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-strip::-webkit-scrollbar {
  height: 4px;
}

.gallery-strip::-webkit-scrollbar-thumb {
  background-color: var(--border-subtle);
  border-radius: 2px;
}

.thumb-card {
  width: 60px;
  height: 60px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-light);
  background-color: #ffffff;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.thumb-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.thumb-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
}

.thumb-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 可选颜色列表 */
.color-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.color-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 4px 10px 4px 6px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
}

.color-swatch-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.color-hex-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* 右列：技术指标与规格 */
.specs-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* 核心尺寸卡片网格 */
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.metric-card.full-span {
  grid-column: span 2;
}

.metric-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value-lg {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.metric-breakdown span {
  display: inline-flex;
  gap: 3px;
}

.metric-breakdown strong {
  color: var(--primary);
  font-weight: 700;
}

/* 深度配比条 */
.depth-ratio-bar {
  height: 7px;
  background-color: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  margin: 8px 0;
}

.depth-ratio-lid {
  background-color: var(--primary);
  height: 100%;
}

.depth-ratio-base {
  background-color: #94a3b8;
  height: 100%;
}

.depth-ratio-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.depth-ratio-labels strong {
  color: var(--text-main);
}

/* 规格参数表格 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.spec-table tr {
  border-bottom: 1px solid var(--border-light);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table tr:hover {
  background-color: var(--bg-subtle);
}

.spec-table td {
  padding: 8px 10px;
  word-break: break-word;
}

.spec-label {
  width: 32%;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11.5px;
}

.spec-data {
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.45;
  font-size: 12px;
}

/* ==========================================================================
   页面右侧悬浮组件 (FLOATING DOCK - 100% 还原官网标准)
   ========================================================================== */
.floating-dock {
  position: fixed;
  right: 16px;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.dock-item {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-dock);
  transition: var(--transition);
}

.dock-item:hover {
  transform: translateY(-2px);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.18);
}

.dock-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.dock-popover {
  position: absolute;
  right: 54px;
  top: 50%;
  transform: translateY(-50%) scale(0.95);
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: var(--transition);
  color: var(--text-main);
  font-size: 12px;
}

.dock-item:hover .dock-popover {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}

.popover-qr {
  width: 140px;
  padding: 10px;
  text-align: center;
}

.popover-qr img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}

.popover-qr-tip {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.popover-phone {
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
}

/* ==========================================================================
   TOAST 反馈提示
   ========================================================================== */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background-color: var(--text-main);
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 2000;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   IMAGE ZOOM MODAL (原位平滑放大查看弹层)
   ========================================================================== */
#zoomOverlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  cursor: zoom-out;
  transition: opacity 0.3s ease;
}

#zoomOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

#zoomedImage {
  position: fixed;
  z-index: 1001;
  pointer-events: auto;
  cursor: zoom-out;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  background-color: #ffffff;
  padding: 16px;
  object-fit: contain;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
}

.zoom-close-btn {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 1002;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.zoom-close-btn:hover {
  transform: scale(1.08);
  border-color: var(--primary);
  color: var(--primary);
}

/* 响应式调整 */
@media (max-width: 900px) {
  .topbar-nav {
    display: none;
  }
  #sidebar {
    width: 220px;
    min-width: 200px;
  }
  #main {
    padding: 16px;
  }
}


/* ==========================================================================
   右侧 280*715 AI 智能选型终端侧边栏 (Apple / B2B 极简科技工业质感)
   ========================================================================== */
.matcher-panel {
  box-sizing: border-box !important;
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  height: 715px !important;
  min-height: 715px !important;
  max-height: 715px !important;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 76px;
  overflow: hidden;
}

.matcher-panel-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matcher-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  width: fit-content;
}

.ai-sparkle-icon {
  font-size: 11px;
}

.matcher-header-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.matcher-header-desc {
  font-size: 11.5px;
  color: var(--text-tertiary);
  line-height: 1.4;
  margin-top: -4px;
}

/* 分段控制器 */
.matcher-scope-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.matcher-seg-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  gap: 3px;
}

.matcher-seg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 0;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.matcher-seg-btn:hover {
  color: var(--text-main);
}

.matcher-seg-btn.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.matcher-sub-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.sub-seg-btn {
  padding: 4px 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.sub-seg-btn.active {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
  font-weight: 700;
}

/* 竖向输入区域 */
.matcher-inputs-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dim-v-dual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.dim-v-dual-row .dim-v-field {
  min-width: 0;
}

.dim-v-dual-row .dim-v-label {
  font-size: 11px;
  white-space: nowrap;
}

.dim-v-dual-row .dim-v-hint {
  font-size: 9.5px;
  white-space: nowrap;
}

.dim-v-dual-row .dim-v-input {
  min-width: 0;
  width: 100%;
  font-size: 12.5px;
}

.dim-v-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dim-v-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dim-v-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
}

.dim-v-hint {
  font-size: 10px;
  color: var(--text-tertiary);
}

.dim-v-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 7px;
  padding: 0 8px;
  height: 32px;
  transition: all 0.15s ease;
}

.dim-v-input-wrap:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.dim-v-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  -moz-appearance: textfield;
}

.dim-v-input::-webkit-outer-spin-button,
.dim-v-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dim-v-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  user-select: none;
}

/* 提示卡片 */
.matcher-rules-box {
  background: rgba(0, 113, 227, 0.035);
  border: 1px solid rgba(0, 113, 227, 0.12);
  border-radius: 8px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 10.5px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.rule-icon {
  font-size: 11px;
  flex-shrink: 0;
}

/* 底部操作与结果卡片 */
.matcher-panel-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matcher-actions-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.btn-ai-calc {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.6px;
  background: linear-gradient(135deg, #0071e3, #0284c7);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.28);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-ai-calc span {
  white-space: nowrap;
}

.btn-ai-calc:hover {
  background: linear-gradient(135deg, #0077ed, #0369a1);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.38);
  transform: translateY(-1px);
}

.btn-ai-calc:active {
  transform: translateY(0);
}

.btn-ai-reset {
  width: 100%;
  height: 24px;
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn-ai-reset:hover {
  color: var(--text-main);
}

/* 结果卡片 */
.matcher-result-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.result-status-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-tertiary);
}

.result-model-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.result-dim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  white-space: nowrap;
  gap: 4px;
}

.result-lbl {
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

.result-val {
  font-weight: 700;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", monospace;
  font-size: 10px;
  white-space: nowrap;
  text-align: right;
}

.result-tips {
  font-size: 9.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
  border-top: 1px dashed var(--border-light);
  padding-top: 4px;
  line-height: 1.3;
}

/* ==========================================================================
   AI 智能纯粒子悬浮动效与进度指示 (无弹窗边框、纯黑粒子、背景全透可操作)
   ========================================================================== */
.ai-compute-floating {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-compute-floating.active {
  opacity: 1;
  pointer-events: none !important;
}

.ai-particle-floating-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 1120px;
  max-width: 96vw;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  margin-top: -30px;
  pointer-events: none !important;
}

.ai-particle-stage-wrap {
  width: 1100px;
  height: 450px;
  max-width: 96vw;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none !important;
}

.ai-particle-canvas-pure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none !important;
}

.ai-floating-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  /* 柔和扩散纯白光晕遮罩：彻底吸收底层表格黑字，杜绝重合干扰，边缘平滑渐隐至透明 */
  background: radial-gradient(ellipse 85% 90% at 50% 50%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 55%, rgba(255, 255, 255, 0) 85%);
  padding: 10px 48px;
  border-radius: 999px;
  pointer-events: none !important;
}

.ai-floating-title {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  text-align: center;
  /* 纯白描边外轮廓 + 多层强光发光晕，字体放大一倍且醒目锐利 */
  -webkit-text-stroke: 2px #ffffff;
  paint-order: stroke fill;
  text-shadow:
    0 0 4px #ffffff,
    0 0 8px #ffffff,
    0 0 16px #ffffff,
    0 0 24px #ffffff,
    0 0 36px #ffffff;
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 1));
}

.ai-floating-target-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14.5px;
  font-weight: 700;
  color: #0369a1;
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid rgba(14, 165, 233, 0.4);
  border-radius: 999px;
  padding: 4px 22px;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.12), 0 0 0 3px #ffffff;
  letter-spacing: 0.01em;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-floating-step {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
  background: #ffffff;
  border: 1.5px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  padding: 6px 26px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 3px #ffffff;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-floating-progress-box {
  width: 520px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
  /* 进度条区域纯白渐隐柔光，消除底层边框干扰 */
  background: radial-gradient(ellipse 90% 90% at 50% 50%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 60%, rgba(255, 255, 255, 0) 90%);
  padding: 8px 36px;
  border-radius: 999px;
  pointer-events: none !important;
}

.ai-floating-track {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border: 1.5px solid rgba(15, 23, 42, 0.25);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 0 0 4px #ffffff, 0 3px 10px rgba(0, 0, 0, 0.08);
}

.ai-floating-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #00f2fe 0%, #2563eb 50%, #7c3aed 100%);
  border-radius: 999px;
  position: relative;
  transition: width 0.08s linear;
}

.ai-floating-flare {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px #00f2fe, 0 0 18px #7c3aed, 0 0 22px #ffffff;
}

.ai-floating-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.ai-floating-pct {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
  padding: 2px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 0 0 2px #ffffff;
}

.ai-floating-time {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  padding: 2px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 0 0 2px #ffffff;
}

/* 文案状态区 */
.ai-hud-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-hud-title {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.ai-hud-step {
  font-size: 12px;
  color: #38bdf8;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  height: 18px;
  transition: all 0.2s ease;
}

/* 进度条 */
.ai-progress-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.25);
  position: relative;
}

.ai-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #00f0ff);
  border-radius: 9999px;
  position: relative;
  transition: width 0.05s linear;
}

.ai-progress-flare {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: #ffffff;
  box-shadow: 0 0 12px #ffffff, 0 0 20px #00f0ff;
  border-radius: 50%;
}

.ai-progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", monospace;
  font-size: 11px;
}

.ai-progress-pct {
  font-weight: 800;
  color: #38bdf8;
}

.ai-progress-time {
  color: #94a3b8;
}

/* 响应式适配 */
@media (max-width: 1280px) {
  .content-grid {
    grid-template-columns: minmax(300px, 360px) 1fr;
  }
  .matcher-panel {
    grid-column: 1 / -1;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
  }
}
