<view class="container">
  <view class="header">
    <text class="title">QR Code Scan Result</text>
    <text class="timestamp">{{ scan_timestamp }}</text>
  </view>

  <view class="section">
    <text class="section-title">QR Code Content</text>
    <view class="content-box">
      <text class="qr-content" selectable="true">{{ qr_code }}</text>
    </view>
  </view>

  <view class="section">
    <text class="section-title">Scan Details</text>
    <view class="details-grid">
      <view class="detail-item">
        <text class="label">Scan Mode:</text>
        <text class="value">{{ scan_mode }}</text>
      </view>
      <view class="detail-item">
        <text class="label">Source Page:</text>
        <text class="value">{{ source_page }}</text>
      </view>
      <view class="detail-item" wx:if="{{ qr_position }}">
        <text class="label">Position:</text>
        <text class="value">({{ qr_position.x }}, {{ qr_position.y }})</text>
      </view>
      <view class="detail-item" wx:if="{{ qr_position }}">
        <text class="label">Centered:</text>
        <text class="value">{{ qr_position.centered ? 'Yes' : 'No' }}</text>
      </view>
      <view class="detail-item" wx:if="{{ qr_sharpness > 0 }}">
        <text class="label">Sharpness:</text>
        <text class="value">{{ qr_sharpness.toFixed(3) }}</text>
      </view>
      <view class="detail-item" wx:if="{{ qr_size > 0 }}">
        <text class="label">QR Size:</text>
        <text class="value">{{ qr_size }}px</text>
      </view>
    </view>
  </view>

  <view class="section">
    <text class="section-title">Raw Query Data</text>
    <view class="content-box">
      <text class="raw-data" selectable="true">{{ raw_query_string }}</text>
    </view>
  </view>

  <view class="actions">
    <button class="action-btn primary" bindtap="scanAgain">Scan Again</button>
    <button class="action-btn secondary" bindtap="copyQRCode">Copy QR Code</button>
    <button class="action-btn secondary" bindtap="goBack">Go Back</button>
  </view>
</view>