.version-page {
  min-height: 100vh;
  background: #f5f5f5;
  padding: 24rpx;
  padding-bottom: 120rpx;

  &__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24rpx;
  }

  &__title {
    font-size: 36rpx;
    font-weight: 600;
    color: #333;
  }

  &__publish-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 32rpx;
    font-size: 26rpx;
    padding: 0 28rpx;
    height: 60rpx;
    line-height: 60rpx;

    &::after {
      border: none;
    }
  }

  // 环境 Tab
  &__tabs {
    display: flex;
    background: #fff;
    border-radius: 12rpx;
    padding: 8rpx;
    margin-bottom: 24rpx;
  }

  &__tab {
    flex: 1;
    height: 72rpx;
    line-height: 72rpx;
    text-align: center;
    font-size: 28rpx;
    color: #666;
    border-radius: 8rpx;

    &.active {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: #fff;
    }
  }

  // 列表
  &__list {
    display: flex;
    flex-direction: column;
    gap: 24rpx;
  }

  &__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120rpx 0;

    text {
      font-size: 30rpx;
      color: #999;
    }

    &-hint {
      margin-top: 16rpx;
      font-size: 26rpx !important;
      color: #ccc !important;
    }
  }

  &__loading,
  &__no-more {
    display: flex;
    justify-content: center;
    padding: 32rpx 0;

    text {
      font-size: 26rpx;
      color: #999;
    }
  }
}

// 版本卡片
.version-card {
  background: #fff;
  border-radius: 16rpx;
  padding: 32rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);

  &__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16rpx;
  }

  &__info {
    display: flex;
    align-items: center;
    gap: 16rpx;
  }

  &__name {
    font-size: 32rpx;
    font-weight: 600;
    color: #333;
  }

  &__status {
    font-size: 24rpx;
    padding: 4rpx 12rpx;
    border-radius: 8rpx;
  }

  &__env {
    font-size: 24rpx;
    padding: 4rpx 16rpx;
    border-radius: 8rpx;
    background: #f5f5f5;
  }

  &__current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 24rpx;
    padding: 4rpx 16rpx;
    border-radius: 8rpx;
    margin-bottom: 16rpx;
    display: inline-block;
  }

  &__body {
    background: #fafafa;
    border-radius: 12rpx;
    padding: 24rpx;
    margin-bottom: 16rpx;
  }

  &__row {
    display: flex;
    margin-bottom: 12rpx;

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

  &__label {
    font-size: 26rpx;
    color: #666;
    width: 140rpx;
    flex-shrink: 0;
  }

  &__value {
    font-size: 26rpx;
    color: #333;
    flex: 1;
  }

  &__changelog {
    background: #f0f7ff;
    border-radius: 12rpx;
    padding: 24rpx;
    margin-bottom: 16rpx;

    &-title {
      display: block;
      font-size: 26rpx;
      color: #1890ff;
      margin-bottom: 8rpx;
    }

    &-content {
      display: block;
      font-size: 26rpx;
      color: #333;
      line-height: 1.6;
      white-space: pre-wrap;
    }
  }

  &__footer {
    display: flex;
    justify-content: flex-end;
  }

  &__time {
    font-size: 24rpx;
    color: #999;
  }
}

// 发布弹窗
.version-page__modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;

  &-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
  }

  &-content {
    position: relative;
    width: 100%;
    max-height: 85vh;
    background: #fff;
    border-radius: 32rpx 32rpx 0 0;
    padding: 48rpx 32rpx;
    padding-bottom: calc(48rpx + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  &-title {
    display: block;
    font-size: 36rpx;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 48rpx;
  }
}

.version-page__form {
  &-item {
    margin-bottom: 32rpx;
  }

  &-label {
    display: block;
    font-size: 28rpx;
    color: #333;
    margin-bottom: 16rpx;
  }

  &-input {
    width: 100%;
    height: 88rpx;
    background: #f5f5f5;
    border-radius: 12rpx;
    padding: 0 24rpx;
    font-size: 30rpx;
  }

  &-radio {
    display: flex;
    gap: 24rpx;

    &-item {
      flex: 1;
      height: 72rpx;
      line-height: 72rpx;
      text-align: center;
      background: #f5f5f5;
      border-radius: 12rpx;
      font-size: 28rpx;
      color: #666;

      &.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
      }
    }
  }

  &-textarea {
    width: 100%;
  }
}

.version-page__textarea {
  width: 100%;
  min-height: 180rpx;
  background: #f5f5f5;
  border-radius: 12rpx;
  padding: 24rpx;
  font-size: 30rpx;
  line-height: 1.6;
  box-sizing: border-box;
}

.version-page__modal-actions {
  display: flex;
  gap: 24rpx;
  margin-top: 48rpx;
}

.version-page__modal-btn {
  flex: 1;
  height: 88rpx;
  line-height: 88rpx;
  border-radius: 44rpx;
  font-size: 32rpx;

  &--cancel {
    background: #f5f5f5;
    color: #666;
  }

  &--confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;

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