/* 重置样式 */
.page-onsite-ai-analysis, .page-onsite-ai-analysis view, .page-onsite-ai-analysis text, .page-onsite-ai-analysis image, .page-onsite-ai-analysis svg, .page-onsite-ai-analysis button {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.page-onsite-ai-analysis {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro SC', 'Helvetica Neue', Arial, sans-serif;
  background: #F0F4FA;
  min-height: 100vh;
  overflow-x: hidden;
  color: #1F2937;
}

/* ===== 蓝色背景 ===== */
.blue-bg {
  background: linear-gradient(180deg, #1E40AF 0%, #2563EB 100%);
  padding: 60px 0 20px;
}

/* ===== 搜索栏 ===== */
.search-bar {
  margin: 0 16px 16px;
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 8px;
}

.search-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
}

.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 14px;
  color: #6B7280;
}

.search-bar input::placeholder {
  color: #9CA3AF;
}

.search-scan {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.6;
}

/* 搜索结果 */
.search-result {
  position: absolute;
  top: 130px;
  left: 16px;
  right: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
}

.search-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #333;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:active {
  background: #f5f5f5;
}

/* ===== 分类卡片 ===== */
.category-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 16px;
}

.cat-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cat-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.cat-tag-orange {
  background: linear-gradient(135deg, #F59E0B, #F97316);
}

.cat-tag-green {
  background: linear-gradient(135deg, #F53F3F, #DC2626);
}

.cat-tag-blue {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
}

.cat-code {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 4px;
}

.cat-value {
  font-size: 18px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 4px;
}

.cat-change {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.cat-change-up {
  color: #F59E0B;
}

.cat-change-down {
  color: #F53F3F;
}

.cat-change svg {
  width: 10px;
  height: 10px;
}

.cat-bottom {
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 6px;
}

/* ===== 横幅 ===== */
.banner-section {
  padding: 0 16px;
  margin-bottom: 16px;
}

.banner {
  background: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 50%, #2563EB 100%);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  min-height: 130px;
}

.banner::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
}

.banner-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.banner-desc {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  margin-bottom: 16px;
  line-height: 1.5;
}

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

.banner-btn-outline {
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
}

.banner-btn-fill {
  padding: 8px 18px;
  border: none;
  border-radius: 20px;
  background: #fff;
  color: #2563EB;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}

.banner-dot.active {
  background: #fff;
  width: 18px;
  border-radius: 3px;
}

/* 横幅上的盾牌图标 */
.banner-shield {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 70px;
  height: 80px;
  opacity: 0.15;
}

/* ===== 快速操作 ===== */
.quick-actions {
  display: flex;
  gap: 24px;
  padding: 0 16px;
  margin-bottom: 16px;
}

.quick-action {
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding-bottom: 2px;
}

.quick-action-active {
  color: #2563EB;
  border-bottom: 2px solid #2563EB;
}

.quick-action-inactive {
  color: #9CA3AF;
}

/* ===== 自选股列表 ===== */
.stock-list {
  padding: 16px;
}

.stock-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 2px solid transparent;
}

.stock-card.active {
  border-color: #3B82F6;
}

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

.stock-name {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
}

.stock-code {
  font-size: 13px;
  color: #6B7280;
}

.stock-config {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.config-item {
  flex: 1;
}

.config-label {
  font-size: 11px;
  color: #9CA3AF;
  margin-bottom: 4px;
}

.config-value {
  font-size: 14px;
  color: #1F2937;
  font-weight: 500;
}

.stock-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-delete {
  padding: 6px 16px;
  border: 1px solid #2563EB;
  border-radius: 16px;
  background: #fff;
  color: #2563EB;
  font-size: 12px;
  font-weight: 500;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #9CA3AF;
  font-size: 14px;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: #9CA3AF;
  font-size: 14px;
}

/* ===== 内容区域 ===== */
.content-area {
  background: #F0F4FA;
  padding: 20px 16px 180px;
}

/* ===== 基金产品卡片 ===== */
.fund-product-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  margin-bottom: 16px;
  position: relative;
}

.fund-product-header {
  background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
  padding: 16px;
  color: #fff;
}

.fund-product-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.fund-product-name {
  font-size: 16px;
  font-weight: 600;
}

.fund-product-code {
  font-size: 12px;
  opacity: 0.8;
}

.fund-product-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.fund-product-nav {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 2px;
}

.fund-product-nav-value {
  font-size: 26px;
  font-weight: 800;
}

.fund-product-change {
  font-size: 16px;
  font-weight: 700;
  color: #FDE68A;
}

.fund-product-change-label {
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 2px;
}

/* K线图区域 */
.kline-area {
  padding: 16px;
  background: #f8f9fa;
}

.kline-canvas {
  width: 100%;
  height: 300px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 操作按钮 */
.fund-actions {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  gap: 12px;
}

.btn-ai-track, .btn-add-favorite {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-ai-track {
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  color: #fff;
}

.btn-add-favorite {
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  color: #fff;
}

/* 主页指示器 */
.home-indicator {
  position: fixed;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 4px;
  border-radius: 2px;
  background: #333;
  z-index: 101;
}
