/* 定义全局变量 */
:root {
    --ion-color-primary: #488aff;
    --ion-color-light: #ffffff;
    --ion-color-primary-darkened: #3b79e6; /* 手动计算的颜色值 */
}

/* 设置页面整体背景 */
.invite-content {
    background: linear-gradient(135deg, #f7f7f7, #eaf5ff);
    padding: 20px;
}

/* 欢迎信息 */
.welcome-message {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
    color: var(--ion-color-primary);
    font-weight: bold;
    padding: 16px;
    border-radius: 8px;
    background: rgba(72, 138, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* 描述性文本 */
.invite-description {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
}

/* 邀请按钮 */
.invite-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 16px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--ion-color-primary), var(--ion-color-primary-darkened));
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    &:hover,
    &:focus {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }

    &:active {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transform: translateY(2px);
    }
}

/* 图标样式 */
.invite-icon {
    color: var(--ion-color-light);
    font-size: 1.5rem;
    margin-right: 10px;
    transition: transform 0.3s ease;

    .invite-button:hover &,
    .invite-button:focus & {
        transform: scale(1.2);
    }
}

/* 社交分享按钮 */
.social-sharing {
    margin-top: 24px;
    text-align: center;

    ion-button {
        margin: 8px 0;
        width: 80%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 邀请链接部分 */
.invite-link-section {
    margin-top: 24px;
    text-align: center;

    ion-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

        ion-button {
            margin-left: 8px;
        }
    }
}

/* 成就或进度展示 */
.achievement-section {
    margin-top: 24px;
    padding: 16px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
  
    h3 {
      font-size: 1.2rem;
      color: var(--ion-color-primary);
      margin-bottom: 16px;
    }
  
    .achievements-container {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 16px; /* 使用gap属性为成就项之间提供间距 */
    }
  
    .achievement-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: calc(33.333% - 32px); /* 适应三列布局，并考虑间隙 */
      padding: 12px;
      background-color: #f9f9f9;
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
  
      &:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      }
  
      .achievement-icon {
        font-size: 1.5rem;
        color: var(--ion-color-primary);
        margin-right: 8px;
        transition: transform 0.3s ease;
  
        & + span {
          flex-grow: 1;
        }
  
        .achievement-item:hover & {
          transform: scale(1.2);
        }
      }
  
      ion-button {
        --background-focused: transparent;
        --color: var(--ion-color-primary);
        --border-radius: 50%;
        padding: 0;
        margin-left: 8px;
      }
    }
  }

/* 推荐理由 */
.recommendation-section {
    margin-top: 24px;
    padding: 16px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
  
    h3 {
      font-size: 1.2rem;
      color: var(--ion-color-primary);
      margin-bottom: 16px;
    }
  
    ul {
      list-style-type: none;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 12px; /* 使用gap属性为列表项之间提供间距 */
    }
  
    li {
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      color: #333;
      padding: 8px;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
  
      &:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      }
    }
  
    .reason-icon {
      font-size: 1.5rem;
      margin-right: 8px;
      color: var(--ion-color-primary);
      transition: transform 0.3s ease;
  
      & + span {
        flex-grow: 1;
      }
  
      li:hover & {
        transform: scale(1.2);
      }
    }
  }