/* 专业分析模块样式 */
.analytics-section {
  animation: fadeInUp 0.6s ease-out;
}

/* 关键指标卡片样式 */
.metric-card {
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.metric-card:hover::before {
  left: 100%;
}

/* 影响力评分动画 */
.impact-score-value {
  animation: countUp 1.5s ease-out;
}

/* 进度条样式 */
.progress-bar {
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.5s ease-out;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
  background-size: 20px 20px;
  animation: progressStripe 1s linear infinite;
}

/* 地理覆盖样式 */
.geographic-coverage {
  transition: all 0.3s ease;
}

.geographic-coverage:hover {
  background-color: #f8fafc;
}

/* 趋势分析样式 */
.trend-analysis {
  transition: all 0.3s ease;
}

.trend-item {
  position: relative;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: help;
}

.trend-item:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

/* 工具提示样式 */
.tooltip {
  position: absolute;
  background-color: #1f2937;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1f2937 transparent transparent transparent;
}

/* 关键指标展开/收起样式 */
.key-indicators {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.key-indicators.expanded {
  max-height: 500px;
}

.toggle-indicators {
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-indicators:hover {
  color: #4f46e5;
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.toggle-icon.rotated {
  transform: rotate(180deg);
}

/* 图表容器样式 */
.chart-container {
  position: relative;
  height: 200px;
  margin: 16px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #e2e8f0;
}

.chart-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #64748b;
  font-size: 14px;
}

/* 数据刷新按钮样式 */
.refresh-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.refresh-btn:active {
  transform: translateY(0);
}

.refresh-icon {
  transition: transform 0.3s ease;
}

.refresh-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

/* 通知样式 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #10b981;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

/* 动画关键帧 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes progressStripe {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .analytics-section {
    padding: 16px;
  }
  
  .metric-card {
    margin-bottom: 12px;
  }
  
  .chart-container {
    height: 150px;
    padding: 12px;
  }
  
  .trend-item {
    margin-bottom: 8px;
  }
}

@media (max-width: 640px) {
  .analytics-section {
    padding: 12px;
  }
  
  .metric-card {
    padding: 12px;
  }
  
  .chart-container {
    height: 120px;
    padding: 8px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .analytics-section {
    background-color: #1f2937;
    border-color: #374151;
  }
  
  .metric-card {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-color: #4b5563;
  }
  
  .geographic-coverage,
  .trend-analysis {
    background-color: #374151;
  }
  
  .chart-container {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-color: #4b5563;
  }
}

/* 加载状态样式 */
.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}