* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

:root {
  --card: #0f1b47;
  --border: #1f3a8a;
  --blue: #1d4ed8;
  --cyan: #22d3ee;
  --yellow: #facc15;
  --green: #22c55e;
  --text: #ffffff;
  --muted: #9fb0d9;
}

body {
  background: linear-gradient(180deg, #060c24, #0a1233);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 80px;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 10px;
}

.yellow { color: var(--yellow); }

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 4px 14px;
}

.back-btn {
  color: var(--text);
  text-decoration: none;
  font-size: 24px;
}

.header h1 {
  font-size: 20px;
  font-weight: 700;
}

/* Banner */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0ea5a4, #22c55e 60%, #3b82f6);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.banner-img { font-size: 60px; }

.banner-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.banner-text h3 { font-size: 20px; line-height: 1.2; }
.per { font-size: 14px; margin-top: 2px; }
.banner-text .yellow-btn { margin-top: 10px; }

/* Buttons */
.yellow-btn {
  background: var(--yellow);
  color: #222;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.yellow-btn:active,
.copy-btn:active,
.share-btn:active {
  transform: scale(0.97);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Code */
.code-row {
  display: flex;
  gap: 8px;
}

.code-box {
  flex: 1;
  background: var(--blue);
  border-radius: 8px;
  padding: 12px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1px;
}

.copy-btn {
  width: 90px;
  background: #16245e;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

/* Stats */
.stats-wrap { margin-bottom: 12px; }

.stats {
  display: flex;
  gap: 8px;
}

.stat {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--cyan);
  border-radius: 10px;
  padding: 10px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label { font-size: 11px; }
.stat-num { font-size: 24px; font-weight: 800; color: var(--yellow); }

/* How it works */
.how-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.gift { font-size: 40px; line-height: 1; }

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #cfe9ff;
  margin-bottom: 10px;
}

.num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cyan);
  color: #06324a;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.share-btn {
  width: 100%;
  margin-top: 6px;
  background: var(--yellow);
  color: #222;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  background: #070e2b;
  border-top: 1px solid var(--border);
  padding: 8px 4px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 10px;
}

.nav-item .icon { font-size: 20px; }

.nav-item.active {
  color: var(--yellow);
  border: 1px solid var(--yellow);
}
/* ==========================================
   Loading Skeleton (data aane tak chamakdar khali dabbe)
   JS jaise hi code / number likhta hai, ye apne aap hat jate hain
   ========================================== */

/* 1. Chamakne wali pattiyan */
.skeleton-text {
  background: linear-gradient(90deg, #1a2a66 25%, #2e44a0 50%, #1a2a66 75%);
  background-size: 200% 100%;
  animation: pwShimmer 1.5s infinite linear, pwGone 0.3s 15s forwards;
  border-radius: 6px;
}

/* 2. Referral code ke dabbe ke andar */
.skeleton-code {
  width: 60%;
  height: 20px;
}

/* 3. Stats ke number ki jagah */
.skeleton-stat {
  display: block;
  width: 44px;
  height: 28px;
  margin: 0 auto;
  border-radius: 8px;
}

/* 4. Link wali line (code ke neeche) - asli link aate hi hat jati hai */
.skeleton-link-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.skeleton-link-row .skeleton-text:first-child {
  flex: 1;
  height: 40px;
  border-radius: 10px;
}

.skeleton-link-row .skeleton-text:last-child {
  width: 92px;
  height: 40px;
  border-radius: 10px;
}

.card:has(#refLink) .skeleton-link-row { display: none; }

/* 5. Your Friends ki list khali ho to 2 chamakti pattiyan */
#friendsBox:empty::before,
#friendsBox:empty::after {
  content: '';
  display: block;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(90deg, #1a2a66 25%, #2e44a0 50%, #1a2a66 75%);
  background-size: 200% 100%;
  animation: pwShimmer 1.5s infinite linear, pwGone 0.3s 15s forwards;
}

#friendsBox:empty::before { margin-bottom: 12px; }

/* 6. Chamak ka animation */
@keyframes pwShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 15 second tak data na aaye to chamakna band (hamesha na chamakta rahe) */
@keyframes pwGone {
  to { opacity: 0; }
}