<template>
  <div class="hit-analysis-page">
    <!-- 现代化页面头部 -->
    <div class="page-header-modern">
      <div class="header-content">
        <button class="back-btn" @click="goBack">
          <svg viewBox="0 0 24 24" class="back-icon">
            <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path>
          </svg>
        </button>
        <div class="header-info">
          <div class="header-text">
            <h1 class="header-title">命中分析</h1>
            <p class="header-subtitle">查看您的预测命中率统计数据</p>
          </div>
        </div>
        
        <!-- 彩票类型筛选 -->
        <div class="lottery-type-filter">
          <span class="filter-label">请选择彩票类型</span>
          <div class="select-wrapper">
            <el-select v-model="currentLotteryType" placeholder="选择彩票类型" @change="handleLotteryTypeChange" class="lottery-select">
              <el-option
                v-for="item in lotteryTypes"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </div>
        </div>
      </div>
    </div>

    <!-- 主要内容 -->
    <div class="analysis-content">
      <!-- 加载状态 -->
      <div v-if="loading" class="loading-container">
        <div class="loading-spinner">
          <div class="spinner"></div>
          <p class="loading-text">正在加载数据...</p>
        </div>
      </div>

      <!-- 数据展示 -->
      <div v-else class="data-container">
        <!-- 命中率分析卡片 -->
        <div>
          <h2 class="section-title">
            <svg class="section-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
              <path d="M3 3v18h18"/>
              <path d="M18.7 8l-5.1 5.2-2.8-2.7L7 14.3"/>
            </svg>
            命中率分析
          </h2>
          
          <div class="analysis-card-container">
            <!-- 首球命中率 -->
            <div class="analysis-row-item">
              <div class="analysis-data">
                <div class="analysis-number">{{ firstBallStats.hitCount }}</div>
                <div class="analysis-label">首球命中次数</div>
              </div>
              <div class="analysis-data">
                <div class="analysis-number highlight">{{ formatRate(firstBallStats.hitRate) }}</div>
                <div class="analysis-label">首球命中率</div>
              </div>
            </div>
            
            <!-- 红球命中率 -->
            <div class="analysis-row-item">
              <div class="analysis-data">
                <div class="analysis-number">{{ redBallStats.totalHitCount }}</div>
                <div class="analysis-label">红球命中总数</div>
              </div>
              <div class="analysis-data">
                <div class="analysis-number highlight">{{ formatRate(redBallStats.hitRate) }}</div>
                <div class="analysis-label">红球命中率</div>
              </div>
            </div>
            
            <!-- 蓝球命中率 -->
            <div class="analysis-row-item">
              <div class="analysis-data">
                <div class="analysis-number">{{ blueBallStats.hitCount }}</div>
                <div class="analysis-label">蓝球命中次数</div>
              </div>
              <div class="analysis-data">
                <div class="analysis-number highlight">{{ formatRate(blueBallStats.hitRate) }}</div>
                <div class="analysis-label">蓝球命中率</div>
              </div>
            </div>
          </div>
        </div>

        <!-- 数据说明卡片 -->
        <div class="info-card">
          <div class="info-header">
            <svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
              <circle cx="12" cy="12" r="10"/>
              <line x1="12" y1="16" x2="12" y2="12"/>
              <line x1="12" y1="8" x2="12.01" y2="8"/>
            </svg>
            <span class="info-title">数据说明</span>
          </div>
          <div class="info-content">
            <ul class="info-list">
              <li>推测次数：您进行号码预测的总次数</li>
              <li>待开奖次数：已预测但尚未开奖的次数</li>
              <li>命中次数：预测准确的总次数</li>
              <li>命中率：命中次数与总预测次数的比率</li>
              <li>首球命中率：第一个红球预测准确的比率</li>
              <li>红球命中率：所有红球预测的平均准确率</li>
              <li>蓝球命中率：蓝球预测准确的比率</li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import api, { lotteryApi } from '../../api/index.js'
import { userStore } from '../../store/user.js'
import { ElSelect, ElOption, ElMessage } from 'element-plus'

export default {
  name: 'HitAnalysis',
  components: {
    ElSelect,
    ElOption
  },
  data() {
    return {
      loading: false,
      currentLotteryType: 'ssq',
      lotteryTypes: [
        { value: 'ssq', label: '双色球' },
        { value: 'dlt', label: '大乐透' }
        // { value: '3d', label: '福彩3D' },
        // { value: 'qlc', label: '七乐彩' },
        // { value: 'qxc', label: '七星彩' },
        // { value: 'pl3', label: '排列3' },
        // { value: 'pl5', label: '排列5' },
        // { value: 'kl8', label: '快乐8' }
      ],
      firstBallStats: {
        hitCount: 0,
        totalCount: 0,
        hitRate: 0
      },
      redBallStats: {
        hitCount: 0,
        totalCount: 0,
        hitRate: 0
      },
      blueBallStats: {
        hitCount: 0,
        totalCount: 0,
        hitRate: 0
      }
    }
  },
  async mounted() {
    await this.loadAllStats()
  },
  methods: {
    handleLotteryTypeChange() {
      // 如果选择大乐透，跳转到大乐透命中分析页面
      if (this.currentLotteryType === 'dlt') {
        this.$router.push('/daletou/hit-analysis')
        return
      }
      // 其他彩票类型暂时不支持，提示用户并重新加载数据
      if (this.currentLotteryType !== 'ssq') {
        ElMessage.info('该彩票类型的命中分析功能正在开发中')
        this.currentLotteryType = 'ssq'
        return
      }
      this.loadAllStats()
    },
    
    async loadAllStats() {
      this.loading = true
      try {
        const userId = userStore.user?.id
        if (!userId) {
          this.$router.push('/login')
          return
        }

        // 并行调用所有API
        const [firstBallRes, redBallRes, blueBallRes] = await Promise.all([
          this.getFirstBallHitRate(this.currentLotteryType),
          this.getRedBallHitRate(this.currentLotteryType),
          this.getBlueBallHitRate(this.currentLotteryType)
        ])

        // 不再需要处理用户统计数据

        // 处理首球命中率数据
        if (firstBallRes && firstBallRes.success) {
          this.firstBallStats = firstBallRes.data
        }

        // 处理红球命中率数据
        if (redBallRes && redBallRes.success) {
          this.redBallStats = redBallRes.data
        }

        // 处理蓝球命中率数据
        if (blueBallRes && blueBallRes.success) {
          this.blueBallStats = blueBallRes.data
        }

      } catch (error) {
        console.error('加载数据失败:', error)
        ElMessage.error('加载数据失败，请重试')
      } finally {
        this.loading = false
      }
    },

    // 移除了获取用户预测统计方法

    async getFirstBallHitRate(lotteryType) {
      try {
        const response = await api.get('/ball-analysis/first-ball-hit-rate', {
          params: { lotteryType }
        })
        return response
      } catch (error) {
        console.error('获取首球命中率失败:', error)
        return null
      }
    },

    async getRedBallHitRate(lotteryType) {
      try {
        const response = await api.get('/ball-analysis/red-ball-hit-rate', {
          params: { lotteryType }
        })
        return response
      } catch (error) {
        console.error('获取红球命中率失败:', error)
        return null
      }
    },

    async getBlueBallHitRate(lotteryType) {
      try {
        const response = await api.get('/ball-analysis/blue-ball-hit-rate', {
          params: { lotteryType }
        })
        return response
      } catch (error) {
        console.error('获取蓝球命中率失败:', error)
        return null
      }
    },

    formatRate(rate) {
      if (typeof rate !== 'number') return '0.00%'
      // API返回的已经是百分比值，不需要再乘100
      return rate.toFixed(2) + '%'
    },

    goBack() {
      // 直接跳转到我的页面
      this.$router.push('/profile')
    }
  }
}
</script>

<style scoped>
.hit-analysis-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 0;
}

/* 页面头部 */
.page-header-modern {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 20px 0;
  position: relative;
  overflow: hidden;
}

.page-header-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='grad1' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:rgba(255,255,255,0.15);stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:rgba(255,255,255,0.05);stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3C!-- Background waves --%3E%3Cpath d='M0,100 Q200,60 400,100 T800,100 L800,200 L0,200 Z' fill='rgba(255,255,255,0.08)'/%3E%3Cpath d='M0,120 Q200,80 400,120 T800,120 L800,200 L0,200 Z' fill='rgba(255,255,255,0.05)'/%3E%3C!-- Target circles (命中目标) --%3E%3Ccircle cx='150' cy='90' r='35' stroke='rgba(255,255,255,0.25)' stroke-width='2.5' fill='none'%3E%3Canimate attributeName='r' values='35;40;35' dur='3s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.25;0.4;0.25' dur='3s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='150' cy='90' r='20' stroke='rgba(255,255,255,0.35)' stroke-width='2' fill='none'%3E%3Canimate attributeName='r' values='20;25;20' dur='3s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.35;0.5;0.35' dur='3s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='150' cy='90' r='8' fill='rgba(255,255,255,0.45)'%3E%3Canimate attributeName='r' values='8;10;8' dur='3s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.45;0.6;0.45' dur='3s' repeatCount='indefinite'/%3E%3C/circle%3E%3C!-- Check marks (命中标记) --%3E%3Cpath d='M280,85 L295,100 L330,65' stroke='rgba(255,255,255,0.35)' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Canimate attributeName='opacity' values='0.35;0.5;0.35' dur='2.5s' repeatCount='indefinite'/%3E%3C/path%3E%3Ccircle cx='305' cy='85' r='28' stroke='rgba(255,255,255,0.25)' stroke-width='2.5' fill='none'%3E%3Canimate attributeName='r' values='28;32;28' dur='2.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C!-- Accuracy indicators (准确率指示) --%3E%3Crect x='400' y='70' width='50' height='10' rx='5' fill='rgba(255,255,255,0.25)'%3E%3Canimate attributeName='width' values='50;60;50' dur='2.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='400' y='70' width='35' height='10' rx='5' fill='rgba(255,255,255,0.45)'%3E%3Canimate attributeName='width' values='35;45;35' dur='2.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='400' y='90' width='60' height='10' rx='5' fill='rgba(255,255,255,0.25)'%3E%3Canimate attributeName='width' values='60;70;60' dur='3.2s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='400' y='90' width='48' height='10' rx='5' fill='rgba(255,255,255,0.45)'%3E%3Canimate attributeName='width' values='48;58;48' dur='3.2s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='400' y='110' width='55' height='10' rx='5' fill='rgba(255,255,255,0.25)'%3E%3Canimate attributeName='width' values='55;65;55' dur='2.6s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='400' y='110' width='40' height='10' rx='5' fill='rgba(255,255,255,0.45)'%3E%3Canimate attributeName='width' values='40;50;40' dur='2.6s' repeatCount='indefinite'/%3E%3C/rect%3E%3C!-- Hit trend line (命中趋势) --%3E%3Cpolyline points='520,120 560,100 600,110 640,85 680,95' stroke='rgba(255,255,255,0.4)' stroke-width='3.5' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Canimate attributeName='points' values='520,120 560,100 600,110 640,85 680,95;520,115 560,95 600,105 640,80 680,90;520,120 560,100 600,110 640,85 680,95' dur='4s' repeatCount='indefinite'/%3E%3C/polyline%3E%3C!-- Data points --%3E%3Ccircle cx='520' cy='120' r='5' fill='rgba(255,255,255,0.7)'%3E%3Canimate attributeName='cy' values='120;115;120' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='560' cy='100' r='5' fill='rgba(255,255,255,0.7)'%3E%3Canimate attributeName='cy' values='100;95;100' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='600' cy='110' r='5' fill='rgba(255,255,255,0.7)'%3E%3Canimate attributeName='cy' values='110;105;110' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='640' cy='85' r='6' fill='rgba(255,255,255,0.8)'%3E%3Canimate attributeName='cy' values='85;80;85' dur='4s' repeatCount='indefinite'/%3E%3Canimate attributeName='r' values='6;8;6' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='680' cy='95' r='5' fill='rgba(255,255,255,0.7)'%3E%3Canimate attributeName='cy' values='95;90;95' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3C!-- Percentage text --%3E%3Ctext x='730' y='100' font-size='32' fill='rgba(255,255,255,0.3)' font-weight='bold'%3E%25%3Canimate attributeName='y' values='100;85;100' dur='3.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.3;0.5;0.3' dur='3.5s' repeatCount='indefinite'/%3E%3C/text%3E%3C!-- Sparkle stars --%3E%3Ccircle cx='100' cy='60' r='2.5' fill='rgba(255,255,255,0.7)'%3E%3Canimate attributeName='opacity' values='0;1;0' dur='2.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='240' cy='130' r='2' fill='rgba(255,255,255,0.6)'%3E%3Canimate attributeName='opacity' values='0;1;0' dur='2.8s' repeatCount='indefinite' begin='0.5s'/%3E%3C/circle%3E%3Ccircle cx='480' cy='65' r='2.5' fill='rgba(255,255,255,0.7)'%3E%3Canimate attributeName='opacity' values='0;1;0' dur='3s' repeatCount='indefinite' begin='1s'/%3E%3C/circle%3E%3Ccircle cx='710' cy='130' r='2' fill='rgba(255,255,255,0.6)'%3E%3Canimate attributeName='opacity' values='0;1;0' dur='2.6s' repeatCount='indefinite' begin='1.5s'/%3E%3C/circle%3E%3C!-- Hit rate indicators --%3E%3Ctext x='50' y='105' font-size='28' fill='rgba(255,255,255,0.2)' font-weight='bold'%3E100%3C/text%3E%3Ctext x='360' y='125' font-size='18' fill='rgba(255,255,255,0.2)' font-weight='bold'%3E✓%3Canimate attributeName='opacity' values='0.2;0.35;0.2' dur='3s' repeatCount='indefinite'/%3E%3C/text%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  opacity: 1;
  z-index: 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.back-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  color: white;
  margin-right: 16px;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.back-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.header-info {
  flex: 1;
}

.header-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: white;
}

.header-subtitle {
  font-size: 14px;
  opacity: 0.8;
  margin: 0;
}

/* 主要内容 */
.analysis-content {
  max-width: 850px;
  margin: 0 auto;
  padding: 16px 16px;
}

/* 加载状态 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.loading-spinner {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4facfe;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: #666;
  font-size: 14px;
  margin: 0;
}

/* 数据容器 */
.data-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 5px;
}

/* 统计卡片 */
.stats-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: none;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.card-icon {
  width: 28px;
  height: 28px;
  stroke: #4facfe;
  stroke-width: 2;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

/* 彩票类型筛选 */
.lottery-type-filter {
  margin-left: 16px;
  display: flex;
  align-items: center;
}

.filter-label {
  color: white;
  font-size: 14px;
  margin-right: 10px;
  white-space: nowrap;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.select-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.lottery-select {
  width: 140px;
}

/* 自定义Element UI下拉框样式 */
:deep(.el-select .el-input__wrapper) {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
  border-radius: 20px;
  padding: 0 15px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

:deep(.el-select .el-input__wrapper:hover) {
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

:deep(.el-select .el-input__inner) {
  color: #333;
  font-size: 14px;
  font-weight: 500;
  height: 36px;
}

:deep(.el-select .el-select__caret) {
  color: #4facfe;
  transition: transform 0.3s;
}

:deep(.el-select-dropdown__item.selected) {
  color: #4facfe;
  font-weight: bold;
  position: relative;
}

:deep(.el-select-dropdown__item.selected::after) {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #4facfe;
}

:deep(.el-select-dropdown__item:hover) {
  background-color: #f0f9ff;
}

:deep(.el-popper.is-light) {
  border-radius: 15px;
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

:deep(.el-select-dropdown__wrap) {
  max-height: 280px;
}

:deep(.el-select-dropdown__list) {
  padding: 8px 0;
}

:deep(.el-scrollbar__bar.is-horizontal) {
  display: none;
}

/* 分析卡片样式开始 */

/* 分析卡片 */
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 5px;
}

.section-icon {
  width: 20px;
  height: 20px;
  stroke: #4facfe;
  stroke-width: 2;
}

.analysis-card-container {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 5px;
  border: 1px solid #e9ecef;
  margin-top: 5px;
}

.analysis-row-item {
  display: flex;
  justify-content: space-between;
  padding: 24px 12px;
  border-bottom: 1px solid #e9ecef;
}

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

.analysis-data {
  text-align: center;
  flex: 1;
}

.analysis-number {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  line-height: 1;
}

.analysis-number.highlight {
  color: #00BFFF;
  font-weight: 700;
}

.analysis-label {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

/* 信息卡片 */
.info-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.info-header {
  background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
  color: white;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-icon {
  width: 24px;
  height: 24px;
  stroke: white;
  stroke-width: 2;
  flex-shrink: 0;
}

.info-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.info-content {
  padding: 24px 32px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
}

.info-list li::before {
  content: '•';
  color: #4facfe;
  font-size: 16px;
  position: absolute;
  left: 0;
  top: 0;
}

.info-list li:last-child {
  margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-header-modern {
    padding: 16px 0;
  }
  
  .header-content {
    padding: 0 16px;
  }
  
  .back-btn {
    width: 40px;
    height: 40px;
    margin-right: 12px;
  }
  
  .back-icon {
    width: 20px;
    height: 20px;
  }
  
  .header-title {
    font-size: 20px;
  }
  
  .header-subtitle {
    font-size: 12px;
  }
  
  .analysis-content {
    padding: 16px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .lottery-type-filter {
    margin-left: 0;
    margin-top: 12px;
    width: 100%;
    justify-content: flex-start;
  }
  
  .filter-label {
    font-size: 13px;
    margin-right: 8px;
  }
  
  .lottery-select {
    width: 130px;
  }
  
  /* 响应式分析卡片样式 */
  
  .analysis-card-container {
    padding: 4px;
  }
  
  .analysis-row-item {
    padding: 20px 10px;
  }
  
  .analysis-number {
    font-size: 20px;
  }
  
  .analysis-label {
    font-size: 12px;
  }
  
  .info-header {
    padding: 16px 20px;
  }
  
  .info-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: 0 12px;
  }
  
  .analysis-content {
    padding: 10px;
  }
  
  /* 移动端分析卡片样式 */
  
  .section-title {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .analysis-card-container {
    padding: 3px;
    border-radius: 8px;
  }
  
  .analysis-row-item {
    padding: 16px 6px;
  }
  
  .analysis-number {
    font-size: 20px;
    margin-bottom: 3px;
    font-weight: 600;
  }
  
  .analysis-label {
    font-size: 12px;
  }
  
  .info-header {
    padding: 12px 16px;
  }
  
  .info-content {
    padding: 16px;
  }
  
  .info-list li {
    font-size: 13px;
  }
}
</style>
