* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #000;
  line-height: 1.5;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #000A23;
  color: #ffffff;
  position: sticky;
  top: 0;
}

header h1 {
  font-size: 22px;
  font-weight: 800;
}

.cta-btns {
  display: flex;
  gap: 12px;
}

.cta-btns button {
  background: #eee;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.cta-btns button svg {
  stroke: #f4c542;
  width: 20px;
  height: 20px;
}
.referral-dashboard{
  padding: 12px;
  margin: 20px;
  box-shadow: 0px 8px 12px #dddddd;
  border-radius: 12px;
  border: 1px solid #dddddd;
}
.referral-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

.label {
  font-size: 14px;
  color: #000A23;
  font-weight: 700;
  margin-bottom: 0px;
}

.referral-code {
  display: flex;
  gap: 8px;
  border: 1px solid #000A23;
  border-radius: 8px;
  padding: 6px 12px;
}

.code {
  font-size: 20px;
  font-weight: 700;
  color: #f4c542;
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-btn {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn svg {
  width: 16px;
  height: 16px;
  stroke: #000A23;
}

.btns {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btns button {
  border: none;
  background: none;
  padding: 8px 12px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.1);
}

.btns button:nth-child(2) {
  background: #000A23;
  color: #ffffff;
}

.btns button svg {
  stroke: #000A23;
  width: 18px;
  height: 18px;
}
.earnings-c{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}
.earning-card{
  text-align: center;
}
.earning-value{
  font-size: 24px;
  font-weight: bold;
  color:#f4c542;
}
.earning-label{
  font-size: 14px;
  font-weight: bold;
}
/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  padding: 12px;
  margin: 20px;
  box-shadow: 0px 8px 12px #dddddd;
  border-radius: 12px;
  border: 1px solid #dddddd;
}

.stat-card {
  background: #ffffff;
  padding: 12px;
  text-align: center;
}

.stat-value {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dddddd;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  font-weight: bold;
  color:#000A23;
}

.stat-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #f4c542;
}

.steps-c {
  text-align: center;
  gap: 12px;
  padding: 12px;
  margin: 20px;
  box-shadow: 0px 8px 12px #dddddd;
  border-radius: 12px;
  border: 1px solid #dddddd;
}

/* How You Earn */
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #000A23;
}

.section-sub {
  color: #808080;
  font-size: 14px;
  margin-bottom: 20px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.step {
  text-align: center;
  border-radius: 8px;
  padding: 20px;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dddddd;
  border: 1px solid #dddddd;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.step-icon svg {
  width: 20px;
  height: 20px;
  stroke: #000A23;
}

.step-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: #f4c542;
}

.note {
  padding: 12px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 700;
  color: #000A23;
}
.referral-info-c {
  text-align: center;
  padding: 12px;
  margin: 20px;
  box-shadow: 0px 8px 12px #dddddd;
  border-radius: 12px;
  border: 1px solid #dddddd;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.referral-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.referral-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.referral-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

.referral-table tr:last-child td {
  border-bottom: none;
}

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

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
}

.username {
  font-weight: 500;
}

.earnings {
  font-weight: 600;
  color: #f4c542;
}
footer{
  background: #000A23;
  color:#fff;
}
.notes {
  text-align: center;
  font-size: 16px;
  padding: 20px 8px;
  font-weight: 700;
}

.notes span {
  font-weight: 900;
  color: #f4c542;
}
/* Modal background */
.share-modal {
  display: none; 
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

/* Modal content box */
.share-modal-c {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 1000;
  padding: 20px;
  padding-bottom: 40px;
  border-radius: 10px;
  width: 100%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  animation: fadeIn 1s ease-in-out;
}
.share-modal-c  p{
  text-align: center;
  font-size:20px;
  font-weight: bold;
  margin-bottom: 8px;
}
.share-options  {
  display: flex;
  justify-content: space-between;
}
.share-option {
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.share-option:hover {
  opacity: 0.9;
}
.share-option:nth-child(1) { background: #25D366; color: #fff; } 
.share-option:nth-child(2) { background: #1DA1F2; color: #fff; } 
.share-option:nth-child(3) { background: #1877f2; color: #fff; } 
.share-option:nth-child(4) { background: #ddd; color: #000A23; } 

/* Animation */
@keyframes fadeIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.referral-modal {
  display: none;
  position: fixed;
  inset: 0; 
  background: #fff;
  z-index: 1000;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  animation: modalFadeIn 1s ease-out;
}
.referral-modal-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 12px 4px;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
}

.close {
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  background: none;
  border: none;
  padding: 0 8px;
}
@keyframes modalFadeIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateY(0);
  }
}
.level-modal {
  position: fixed;
  top:0;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.level-modal.active {
  display: flex;
}

.level-modal-c {
  background: #fff;
  width: 100%;
  padding: 18px;
  color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
  height: 100%;
  animation: modalFadeIn 1s ease;
}

.level-modal-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.level-modal-h h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.title-yellow {
  color: #facc15;
}

.level-modal-close {
  font-size: 28px;
  background: none;
  border: none;
  color: #222;
  cursor: pointer;
}
.level-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.level-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.level-info {
  flex: 1;
}

.level-name {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  color:#000A23;
}

.level-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: #aaa;
}
.progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 60px;
}

.progress-text {
  font-size: 14px;
  color: #f4c542;
  margin-bottom: 4px;
  font-weight: bold;
}

@media(min-width:900px){
  .share-modal-c{
    position: relative;
    width:50%;
    justify-self: center;
    animation: fadeIn 0.8s ease;
  }
  .share-modal{
    align-content:center;
  }
  .referral-modal{
    width:50%;
    height:auto;
    justify-self:center;
    align-self:center;
    border-radius:12px;
    max-height: 70%;
    animation:fadeIn 0.8s ease;
  }
  .level-modal-c{
    width:50%;
    height:auto;
    justify-self:center;
    align-self:center;
    border-radius:12px;
    max-height: 70%;
    overflow-y: auto;
    animation: fadeIn 0.8s ease;
  }
}
.level-modal{
  align-content:center;
}
