.contents.referral-contents {
  width: min(100%, 1296px);
  max-width: 1296px;
  padding: 0 24px;
  box-sizing: border-box;
}

.referral-contents > .breadcrumb {
  margin: 0 0 18px;
  padding: 16px 0 0;
}

.referral-contents > .page-title {
  margin: 0 0 28px;
  padding: 4px 0 0;
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  color: #ffffff;
}

.referral-page {
  min-height: 0;
  padding: 0 0 48px;
  color: #ffffff;
  overflow-x: hidden;
}

.referral__top {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: flex-start;
  gap: 26px;
  min-width: 0;
}

.referral__top_left_side {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.referral__top_right_side {
  min-width: 0;
}

.referral__lvl-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.referral__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.referral__lvl-name {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
}

.referral__lvl-gain {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 15px;
}

.referral__gain.user {
  color: #ffffff;
  font-weight: 600;
}

.referral__gain span {
  font-weight: 600;
}

.referral__promocode {
  max-width: 520px;
  margin-bottom: 28px;
}

.referral__promocode-label {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 8px;
}

.referral-topbar__promocode-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 520px;
}

.referral-topbar__promocode-input {
  flex: 1;
  min-width: 0;
}

.referral-topbar__promocode-field {
  width: 100%;
  height: 42px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #9ca3af;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.referral-topbar__promocode-field:focus {
  border-color: #fbbf24;
}

.referral-topbar__promocode-field::placeholder {
  color: #6b7280;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn_size-fill {
  width: auto;
}

.btn_type-fullwidth {
  width: 100%;
}

.btn_color-success {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #0f172a;
}

.btn_uppercase {
  text-transform: uppercase;
}

.btn__content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 14px;
}

.btn__label {
  letter-spacing: 0.5px;
}

.btn_color-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* Stats Section */
.referral__stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin-bottom: 34px;
}

.stat-card {
  min-width: 0;
  min-height: 106px;
  background: #08111a;
  border: 1px solid rgba(104, 120, 148, 0.14);
  border-radius: 8px;
  padding: 18px 20px;
  transition: transform 0.2s, background 0.2s;
}

.stat-card:hover {
  background: #0a1520;
  transform: translateY(-2px);
}

.stat-title {
  color: #687894;
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 500;
}

.stat-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 100%;
  height: 100%;
}

.stat-value {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-value span {
  font-size: 16px;
  color: #6b7280;
  font-weight: 400;
}

.stat-value b {
  font-weight: 700;
}

/* Bottom Levels Section */
.referral__bottom {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.referral__levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.referral__levels-item {
  min-width: 0;
  background: #08111a;
  border: 1px solid rgba(104, 120, 148, 0.14);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.referral__levels-item:only-child {
  grid-column: 1 / -1;
}

.referral__levels-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.08);
}

.referral__levels-item:nth-child(2) {
  border-color: rgba(251, 191, 36, 0.2);
}

.referral__levels-item:nth-child(3) {
  border-color: rgba(148, 163, 184, 0.2);
}

.referral__levels-image {
  margin-bottom: 16px;
}

.referral__levels-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.referral-level__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.referral-level__name {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.referral-level__terms {
  margin-bottom: 8px;
}

.referral-level__terms-label {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 6px;
}

.referral-level__terms-value {
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.referral-level__benefits {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
}

.referral-level__benefit {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.referral-level__benefit-label {
  color: #6b7280;
  font-size: 13px;
}

.referral-level__benefit-value {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 968px) {
  .referral__levels {
    grid-template-columns: 1fr;
  }

  .referral__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .contents.referral-contents {
    padding: 0 12px;
  }

  .referral-contents > .breadcrumb {
    margin-bottom: 18px;
  }

  .referral-contents > .page-title {
    margin-bottom: 20px;
    text-align: left;
    font-size: 18px;
    text-transform: none;
  }

  .referral-page {
    padding: 0 0 44px;
  }

  .referral__top {
    flex-direction: column;
    display: flex;
    gap: 16px;
  }

  .referral__top_right_side {
    width: 100%;
  }

  .referral__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .referral-topbar__promocode-form {
    flex-direction: column;
    max-width: none;
  }

  .referral__stats {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 32px;
  }

  .referral__lvl-img {
    width: 60px;
    height: 60px;
  }

  .referral__lvl-name {
    font-size: 24px;
  }

  .stat-card {
    padding: 16px;
  }

  .referral__levels-item {
    padding: 20px;
  }

  .referral-level__terms-value {
    font-size: 26px;
  }

  .referral-level__benefits {
    gap: 12px;
  }
}
