/* ===== Share Overlay ===== */
.share-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  max-height: 90vh;
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex; flex-direction: column;
  animation: shareUp 0.3s ease;
  overflow: hidden;
}
@keyframes shareUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.share-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--slate-100);
}
.share-panel-title { font-size: 16px; font-weight: 600; color: var(--slate-800); }
.share-panel-body {
  flex: 1; overflow-y: auto;
  padding: 20px;
  display: flex; justify-content: center;
}
.share-image-wrap {
  width: 100%; max-width: 360px;
  display: flex; align-items: center; justify-content: center;
}
.share-image-wrap img {
  width: 100%; display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.share-panel-footer {
  padding: 12px 20px 20px;
  text-align: center;
}
.share-tip {
  font-size: 13px; color: var(--slate-400);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.share-loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 60px 0;
  color: var(--slate-400);
  font-size: 14px;
}
.share-loading i { font-size: 32px; animation: spin 1s linear infinite; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== Scroll to Bottom Button ===== */
.scroll-bottom-btn {
  position: absolute;
  right: 20px; bottom: calc(100% + 12px);
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  color: var(--slate-600);
  cursor: pointer;
  display: none;
  align-items: center; justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
  z-index: 15;
}
.scroll-bottom-btn.active { display: flex; }
.scroll-bottom-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,92,246,0.25);
}
.scroll-bottom-btn:active { transform: translateY(0); }

/* ===== Safe Area ===== */
.content-padding {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}
.chat-input-area {
  padding-bottom: calc(24px + 72px + env(safe-area-inset-bottom, 0px));
}
.home-content {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}
.memory-content {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}
.chat-messages {
  padding-bottom: 8px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Hide scrollbars, keep scroll ===== */
.home-content, .chat-messages, .memory-content,
.news-detail-scroll, .share-panel-body, .agent-tabs, .products-content, .discover-content,
.community-content, .qdetail-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.home-content::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.memory-content::-webkit-scrollbar,
.news-detail-scroll::-webkit-scrollbar,
.share-panel-body::-webkit-scrollbar,
.agent-tabs::-webkit-scrollbar,
.products-content::-webkit-scrollbar,
.discover-content::-webkit-scrollbar,
.community-content::-webkit-scrollbar,
.qdetail-scroll::-webkit-scrollbar {
  display: none;
}

