.test-requirement-mapping {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  .test-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;

    h2 {
      margin: 0 0 12px 0;
      font-size: 28px;
      font-weight: 600;
    }

    .test-description {
      margin: 0 0 20px 0;
      font-size: 16px;
      opacity: 0.9;
      line-height: 1.5;
    }

    .reset-btn {
      background: rgba(255, 255, 255, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.3);
      color: white;
      padding: 8px 16px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
      transition: all 0.2s ease;

      &:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
      }
    }
  }

  .test-progress {
    margin-bottom: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;

    h3 {
      margin: 0 0 16px 0;
      font-size: 18px;
      color: #495057;
    }

    .steps-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 16px;
    }

    .step-item {
      display: flex;
      align-items: center;
      padding: 12px;
      background: white;
      border-radius: 6px;
      border: 2px solid #e9ecef;
      transition: all 0.2s ease;

      &.step-pending {
        border-color: #e9ecef;
        .step-icon { color: #6c757d; }
      }

      &.step-in-progress {
        border-color: #ffc107;
        background: #fff8e1;
        .step-icon { color: #ffc107; }
      }

      &.step-completed {
        border-color: #28a745;
        background: #f8fff9;
        .step-icon { color: #28a745; }
      }

      &.step-error {
        border-color: #dc3545;
        background: #fff5f5;
        .step-icon { color: #dc3545; }
      }

      .step-icon {
        font-size: 20px;
        margin-right: 12px;
      }

      .step-info {
        .step-name {
          font-weight: 500;
          font-size: 14px;
          color: #495057;
        }

        .step-status {
          font-size: 12px;
          color: #6c757d;
          margin-top: 2px;
        }
      }
    }
  }

  .upload-section,
  .analysis-section,
  .mapping-section {
    margin-bottom: 32px;
    padding: 24px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    &.disabled {
      opacity: 0.6;
      pointer-events: none;
    }

    h3 {
      margin: 0 0 20px 0;
      font-size: 20px;
      color: #495057;
      border-bottom: 2px solid #e9ecef;
      padding-bottom: 8px;
    }
  }

  .upload-area {
    position: relative;
    min-height: 200px;

    .upload-dropzone {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 200px;
      border: 2px dashed #dee2e6;
      border-radius: 8px;
      background: #f8f9fa;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;

      &:hover {
        border-color: #667eea;
        background: #f0f4ff;
      }

      .upload-icon {
        font-size: 48px;
        margin-bottom: 16px;
        opacity: 0.7;
      }

      .upload-text {
        font-size: 18px;
        font-weight: 500;
        color: #495057;
        margin-bottom: 8px;
      }

      .upload-hint {
        font-size: 14px;
        color: #6c757d;
      }

      .file-input {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
      }
    }

    .uploaded-files {
      h4 {
        margin: 0 0 16px 0;
        font-size: 16px;
        color: #495057;
      }

      .files-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
      }

      .file-item {
        border: 1px solid #e9ecef;
        border-radius: 6px;
        overflow: hidden;
        background: white;

        .file-preview {
          width: 100%;
          height: 120px;
          object-fit: cover;
        }

        .file-info {
          padding: 8px;

          .file-name {
            font-size: 12px;
            font-weight: 500;
            color: #495057;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }

          .file-size {
            font-size: 11px;
            color: #6c757d;
          }
        }
      }
    }

    .loading-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(255, 255, 255, 0.9);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
    }
  }

  .analysis-loading,
  .mapping-loading {
    display: flex;
    align-items: center;
    padding: 24px;
    background: #f0f4ff;
    border-radius: 6px;
    border: 1px solid #e3f2fd;

    .loading-text {
      margin-left: 16px;

      h4 {
        margin: 0 0 8px 0;
        font-size: 16px;
        color: #495057;
      }

      p {
        margin: 0;
        font-size: 14px;
        color: #6c757d;
      }
    }
  }

  .analysis-error,
  .mapping-error {
    display: flex;
    align-items: center;
    padding: 24px;
    background: #fff5f5;
    border-radius: 6px;
    border: 1px solid #ffebee;

    .error-icon {
      font-size: 24px;
      margin-right: 16px;
    }

    .error-text {
      flex: 1;

      h4 {
        margin: 0 0 8px 0;
        font-size: 16px;
        color: #dc3545;
      }

      p {
        margin: 0 0 12px 0;
        font-size: 14px;
        color: #6c757d;
      }

      .retry-btn {
        background: #dc3545;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        transition: background 0.2s ease;

        &:hover {
          background: #c82333;
        }
      }
    }
  }

  .analysis-result,
  .mapping-result {
    h4 {
      margin: 0 0 16px 0;
      font-size: 18px;
      color: #28a745;
      display: flex;
      align-items: center;
    }

    .analysis-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 16px;
      margin-top: 16px;
    }

    .summary-item {
      display: flex;
      justify-content: space-between;
      padding: 12px;
      background: #f8f9fa;
      border-radius: 4px;

      .label {
        font-weight: 500;
        color: #495057;
      }

      .value {
        color: #6c757d;
      }
    }
  }

  .mapping-section-item {
    margin-bottom: 24px;

    h5 {
      margin: 0 0 16px 0;
      font-size: 16px;
      color: #495057;
      border-bottom: 1px solid #e9ecef;
      padding-bottom: 8px;
    }

    .scene-info {
      .info-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #f8f9fa;

        .label {
          font-weight: 500;
          color: #495057;
        }

        .value {
          color: #6c757d;
        }
      }

      .atmosphere-preview {
        margin-top: 16px;
        text-align: center;

        .preview-image {
          max-width: 300px;
          max-height: 200px;
          border-radius: 6px;
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .preview-label {
          margin-top: 8px;
          font-size: 14px;
          color: #6c757d;
        }
      }
    }

    .params-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 20px;
    }

    .param-group {
      background: #f8f9fa;
      padding: 16px;
      border-radius: 6px;

      h6 {
        margin: 0 0 12px 0;
        font-size: 14px;
        font-weight: 600;
        color: #495057;
      }

      .param-item {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #e9ecef;

        &:last-child {
          border-bottom: none;
        }

        .label {
          font-size: 13px;
          color: #6c757d;
        }

        .value {
          font-size: 13px;
          font-weight: 500;
          color: #495057;
        }
      }
    }
  }

  .analysis-placeholder,
  .mapping-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    color: #6c757d;

    .placeholder-icon {
      font-size: 48px;
      margin-bottom: 16px;
      opacity: 0.7;
    }

    .placeholder-text {
      text-align: center;

      h4 {
        margin: 0 0 8px 0;
        font-size: 16px;
      }

      p {
        margin: 0;
        font-size: 14px;
        opacity: 0.8;
      }
    }
  }

  .test-actions {
    margin-top: 24px;
    text-align: center;

    .download-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #667eea;
      color: white;
      border: none;
      padding: 12px 24px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.2s ease;

      &:hover {
        background: #5a6fd8;
        transform: translateY(-1px);
      }

      svg {
        width: 16px;
        height: 16px;
      }
    }
  }

  .loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

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

  // 响应式设计
  @media (max-width: 768px) {
    padding: 16px;

    .test-header {
      padding: 16px;

      h2 {
        font-size: 24px;
      }

      .test-description {
        font-size: 14px;
      }
    }

    .upload-section,
    .analysis-section,
    .mapping-section {
      padding: 16px;
    }

    .steps-container {
      grid-template-columns: 1fr;
    }

    .params-grid {
      grid-template-columns: 1fr;
    }

    .analysis-summary {
      grid-template-columns: 1fr;
    }
  }
}