.ai-cloth-change-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 12px 16px 16px;
  background-color: #f0f2f5;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;

  // 示例按钮行（单行显示，pill 样式）
  .examples-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
    padding: 8px 0 12px 0;
    overflow-x: auto; /* 小屏幕时可以横向滚动 */
    -webkit-overflow-scrolling: touch;
  }

  .example-btn {
    border-radius: 20px !important;
    border: 1px solid #2b8fff !important;
    color: #2b8fff !important;
    background: #fff !important;
    padding: 6px 14px !important;
    height: 36px !important;
    line-height: 22px !important;
    box-shadow: none !important;
    white-space: nowrap;
  }

  .example-btn:hover {
    background: rgba(43, 143, 255, 0.06) !important;
    border-color: #1a6fe6 !important;
    color: #1a6fe6 !important;
  }

  //顶部标题区
  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    padding: 16px 16px;

    .page-title {
      font-size: 20px;
      font-weight: 600;
      color: #1f2329;
      margin: 0;
      letter-spacing: 0.5px;
    }

    .header-desc {
      font-size: 13px;
      color: #8f959e;
      margin: 0;
      flex: 1;
      text-align: right;
    }
  }

  .cloth-change-wrapper {
    flex: 1;
    display: flex;
    gap: 16px;
    overflow: hidden;
    height: 100%;
  }

  //左侧配置面板
  .config-panel {
    width: 420px;
    min-width: 360px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    .config-tabs {
      padding: 16px 20px 0;

      :deep(.ant-tabs-nav::before) {
        border-bottom: none;
      }
      :deep(.ant-tabs-tab) {
        padding: 8px 0;
        margin: 0 24px 0 0;
        font-size: 15px;
        &.ant-tabs-tab-active .ant-tabs-tab-btn {
          color: #00b96b;
          font-weight: 600;
        }
      }
      :deep(.ant-tabs-ink-bar) {
        background: #00b96b;
      }
    }

    .form-scroll {
      flex: 1;
      overflow-y: auto;
      padding: 0 20px 8px;
    }

    .action-bar {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 12px 20px 16px;
      border-top: 1px solid #f0f0f0;

      .gen-btn {
        height: 40px;
        padding: 0 40px;
        font-size: 15px;
        background: #00b96b;
        border-color: #00b96b;
        border-radius: 20px;
        &:hover {
          background: #00d97e;
          border-color: #00d97e;
        }
      }
    }

    //单件服装上传
    .cloth-upload-area {
      width: 100%;
      height: 200px;
      border: 1.5px dashed #d9d9d9;
      border-radius: 8px;
      cursor: pointer;
      overflow: hidden;
      transition: border-color 0.2s;
      margin-bottom: 16px;

      &:hover {
        border-color: #1890ff;
      }

      .upload-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: #fafafa;

        .upload-text {
          font-size: 13px;
          color: #aaa;
        }
      }

      .uploaded-img-box {
        position: relative;
        width: 100%;
        height: 100%;

        .uploaded-img {
          width: 100%;
          height: 100%;
          object-fit: cover;
          display: block;
        }

        .img-mask {
          position: absolute;
          inset: 0;
          background: rgba(0, 0, 0, 0.4);
          display: none;
          align-items: center;
          justify-content: center;
          cursor: pointer;
        }

        &:hover .img-mask {
          display: flex;
        }
      }
    }

    //多件服装上传
    .multi-cloth-container {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;

      .cloth-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;

        .cloth-label {
          font-size: 12px;
          font-weight: 600;
          color: #1f2329;
        }

        .upload-placeholder {
          flex: 1;
          border: 1.5px dashed #d9d9d9;
          border-radius: 8px;
          cursor: pointer;
          overflow: hidden;
          transition: border-color 0.2s;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          gap: 8px;
          background: #fafafa;

          &:hover {
            border-color: #1890ff;
          }

          .upload-text {
            font-size: 12px;
            color: #aaa;
          }
        }

        .uploaded-img-box {
          position: relative;
          flex: 1;
          border-radius: 8px;
          overflow: hidden;

          .uploaded-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
          }

          .img-mask {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.4);
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
          }

          &:hover .img-mask {
            display: flex;
          }
        }
      }
    }

    //视频提示
    .ai-notice {
      margin-top: 10px;

      :deep(.ant-alert) {
        font-size: 12px;
        padding: 8px 12px;
        border-radius: 6px;
      }

      :deep(.ant-alert-message) {
        font-size: 12px;
      }
    }

    //区块
    .section-block {
      margin-top: 16px;

      .section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;

        .section-title {
          font-size: 14px;
          font-weight: 600;
          color: #1f2329;
        }
      }
    }
  }

  // 状态
  .empty-state {
    text-align: center;
    color: #8f959e;
    p {
      margin-top: 16px;
    }
  }

  .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  // 结果展示
  .result-image-wrapper,
  .result-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

    .result-image,
    .result-video {
      width: 100%;
      height: 100%;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      object-fit: contain;
    }

    .hover-actions {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.4);
      display: none;
      align-items: center;
      justify-content: center;
      gap: 16px;
      border-radius: 8px;
      backdrop-filter: blur(2px);
    }

    &:hover .hover-actions {
      display: flex;
    }
  }

  //右侧预览面板
  .preview-panel {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    .preview-content {
      flex: 1;
      background: #f7f8fc;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
      margin: 16px;
    }
  }
}
