// 确认需求阶段样式 - 多空间支持

// CSS 变量定义
:host {
  --primary-color: #3880ff;
  --primary-rgb: 56, 128, 255;
  --secondary-color: #0cd1e8;
  --tertiary-color: #7044ff;
  --success-color: #2dd36f;
  --warning-color: #ffc409;
  --danger-color: #eb445a;
  --dark-color: #222428;
  --medium-color: #92949c;
  --light-color: #f4f5f8;
  --light-shade: #d7d8da;
  --white: #ffffff;
}

// 加载容器
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 20px;

  p {
    color: var(--medium-color);
    margin: 16px 0 0;
    font-size: 14px;
  }
}

// Spinner 动画
.spinner {
  width: 48px;
  height: 48px;
  position: relative;

  .spinner-circle {
    width: 100%;
    height: 100%;
    border: 4px solid var(--light-shade);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
}

.spinner-small {
  width: 20px;
  height: 20px;
  position: relative;
  display: inline-block;

  .spinner-circle {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
}

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

// 确认需求容器
.stage-requirements-container {
  padding: 0 12px 80px;

  // 多空间切换器
  .space-selector {
    margin-bottom: 16px;

    .space-tabs {
      display: flex;
      overflow-x: auto;
      gap: 8px;
      padding: 4px;
      background: var(--light-color);
      border-radius: 12px;

      &::-webkit-scrollbar {
        height: 4px;
      }

      &::-webkit-scrollbar-track {
        background: transparent;
      }

      &::-webkit-scrollbar-thumb {
        background: var(--medium-color);
        border-radius: 2px;
      }

      .space-tab {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        border: none;
        background: transparent;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 500;
        color: var(--medium-color);
        cursor: pointer;
        transition: all 0.3s;
        white-space: nowrap;
        position: relative;
        min-width: 120px;
        justify-content: center;

        .icon, .space-icon {
          font-size: 18px;
        }

        .progress-indicator {
          position: absolute;
          bottom: 0;
          left: 0;
          height: 2px;
          background: var(--success-color);
          border-radius: 1px;
          transition: width 0.3s;
        }

        &.active {
          background: var(--primary-color);
          color: white;
          box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
        }

        &:hover:not(.active) {
          background: rgba(var(--primary-rgb), 0.1);
          color: var(--primary-color);
        }
      }
    }
  }

  // 需求分段导航
  .requirements-segment {
    margin-bottom: 16px;

    .segment-buttons {
      display: flex;
      gap: 4px;
      background: var(--light-color);
      border-radius: 8px;
      padding: 4px;

      .segment-btn {
        flex: 1;
        padding: 12px 16px;
        border: none;
        background: transparent;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 500;
        color: var(--medium-color);
        cursor: pointer;
        transition: all 0.3s;
        white-space: nowrap;

        &.active {
          background: var(--primary-color);
          color: white;
          box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.3);
        }

        &:hover:not(.active) {
          background: rgba(var(--primary-rgb), 0.1);
          color: var(--primary-color);
        }
      }
    }
  }

  // 通用卡片样式
  .card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    overflow: hidden;

    .card-header {
      padding: 16px;
      border-bottom: 1px solid var(--light-shade);
      display: flex;
      justify-content: space-between;
      align-items: flex-start;

      .card-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0 0 4px;
        font-size: 16px;
        font-weight: 600;
        color: var(--dark-color);

        .icon, .space-icon {
          font-size: 20px;
          color: var(--primary-color);
        }

        .completion-indicator {
          display: flex;
          align-items: center;
          gap: 8px;
          font-size: 12px;

          .progress-bar {
            width: 60px;
            height: 6px;
            background: var(--light-shade);
            border-radius: 3px;
            overflow: hidden;

            .progress-fill {
              height: 100%;
              background: var(--success-color);
              transition: width 0.3s;
            }
          }

          .progress-text {
            font-weight: 600;
            color: var(--success-color);
          }
        }
      }

      .card-subtitle {
        color: var(--medium-color);
        font-size: 12px;
        margin: 0;
      }
    }

    .card-content {
      padding: 16px;
    }

    &.active {
      border: 2px solid var(--primary-color);
      box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.2);
    }
  }

  // 必填标记
  .required {
    color: var(--danger-color);
    margin-left: 4px;
  }

  // 空状态
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;

    .icon-large {
      font-size: 64px;
      color: var(--medium-color);
      margin-bottom: 16px;
      opacity: 0.5;
    }

    p {
      color: var(--medium-color);
      margin: 0 0 16px;
    }

    .btn {
      margin-top: 8px;
    }
  }

  // AI分析操作区域
  .ai-analysis-actions {
    display: flex;
    gap: 8px;
    align-items: center;

    .btn {
      .spinner-small {
        margin-right: 4px;
      }
    }
  }

  // AI分析结果
  .ai-analysis-results {
    margin-bottom: 20px;

    .analysis-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--light-shade);

      .badge {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        padding: 6px 12px;

        .icon, .space-icon {
          font-size: 14px;
        }
      }
    }

    .analysis-grid {
      display: grid;
      gap: 16px;

      .analysis-item {
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 16px;
        padding: 16px;
        background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), rgba(12, 209, 232, 0.03));
        border-radius: 12px;
        border: 1px solid rgba(var(--primary-rgb), 0.1);

        .analysis-image {
          position: relative;
          border-radius: 8px;
          overflow: hidden;
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

          img {
            width: 100%;
            height: 150px;
            object-fit: cover;
          }

          .confidence-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 600;
          }
        }

        .analysis-content {
          display: flex;
          flex-direction: column;
          gap: 12px;

          .analysis-section {
            h5 {
              margin: 0 0 8px;
              font-size: 13px;
              font-weight: 600;
              color: var(--dark-color);
              display: flex;
              align-items: center;
              gap: 6px;

              &::before {
                content: '';
                width: 3px;
                height: 14px;
                background: var(--primary-color);
                border-radius: 2px;
              }
            }

            p {
              margin: 0;
              font-size: 12px;
              line-height: 1.5;
              color: var(--medium-color);
            }

            .color-palette {
              display: flex;
              gap: 6px;
              flex-wrap: wrap;

              .color-swatch {
                width: 24px;
                height: 24px;
                border-radius: 4px;
                border: 1px solid rgba(0, 0, 0, 0.1);
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                cursor: pointer;
                transition: transform 0.2s;

                &:hover {
                  transform: scale(1.1);
                }
              }
            }

            .tags {
              display: flex;
              flex-wrap: wrap;
              gap: 6px;

              .badge {
                font-size: 10px;
                padding: 3px 8px;
              }
            }
          }
        }
      }
    }

    .cad-analysis-grid {
      display: grid;
      gap: 16px;

      .cad-analysis-item {
        padding: 16px;
        background: linear-gradient(135deg, rgba(var(--tertiary-rgb), 0.03), rgba(45, 211, 111, 0.03));
        border-radius: 12px;
        border: 1px solid rgba(var(--tertiary-rgb), 0.1);

        .cad-file-info {
          display: flex;
          align-items: center;
          gap: 12px;
          margin-bottom: 16px;
          padding-bottom: 12px;
          border-bottom: 1px solid var(--light-shade);

          .file-icon {
            font-size: 32px;
            color: var(--tertiary-color);
          }

          .file-details {
            flex: 1;

            h4 {
              margin: 0 0 4px;
              font-size: 15px;
              font-weight: 600;
              color: var(--dark-color);
            }

            p {
              margin: 0;
              font-size: 12px;
              color: var(--medium-color);
            }
          }
        }

        .cad-analysis-content {
          display: grid;
          gap: 16px;

          .analysis-section {
            h5 {
              margin: 0 0 8px;
              font-size: 13px;
              font-weight: 600;
              color: var(--dark-color);
              display: flex;
              align-items: center;
              gap: 6px;

              &::before {
                content: '';
                width: 3px;
                height: 14px;
                background: var(--tertiary-color);
                border-radius: 2px;
              }
            }

            .structure-info,
            .dimensions-info {
              display: grid;
              grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
              gap: 8px;

              .info-item {
                display: flex;
                align-items: center;
                gap: 8px;

                .label {
                  font-size: 12px;
                  color: var(--medium-color);
                  font-weight: 500;
                }

                .value {
                  font-size: 13px;
                  color: var(--dark-color);
                  font-weight: 600;
                }
              }
            }

            .tags {
              display: flex;
              flex-wrap: wrap;
              gap: 6px;

              .badge {
                font-size: 10px;
                padding: 3px 8px;
              }
            }
          }
        }
      }
    }
  }

  // 综合AI分析卡片
  .comprehensive-analysis-card {
    border: 2px solid rgba(var(--success-rgb), 0.2);
    box-shadow: 0 4px 16px rgba(45, 211, 111, 0.1);

    .comprehensive-analysis-content {
      .analysis-section {
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--light-shade);

        &:last-child {
          margin-bottom: 0;
          padding-bottom: 0;
          border-bottom: none;
        }

        h4 {
          margin: 0 0 12px;
          font-size: 15px;
          font-weight: 600;
          color: var(--dark-color);
          display: flex;
          align-items: center;
          gap: 8px;

          &::before {
            content: '';
            width: 4px;
            height: 16px;
            background: var(--success-color);
            border-radius: 2px;
          }
        }

        p {
          margin: 0;
          font-size: 14px;
          line-height: 1.6;
          color: var(--dark-color);
        }

        .ai-color-scheme {
          display: flex;
          gap: 16px;
          align-items: center;
          padding: 12px;
          background: linear-gradient(135deg, rgba(var(--success-rgb), 0.05), rgba(112, 68, 255, 0.05));
          border-radius: 8px;

          .color-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;

            .color-swatch {
              width: 48px;
              height: 48px;
              border-radius: 8px;
              border: 2px solid white;
              box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
              cursor: pointer;
              transition: transform 0.2s;

              &:hover {
                transform: scale(1.05);
              }
            }

            .color-label {
              font-size: 11px;
              color: var(--medium-color);
              font-weight: 500;
            }
          }
        }

        .optimization-list {
          margin: 0;
          padding-left: 20px;

          li {
            margin-bottom: 6px;
            font-size: 13px;
            line-height: 1.5;
            color: var(--dark-color);

            &:last-child {
              margin-bottom: 0;
            }

            &::marker {
              color: var(--success-color);
            }
          }
        }

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

          .budget-range,
          .risk-level {
            display: flex;
            align-items: center;
            gap: 8px;

            .label {
              font-size: 12px;
              color: var(--medium-color);
              font-weight: 500;
            }

            .value {
              font-size: 14px;
              color: var(--dark-color);
              font-weight: 600;
            }

            .badge {
              font-size: 10px;
              padding: 4px 8px;
            }
          }
        }
      }
    }
  }

  // AI聊天卡片
  .ai-chat-card {
    .ai-chat-container {
      display: flex;
      flex-direction: column;
      height: 400px;

      .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        background: var(--light-color);
        border-radius: 8px;
        margin-bottom: 12px;

        &::-webkit-scrollbar {
          width: 4px;
        }

        &::-webkit-scrollbar-track {
          background: transparent;
        }

        &::-webkit-scrollbar-thumb {
          background: var(--medium-color);
          border-radius: 2px;
        }

        .message {
          display: flex;
          gap: 12px;
          margin-bottom: 16px;

          &:last-child {
            margin-bottom: 0;
          }

          &.user-message {
            flex-direction: row-reverse;

            .message-avatar {
              .icon, .space-icon {
                color: var(--primary-color);
              }
            }

            .message-content {
              background: var(--primary-color);
              color: white;
            }
          }

          &.ai-message {
            .message-avatar {
              .icon, .space-icon {
                color: var(--success-color);
              }
            }

            .message-content {
              background: white;
              color: var(--dark-color);
              border: 1px solid var(--light-shade);
            }
          }

          .message-avatar {
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;

            .icon, .space-icon {
              font-size: 24px;
            }
          }

          .message-content {
            flex: 1;
            max-width: 70%;
            padding: 12px 16px;
            border-radius: 16px;
            word-wrap: break-word;

            .message-text {
              font-size: 13px;
              line-height: 1.5;
              margin-bottom: 4px;
            }

            .message-time {
              font-size: 10px;
              opacity: 0.7;
            }
          }
        }

        .empty-chat {
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          height: 100%;
          text-align: center;

          .icon-large {
            font-size: 48px;
            color: var(--medium-color);
            margin-bottom: 12px;
            opacity: 0.5;
          }

          p {
            color: var(--medium-color);
            margin: 0;
            font-size: 13px;
          }
        }
      }

      .chat-input {
        .input-group {
          display: flex;
          gap: 8px;

          .form-input {
            flex: 1;
            padding: 12px 16px;
            border: 1px solid var(--light-shade);
            border-radius: 24px;
            font-size: 13px;
            background: white;

            &:focus {
              outline: none;
              border-color: var(--primary-color);
              box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
            }

            &::placeholder {
              color: var(--medium-color);
            }
          }

          .btn {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            padding: 0;
            flex-shrink: 0;

            .icon, .space-icon {
              font-size: 20px;
            }
          }
        }
      }
    }
  }

  // 参考图片卡片
  .reference-images-card {
    .images-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;

      .image-item {
        position: relative;
        aspect-ratio: 1;
        border-radius: 8px;
        overflow: hidden;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }

        .image-overlay {
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent);
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          padding: 8px;
          opacity: 0;
          transition: opacity 0.3s;

          .badge {
            height: fit-content;
            font-size: 10px;
            padding: 4px 8px;
          }

          .btn-icon {
            width: 32px;
            height: 32px;
            padding: 4px;
          }
        }

        &:hover .image-overlay {
          opacity: 1;
        }

        &.small {
          aspect-ratio: 1.2;

          .image-overlay {
            padding: 6px;
          }
        }
      }

      .upload-placeholder {
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px dashed var(--light-shade);
        border-radius: 8px;
        background-color: var(--light-color);
        transition: all 0.3s;

        &:hover {
          border-color: var(--primary-color);
          background-color: rgba(var(--primary-rgb), 0.05);
        }

        &.small {
          aspect-ratio: 1.2;
        }
      }
    }
  }

  // CAD文件卡片
  .cad-files-card {
    .file-list {
      display: flex;
      flex-direction: column;
      gap: 0;
      margin-bottom: 16px;
    }

    .file-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid var(--light-shade);

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

      .file-icon {
        font-size: 40px;
        color: var(--primary-color);
        flex-shrink: 0;
      }

      .file-info {
        flex: 1;
        min-width: 0;

        h4 {
          margin: 0 0 4px;
          font-size: 15px;
          font-weight: 600;
          color: var(--dark-color);
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        p {
          margin: 0;
          font-size: 12px;
          color: var(--medium-color);
        }
      }

      .btn-icon {
        flex-shrink: 0;
      }
    }
  }

  // 风格偏好卡片
  .style-preferences-card {
    .color-scheme {
      margin-bottom: 24px;

      .color-inputs {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-top: 12px;

        .form-color-input {
          width: 100%;
          height: 48px;
          border: 1px solid var(--light-shade);
          border-radius: 8px;
          cursor: pointer;
          padding: 4px;

          &:disabled {
            cursor: not-allowed;
            opacity: 0.5;
          }
        }
      }
    }

    .budget-range {
      margin-bottom: 24px;

      h4 {
        margin: 0 0 12px;
        font-size: 14px;
        font-weight: 600;
        color: var(--dark-color);
      }

      .budget-inputs {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: flex-start;
        gap: 12px;

        .separator {
          font-size: 20px;
          font-weight: 600;
          color: var(--medium-color);
          padding-top: 32px;
        }
      }
    }

    .quality-level {
      margin-bottom: 24px;

      .radio-group {
        display: flex;
        gap: 16px;
        margin-top: 8px;

        .radio-item {
          display: flex;
          align-items: center;
          gap: 8px;
          cursor: pointer;

          input[type="radio"] {
            margin: 0;
          }

          .radio-label {
            font-size: 14px;
            color: var(--dark-color);
          }
        }
      }
    }
  }

  // 空间需求
  .space-requirements {
    display: flex;
    flex-direction: column;
    gap: 16px;

    .space-requirement-card {
      .completion-badge {
        background: var(--success-color);
        color: white;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 600;
      }

      .space-reference-images {
        h4 {
          margin: 16px 0 8px;
          font-size: 14px;
          font-weight: 600;
          color: var(--dark-color);
        }
      }
    }
  }

  // 跨空间需求
  .cross-space-requirements {
    .cross-space-list {
      .cross-space-item {
        padding: 16px;
        background-color: var(--light-color);
        border-radius: 8px;
        margin-bottom: 12px;

        .item-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 8px;
        }

        .description {
          margin: 0 0 12px;
          font-size: 14px;
          line-height: 1.5;
          color: var(--dark-color);
        }

        .related-spaces {
          display: flex;
          align-items: center;
          gap: 8px;

          .label {
            font-size: 12px;
            color: var(--medium-color);
            font-weight: 500;
          }

          .space-tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
          }
        }
      }
    }
  }

  // AI方案卡片
  .ai-solution-card {
    .ai-solution-content {
      .solution-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--light-shade);

        .badge {
          display: flex;
          align-items: center;
          gap: 4px;
          padding: 6px 12px;

          .icon, .space-icon {
            font-size: 16px;
          }
        }
      }

      .solution-summary {
        margin-bottom: 24px;
        padding: 16px;
        background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), rgba(12, 209, 232, 0.05));
        border-radius: 8px;
        border-left: 4px solid var(--primary-color);

        p {
          margin: 0;
          font-size: 14px;
          line-height: 1.6;
          color: var(--dark-color);
        }
      }

      .spaces-solution {
        .space-solution-item {
          padding: 16px;
          background-color: var(--light-color);
          border-radius: 8px;
          margin-bottom: 16px;

          &:last-child {
            margin-bottom: 20px;
          }

          .space-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;

            .icon, .space-icon {
              font-size: 20px;
              color: var(--primary-color);
            }

            h4 {
              margin: 0;
              font-size: 16px;
              font-weight: 600;
              color: var(--dark-color);
            }
          }

          .style-desc {
            margin: 0 0 16px;
            font-size: 13px;
            line-height: 1.6;
            color: var(--medium-color);
          }

          .solution-details {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 16px;

            .detail-item {
              display: flex;
              align-items: center;
              gap: 8px;

              .label {
                font-size: 12px;
                color: var(--medium-color);
                font-weight: 500;
              }

              .value {
                font-size: 14px;
                color: var(--dark-color);
                font-weight: 600;
              }
            }
          }

          .color-palette,
          .materials,
          .furniture {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;

            &:last-child {
              margin-bottom: 0;
            }

            .label {
              font-size: 12px;
              font-weight: 500;
              color: var(--medium-color);
              white-space: nowrap;
            }

            .colors {
              display: flex;
              gap: 6px;
              flex-wrap: wrap;

              .color-swatch {
                width: 32px;
                height: 32px;
                border-radius: 4px;
                border: 1px solid rgba(0, 0, 0, 0.1);
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                cursor: pointer;
              }
            }

            .tags {
              display: flex;
              flex-wrap: wrap;
              gap: 6px;
            }
          }
        }
      }

      .cross-space-coordination {
        margin-bottom: 24px;
        padding: 16px;
        background: linear-gradient(135deg, rgba(var(--secondary-rgb), 0.05), rgba(112, 68, 255, 0.05));
        border-radius: 8px;
        border-left: 4px solid var(--secondary-color);

        h4 {
          margin: 0 0 16px;
          font-size: 15px;
          font-weight: 600;
          color: var(--dark-color);
          display: flex;
          align-items: center;
          gap: 8px;

          .icon, .space-icon {
            font-size: 18px;
            color: var(--secondary-color);
          }
        }

        .coordination-items {
          display: flex;
          flex-direction: column;
          gap: 12px;

          .coordination-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;

            .icon, .space-icon {
              font-size: 20px;
              color: var(--secondary-color);
              flex-shrink: 0;
              margin-top: 2px;
            }

            h5 {
              margin: 0 0 4px;
              font-size: 14px;
              font-weight: 600;
              color: var(--dark-color);
            }

            p {
              margin: 0;
              font-size: 13px;
              line-height: 1.5;
              color: var(--medium-color);
            }
          }
        }
      }

      .summary {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;

        .summary-item {
          display: flex;
          align-items: center;
          gap: 12px;
          padding: 16px;
          background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(12, 209, 232, 0.1));
          border-radius: 8px;

          .icon, .space-icon {
            font-size: 32px;
            color: var(--primary-color);
            flex-shrink: 0;
          }

          .label {
            font-size: 11px;
            color: var(--medium-color);
            margin: 0 0 4px;
          }

          h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 700;
            color: var(--primary-color);
          }

          p {
            margin: 0;
            font-size: 12px;
            line-height: 1.4;
            color: var(--medium-color);
          }
        }
      }
    }
  }

  // 操作按钮
  .action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 0;
    margin-top: 20px;
  }
}

// Badge 组件
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;

  &.badge-primary {
    background: var(--primary-color);
    color: white;
  }

  &.badge-secondary {
    background: var(--secondary-color);
    color: white;
  }

  &.badge-tertiary {
    background: var(--tertiary-color);
    color: white;
  }

  &.badge-success {
    background: var(--success-color);
    color: white;
  }

  &.badge-warning {
    background: var(--warning-color);
    color: var(--dark-color);
  }

  &.badge-danger {
    background: var(--danger-color);
    color: white;
  }

  &.badge-medium {
    background: var(--medium-color);
    color: white;
  }

  &.badge-outline {
    background: transparent;
    border: 1px solid var(--medium-color);
    color: var(--medium-color);
  }
}

// 按钮样式
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  outline: none;
  white-space: nowrap;

  .icon, .space-icon {
    font-size: 20px;
  }

  &.btn-primary {
    background: var(--primary-color);
    color: white;

    &:hover:not(:disabled) {
      background: #2f6ce5;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    }

    &:active:not(:disabled) {
      transform: translateY(0);
    }
  }

  &.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);

    &:hover:not(:disabled) {
      background: var(--primary-color);
      color: white;
    }

    &:active:not(:disabled) {
      transform: scale(0.98);
    }
  }

  &.btn-sm {
    padding: 8px 16px;
    font-size: 12px;

    .icon, .space-icon {
      font-size: 16px;
    }
  }

  &.btn-block {
    display: flex;
    width: 100%;
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

// 图标按钮
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  padding: 8px;

  .icon, .space-icon {
    font-size: 24px;
  }

  &.btn-danger {
    color: white;
    background: var(--danger-color);

    &:hover:not(:disabled) {
      background: #d33939;
      transform: scale(1.1);
    }

    &:active:not(:disabled) {
      transform: scale(0.95);
    }
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

// 表单样式
.form-group {
  margin-bottom: 16px;

  &:last-child {
    margin-bottom: 0;
  }

  .form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
  }

  .form-input,
  .form-textarea,
  .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--light-shade);
    border-radius: 8px;
    font-size: 14px;
    color: var(--dark-color);
    background: white;
    transition: all 0.3s;
    font-family: inherit;

    &:focus {
      outline: none;
      border-color: var(--primary-color);
      box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    }

    &::placeholder {
      color: var(--medium-color);
    }

    &:disabled {
      background: var(--light-color);
      cursor: not-allowed;
      opacity: 0.7;
    }
  }

  .form-textarea {
    min-height: 80px;
    resize: vertical;
  }

  .form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;

    &:disabled {
      cursor: not-allowed;
    }
  }
}

// 响应式适配
@media (min-width: 768px) {
  .stage-requirements-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 80px;

    .reference-images-card {
      .images-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    .style-preferences-card {
      .color-inputs {
        grid-template-columns: repeat(4, 1fr);
      }
    }

    .ai-solution-card {
      .ai-solution-content {
        .summary {
          grid-template-columns: repeat(2, 1fr);
        }
      }
    }
  }
}

@media (min-width: 1024px) {
  .stage-requirements-container {
    max-width: 1000px;

    .reference-images-card {
      .images-grid {
        grid-template-columns: repeat(4, 1fr);
      }
    }
  }
}

// 移动端优化
@media (max-width: 480px) {
  .stage-requirements-container {
    padding: 0 8px 70px;

    .space-selector {
      .space-tabs {
        .space-tab {
          min-width: 100px;
          padding: 10px 12px;
          font-size: 12px;

          .icon, .space-icon {
            font-size: 16px;
          }
        }
      }
    }

    .card {
      .card-header {
        padding: 12px;

        .card-title {
          font-size: 15px;

          .icon, .space-icon {
            font-size: 18px;
          }
        }

        .card-subtitle {
          font-size: 11px;
        }
      }

      .card-content {
        padding: 12px;
      }
    }

    .reference-images-card {
      .images-grid {
        gap: 8px;

        .image-item {
          .image-overlay {
            padding: 6px;

            .badge {
              font-size: 9px;
              padding: 3px 6px;
            }

            .btn-icon {
              width: 28px;
              height: 28px;

              .icon, .space-icon {
                font-size: 20px;
              }
            }
          }
        }
      }
    }

    .style-preferences-card {
      .color-inputs {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
      }

      .quality-level {
        .radio-group {
          flex-direction: column;
          gap: 8px;

          .radio-item {
            .radio-label {
              font-size: 13px;
            }
          }
        }
      }
    }

    .ai-solution-card {
      .ai-solution-content {
        .spaces-solution {
          .space-solution-item {
            padding: 12px;

            .space-header {
              h4 {
                font-size: 15px;
              }
            }

            .solution-details {
              grid-template-columns: 1fr;
              gap: 8px;
            }

            .color-palette,
            .materials,
            .furniture {
              flex-direction: column;
              align-items: flex-start;
              gap: 8px;

              .label {
                width: 100%;
              }
            }
          }
        }

        .cross-space-coordination {
          padding: 12px;

          .coordination-items {
            .coordination-item {
              .icon, .space-icon {
                font-size: 18px;
              }
            }
          }
        }

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

          .summary-item {
            padding: 12px;

            .icon, .space-icon {
              font-size: 28px;
            }

            h3 {
              font-size: 16px;
            }
          }
        }
      }
    }

    .action-buttons {
      gap: 8px;

      .btn {
        padding: 10px 16px;
        font-size: 13px;

        .icon, .space-icon {
          font-size: 18px;
        }
      }
    }

    .form-group {
      margin-bottom: 14px;

      .form-label {
        font-size: 12px;
      }

      .form-input,
      .form-textarea,
      .form-select {
        padding: 10px 12px;
        font-size: 13px;
      }
    }

    .btn {
      padding: 10px 20px;
      font-size: 13px;

      .icon, .space-icon {
        font-size: 18px;
      }
    }

    .btn-icon {
      width: 36px;
      height: 36px;

      .icon, .space-icon {
        font-size: 20px;
      }
    }
  }
}