/**
 * AI研究报告样式 - 全新设计
 */

/* 页面容器 */
.ai-report-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f5f7fa;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ai-report-page.active {
  opacity: 1;
  visibility: visible;
}

body.ai-report-open {
  overflow: hidden;
}

/* 导航栏 */
.ai-report-navbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ai-report-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-report-back:hover {
  background: rgba(255,255,255,0.3);
}

.ai-report-nav-title {
  font-size: 16px;
  font-weight: 600;
}

.ai-report-nav-actions {
  display: flex;
  gap: 10px;
}

.ai-report-nav-btn {
  padding: 8px 16px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-report-nav-btn.primary {
  background: rgba(255,255,255,0.3);
}

.ai-report-nav-btn:hover {
  background: rgba(255,255,255,0.4);
}

/* 主内容区 */
.ai-report-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Hero区域 */
.ai-report-hero {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.ai-report-hero-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ai-report-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ai-report-app-meta {
  flex: 1;
}

.ai-report-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px 0;
}

.ai-report-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 12px 0;
}

.ai-report-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-category {
  background: #e0e7ff;
  color: #4338ca;
}

.badge-price {
  background: #dcfce7;
  color: #16a34a;
}

.badge-rank {
  background: #fef3c7;
  color: #d97706;
}

.badge-rating {
  background: #fef9c3;
  color: #ca8a04;
}

.badge-cached {
  background: #d1fae5;
  color: #059669;
  font-size: 11px;
}

/* 评分区域 */
.ai-report-score-section {
  margin-bottom: 20px;
}

.ai-report-score-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.score-main {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-value {
  font-size: 32px;
  font-weight: 700;
  color: white;
}

.score-info {
  flex: 1;
}

.score-grade {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.score-grade.grade-a { color: #16a34a; }
.score-grade.grade-b { color: #65a30d; }
.score-grade.grade-c { color: #ca8a04; }
.score-grade.grade-d { color: #ea580c; }
.score-grade.grade-e { color: #dc2626; }

.score-interpretation {
  font-size: 14px;
  color: #64748b;
}

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breakdown-label {
  font-size: 12px;
  color: #64748b;
  width: 60px;
  flex-shrink: 0;
}

.breakdown-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.breakdown-value {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a2e;
  width: 24px;
  text-align: right;
}

/* 执行摘要 */
.ai-report-summary {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.ai-report-summary h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 16px 0;
}

.summary-text {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
  margin-bottom: 20px;
}

.key-recommendations h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 12px 0;
}

.key-recommendations ul {
  margin: 0;
  padding-left: 20px;
}

.key-recommendations li {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 6px;
}

/* 分析模块 */
.ai-report-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.ai-report-section {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.section-icon {
  font-size: 24px;
}

.section-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
  flex: 1;
}

.section-subtitle {
  font-size: 13px;
  color: #64748b;
}

.section-content {
  padding: 24px;
}

/* 分析卡片 */
.analysis-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.analysis-card:last-child {
  margin-bottom: 0;
}

.analysis-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 12px 0;
}

.analysis-card p {
  font-size: 14px;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}

.analysis-card ul {
  margin: 0;
  padding-left: 18px;
}

.analysis-card li {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 4px;
}

.analysis-card.highlight {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.analysis-card.highlight h4 {
  color: #4338ca;
}

.analysis-card.success {
  background: #dcfce7;
}

.analysis-card.success h4 {
  color: #16a34a;
}

.analysis-card.warning {
  background: #fef3c7;
}

.analysis-card.warning h4 {
  color: #d97706;
}

.analysis-card.recommendation {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.analysis-card.recommendation h4 {
  color: white;
}

.analysis-card.recommendation p {
  color: rgba(255,255,255,0.9);
  font-size: 15px;
}

.analysis-intro {
  font-size: 15px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

/* 标签列表 */
.feature-list, .module-list, .channel-list, .tech-list, .scenario-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-tag, .module-tag, .channel-tag, .tech-tag, .scenario-tag {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
}

.feature-tag {
  background: #e0e7ff;
  color: #4338ca;
}

.module-tag {
  background: #dbeafe;
  color: #2563eb;
}

.channel-tag {
  background: #fce7f3;
  color: #db2777;
}

.tech-tag {
  background: #d1fae5;
  color: #059669;
}

.scenario-tag {
  background: #fef3c7;
  color: #d97706;
}

/* 双列布局 */
.analysis-row {
  display: flex;
  gap: 16px;
}

.analysis-card.half {
  flex: 1;
}

/* 目标用户 */
.target-audience {
  font-size: 18px !important;
  font-weight: 600;
  color: #4338ca !important;
}

/* 市场规模 */
.market-size {
  font-size: 15px !important;
}

/* 行动建议 */
.ai-report-actions {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.ai-report-actions h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 16px 0;
}

.action-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #f8fafc;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-item:hover {
  background: #f1f5f9;
}

.action-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #667eea;
}

.action-number {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.action-text {
  flex: 1;
  font-size: 14px;
  color: #334155;
}

/* 页脚 */
.ai-report-footer {
  text-align: center;
  padding: 30px 20px;
  color: #94a3b8;
  font-size: 12px;
}

.ai-report-footer p {
  margin: 4px 0;
}

/* 加载状态 */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

.loading-spinner.small {
  width: 24px;
  height: 24px;
  border-width: 3px;
  margin: 0;
}

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

.loading-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

/* AI加载状态 */
.ai-loading-state {
  text-align: center;
  padding: 40px 20px;
}

.ai-loading-state h3 {
  font-size: 20px;
  color: #1a1a2e;
  margin: 20px 0 10px;
}

.ai-loading-state p {
  color: #64748b;
  margin: 8px 0;
}

.ai-loading-state .loading-tip {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 16px;
}

.loading-progress {
  width: 200px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin: 20px auto 0;
  overflow: hidden;
}

.loading-progress .progress-bar {
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0%; margin-left: 0; }
  50% { width: 60%; margin-left: 20%; }
  100% { width: 0%; margin-left: 100%; }
}

.section-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px;
  color: #94a3b8;
}

/* 错误状态 */
.error-state {
  text-align: center;
  padding: 40px 20px;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-state h3 {
  font-size: 18px;
  color: #1a1a2e;
  margin: 0 0 8px 0;
}

.error-state p {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 20px 0;
}

.retry-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 无数据提示 */
.no-data {
  text-align: center;
  padding: 30px 20px;
  color: #94a3b8;
  font-size: 14px;
}

/* 详细功能列表 */
.feature-detail-list {
  margin: 0;
  padding-left: 20px;
}

.feature-detail-list li {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 8px;
  padding-left: 4px;
}

/* 场景详细列表 */
.scenario-list-detail {
  margin: 0;
  padding-left: 20px;
}

.scenario-list-detail li {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 8px;
}

/* 竞品分析列表 */
.competitors-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.competitor-item {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 14px 16px;
}

.competitor-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.competitor-strengths,
.competitor-weaknesses {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  margin-top: 6px;
}

.competitor-strengths .label,
.competitor-weaknesses .label {
  font-weight: 600;
  color: #64748b;
}

.competitor-strengths {
  color: #16a34a;
}

.competitor-weaknesses {
  color: #dc2626;
}

/* 推广渠道详细列表 */
.channels-detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-detail-item {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 14px 16px;
}

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

.channel-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
}

.channel-roi {
  font-size: 12px;
  background: #dcfce7;
  color: #16a34a;
  padding: 3px 10px;
  border-radius: 10px;
}

.channel-reason,
.channel-budget {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  margin-top: 6px;
}

.channel-reason .label,
.channel-budget .label {
  font-weight: 600;
  color: #64748b;
}

/* 技术栈详细列表 */
.tech-detail-list {
  margin: 0;
  padding-left: 20px;
}

.tech-detail-list li {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 8px;
}

/* MVP功能列表 */
.mvp-features,
.full-features {
  margin: 0;
  padding-left: 20px;
}

.mvp-features li,
.full-features li {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 6px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .ai-report-navbar {
    padding: 10px 16px;
  }
  
  .ai-report-nav-title {
    display: none;
  }
  
  .ai-report-main {
    padding: 16px;
  }
  
  .ai-report-hero {
    padding: 20px;
  }
  
  .ai-report-hero-content {
    flex-direction: column;
    text-align: center;
  }
  
  .ai-report-icon {
    width: 72px;
    height: 72px;
  }
  
  .ai-report-title {
    font-size: 20px;
  }
  
  .ai-report-badges {
    justify-content: center;
  }
  
  .score-main {
    flex-direction: column;
    text-align: center;
  }
  
  .score-breakdown {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    padding: 16px 20px;
  }
  
  .section-header h3 {
    font-size: 16px;
  }
  
  .section-subtitle {
    display: none;
  }
  
  .section-content {
    padding: 20px;
  }
  
  .analysis-row {
    flex-direction: column;
  }
  
  .analysis-card.half {
    flex: none;
  }
  
  .feature-list, .module-list, .channel-list, .tech-list, .scenario-list {
    justify-content: center;
  }
}
