/* ===== shared.css · 产品端共享组件样式 ===== */

/* 移动端页面容器 */
.app-container {
  max-width: 448px;  /* max-w-md = 28rem */
  margin: 0 auto;
  min-height: 100vh;
  background: #fafafa;
  position: relative;
}

/* 底部安全区域 */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

/* ===== 底部 Tab 导航 ===== */
.bottom-tab {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 448px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 56px;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-tab__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  padding: 8px 20px;
}

.bottom-tab__item.active {
  color: #7c3aed;
  font-weight: 600;
}

.bottom-tab__item.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

.bottom-tab__icon {
  width: 22px;
  height: 22px;
}

/* ===== 对话气泡 ===== */
.bubble-user {
  max-width: 80%;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
  color: white;
  border-radius: 18px 18px 4px 18px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 2px 8px -2px rgba(124, 58, 237, 0.25);
}

.bubble-ai {
  max-width: 85%;
  background: white;
  border: 1px solid #f1f5f9;
  color: #334155;
  border-radius: 18px 18px 18px 4px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.06);
}

/* AI 气泡内嵌产物卡片 */
.bubble-product {
  margin-top: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
}

/* ===== 对话输入栏 ===== */
.chat-input-bar {
  position: fixed;
  bottom: 56px;  /* tab 高度 */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 448px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  z-index: 49;
  padding-bottom: env(safe-area-inset-bottom);
}

.chat-input {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: #c4b5fd;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px -2px rgba(124, 58, 237, 0.3);
  cursor: pointer;
}

/* ===== 产物侧栏 ===== */
.product-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 85%;
  max-width: 380px;
  background: white;
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 32px -8px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}

.product-panel.open {
  transform: translateX(0);
}

.product-panel__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.product-panel__overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ===== 页面内容区（底部 tab 上方留白）===== */
.page-content {
  padding-bottom: 72px; /* tab 56px + 间隙 */
}

/* ===== 演示版标识 ===== */
.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  line-height: 1.2;
}

/* ===== 卡片悬浮效果 ===== */
.card-pressable {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.card-pressable:active {
  transform: scale(0.97);
}

/* ===== 引擎卡片 ===== */
.engine-card {
  border-radius: 20px;
  padding: 16px 14px;
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.engine-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 快捷入口圆形按钮 ===== */
.quick-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.quick-entry__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.1);
}

.quick-entry__label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* ===== 列表项 ===== */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: white;
  border-radius: 12px;
  transition: background 0.15s;
}

.list-item:active {
  background: #f8fafc;
}

/* ===== 隐藏滚动条 ===== */
.scrollbar-none {
  -webkit-overflow-scrolling: touch;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
