// 星妈实验室发布页面样式
.xingmalabpublishpage {
  width: 750rpx;
  height: 1624rpx;
  left: 0rpx;
  top: 0rpx;
  position: absolute;

  .xingmalabpublishpagebg {
    width: 750rpx;
    height: 1624rpx;
    left: 0rpx;
    top: 0rpx;
    position: absolute;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }

  // 返回按钮
  .xingmalabpublishpagebackbtn {
    width: 20rpx;
    height: 33rpx;
    left: 31rpx;
    top: 88rpx;
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1000;
    transition: opacity 0.3s ease;

    &:hover {
      opacity: 0.8;
    }
  }

  // 未选择状态
  .xingmalabpublishpagenosel {
    width: 750rpx;
    height: 1416rpx;
    left: 0rpx;
    top: 308rpx;
    position: absolute;

    .xingmalabpublishpagenoseltextplaceholder {
      width: 684rpx;
      height: 160rpx;
      left: 33rpx;
      top: 1129rpx;
      position: absolute;
      font-size: 32rpx;
      line-height: 1.5;
      color: rgba(0, 0, 0, 1);
      border: none;
      background: transparent;
      resize: none;
      outline: none;

      &::placeholder {
        color: rgba(189, 191, 195, 1);
      }
    }

    .xingmalabpublishpagenoselbottomcon {
      width: 750rpx;
      height: 218rpx;
      left: 0rpx;
      top: 1378rpx;
      position: absolute;

      .xingmalabpublishpagenoselbottomconbg {
        width: 750rpx;
        height: 218rpx;
        left: 0rpx;
        top: 0rpx;
        position: absolute;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
      }

      .xingmalabpublishpagenoselbottomconbtn {
        width: 686rpx;
        height: 94rpx;
        left: 32rpx;
        top: 32rpx;
        position: absolute;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;

        transition: opacity 0.3s ease;

        &:hover {
          opacity: 0.8;
        }
      }
    }

    .xingmalabpublishpagenoselbtn {
      width: 686rpx;
      height: 912rpx;
      left: 32rpx;
      top: 180rpx;
      position: absolute;
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center;

      transition: opacity 0.3s ease;

      &:hover {
        opacity: 0.8;
      }
    }
  }

  // 主内容区域（整合未选择状态和选择状态）
  .xingmalabpublishpagenosel {
    // 选择状态下的文案输入框样式
    &:has(.xingmalabpublishpageselbottomcon)
      .xingmalabpublishpagenoseltextplaceholder {
      width: 684rpx;
      height: 160rpx;
      left: 33rpx;
      top: 1129rpx;
      color: rgba(0, 0, 0, 1);
    }

    // 选择状态下的底部按钮区域
    .xingmalabpublishpageselbottomcon {
      width: 750rpx;
      height: 218rpx;
      left: 0rpx;
      top: 1378rpx;
      position: absolute;

      .xingmalabpublishpageselbottomconpublishbtnbg {
        width: 750rpx;
        height: 218rpx;
        left: 0rpx;
        top: 0rpx;
        position: absolute;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
      }

      .xingmalabpublishpageselbottomconpublishbtn {
        width: 686rpx;
        height: 94rpx;
        left: 32rpx;
        top: 32rpx;
        position: absolute;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;

        transition: opacity 0.3s ease;

        &:hover {
          opacity: 0.8;
        }

        // 禁用状态样式
        &.disabled-publish-btn {
          opacity: 0.5;
          cursor: not-allowed;
          pointer-events: none;

          &:hover {
            opacity: 0.5;
          }
        }
      }
    }

    // 已上传图片显示
    .xingmalabpublishpageselpic {
      width: 686rpx;
      height: 912rpx;
      left: 32rpx;
      top: 180rpx;
      position: absolute;
      object-fit: contain;
      border-radius: 16rpx;
      background-color: #f8f9fa;
    }

    .xingmalabpublishpageselcpver {
      width: 686rpx;
      height: 189rpx;
      left: 32rpx;
      top: 903rpx;
      position: absolute;
      opacity: 0.3;
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center;
    }

    .xingmalabpublishpageselretry {
      width: 270rpx;
      height: 76rpx;
      left: 240rpx;
      top: 984rpx;
      position: absolute;
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center;

      transition: opacity 0.3s ease;

      &:hover {
        opacity: 0.8;
      }
    }
  }

  // 成功状态
  .xingmalabpublishpagesuc {
    width: 750rpx;
    height: 1416rpx;
    left: 0rpx;
    top: 308rpx;
    position: absolute;

    .xingmalabpublishpagesucbottomconicon {
      width: 133rpx;
      height: 152rpx;
      left: 314rpx;
      top: 182rpx;
      position: absolute;
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center;
    }

    .xingmalabpublishpagesucbottomcon {
      width: 750rpx;
      height: 218rpx;
      left: 0rpx;
      top: 1375rpx;
      position: absolute;

      .xingmalabpublishpagesucbottomconbg {
        width: 750rpx;
        height: 218rpx;
        left: 0rpx;
        top: 0rpx;
        position: absolute;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
      }

      .xingmalabpublishpagesucbottomconbtn {
        width: 686rpx;
        height: 94rpx;
        left: 32rpx;
        top: 32rpx;
        position: absolute;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;

        transition: opacity 0.3s ease;

        &:hover {
          opacity: 0.8;
        }
      }
    }

    .xingmalabpublishpagesucdesc {
      width: 538rpx;
      height: 117rpx;
      left: 111rpx;
      top: 371rpx;
      position: absolute;
      font-size: 30rpx;
      color: rgba(29, 30, 37, 1);
      line-height: 1.5;
      text-align: left;
    }

    .xingmalabpublishpagesucpicbg {
      width: 576rpx;
      height: 812rpx;
      left: 87rpx;
      top: 521rpx;
      position: absolute;
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center;
    }

    .xingmalabpublishpagesucpic {
      width: 534rpx;
      height: 708rpx;
      left: 108rpx;
      top: 536rpx;
      position: absolute;
      object-fit: contain;
      border-radius: 16rpx;
      background-color: #f8f9fa;
    }

    .xingmalabpublishpagesucnum {
      width: 222rpx;
      height: 25rpx;
      left: 271rpx;
      top: 1261rpx;
      position: absolute;
      font-size: 32rpx;
      line-height: 25rpx;
      color: rgba(178, 124, 30, 1);
      text-align: center;
    }
  }
}

// 确认发布弹窗样式
.confirm-popup {
  background: white;
  border-radius: 24rpx;
  padding: 40rpx;
  width: 600rpx;
  max-width: 90vw;

  .confirm-title {
    font-size: 36rpx;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40rpx;
    color: #333;
  }

  .confirm-content {
    margin-bottom: 40rpx;

    .confirm-image {
      width: 100%;
      height: 300rpx;
      margin-bottom: 20rpx;
      border-radius: 16rpx;
      overflow: hidden;

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

    .confirm-description {
      font-size: 28rpx;
      color: #666;
      line-height: 1.5;
      text-align: center;
      padding: 20rpx;
      background-color: #f8f9fa;
      border-radius: 12rpx;
      min-height: 80rpx;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  .confirm-actions {
    display: flex;
    gap: 20rpx;

    .confirm-btn {
      flex: 1;
      height: 80rpx;
      border-radius: 40rpx;
      font-size: 28rpx;
      border: none;

      transition: all 0.3s ease;

      &.cancel {
        background-color: #f0f0f0;
        color: #666;

        &:hover {
          background-color: #e0e0e0;
        }
      }

      &.confirm {
        background-color: #007aff;
        color: white;

        &:hover {
          background-color: #0056cc;
        }
      }
    }
  }
}

// 响应式适配
@media screen and (max-width: 750px) {
  .xingmalabpublishpage {
    width: 100vw;
    height: 100vh;

    .xingmalabpublishpagebg,
    .xingmalabpublishpagenosel,
    .xingmalabpublishpagesel,
    .xingmalabpublishpagesuc {
      width: 100%;
      height: 100%;
      left: 0;
      top: 0;
    }

    .collection-image-area,
    .collection-description-area {
      position: relative;
      left: auto;
      top: auto;
      margin: 20rpx auto;
      width: 90%;
    }
  }
}

// 动画效果
.xingmalabpublishpage {
  .xingmalabpublishpagenosel,
  .xingmalabpublishpagesel,
  .xingmalabpublishpagesuc {
    animation: fadeIn 0.5s ease-in-out;
  }

  .collection-image-area,
  .collection-description-area {
    animation: slideInUp 0.8s ease-out 0.3s both;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50rpx);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

// 上传状态样式
.upload-placeholder {
  &.uploading {
    opacity: 0.7;
    pointer-events: none;
  }
}

// 文案输入框焦点样式
.description-textarea {
  &:focus {
    box-shadow: 0 0 0 4rpx rgba(0, 122, 255, 0.2);
  }
}

// 用户信息授权弹窗样式
.user-info-popup {
  background: white;
  border-radius: 24rpx 24rpx 0 0;
  padding: 0;
  width: 100%;
  height: auto;
  position: absolute;
  bottom: -80rpx;
  max-height: 80vh;

  .user-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40rpx 40rpx 20rpx;
    border-bottom: 1rpx solid #ffffff;

    .header-left {
      display: flex;
      align-items: center;

      .xingma-logo {
        width: 40rpx;
        height: 40rpx;
        margin-right: 16rpx;
        border-radius: 60rpx;
        border: none;
      }

      .app-name {
        font-size: 32rpx;
        font-weight: bold;
        color: #333;
      }
    }
  }

  .user-info-title {
    font-size: 36rpx;
    font-weight: bold;
    text-align: left;
    padding: 40rpx 40rpx 20rpx;
    color: #333;
  }

  .user-info-content {
    padding: 0 40rpx 40rpx;

    .user-profile {
      display: flex;
      align-items: center;
      padding: 30rpx 0;
      border-bottom: 1rpx solid #f0f0f0;
      margin-bottom: 30rpx;

      .avatar-section {
        margin-right: 30rpx;

        .avatar-btn {
          width: 120rpx;
          height: 120rpx;
          border-radius: 12rpx;
          border: none !important;
          padding: 0;
          background: transparent;
          position: relative;

          &::after {
            border: none !important;
          }

          .avatar-image {
            width: 100%;
            height: 100%;
            border-radius: 12rpx;
            border: none;
            object-fit: contain;
            background-color: #f8f9fa;
          }

          .avatar-placeholder {
            width: 100%;
            height: 100%;
            border-radius: 12rpx;
            background-color: #ffffff;
            display: flex;
            align-items: center;
            border: none;
            justify-content: center;

            .avatar-icon {
              width: 100%;
              height: 100%;
              border-radius: 12rpx;
              border: none;
              background-size: cover;
              background-repeat: no-repeat;
              background-position: center;
            }
          }
        }
      }

      .nickname-section {
        flex: 1;

        .nickname-input {
          width: 100%;
          height: 60rpx;
          border: none;
          background: transparent;
          font-size: 32rpx;
          color: #333;
          margin-bottom: 10rpx;

          &::placeholder {
            color: #999;
          }
        }

        .nickname-label {
          font-size: 24rpx;
          color: #999;
        }
      }

      .check-icon {
        margin-left: 20rpx;

        .check-mark {
          width: 40rpx;
          height: 40rpx;
          border-radius: 50%;
          background-color: #07c160;
          color: white;
          font-size: 24rpx;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: bold;
        }
      }
    }
  }

  .user-info-actions {
    display: flex;
    // padding: 0 40rpx 40rpx;
    // gap: 20rpx;
    margin-top: 0;
    height: 180rpx;
    justify-content: center;

    .action-btn {
      // flex: 1;
      height: 88rpx;
      width: 200rpx;
      font-size: 32rpx;
      border: none !important;
      position: relative;
      margin: 0 20rpx;

      &::after {
        border: none !important;
      }

      &.reject-btn {
        background-color: #f0f0f0;
        color: #666;

        &:hover {
          background-color: #f0f0f0;
        }
      }

      &.allow-btn {
        background-color: #07c160;
        color: white;

        &:hover:not(:disabled) {
          background-color: #06ad56;
        }

        &:disabled {
          background-color: #ccc;
          color: #999;
        }
      }
    }
  }
}

// 调试信息样式
.debug-info {
  position: absolute;
  top: 20rpx;
  right: 20rpx;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 20rpx;
  border-radius: 10rpx;
  font-size: 24rpx;
  z-index: 100;
  max-width: 300rpx;

  .debug-text {
    display: block;
    margin-bottom: 10rpx;
    line-height: 1.4;
  }
}
