:root {
  --sky: #e8f6ff;
  --sky-light: #f0faff;
  --sun: #ffd05a;
  --sun-light: #fff3d6;
  --coral: #ff7a7a;
  --coral-light: #ffe8e8;
  --mint: #7ee0c3;
  --mint-light: #e0fff4;
  --blue: #3a7bff;
  --blue-light: #e8f0ff;
  --purple: #a78bfa;
  --purple-light: #f3f0ff;
  --ink: #1d2b4f;
  --muted: #5a6c88;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(26, 53, 102, 0.12);
  --shadow-lg: 0 25px 60px rgba(26, 53, 102, 0.18);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --gold: #f59e0b;
  --gold-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fefcff 0%, var(--sky) 40%, var(--sky-light) 70%, #ffffff 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.page { max-width: 1200px; margin: 0 auto; padding: 0 20px 80px; }

.floating-doodles { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.doodle { position: absolute; border-radius: 999px; opacity: 0.7; animation: floaty 20s ease-in-out infinite; }
.doodle.one { width: 200px; height: 200px; background: radial-gradient(circle, rgba(245, 158, 11, 0.6), transparent 65%); top: -60px; left: 5%; }
.doodle.two { width: 280px; height: 280px; background: radial-gradient(circle, rgba(126, 224, 195, 0.5), transparent 65%); top: 15%; right: -80px; animation-delay: 3s; }
.doodle.three { width: 320px; height: 320px; background: radial-gradient(circle, rgba(167, 139, 250, 0.45), transparent 65%); bottom: -100px; left: -60px; animation-delay: 6s; }
.doodle.four { width: 180px; height: 180px; background: radial-gradient(circle, rgba(58, 123, 255, 0.4), transparent 65%); top: 50%; right: 10%; animation-delay: 9s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  25% { transform: translateY(-20px) translateX(15px) scale(1.05); }
  50% { transform: translateY(-30px) translateX(-10px) scale(1); }
  75% { transform: translateY(-15px) translateX(20px) scale(0.95); }
}

header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 24px; background: rgba(255, 255, 255, 0.95);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 4px 30px rgba(26, 53, 102, 0.1);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(58, 123, 255, 0.1);
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: "Baloo 2", cursive; font-weight: 700; font-size: 1.4rem; color: var(--ink); }
.brand-logo { width: 50px; height: 50px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--sun-light), var(--mint-light)); display: grid; place-items: center; box-shadow: 0 8px 20px rgba(126, 224, 195, 0.3); overflow: hidden; transition: transform 0.3s ease; }
.brand-logo:hover { transform: scale(1.05) rotate(-3deg); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }

.cta-button {
  background: linear-gradient(135deg, var(--blue) 0%, #6bc7ff 100%);
  color: white; border: none; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
  box-shadow: 0 8px 24px rgba(58, 123, 255, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cta-button:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 32px rgba(58, 123, 255, 0.45); }
.secondary-button {
  border: 2px solid rgba(58, 123, 255, 0.3); background: white; color: var(--blue);
  padding: 12px 24px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 6px 20px rgba(58, 123, 255, 0.1);
}
.secondary-button:hover { transform: translateY(-3px); background: var(--blue-light); border-color: var(--blue); }
.login-trigger {
  border: 1px solid rgba(58, 123, 255, 0.35); background: white; color: var(--blue);
  padding: 10px 18px; border-radius: 999px; font-weight: 700; cursor: pointer;
  transition: transform 0.2s ease; box-shadow: 0 10px 20px rgba(58, 123, 255, 0.12);
}
.login-trigger:hover { transform: translateY(-2px); }

.hero { margin-top: 48px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: linear-gradient(135deg, var(--gold-light), var(--sun-light));
  color: var(--ink); border-radius: 999px; font-size: 0.9rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}
.hero h1 {
  font-family: "Baloo 2", cursive; font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 20px; line-height: 1.2;
  background: linear-gradient(135deg, var(--ink) 0%, var(--gold) 50%, var(--coral) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { color: var(--muted); font-size: 1.2rem; max-width: 700px; margin: 0 auto 32px; line-height: 1.7; }

.section-title { font-family: "Baloo 2", cursive; font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0 0 20px; text-align: center; }
.section-subtitle { color: var(--muted); margin-bottom: 30px; text-align: center; font-size: 1.1rem; }

#logged-in-view { display: none; }
#logged-in-view.active { display: block; }

/* Your Code Section */
.your-code-section {
  background: linear-gradient(135deg, var(--blue-light), var(--purple-light));
  border-radius: var(--radius-lg); padding: 28px; margin-bottom: 28px;
  border: 2px solid rgba(58, 123, 255, 0.2);
}
.code-section-title {
  font-family: "Baloo 2", cursive; font-size: 1.3rem; color: var(--ink);
  margin-bottom: 16px;
}
.code-display-box {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: white; padding: 16px 24px; border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(58, 123, 255, 0.15);
}
.code-value {
  font-family: "Baloo 2", cursive; font-size: 2rem; letter-spacing: 4px;
  color: var(--ink); font-weight: 700;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.copy-code-btn {
  background: linear-gradient(135deg, var(--blue), #6bc7ff); color: white;
  border: none; padding: 12px 24px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 20px rgba(58, 123, 255, 0.3);
  transition: all 0.3s ease;
}
.copy-code-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(58, 123, 255, 0.4); }
.copy-code-btn.copied { background: linear-gradient(135deg, var(--success), #34d399); }
.code-hint { color: var(--muted); font-size: 0.95rem; margin-top: 12px; }

/* Usage Statistics Section */
.usage-section {
  background: white; border-radius: var(--radius-lg); padding: 28px;
  margin-bottom: 28px; box-shadow: 0 8px 30px rgba(26, 53, 102, 0.08);
  border: 2px solid rgba(126, 224, 195, 0.3);
}
.usage-title {
  font-family: "Baloo 2", cursive; font-size: 1.3rem; color: var(--ink);
  margin-bottom: 20px;
}
.total-referrals {
  display: flex; align-items: center; gap: 12px; padding: 16px 24px;
  background: linear-gradient(135deg, var(--gold-light), var(--sun-light));
  border-radius: var(--radius-md); margin-bottom: 20px;
}
.total-label { font-weight: 600; color: var(--ink); font-size: 1.1rem; }
.total-count {
  font-family: "Baloo 2", cursive; font-size: 2rem; color: var(--gold);
  font-weight: 700;
}
.levels-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.usage-level-card {
  background: linear-gradient(145deg, #ffffff 0%, var(--sky-light) 100%);
  border-radius: var(--radius-md); padding: 20px;
  border: 2px solid rgba(58, 123, 255, 0.1);
  transition: all 0.3s ease;
}
.usage-level-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(26, 53, 102, 0.12); }
.usage-level-card.level-1 { border-color: var(--gold); background: linear-gradient(145deg, #ffffff 0%, var(--gold-light) 100%); }
.usage-level-card.level-2 { border-color: var(--blue); background: linear-gradient(145deg, #ffffff 0%, var(--blue-light) 100%); }
.usage-level-card.level-3 { border-color: var(--purple); background: linear-gradient(145deg, #ffffff 0%, var(--purple-light) 100%); }
.level-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.level-badge { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.level-percent { font-size: 0.85rem; color: var(--muted); background: rgba(255,255,255,0.7); padding: 4px 10px; border-radius: 999px; }
.level-count { text-align: center; }
.count-number { font-family: "Baloo 2", cursive; font-size: 2.5rem; color: var(--ink); display: block; line-height: 1; }
.count-label { font-size: 0.9rem; color: var(--muted); }
.no-usage-message { text-align: center; padding: 30px; color: var(--muted); }
.no-usage-icon { font-size: 3rem; margin-bottom: 12px; }

.referral-dashboard {
  background: linear-gradient(145deg, #ffffff 0%, var(--mint-light) 100%);
  border-radius: var(--radius-xl); padding: 40px; margin-top: 40px;
  box-shadow: var(--shadow-lg); border: 3px solid rgba(126, 224, 195, 0.3);
}
.dashboard-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
.dashboard-title { font-family: "Baloo 2", cursive; font-size: 1.8rem; color: var(--ink); }
.generate-btn {
  background: linear-gradient(135deg, var(--gold), #f59e0b); color: white; border: none;
  padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 700; font-size: 1rem;
  cursor: pointer; box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4); transition: all 0.3s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.generate-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5); }
.generate-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.referral-list { display: grid; gap: 20px; margin-top: 24px; }
.referral-card {
  background: white; border-radius: var(--radius-lg); padding: 24px;
  box-shadow: 0 10px 30px rgba(26, 53, 102, 0.1); border: 2px solid transparent;
  transition: all 0.3s ease; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
}
.referral-card:hover { border-color: var(--mint); transform: translateY(-4px); box-shadow: 0 15px 40px rgba(26, 53, 102, 0.15); }
.referral-code-info { display: flex; flex-direction: column; gap: 8px; }
.referral-code {
  font-family: "Baloo 2", cursive; font-size: 1.5rem; color: var(--ink);
  background: linear-gradient(135deg, var(--blue-light), var(--purple-light));
  padding: 8px 16px; border-radius: var(--radius-sm); display: inline-block; letter-spacing: 2px;
}
.referral-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-item { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.stat-icon { font-size: 1.2rem; }
.stat-value { color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.copy-btn {
  background: var(--blue); color: white; border: none; padding: 12px 20px;
  border-radius: var(--radius-sm); font-weight: 700; cursor: pointer;
  transition: all 0.2s ease; display: flex; align-items: center; gap: 6px;
}
.copy-btn:hover { background: #2563eb; transform: scale(1.05); }
.copy-btn.copied { background: var(--success); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-family: "Baloo 2", cursive; font-size: 1.5rem; color: var(--ink); margin-bottom: 8px; }

.referral-animation-section {
  background: linear-gradient(145deg, var(--gold-light) 0%, var(--sun-light) 50%, var(--mint-light) 100%);
  border-radius: var(--radius-xl); padding: 60px 40px; margin-top: 40px; position: relative; overflow: hidden;
}
.referral-animation-section::before {
  content: "💰"; position: absolute; top: 20px; right: 30px; font-size: 3rem; opacity: 0.3;
}

/* Growing Chain Animation Container */
.chain-demo-container {
  position: relative; padding: 50px 20px 30px; margin: 30px 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.3) 100%);
  border-radius: var(--radius-lg);
}
.chain-demo-title {
  text-align: center; font-family: "Baloo 2", cursive; font-size: 1.4rem;
  color: var(--ink); margin-bottom: 16px;
  background: linear-gradient(135deg, var(--gold), var(--coral));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.chain-demo-subtitle { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 30px; }

/* Total Earnings Display */
.total-earnings-display {
  position: absolute; top: 15px; right: 20px;
  background: linear-gradient(135deg, var(--success), #059669); color: white;
  padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 700;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  font-size: 1rem; opacity: 0; transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.total-earnings-display.show { opacity: 1; transform: scale(1); }
.total-earnings-display .amount { font-size: 1.3rem; }

/* Chain Network */
.chain-network {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  position: relative; min-height: 400px;
}
.chain-row {
  display: flex; justify-content: center; align-items: flex-start;
  gap: 40px; position: relative; padding: 15px 0;
}

/* Connection Lines SVG */
.chain-lines-svg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
.connection-line {
  stroke: url(#lineGradient); stroke-width: 3; fill: none;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.8s ease;
}
.connection-line.drawn { stroke-dashoffset: 0; }

/* Chain Nodes */
.chain-node {
  display: flex; flex-direction: column; align-items: center;
  opacity: 0; transform: scale(0.3) translateY(20px);
  position: relative; z-index: 2; transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chain-node.visible { opacity: 1; transform: scale(1) translateY(0); }

.node-avatar {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1rem; font-weight: 700; color: white; position: relative; z-index: 2;
  border: 4px solid white;
}
.node-avatar.you {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  font-size: 0.85rem;
}
.node-avatar.level-1 {
  background: linear-gradient(135deg, #6ee7b7, #34d399, #10b981);
  box-shadow: 0 8px 25px rgba(52, 211, 153, 0.4);
}
.node-avatar.level-2 {
  background: linear-gradient(135deg, #93c5fd, #60a5fa, #3b82f6);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}
.node-avatar.level-3 {
  background: linear-gradient(135deg, #c4b5fd, #a78bfa, #8b5cf6);
  box-shadow: 0 8px 25px rgba(139, 92, 250, 0.4);
}

.node-label {
  margin-top: 10px; font-weight: 700; color: var(--ink);
  font-size: 0.85rem; text-align: center;
}
.node-percent {
  font-size: 0.75rem; color: var(--muted); margin-top: 3px;
  background: rgba(255,255,255,0.8); padding: 2px 8px; border-radius: 10px;
}

/* Earning Badges */
.node-earning-badge {
  position: absolute; top: -8px; right: -8px;
  background: linear-gradient(135deg, #22c55e, #16a34a); color: white;
  padding: 4px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.5);
  opacity: 0; transform: scale(0) rotate(-10deg);
  white-space: nowrap;
}
.node-earning-badge.show {
  animation: badgePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes badgePopIn {
  0% { opacity: 0; transform: scale(0) rotate(-10deg); }
  70% { transform: scale(1.2) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Pulse highlight for earnings counter */
.pulse-highlight {
  color: #f59e0b !important;
  transform: scale(1.2);
  transition: transform 0.2s ease;
}

/* Payment Indicator */
.payment-indicator {
  position: absolute; bottom: -32px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e;
  padding: 5px 12px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; white-space: nowrap;
  opacity: 0; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  border: 2px solid #fbbf24;
}
.payment-indicator.pulse {
  animation: paymentAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes paymentAppear {
  0% { opacity: 0; transform: translateX(-50%) scale(0.5) translateY(10px); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}

/* Connecting Arrows */
.connect-arrow {
  color: var(--gold); font-size: 1.2rem; text-align: center;
  opacity: 0; transition: opacity 0.3s ease; padding: 4px 0;
}
.connect-arrow.show { opacity: 0.5; }

/* Replay Button */
.replay-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 25px auto 0; background: linear-gradient(135deg, var(--blue), #2563eb);
  color: white; border: none; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
  box-shadow: 0 8px 25px rgba(58, 123, 255, 0.35);
  transition: all 0.3s ease;
}
.replay-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(58, 123, 255, 0.45);
}
.replay-btn:active { transform: translateY(0) scale(0.98); }

/* Step Indicator */
.step-indicator {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 20px;
}
.step-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(0,0,0,0.1); transition: all 0.3s ease;
}
.step-dot.active { background: var(--gold); transform: scale(1.3); box-shadow: 0 0 10px var(--gold); }
.step-dot.completed { background: var(--success); }

/* Keyframes */
@keyframes fadeIn { to { opacity: 1; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4); } 50% { box-shadow: 0 10px 40px rgba(245, 158, 11, 0.6); } }

/* Mobile Responsive */
@media (max-width: 768px) {
  .chain-demo-container { padding: 30px 10px 20px; margin: 15px 0; }
  .chain-demo-title { font-size: 1.1rem; }
  .chain-demo-subtitle { font-size: 0.8rem; margin-bottom: 15px; }
  .chain-network { min-height: auto; }
  .chain-row { gap: 12px; padding: 8px 0; }
  .node-avatar { width: 48px; height: 48px; font-size: 0.85rem; border-width: 3px; }
  .node-label { font-size: 0.7rem; margin-top: 6px; }
  .node-percent { font-size: 0.6rem; padding: 1px 5px; }
  .node-earning-badge { padding: 2px 6px; font-size: 0.6rem; top: -5px; right: -5px; }
  .payment-indicator { font-size: 0.6rem; padding: 3px 8px; bottom: -25px; }
  .total-earnings-display { position: relative; top: auto; right: auto; margin: 0 auto 15px; text-align: center; display: block; width: fit-content; }
  .total-earnings-display .amount { font-size: 1.1rem; }
  .step-indicator { margin-bottom: 10px; }
  .connect-arrow { font-size: 0.9rem; padding: 2px 0; }
  /* Hide level 3 row on mobile to reduce clutter */
  #row-3 { display: none; }
  #arrow-3 { display: none; }
  .referral-animation-section { padding: 30px 15px; }
  .earnings-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .earning-card { padding: 16px; }
  .earning-percent { font-size: 1.8rem; }
  .security-grid { grid-template-columns: 1fr; gap: 16px; }
  .security-section { padding: 30px 15px; }
  .cta-section { padding: 30px 15px; }
}
@media (max-width: 400px) {
  .node-avatar { width: 40px; height: 40px; font-size: 0.75rem; }
  .chain-row { gap: 8px; }
  .node-label { font-size: 0.65rem; }
  .payment-indicator { display: none; }
  .earnings-grid { grid-template-columns: 1fr; }
}

.earnings-breakdown { background: white; border-radius: var(--radius-lg); padding: 32px; margin-top: 40px; box-shadow: var(--shadow); }
.earnings-title { font-family: "Baloo 2", cursive; font-size: 1.5rem; color: var(--ink); margin-bottom: 24px; text-align: center; }
.earnings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.earning-card {
  background: linear-gradient(145deg, var(--sky-light), white); border-radius: var(--radius-md);
  padding: 24px; text-align: center; border: 2px solid transparent; transition: all 0.3s ease;
}
.earning-card:hover { border-color: var(--gold); transform: translateY(-5px); }
.earning-level { font-size: 0.85rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.earning-percent {
  font-family: "Baloo 2", cursive; font-size: 2.5rem;
  background: linear-gradient(135deg, var(--gold), var(--coral));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.earning-desc { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.lifetime-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--success), #059669); color: white;
  padding: 12px 24px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.security-section {
  background: linear-gradient(145deg, var(--blue-light) 0%, var(--purple-light) 100%);
  border-radius: var(--radius-xl); padding: 50px 40px; margin-top: 60px; text-align: center;
  position: relative; overflow: hidden;
}
.security-section::before { content: "🔒"; position: absolute; top: 20px; left: 30px; font-size: 2.5rem; opacity: 0.3; }
.security-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-top: 32px; }
.security-card { background: white; border-radius: var(--radius-md); padding: 24px; box-shadow: 0 10px 30px rgba(26, 53, 102, 0.1); }
.security-icon { font-size: 2.5rem; margin-bottom: 12px; }
.security-card h4 { font-family: "Baloo 2", cursive; font-size: 1.2rem; color: var(--ink); margin-bottom: 8px; }
.security-card p { color: var(--muted); font-size: 0.9rem; }
.coming-soon-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--purple), #8b5cf6); color: white;
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; margin-top: 24px;
}

.cta-section {
  background: linear-gradient(120deg, #ffeccc, #d6f3ff); border-radius: var(--radius-xl);
  padding: 50px 40px; margin-top: 60px; text-align: center; box-shadow: var(--shadow);
}
.cta-section h2 { font-family: "Baloo 2", cursive; font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--ink); margin-bottom: 16px; }
.cta-section p { color: var(--muted); font-size: 1.1rem; margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

footer { text-align: center; color: var(--muted); margin-top: 50px; font-size: 0.95rem; }
.footer-links { margin-top: 10px; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.footer-links a { color: var(--blue); padding: 4px 10px; border-radius: 999px; transition: background 0.2s ease; }
.footer-links a:hover { background: rgba(58, 123, 255, 0.12); }

.status-message { padding: 12px 20px; border-radius: var(--radius-sm); font-weight: 600; margin-top: 16px; display: none; }
.status-message.success { background: var(--success-light); color: #065f46; display: block; }
.status-message.error { background: var(--coral-light); color: #b91c1c; display: block; }

.account-dropdown-container { position: relative; }
.account-dropdown-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(58, 123, 255, 0.35); background: white; color: var(--blue);
  padding: 10px 16px; border-radius: 999px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 20px rgba(58, 123, 255, 0.12); transition: transform 0.2s ease;
}
.account-dropdown-toggle:hover { transform: translateY(-2px); }
.account-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; background: white;
  border-radius: 16px; box-shadow: 0 18px 40px rgba(26, 53, 102, 0.18);
  padding: 8px; min-width: 200px; display: none; z-index: 20;
}
.account-dropdown.active { display: block; }
.dropdown-item {
  width: 100%; border: none; background: transparent; padding: 10px 12px;
  border-radius: 12px; font-weight: 700; color: var(--ink); text-align: left;
  cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background 0.2s ease;
}
.dropdown-item:hover { background: rgba(58, 123, 255, 0.1); }
.dropdown-item-danger { color: #d14343; }

.loading-spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3); border-radius: 50%;
  border-top-color: white; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .page { padding: 0 16px 60px; }
  header { padding: 10px 16px; }
  .brand { font-size: 1.2rem; }
  .brand-logo { width: 44px; height: 44px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .referral-dashboard { padding: 24px; }
  .dashboard-header { flex-direction: column; text-align: center; }
  .referral-card { grid-template-columns: 1fr; text-align: center; }
  .referral-stats { justify-content: center; }
  .chain-animation { flex-direction: column; gap: 16px; }
  .chain-arrow { transform: rotate(90deg); margin: 8px 0; }
  .node-avatar { width: 60px; height: 60px; font-size: 1.5rem; }
  .referral-animation-section { padding: 40px 20px; }
  .security-section { padding: 40px 20px; }
  .cta-section { padding: 40px 20px; }
  .earnings-breakdown { padding: 24px; }
}

@media (max-width: 480px) {
  .header-actions .cta-button, .header-actions .secondary-button { padding: 8px 14px; font-size: 0.85rem; }
  .generate-btn { width: 100%; justify-content: center; }
  .cta-buttons { flex-direction: column; }
  .cta-buttons .cta-button, .cta-buttons .secondary-button { width: 100%; }
}
