<view class="page">
  <view class="page-content">
    <view class="stats-row">
      <view class="stat-card">
        <view class="stat-value">{{total}}</view>
        <view class="stat-label">累计次数</view>
      </view>
      <view class="stat-card">
        <view class="stat-value">{{totalHours}}h</view>
        <view class="stat-label">累计时长</view>
      </view>
      <view class="stat-card">
        <view class="stat-value">{{monthCount}}</view>
        <view class="stat-label">本月次数</view>
      </view>
    </view>

    <view class="section-title">最近记录</view>

    <view class="record-item" wx:for="{{records}}" wx:key="session_id">
      <view class="record-date">{{item.date_text}}</view>
      <text class="record-mode {{item.mode === 1 ? 'smart' : 'normal'}}">{{item.mode === 1 ? '✨ 智能' : '🔄 普通'}}</text>
      <view class="record-details">{{item.duration_text}}</view>
    </view>

    <view class="empty-state" wx:if="{{!loading && records.length === 0}}">
      <text class="empty-icon">📃</text>
      <view class="empty-text">暂无使用记录</view>
    </view>

    <view class="loading-more" wx:if="{{loadingMore}}">加载更多...</view>
  </view>
</view>
