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

:root {
  --green: #00c853;
  --gold: #ffd700;
  --purple: #7c3aed;
  --blue: #2563eb;
  --orange: #f97316;
  --dark: #0f172a;
  --card-bg: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  background: #0f172a;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: nowrap;
  position: relative;
}
.logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold);
  text-decoration: none;
}
/* Desktop nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-desktop a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.btn-nav {
  background: var(--green);
  color: #000 !important;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}
.credits-badge {
  background: #1e293b;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
/* Mobile dropdown */
.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1e293b;
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  z-index: 999;
}
.nav-mobile.open {
  display: flex;
}
.nav-mobile a, .mobile-credits {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}
.mobile-credits {
  color: var(--gold);
  font-weight: 600;
}
.nav-mobile a:last-child {
  border-bottom: none;
}

/* HERO */
.hero { max-width: 700px; margin: 0 auto; padding: 4rem 1.5rem 2rem; text-align: center; }
.hero h1 { font-size: 2.5rem; font-weight: 900; line-height: 1.2; margin-bottom: 1rem; }
.highlight { color: var(--gold); }
.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }

/* FORM CARD */
.form-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; padding: 2rem; text-align: left; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--muted); }
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%; padding: 0.8rem 1rem; background: var(--dark); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: 'Poppins', sans-serif; font-size: 1rem;
  transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--green); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* OPTION CARDS */
.option-group { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.option-card { flex: 1; min-width: 100px; }
.option-card input { display: none; }
.option-card span {
  display: block; text-align: center; padding: 0.75rem; background: var(--dark);
  border: 2px solid var(--border); border-radius: 10px; cursor: pointer;
  font-size: 0.85rem; font-weight: 500; transition: all 0.2s;
}
.option-card input:checked + span { border-color: var(--green); background: rgba(0,200,83,0.1); color: var(--green); }
.option-card span:hover { border-color: var(--muted); }

/* BUTTONS */
.btn-generate {
  width: 100%; padding: 1rem; background: linear-gradient(135deg, var(--green), #00e676);
  color: #000; border: none; border-radius: 12px; font-size: 1.1rem; font-weight: 800;
  cursor: pointer; transition: transform 0.2s, opacity 0.2s; display: block; text-align: center;
  text-decoration: none; margin-top: 1rem;
}
.btn-generate:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-generate:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.free-note { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 1rem; }

/* HOW IT WORKS */
.how-it-works { max-width: 800px; margin: 4rem auto; padding: 0 1.5rem; text-align: center; }
.how-it-works h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 2rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
.step-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.85rem; }

/* TESTIMONIALS */
.sample-cards { max-width: 900px; margin: 4rem auto; padding: 0 1.5rem; text-align: center; }
.sample-cards h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 2rem; }
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.testimonial { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
.mini-card { border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.mini-card.green { background: linear-gradient(135deg, #052e16, #166534); border: 1px solid var(--green); }
.mini-card.gold { background: linear-gradient(135deg, #1c1500, #713f12); border: 1px solid var(--gold); }
.mini-card.purple { background: linear-gradient(135deg, #2e1065, #4c1d95); border: 1px solid #a78bfa; }
.mini-name { font-weight: 700; font-size: 0.95rem; }
.mini-aura { font-size: 0.85rem; color: var(--muted); margin: 0.3rem 0; }
.mini-worth { font-size: 1.1rem; font-weight: 700; color: var(--gold); }
.testimonial > p { color: var(--muted); font-size: 0.85rem; font-style: italic; }

/* CROREPATI CARD */
.card-page { max-width: 600px; margin: 0 auto; padding: 2rem 1.5rem; }
.card-wrapper { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.crorepati-card {
  width: 100%; max-width: 420px; border-radius: 20px; padding: 1.75rem;
  position: relative; overflow: hidden;
}
.aura-green { background: linear-gradient(135deg, #052e16, #14532d); border: 2px solid var(--green); }
.aura-gold { background: linear-gradient(135deg, #1c1500, #78350f); border: 2px solid var(--gold); }
.aura-purple { background: linear-gradient(135deg, #2e1065, #4c1d95); border: 2px solid #a78bfa; }
.aura-blue { background: linear-gradient(135deg, #172554, #1e3a8a); border: 2px solid #60a5fa; }
.aura-orange { background: linear-gradient(135deg, #431407, #7c2d12); border: 2px solid var(--orange); }

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.card-logo { font-size: 0.85rem; font-weight: 700; color: var(--gold); }
.card-date { font-size: 0.75rem; color: var(--muted); }
.card-name { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.75rem; }
.card-aura { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; }
.aura-emoji { font-size: 1.5rem; }
.aura-text { font-size: 1rem; font-weight: 600; color: var(--gold); }
.card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.stat { background: rgba(0,0,0,0.3); border-radius: 10px; padding: 0.75rem; }
.stat-label { display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 0.25rem; }
.stat-value { display: block; font-size: 1rem; font-weight: 700; }
.card-prediction { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin-bottom: 1rem; font-style: italic; }
.card-ref-url { font-size: 0.7rem; color: rgba(255,255,255,0.4); text-align: right; }

/* TIP */
.tip-box { background: rgba(0,200,83,0.1); border: 1px solid var(--green); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.9rem; }
.tip-box span { font-weight: 700; color: var(--green); }

/* ACTION BUTTONS */
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.5rem; }
.btn-download, .btn-whatsapp, .btn-twitter, .btn-copy {
  padding: 0.75rem; border: none; border-radius: 10px; font-size: 0.9rem;
  font-weight: 600; cursor: pointer; font-family: 'Poppins', sans-serif; transition: opacity 0.2s;
}
.btn-download { background: var(--blue); color: white; }
.btn-whatsapp { background: #25d366; color: white; }
.btn-twitter { background: #1da1f2; color: white; }
.btn-copy { background: var(--card-bg); color: var(--text); border: 1px solid var(--border); }
.btn-download:hover, .btn-whatsapp:hover, .btn-twitter:hover, .btn-copy:hover { opacity: 0.85; }

/* SHARE SECTION */
.share-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; }
.share-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.share-subtitle { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.25rem; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.75rem 0.5rem; border: none; border-radius: 12px; cursor: pointer; font-family: 'Poppins', sans-serif; transition: transform 0.15s, opacity 0.15s; }
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.share-icon { font-size: 1.5rem; line-height: 1; }
.share-label { font-size: 0.7rem; font-weight: 600; }
.btn-download { background: #1e40af; color: white; }
.btn-whatsapp { background: #25d366; color: white; }
.btn-instagram { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); color: white; }
.btn-facebook { background: #1877f2; color: white; }
.btn-twitter { background: #000; color: white; border: 1px solid #333; }
.btn-telegram { background: #0088cc; color: white; }
.btn-linkedin { background: #0a66c2; color: white; }
.btn-copy { background: var(--dark); color: var(--text); border: 1px solid var(--border); }

/* INSTAGRAM POPUP */
.insta-popup { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; z-index: 999; padding: 1rem; }
.insta-popup-inner { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; max-width: 380px; width: 100%; }
.insta-popup-inner h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.insta-popup-inner p { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.insta-link-box { display: flex; gap: 0.5rem; background: var(--dark); border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.75rem; margin: 0.75rem 0; }
.insta-link-box span { flex: 1; font-size: 0.8rem; color: var(--green); word-break: break-all; }
.insta-link-box button { background: var(--green); color: #000; border: none; border-radius: 6px; padding: 0.3rem 0.6rem; font-weight: 700; cursor: pointer; font-size: 0.8rem; }
.insta-close { width: 100%; padding: 0.6rem; background: var(--border); border: none; border-radius: 8px; color: var(--text); font-family: 'Poppins', sans-serif; cursor: pointer; margin-top: 0.5rem; font-size: 0.9rem; }

/* MAKE OWN */
.make-own { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; text-align: center; margin-bottom: 1rem; }
.make-own h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
.ref-note { color: var(--green); font-size: 0.85rem; margin-top: 0.75rem; }
.views-count { text-align: center; color: var(--muted); font-size: 0.85rem; }

/* AUTH */
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 2rem; }
.auth-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; }
.auth-card > p { color: var(--muted); margin-bottom: 2rem; font-size: 0.9rem; }
.error-msg { background: rgba(220,38,38,0.15); border: 1px solid #dc2626; border-radius: 8px; padding: 0.75rem 1rem; color: #fca5a5; font-size: 0.9rem; margin-bottom: 1rem; }
.auth-switch { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 1.25rem; }
.auth-switch a { color: var(--green); text-decoration: none; font-weight: 600; }

/* DASHBOARD */
.dashboard { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.dash-header h2 { font-size: 1.8rem; font-weight: 800; }
.dash-credits { text-align: center; }
.credits-big { font-size: 2rem; font-weight: 900; color: var(--gold); display: block; }
.ref-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; }
.ref-section h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.ref-section > p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.ref-link-box { display: flex; gap: 0.5rem; background: var(--dark); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.ref-link-box span { flex: 1; font-size: 0.85rem; color: var(--green); word-break: break-all; }
.ref-link-box button { background: var(--green); color: #000; border: none; border-radius: 6px; padding: 0.4rem 0.75rem; font-weight: 700; cursor: pointer; font-size: 0.8rem; }
.share-ref { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; }
.btn-whatsapp-sm, .btn-twitter-sm { padding: 0.5rem 1rem; border: none; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; font-family: 'Poppins', sans-serif; }
.btn-whatsapp-sm { background: #25d366; color: white; }
.btn-twitter-sm { background: #1da1f2; color: white; }
.ref-tip { color: var(--muted); font-size: 0.8rem; }
.how-to-earn { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; }
.how-to-earn h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.earn-list { display: flex; flex-direction: column; gap: 0.5rem; }
.earn-item { background: var(--dark); border-radius: 8px; padding: 0.6rem 1rem; font-size: 0.9rem; }
.my-cards h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.mini-card-link { text-decoration: none; color: inherit; }
.mini-card-dash { border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem; transition: transform 0.2s; }
.mini-card-dash:hover { transform: translateY(-3px); }
.mc-aura { font-size: 0.8rem; }
.mc-name { font-weight: 700; font-size: 0.95rem; }
.mc-worth { font-size: 1rem; font-weight: 700; color: var(--gold); }
.mc-views { font-size: 0.75rem; color: var(--muted); }
.new-card-cta { text-align: center; margin-top: 1rem; }

/* FOOTER */
footer { text-align: center; padding: 2rem; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 4rem; }
footer a { color: var(--green); text-decoration: none; }

/* LOADING */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.9);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  z-index: 999; display: none;
}
.loading-overlay.active { display: flex; }
.loading-spinner { font-size: 3rem; animation: spin 1s linear infinite; margin-bottom: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 1.2rem; font-weight: 600; color: var(--gold); }

/* RESPONSIVE */
@media (max-width: 768px) {
  /* Navbar */
  .logo { font-size: 1.1rem; }
  .nav-desktop { display: none; }
  .hamburger { display: flex; }

  /* Hero */
  .hero { padding: 2rem 1rem 1.5rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 0.95rem; }

  /* Form */
  .form-card { padding: 1.25rem; border-radius: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .option-group { flex-direction: column; }
  .option-card { min-width: unset; }
  .option-card span { padding: 0.65rem; }

  /* How it works */
  .how-it-works { padding: 0 1rem; margin: 2.5rem auto; }
  .steps { grid-template-columns: 1fr; gap: 1rem; }

  /* Testimonials */
  .sample-cards { padding: 0 1rem; margin: 2.5rem auto; }
  .testimonials { grid-template-columns: 1fr; gap: 1rem; }

  /* Card page */
  .card-page { padding: 1.25rem 1rem; }
  .crorepati-card { padding: 1.25rem; }
  .card-name { font-size: 1.1rem; }
  .card-stats { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .stat { padding: 0.6rem; }
  .stat-value { font-size: 0.9rem; }

  /* Share buttons — 4 per row on mobile */
  .share-grid { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
  .share-btn { padding: 0.6rem 0.25rem; border-radius: 10px; }
  .share-icon { font-size: 1.2rem; }
  .share-label { font-size: 0.6rem; }

  /* Instagram popup */
  .insta-popup-inner { padding: 1.25rem; }

  /* Auth */
  .auth-card { padding: 1.5rem; border-radius: 16px; }

  /* Dashboard */
  .dashboard { padding: 1.25rem 1rem; }
  .dash-header { flex-direction: column; gap: 0.75rem; text-align: center; }
  .dash-header h2 { font-size: 1.4rem; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .earn-item { font-size: 0.82rem; }
  .ref-link-box span { font-size: 0.75rem; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 1.4rem; }
  .share-grid { grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
  .share-label { font-size: 0.55rem; }
  .share-icon { font-size: 1rem; }
  .card-stats { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 0.85rem; }
}
