<div class="furniture-form-selector">
  <div class="selector-header">
    <h6>软装形体质感</h6>
    <div class="selection-count">
      已选择: {{ selectedForms.length }} / {{ maxSelections }}
      @if (selectedForms.length > 0) {
        <button class="clear-btn" (click)="clearSelections()">清除</button>
      }
    </div>
  </div>

  <div class="form-options-grid">
    @for (option of formOptions; track option.id) {
      <div 
        class="form-option-card"
        [class.selected]="isSelected(option.id)"
        (click)="toggleFormSelection(option)">
        
        <!-- 选择指示器 -->
        <div class="selection-indicator">
          @if (isSelected(option.id)) {
            <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3">
              <polyline points="20 6 9 17 4 12"></polyline>
            </svg>
          }
        </div>
        
        <!-- 形体图标 -->
        <div class="form-icon">
          <svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
            <path [attr.d]="option.icon"></path>
          </svg>
        </div>
        
        <!-- 形体信息 -->
        <div class="form-info">
          <h6 class="form-name">{{ option.name }}</h6>
          <p class="form-description">{{ option.description }}</p>
          
          <!-- 质感标签 -->
          <div class="texture-tags">
            @for (texture of option.textures; track texture) {
              <span class="texture-tag" [attr.data-texture]="texture">
                {{ getTextureName(texture) }}
              </span>
            }
          </div>
          
          <!-- 示例 -->
          @if (showExamples && option.examples.length > 0) {
            <div class="examples">
              <span class="examples-label">示例:</span>
              <span class="examples-text">{{ option.examples.join('、') }}</span>
            </div>
          }
        </div>
      </div>
    }
  </div>

  <!-- 分析结果摘要 -->
  @if (selectedForms.length > 0) {
    <div class="analysis-summary">
      <h6>分析结果</h6>
      <div class="summary-items">
        <div class="summary-item">
          <span class="label">主导质感:</span>
          <span class="value">{{ calculateDominantTexture() }}</span>
        </div>
        <div class="summary-item">
          <span class="label">形体复杂度:</span>
          <span class="value">{{ getComplexityName(calculateFormComplexity()) }}</span>
        </div>
        <div class="summary-item">
          <span class="label">风格方向:</span>
          <span class="value">{{ determineStyleDirection() }}</span>
        </div>
      </div>
    </div>
  }
</div>

