/* ========================================
   核心通用样式（合并文件）
   合并来源：base.css + components.css + layout.css + modal.css
   ======================================== */

/* ========================================
   Base Styles - CSS Variables & Global
   ======================================== */

/* CSS Variables */
:root {
  --bg-1: #f7fafc;
  --bg-2: #eef2f7;
  --accent-1: #7dd3fc; /* sky-300 */
  --accent-2: #a78bfa; /* violet-400 */
  --accent-3: #34d399; /* emerald-400 */
  --glass: rgba(255,255,255,0.60);
  --border: rgba(255,255,255,0.72);
  --text: rgba(17,24,39,0.92);
  --muted: rgba(17,24,39,0.60);
  --shadow: rgba(17,24,39,0.08);
  color-scheme: light;
}

/* Global Reset & Base */
html {
  height: calc(100% + env(safe-area-inset-top)) !important;
  overflow-x: hidden;
  width: 100%;
}

html, body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  background: radial-gradient(1200px 600px at 80% -100px, rgba(167,139,250,0.14), transparent),
              radial-gradient(800px 400px at -120px 50%, rgba(125,211,252,0.10), transparent),
              linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* 背景柔光噪点，增加玻璃感真实度 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 20% 10%, rgba(0,0,0,0.03), transparent 45%),
                    radial-gradient(circle at 80% 90%, rgba(0,0,0,0.02), transparent 40%);
  pointer-events: none;
}

@supports(padding: env(safe-area-inset-top)) {
  body::before { top: env(safe-area-inset-top); }
}

/* Glass Card - 通用玻璃卡片样式 */
.glass-card {
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: 16px;
  box-shadow: 0 8px 24px var(--shadow), inset 0 1px rgba(255,255,255,0.6);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Chip - 通用芯片样式 */
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  color: var(--text);
  font-size: 12px;
}









/* ========================================
   Component Styles - 通用组件样式
   ======================================== */

/* 总结列表项，沿用观点事件轻玻璃卡片风格（无头像） */
.summary-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}

.summary-title {
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

.summary-meta {
  font-size: 12px;
  color: var(--muted);
}

.summary-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.summary-list {
  display: grid;
  gap: 8px;
}

.summary-row {
  display: grid;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.55);
}

/* 深度分析整块内容（字体与总结保持一致） */
.analysis-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 原文弹窗专用样式 */
#content-original {
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
  font-size: 14px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}

/* 下拉刷新控件 */
.pull-refresh {
  position: fixed;
  inset: 0 auto auto 0;
  right: 0;
  height: 0;
  z-index: 60;
  display: grid;
  place-items: start center;
  pointer-events: none;
}

.pull-refresh .inner {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.90);
  box-shadow: 0 8px 20px var(--shadow), inset 0 1px rgba(255,255,255,0.7);
  color: var(--muted);
  font-size: 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  transform: translateY(-32px);
  transition: transform 160ms ease;
  will-change: transform;
}

.pull-refresh .spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(17,24,39,0.15);
  border-top-color: var(--accent-2);
  animation: prspin 600ms linear infinite;
}

@keyframes prspin {
  to { transform: rotate(360deg); }
}

/* PWA/WebView 模式：禁用系统下拉刷新，启用自定义手势 */
html.custom-refresh,
body.custom-refresh {
  overscroll-behavior-y: contain;
}

html.custom-refresh main {
  overscroll-behavior-y: contain;
  will-change: transform;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
  touch-action: pan-y;
}

/* 下拉刷新说明：依赖浏览器原生行为 */
.pull-hint {
  margin: 8px 12px 0;
  font-size: 12px;
  color: var(--muted);
}

/* 小屏优化 */
@media (max-width: 360px) {
  .tge-grid {
    grid-auto-columns: min-content;
    gap: 5px;
    padding: 8px 8px;
  }
  .tge-item {
    padding: 5px 3px;
    gap: 5px;
  }
  .tge-add-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
    max-width: 26px;
    border-radius: 7px;
  }
  .tge-add-btn::before {
    width: 12px;
    height: 1.5px;
  }
  .tge-add-btn::after {
    width: 1.5px;
    height: 12px;
  }
  .tge-icon {
    width: 30px;
    height: 30px;
  }
  .tge-name {
    font-size: 10px;
  }
}








/* ========================================
   Layout Styles - Topbar, Bottombar, Main, Section
   ======================================== */

/* Topbar - 顶部导航栏 */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: block;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: #ffffff;
  border-bottom: none;
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand .logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  background-color: #fff;
  background-image: url('/assets/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 4px 10px rgba(125,211,252,0.35);
}

.actions {
  display: flex;
  gap: 10px;
}

.actions .icon.bot {
  width: 26px; height: 26px;
  border-radius: 50%; border: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  box-shadow: inset 0 1px rgba(255,255,255,0.70), 0 4px 12px var(--shadow);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
}

.actions .icon.bot:active { transform: translateY(1px); }

.actions .tg-user {
  margin-left: -10px;
  font-size: 12px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  line-height: 1;
  vertical-align: middle;
  transform: translateY(1px);
}

.actions .tg-user.active { color: var(--text); font-weight: 500; }

/* Main Content Area */
main {
  padding: 12px 12px;
  display: grid;
  gap: 16px;
  padding-top: calc(48px + 12px);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Section - 内容区块 */
.section {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* X信号专用：缩小筛选与内容间距；同时让"重点关注"离顶部更多一些 */
.opinions-section { gap: 6px; margin-top: 2px; margin-bottom: -4px; }

/* 资源网络板块：增加顶部间距 */
.network-section { gap: 10px; margin-top: 10px; }

/* 认证横幅板块：调整上下间距 */
.verify-banner-section { margin-top: 12px; margin-bottom: 4px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}


.title-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 0 6px rgba(125,211,252,0.22);
}

/* Bottom Navigation Bar - 底部导航栏 */
.bottombar {
  position: fixed;
  bottom: 20px; left: 20px; right: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(17, 24, 39, 0.12), 
              0 2px 8px rgba(17, 24, 39, 0.08),
              inset 0 1px rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  max-width: calc(100% - 40px);
  width: calc(100% - 40px);
  margin: 0 auto;
  gap: 4px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.bottombar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  gap: 2px;
  cursor: pointer;
  color: var(--muted);
  transition: all 200ms ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 16px;
  position: relative;
}

.bottombar-item.active {
  color: var(--accent-2);
  background: rgba(167, 139, 250, 0.1);
}

.bottombar-item:hover:not(.active) {
  color: var(--text);
  background: rgba(17, 24, 39, 0.04);
}

.bottombar-item span {
  font-size: 12px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.bottombar-item.active span {
  font-weight: 600;
}

/* 移动端视觉尺寸与安全区 */
@supports(padding: env(safe-area-inset-top)) {
  .topbar { padding-top: 0; }
  .topbar-inner { padding-top: calc(10px + env(safe-area-inset-top)); }
  .bottombar { 
    bottom: calc(20px + env(safe-area-inset-bottom));
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
  main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@supports not (padding: env(safe-area-inset-top)) {
  main { padding-bottom: 80px; }
}

/* 小屏幕优化：减少底部间距 */
@media (max-width: 767px) {
  .bottombar {
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: calc(100% - 32px);
    border-radius: 18px;
    padding: 6px 12px;
  }
  .bottombar-item {
    padding: 6px 12px;
    border-radius: 14px;
  }
}


/* ========================================
   Modal Styles - 弹窗基础样式
   ======================================== */

/* 弹窗根容器 */
.modal-root {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0; /* 现代浏览器使用 inset，上面提供回退方案 */
  z-index: 50;
  overflow: hidden;
  overscroll-behavior: contain;
}

/* 发布需求弹窗需要更高的z-index，确保在人脉管理弹窗之上 */
#publish-demand-modal {
  z-index: 55;
}

/* 认证弹窗需要较高的z-index，确保在资源网络等基础弹窗之上，但在确认类弹窗之下 */
#verify-modal {
  z-index: 58;
}

/* 登录弹窗需要较高的z-index，确保在探索弹窗等其他弹窗之上 */
#tg-login-modal {
  z-index: 58;
}

/* Bot推送设置弹窗：设置较低的z-index，确保从它打开的弹窗能显示在上层 */
#bot-modal {
  z-index: 52;
}

/* 账号详情弹窗和添加关注弹窗：需要较高的z-index，确保在bot-modal之上 */
#profile-modal,
#follow-modal {
  z-index: 59;
}

/* 原文弹窗需要最高的z-index，确保在所有其他弹窗（包括代币弹窗）之上 */
#content-modal {
  z-index: 61;
}

/* 确认类弹窗（如删除、下架确认）需要最高的z-index，确保在所有其他弹窗之上 */
#publish-demand-confirm-modal,
#demand-offline-confirm-modal,
#delete-modal,
#logout-modal {
  z-index: 60;
}

.modal-root.open {
  display: flex;
}

/* 弹窗背景遮罩 */
.modal-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0; /* 现代浏览器使用 inset，上面提供回退方案 */
  z-index: 1; /* 确保遮罩层在面板下方 */
  background: rgba(17,24,39,0.5); /* 增加不透明度，确保在不支持 backdrop-filter 的浏览器中也能看到 */
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  touch-action: none; /* 避免在遮罩上触发滚动手势 */
}

/* 回退方案：如果浏览器不支持 backdrop-filter，使用更不透明的背景色 */
@supports not (backdrop-filter: blur(10px)) {
  .modal-backdrop {
    background: rgba(17,24,39,0.65);
  }
}

/* 打开弹窗时冻结页面在 iOS/PWA 下防止背景滑动 */
body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

/* 弹窗面板 */
.modal-panel {
  position: relative;
  z-index: 2; /* 确保面板在遮罩层上方 */
  margin: auto;
  width: min(560px, calc(100% - 24px));
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 16px 40px var(--shadow), inset 0 1px rgba(255,255,255,0.6);
  color: var(--text);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

#tge-detail-modal .modal-panel {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

/* 弹窗头部 */
.modal-head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid rgba(17,24,39,0.08);
}

.modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.modal-title {
  font-weight: 600;
}

.modal-sub {
  font-size: 12px;
  color: var(--muted);
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-handle {
  font-size: 12px;
  color: var(--muted);
}

.modal-bio {
  display: none;
}

.modal-updated {
  font-size: 11px;
  color: var(--muted);
  justify-self: end;
  text-align: right;
  margin-top: 2px;
  max-width: 84px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-stats {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.55);
}

.stat-num {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
}

/* 弹窗操作按钮 */
.modal-action {
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.70);
  color: var(--text);
  font-size: 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  box-sizing: border-box;
}

.modal-action:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.modal-action[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.7;
}

.modal-action.loading {
  opacity: 0.75;
}

.modal-action.success {
  background: rgba(255,255,255,0.80);
  box-shadow: inset 0 1px rgba(255,255,255,0.7);
}

.modal-action .action-title {
  line-height: 1.1;
}

.modal-action .action-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.1;
}

/* 强调色按钮：用于 AI 搜索等主操作 */
.accent-action {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 2px 8px rgba(17,24,39,0.12);
}

.accent-action .action-sub {
  color: rgba(255,255,255,0.85);
}

.accent-action:hover {
  filter: brightness(1.02);
}

.accent-action.loading .action-title::after {
  border-color: rgba(255,255,255,0.6);
  border-top-color: #fff;
}

/* 完成态：强调按钮保持渐变，不变成白色 */
.accent-action.success {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 2px 8px rgba(17,24,39,0.14);
}

.accent-action.success .action-sub {
  color: rgba(255,255,255,0.85);
}

/* 按钮加载中：在标题后显示旋转指示 */
.modal-action.loading .action-title::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  border-radius: 50%;
  border: 2px solid rgba(17,24,39,0.15);
  border-top-color: var(--accent-2);
  animation: prspin 600ms linear infinite;
  vertical-align: -2px;
}

/* 原文弹窗中的 AI 搜索按钮：更小、更明显的加载旋转指示（主题色） */
#content-ai-explore-btn.loading .action-title::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  position: relative;
  top: 0px;
  border-radius: 50%;
  border: 2px solid rgba(17,24,39,0.22);
  border-top-color: var(--accent-2);
  animation: prspin 600ms linear infinite;
}

/* 弹窗关闭按钮 */
.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.65);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  cursor: pointer;
}

.modal-close span {
  font-size: 16px;
  line-height: 1;
  color: var(--text);
}

/* 弹窗分隔线 */
.modal-divider {
  height: 1px;
  background: rgba(17,24,39,0.10);
  margin: 6px 0;
}

/* 弹窗选项卡 */
.modal-tabs {
  display: flex;
  gap: 0;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(17,24,39,0.10);
}

.modal-tabs .tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.modal-tabs .tab.active {
  background: transparent;
  border-bottom-color: var(--accent-2);
}

/* 选项卡加载中：显示旋转指示 */
.modal-tabs .tab.loading::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  border-radius: 50%;
  border: 2px solid rgba(17,24,39,0.15);
  border-top-color: var(--accent-2);
  animation: prspin 600ms linear infinite;
  vertical-align: -1px;
}

/* 选项卡锁定：不可点击，显示锁图标 */
.modal-tabs .tab.locked {
  cursor: not-allowed;
  opacity: 0.6;
}

.modal-tabs .tab.locked::before {
  content: '🔒';
  margin-right: 4px;
  font-size: 10px;
}

/* 弹窗内容区域 */
.modal-body {
  padding: 12px;
}

.panel {
  display: none;
}

.panel.active {
  display: grid;
  gap: 8px;
}

/* 特定弹窗的高度限制 */
#content-modal .modal-panel {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

#content-modal .modal-body {
  flex: 1;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

#tge-detail-modal .modal-panel {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

#tge-detail-modal .modal-body {
  flex: 1;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

#profile-modal .modal-panel {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

#profile-modal .modal-body {
  flex: 1;
  overflow-y: auto;
}

#explore-modal .modal-panel {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

#explore-modal .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* 探索弹窗历史搜索样式优化 */
#explore-modal #history-list {
  display: grid;
  gap: 8px;
}

#explore-modal #history-list .explore-history-item {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  transition: all 160ms ease;
  cursor: pointer;
  min-height: auto;
}

#explore-modal #history-list .explore-history-item:hover {
  background: rgba(255,255,255,0.85);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17,24,39,0.08);
}

.explore-history-row-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.explore-history-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.explore-history-title {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.explore-history-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.explore-history-expand-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  transition: transform 200ms ease, color 160ms ease;
}

#explore-modal #history-list .explore-history-item:hover .explore-history-expand-icon {
  color: var(--accent-2);
}

#explore-modal #history-list .explore-history-item[data-expanded="true"] .explore-history-expand-icon {
  transform: rotate(90deg);
  color: var(--accent-2);
}

.explore-history-detail {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  max-height: 0px;
  overflow: hidden;
  opacity: 0;
  transition: max-height 220ms ease, opacity 220ms ease, margin-top 220ms ease, padding-top 220ms ease, padding-bottom 220ms ease;
}

.explore-history-detail.expanded {
  max-height: 2000px;
  opacity: 1;
  margin-top: 4px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Telegram 登录弹窗和 Bot 弹窗 */
#tg-login-modal .modal-body {
  padding: 12px;
}

#bot-modal .modal-panel {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

#bot-modal .modal-body {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  max-height: calc(80vh - 60px);
}

/* 首页词云样式 */
#daily-word-cloud .report-word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px; /* 桌面端间距 */
  padding: 2px 0px !important; /* 桌面端内边距（缩小四周距离） */
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80px;
  max-height: 200px; /* 桌面端高度限制 */
  overflow-y: auto; /* 允许滚动 */
  line-height: 1.2; /* 桌面端行高 */
}

.word-cloud-tag {
  --heat-intensity: 0.5;
  display: inline-block;
  padding: 3px 8px; /* 桌面端内边距 */
  border-radius: 4px;
  background: transparent;
  font-weight: 500;
  transition: all 180ms ease;
  cursor: default;
  white-space: nowrap;
  line-height: 1.3; /* 桌面端行高 */
  color: var(--accent-2);
  opacity: calc(0.5 + var(--heat-intensity) * 0.5);
}

.word-cloud-tag:hover {
  color: var(--accent-2);
  transform: scale(1.08);
  text-shadow: 0 0 8px rgba(34,211,153,0.3);
  opacity: 1 !important; /* hover 时完全显示 */
}

.word-cloud-tag:active {
  transform: scale(1.05);
}

.word-cloud-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 20px;
  text-align: center;
}

/* 报告弹窗：关键词卡片网格布局（两列） */
.report-keywords-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.report-keyword-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 160ms ease;
}

.report-keyword-card:hover {
  background: rgba(255,255,255,0.95);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17,24,39,0.08);
  border-color: var(--accent-2);
}

.report-keyword-card:active {
  transform: translateY(0);
}

.keyword-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.keyword-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.keyword-card-summary {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

/* 手机端响应式 */
@media (max-width: 480px) {
  #daily-word-cloud .report-word-cloud {
    gap: 2px 4px;        /* 缩小间距 */
    padding: 2px 0px !important;    /* 减小内边距（缩小四周距离） */
    max-height: 180px;  /* 手机端高度限制 */
    min-height: 60px;
    line-height: 1.1;     /* 更小的行高 */
  }
  
  .word-cloud-tag {
    padding: 1px 4px;     /* 减小内边距 */
    line-height: 1.1;     /* 更小的行高 */
  }
  
  .report-keywords-grid {
    grid-template-columns: repeat(2, 1fr); /* 手机端也保持两列 */
    gap: 8px;
  }
  
  .report-keyword-card {
    padding: 10px;
  }
}


/* 探索弹窗：增加板块之间的间距 */
#explore-modal .analysis-block:not(:last-child) {
  margin-bottom: 5px;
}

/* 关注星标样式 */
#profile-follow-star {
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

#profile-follow-star span {
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}

#profile-follow-star[data-focused="true"] span {
  color: var(--accent-2);
}

#profile-follow-star.loading span {
  animation: starPulse 800ms ease-in-out infinite;
  transform-origin: center;
}

#profile-follow-star[disabled] {
  cursor: default;
  opacity: 0.95;
}

/* 行情弹窗星星图标样式 - 与profile弹窗保持一致 */
#market-follow-star {
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

#market-follow-star span {
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}

#market-follow-star[data-focused="true"] span {
  color: var(--accent-2);
}

#market-follow-star.loading span {
  animation: starPulse 800ms ease-in-out infinite;
  transform-origin: center;
}

#market-follow-star[disabled] {
  cursor: default;
  opacity: 0.95;
}

/* 探索与历史列表的通用关注星标样式 */
.follow-star {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.follow-star span {
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}

.follow-star[data-focused="true"] span {
  color: var(--accent-2);
}

.follow-star.loading span {
  animation: starPulse 800ms ease-in-out infinite;
  transform-origin: center;
}

.follow-star[disabled] {
  cursor: default;
  opacity: 0.95;
}

/* 星标加载中的细微动效：脉动放大与颜色提升 */
@keyframes starPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); color: var(--accent-2); }
  100% { transform: scale(1); }
}

/* 旋转动画 */
@keyframes prspin {
  to { transform: rotate(360deg); }
}

