/* ============================================================
   Referral Challenge — Public CSS
   ============================================================ */

:root {
  --rc-gold: #F5C842;
  --rc-gold-dark: #C49B00;
  --rc-gold-light: #FFE082;
  --rc-bg: #0A0A0F;
  --rc-surface: #111118;
  --rc-surface2: #1A1A24;
  --rc-surface3: #22222F;
  --rc-border: rgba(245,200,66,0.15);
  --rc-text: #F0EDE8;
  --rc-muted: #7A7A8A;
  --rc-green: #2ECC71;
  --rc-red: #E74C3C;
  --rc-orange: #F39C12;
}

/* WRAPPER */
.rc-front-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--rc-text);
}

/* CARD */
.rc-front-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}
.rc-front-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--rc-text);
  margin: 0 0 20px 0;
}

/* CHALLENGE HERO */
.rc-challenge-hero {
  background: linear-gradient(135deg, rgba(245,200,66,0.07) 0%, rgba(10,10,15,0) 60%);
  border: 1px solid rgba(245,200,66,0.2);
  border-radius: 20px;
  padding: 36px;
  margin-bottom: 20px;
  text-align: center;
}
.rc-ch-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--rc-gold); margin-bottom: 12px; }
.rc-ch-title { font-size: 28px; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.5px; }
.rc-ch-desc  { color: var(--rc-muted); font-size: 15px; line-height: 1.6; max-width: 480px; margin: 0 auto; }

/* CLAIM BANNER */
.rc-claim-banner {
  background: linear-gradient(135deg, #C49B00, #F5C842);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  animation: rcPulse 2s ease-in-out infinite alternate;
}
@keyframes rcPulse {
  from { box-shadow: 0 0 20px rgba(245,200,66,0.2); }
  to   { box-shadow: 0 0 40px rgba(245,200,66,0.45); }
}
.rc-claim-title { font-size: 17px; font-weight: 800; color: #000; }
.rc-claim-sub   { font-size: 13px; color: rgba(0,0,0,0.6); margin-top: 4px; }
.rc-btn-claim-cta {
  background: #000; color: var(--rc-gold);
  padding: 12px 22px; border-radius: 10px;
  font-weight: 700; font-size: 14px;
  text-decoration: none; white-space: nowrap;
  transition: opacity 0.2s;
}
.rc-btn-claim-cta:hover { opacity: 0.85; color: var(--rc-gold); }

/* STATS BAR */
.rc-stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.rc-stat-mini {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.rc-stat-mini-val   { display: block; font-size: 24px; font-weight: 800; color: var(--rc-gold); }
.rc-stat-mini-label { font-size: 12px; color: var(--rc-muted); margin-top: 4px; display: block; }

/* LINK COPY */
.rc-link-copy-box {
  display: flex; gap: 10px; align-items: center;
  background: var(--rc-surface2);
  border: 1px solid var(--rc-border);
  border-radius: 10px;
  padding: 4px 4px 4px 14px;
}
.rc-link-input {
  flex: 1; background: transparent; border: none; color: var(--rc-gold);
  font-family: monospace; font-size: 13px; outline: none;
}
.rc-copy-btn {
  background: var(--rc-gold); color: #000;
  border: none; padding: 9px 16px; border-radius: 7px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background 0.2s;
}
.rc-copy-btn:hover { background: var(--rc-gold-light); }

/* TIERS LIST */
.rc-tiers-list { display: flex; flex-direction: column; gap: 10px; }
.rc-tier-row {
  background: var(--rc-surface2);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s;
}
.rc-tier-active { border-color: var(--rc-gold); background: rgba(245,200,66,0.04); }
.rc-tier-done   { border-color: rgba(46,204,113,0.3); background: rgba(46,204,113,0.04); }
.rc-tier-locked { opacity: 0.6; }
.rc-tier-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--rc-surface3); border: 1px solid var(--rc-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--rc-muted);
}
.rc-tier-active .rc-tier-num { background: var(--rc-gold); color: #000; border-color: var(--rc-gold); }
.rc-tier-done   .rc-tier-num { background: var(--rc-green); color: #000; border-color: var(--rc-green); }
.rc-tier-name   { font-weight: 600; font-size: 14px; }
.rc-tier-range  { font-size: 12px; color: var(--rc-muted); }
.rc-tier-reward { font-weight: 700; color: var(--rc-gold); font-size: 15px; }

/* PROGRESS BAR */
.rc-progress-bar-bg   { background: var(--rc-surface3); border-radius: 4px; height: 4px; overflow: hidden; margin-top: 6px; }
.rc-progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--rc-gold-dark), var(--rc-gold)); border-radius: 4px; }

/* PUBLIC TIERS GRID */
.rc-tiers-public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.rc-tier-public-card {
  background: var(--rc-surface2);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
}
.rc-tier-public-icon   { font-size: 32px; margin-bottom: 8px; }
.rc-tier-public-name   { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.rc-tier-public-range  { font-size: 12px; color: var(--rc-muted); margin-bottom: 8px; }
.rc-tier-public-reward { font-size: 22px; font-weight: 800; color: var(--rc-gold); }

/* STEPS */
.rc-steps { display: flex; flex-direction: column; gap: 18px; }
.rc-step  { display: flex; gap: 16px; align-items: flex-start; }
.rc-step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--rc-gold); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.rc-step-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.rc-step-desc  { font-size: 14px; color: var(--rc-muted); line-height: 1.5; }

/* REFERRALS LIST */
.rc-referrals-list  { display: flex; flex-direction: column; gap: 12px; }
.rc-ref-row         { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.rc-ref-row:last-child { border-bottom: none; }
.rc-ref-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #444, #666);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.rc-ref-info  { flex: 1; }
.rc-ref-name  { font-size: 14px; font-weight: 500; }
.rc-ref-date  { font-size: 12px; color: var(--rc-muted); }

/* BADGES */
.rc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.rc-badge-green  { background: rgba(46,204,113,0.15); color: var(--rc-green); }
.rc-badge-orange { background: rgba(243,156,18,0.15); color: var(--rc-orange); }
.rc-badge-red    { background: rgba(231,76,60,0.15);  color: var(--rc-red); }
.rc-badge-grey   { background: var(--rc-surface3); color: var(--rc-muted); }
.rc-badge-gold   { background: rgba(245,200,66,0.15); color: var(--rc-gold); }

/* FORM */
.rc-form-group  { margin-bottom: 18px; }
.rc-form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rc-form-label  {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--rc-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 7px;
}
.rc-form-input {
  width: 100%; background: var(--rc-surface2);
  border: 1px solid var(--rc-border); border-radius: 10px;
  padding: 11px 14px; font-size: 14px; color: var(--rc-text);
  outline: none; transition: border-color 0.2s;
  font-family: inherit; box-sizing: border-box;
}
.rc-form-input:focus { border-color: var(--rc-gold); }
.rc-form-input option { background: var(--rc-surface2); }
textarea.rc-form-input { resize: vertical; }

/* BUTTONS */
.rc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: all 0.2s; font-family: inherit;
}
.rc-btn-gold { background: var(--rc-gold); color: #000; }
.rc-btn-gold:hover { background: var(--rc-gold-light); transform: translateY(-1px); color: #000; }

/* ALERTS */
.rc-alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.rc-alert-success { background: rgba(46,204,113,0.1); border: 1px solid rgba(46,204,113,0.2); color: #7EE8A2; }
.rc-alert-error   { background: rgba(231,76,60,0.1);  border: 1px solid rgba(231,76,60,0.2);  color: #F1948A; }

/* TEXT COLORS */
.rc-text-gold  { color: var(--rc-gold); }
.rc-text-green { color: var(--rc-green); }
.rc-text-muted { color: var(--rc-muted); }

/* RESPONSIVE */
@media (max-width: 640px) {
  .rc-front-card { padding: 20px 16px; }
  .rc-form-row   { grid-template-columns: 1fr; }
  .rc-stats-bar  { grid-template-columns: 1fr 1fr; }
  .rc-tier-row   { grid-template-columns: 36px 1fr; }
  .rc-tier-reward, .rc-tier-status { display: none; }
}
