/* Refer Friend Page Styles */

/* Section 1: Hero Banner */
.refer-hero {
  width: 100%;
  background-image: url('/element/img/refer-friend/banner.png'); /* 背景图片，请替换为实际图片路径 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 20px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.refer-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1BA1FF 0%, #1962EB 100%); /* 蒙层使用渐变蓝色 */
  opacity: 0.05; /* 调整蒙层透明度，可根据需要修改 */
  z-index: 0;
}

.refer-hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: rgba(243, 250, 255, 0.9);
  border-radius: 20px;
  padding: 50px 40px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.refer-hero-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
  color: #0f294d;
}

.refer-hero-subtitle {
  font-size: 20px;
  margin-bottom: 40px;
  line-height: 1.6;
  color: #24324a;
}

.refer-hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.refer-hero-btn {
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
}

.refer-hero-btn-primary {
  background: #ffc11c;
  color: #222;
  box-shadow: 0 4px 15px rgba(255, 193, 28, 0.4);
}

.refer-hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 193, 28, 0.5);
}

.refer-hero-btn-secondary {
  background: #3E8AFF;
  color: #fff;
}

.refer-hero-btn-secondary:hover {
  background: #3E8AFF;
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

/* Container */
.refer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Section Titles */
.refer-section-title {
  font-size: 36px;
  font-weight: 700;
  color: #0f294d;
  text-align: center;
  margin-bottom: 15px;
}

.refer-section-subtitle {
  font-size: 18px;
  color: #5b6b85;
  text-align: center;
  margin-bottom: 50px;
}

/* Section 2: Steps */
.refer-steps {
  padding: 80px 0;
  background: #f8f9fa;
}

.refer-steps-grid {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  margin-top: 60px;
  gap: 15px;
  position: relative;
}

.refer-step-card {
  background: #fff;
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  align-items: center;
}

.refer-step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.refer-step-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.refer-step-card-1 .refer-step-icon {
  background: #2b7fff;
  color: #ffffff;
}

.refer-step-card-2 .refer-step-icon {
  background: #00b8db;
  color: #ffffff;
}

.refer-step-card-3 .refer-step-icon {
  background: #ad46ff;
  color: #ffffff;
}

.refer-step-card-4 .refer-step-icon {
  background: #fe9a00;
  color: #ffffff;
}

.refer-step-card:hover .refer-step-icon {
  transform: scale(1.1);
}

.refer-step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1BA1FF, #1962EB);
}

.refer-step-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.refer-step-number {
  font-size: 16px;
  font-weight: 700;
  color: #1BA1FF;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.refer-step-title {
  font-size: 19px;
  font-weight: 700;
  color: #0f294d;
  margin-bottom: 12px;
  line-height: 1.4;
}

.refer-step-description {
  font-size: 15px;
  color: #5b6b85;
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

.refer-step-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1BA1FF;
  font-size: 28px;
  opacity: 0.6;
  width: 40px;
}

/* Section 3: Benefits */
.refer-benefits {
  padding: 80px 0;
  background: #fff;
}

.refer-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.refer-benefit-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #e5e9f2;
  border-radius: 20px;
  padding: 40px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.refer-benefit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #1BA1FF, #1962EB);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.refer-benefit-card:hover {
  border-color: #1BA1FF;
  box-shadow: 0 12px 40px rgba(27, 161, 255, 0.15);
  transform: translateY(-5px);
}

.refer-benefit-card:hover::before {
  transform: scaleX(1);
}

/* 卡片1 - 蓝色主题 */
.refer-benefit-card-1 {
  background: linear-gradient(135deg, #E8F4FF 0%, #F0F8FF 100%);
  border-color: #B3D9FF;
}

.refer-benefit-card-1::before {
  background: linear-gradient(90deg, #2b7fff, #1BA1FF);
}

.refer-benefit-card-1:hover {
  border-color: #2b7fff;
  box-shadow: 0 12px 40px rgba(43, 127, 255, 0.2);
}

/* 卡片2 - 橙色主题 */
.refer-benefit-card-2 {
  background: linear-gradient(135deg, #FFF4E6 0%, #FFFBF0 100%);
  border-color: #FFD9B3;
}

.refer-benefit-card-2::before {
  background: linear-gradient(90deg, #fe9a00, #FFB84D);
}

.refer-benefit-card-2:hover {
  border-color: #fe9a00;
  box-shadow: 0 12px 40px rgba(254, 154, 0, 0.2);
}

.refer-benefit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 30px;
}

.refer-benefit-icon {
  width: 60px;
  height: 60px;
  background: #00b8db;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
}

.refer-benefit-card-2 .refer-benefit-icon {
  background: #fe9a00;
}

.refer-benefit-label {
  font-size: 14px;
  font-weight: 400;
  color: #0a0a0a;
  background: #ffffff;
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.refer-benefit-content {
  text-align: left;
}

.refer-benefit-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f294d;
  margin-bottom: 20px;
}

.refer-benefit-points {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 15px;
}

.refer-benefit-points-number {
  font-size: 56px;
  font-weight: 700;
  color: #1BA1FF;
  line-height: 1;
}

.refer-benefit-card-2 .refer-benefit-points-number {
  color: #f54a00;
}

.refer-benefit-points-unit {
  font-size: 24px;
  font-weight: 600;
  color: #1BA1FF;
}
.refer-benefit-card-2 .refer-benefit-points-unit{
  color: #f54a00;
}
.refer-benefit-subtitle {
  font-size: 16px;
  color: #5b6b85;
  margin-bottom: 20px;
  font-weight: 600;
}

.refer-benefit-description {
  font-size: 15px;
  color: #24324a;
  line-height: 1.7;
  margin: 0;
  background: #fff;
  padding: 10px;
  border-radius: 12px;
}

/* Section 4: Share */
.refer-share {
  padding: 80px 0;
  background-image: url('/element/img/refer-friend/share_bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.refer-share::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #155dfc 0%, #00b8db 100%);
  opacity: 0.8;
  z-index: 0;
}

.refer-share .refer-container {
  position: relative;
  z-index: 1;
}

.refer-share .refer-section-title {
  color: #ffffff;
}

.refer-share .refer-section-subtitle {
  color: rgba(255, 255, 255, 0.95);
}

.refer-share-description {
  text-align: center;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 50px;
}

.refer-share-code-box {
  max-width: 800px;
  margin: 0 auto 30px;
  background: #fff;
  padding: 10px 10px 10px 30px;
  border-radius: 12px;
}

.refer-share-code-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-end;
  max-width: 100%;
}

.refer-share-code-value {
  flex: 0 0 70%;
  font-size: 14px;
  font-weight: 400;
  color: #333;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 12px;
  text-align: left;
  line-height: 1.4;
  outline: none;
  cursor: default;
  resize: none;
  /* 桌面端：单行显示，不换行 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 44px;
  min-height: 44px;
}

.refer-share-code-value:focus {
  outline: none;
}

.refer-share-copy-btn {
  flex: 0 0 30%;
  background: #155dfc;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.refer-share-copy-btn:hover {
  background: #0f4dd4;
}

.refer-share-copy-btn:active {
  transform: translateY(0);
}

.refer-share-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.refer-share-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  justify-content: center;
}

.refer-share-btn i {
  color: #ffffff;
}

.refer-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.refer-share-btn-email {
  color: #ffffff;
}

.refer-share-btn-email:hover {
  color: #ffffff;
}

.refer-share-btn-line {
  color: #ffffff;
}

.refer-share-btn-line:hover {
  color: #ffffff;
}

.refer-share-note {
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 30px;
}

/* Logged Out State */
.refer-share-logged-out {
  background: #fff;
  border: 2px solid #e5e9f2;
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.refer-share-logged-out-content {
  max-width: 600px;
  margin: 0 auto;
}

.refer-share-logged-out-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #f0f5ff, #e8f0ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  color: #1BA1FF;
  font-size: 48px;
}

.refer-share-logged-out-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

.refer-share-logged-out-description {
  font-size: 16px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 40px;
}

.refer-share-logged-out-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Section 5: FAQ */
.refer-faq {
  padding: 80px 0;
  background: #fff;
}

.refer-faq-list {
  max-width: 900px;
  margin: 50px auto 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.refer-faq-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #fff;
}

.refer-faq-item:hover {
  border: 1px solid #bedbff;
}

.refer-faq-question {
  padding: 24px 30px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  font-size: 18px;
  font-weight: 400;
  color: #0f294d;
  transition: all 0.3s ease;
}

.refer-faq-question i {
  color: #99a1af;
  transition: transform 0.3s ease;
}

.refer-faq-item.active .refer-faq-question i {
  transform: rotate(180deg);
}

.refer-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 30px;
}

.refer-faq-item.active .refer-faq-answer {
  max-height: 500px;
  padding: 24px 30px;
}

.refer-faq-answer p {
  font-size: 16px;
  color: #5b6b85;
  line-height: 1.7;
  margin: 0;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .refer-steps-grid {
    flex-wrap: wrap;
    gap: 30px;
  }
  
  .refer-step-card {
    flex: 0 0 calc(50% - 15px);
    min-width: 0;
  }
  
  .refer-step-arrow {
    display: none;
  }
  
  .refer-benefits-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 767px) {
  .refer-hero {
    padding: 60px 20px;
  }
  
  .refer-hero-content {
    padding: 35px 25px;
    border-radius: 16px;
  }
  
  .refer-hero-title {
    font-size: 28px;
  }
  
  .refer-hero-subtitle {
    font-size: 16px;
  }
  
  .refer-hero-btn {
    min-width: 100%;
    padding: 14px 30px;
    font-size: 16px;
  }
  
  .refer-hero-buttons {
    flex-direction: column;
  }
  
  .refer-section-title {
    font-size: 28px;
  }
  
  .refer-section-subtitle {
    font-size: 16px;
  }
  
  .refer-steps {
    padding: 60px 0;
  }
  
  .refer-steps-grid {
    flex-direction: column;
    gap: 30px;
  }
  
  .refer-step-card {
    flex: 1;
    width: 100%;
    padding: 30px 20px;
    min-height: auto;
  }
  
  .refer-step-icon {
    width: 48px;
    height: 48px;
  }
  
  .refer-step-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .refer-step-arrow {
    display: none;
  }
  
  .refer-benefits {
    padding: 60px 0;
  }
  
  .refer-benefit-card {
    padding: 30px 20px;
  }
  
  .refer-benefit-points-number {
    font-size: 42px;
  }
  
  .refer-share {
    padding: 60px 0;
  }
  
  .refer-share-code-box {
    padding: 30px 20px;
  }
  
  .refer-share-code-wrapper {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .refer-share-code-value {
    flex: 1 1 100%;
    min-width: 0;
    /* 移动端：允许换行 */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    height: auto;
    min-height: 44px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-all;
  }
  
  .refer-share-copy-btn {
    flex: 1 1 auto;
    min-width: 120px;
    justify-content: center;
  }
  
  .refer-share-buttons {
    flex-direction: column;
  }
  
  .refer-share-btn {
    min-width: 100%;
  }
  
  .refer-share-logged-out {
    padding: 40px 20px;
  }
  
  .refer-share-logged-out-buttons {
    flex-direction: column;
  }
  
  .refer-faq {
    padding: 60px 0;
  }
  
  .refer-faq-question {
    padding: 20px;
    font-size: 16px;
  }
  
  .refer-faq-answer {
    padding: 0 20px;
  }
  
  .refer-faq-item.active .refer-faq-answer {
    padding: 20px;
  }
}
