:root {
  --green: #4BB227;
  --green-2: #28c76f;
  --green-dark: #2e7d18;
  --green-soft: #e9f7e3;
  --red: #ea5455;
  --blue: #1E74FD;
  --gold: #ffd01e;
  --ink: #1f2a24;
  --muted: #6f6f6f;
  --line: #eceff0;
  --bg: #f5f7f5;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(20, 40, 20, 0.08);
  --shadow-sm: 0 3px 12px rgba(20, 40, 20, 0.06);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Mobile-first app shell */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 78px;
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  color: var(--green-dark);
  letter-spacing: -0.3px;
}
.brand .logo {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  border-radius: 9px;
  display: grid; place-items: center;
  color: #fff; font-size: 17px;
}
.topbar .balance-pill {
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 20px;
  border-radius: 12px;
  transition: transform .08s ease, box-shadow .2s ease, opacity .2s;
  width: 100%;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(40, 199, 111, 0.35);
}
.btn-gold { background: linear-gradient(135deg, #ffd93b, #ffb300); color: #5a3d00; }
.btn-outline { background: #fff; border: 1.5px solid var(--green); color: var(--green-dark); }
.btn-red { background: var(--red); color: #fff; }
.btn-ghost { background: #f0f2f0; color: var(--ink); }
.btn-sm { width: auto; padding: 9px 16px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ---------- Generic layout ---------- */
.page { padding: 18px 16px 30px; }
.section { padding: 26px 16px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 14px;
}
.h1 { font-size: 26px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.5px; }
.h2 { font-size: 20px; font-weight: 800; margin: 0 0 12px; }
.eyebrow { color: var(--green-dark); font-weight: 800; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 120% at 50% 0%, #35a11e 0%, #2e8b16 45%, #1f6b0f 100%);
  color: #fff;
  padding: 30px 20px 34px;
  text-align: center;
  border-bottom-left-radius: 26px;
  border-bottom-right-radius: 26px;
}
.hero .tag {
  display: inline-block;
  background: rgba(255,255,255,0.16);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 { font-size: 29px; line-height: 1.2; margin: 0 0 10px; font-weight: 800; }
.hero h1 .hl { color: var(--gold); }
.hero p { opacity: .92; margin: 0 auto 20px; max-width: 340px; font-size: 15px; }
.hero .cta { display: flex; flex-direction: column; gap: 10px; max-width: 300px; margin: 0 auto; }
.hero .trust { margin-top: 16px; font-size: 12px; opacity: .8; }

/* stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: -26px 16px 0;
  position: relative;
  z-index: 5;
}
.stat {
  background: #fff;
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 19px; color: var(--green-dark); }
.stat span { font-size: 11px; color: var(--muted); }

/* feature cards */
.features { display: grid; gap: 12px; }
.feature {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm);
}
.feature .ic {
  flex: 0 0 46px; height: 46px; border-radius: 12px;
  background: var(--green-soft); display: grid; place-items: center; font-size: 22px;
}
.feature h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.feature p { margin: 0; font-size: 13px; color: var(--muted); }

/* steps */
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num {
  flex: 0 0 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #fff; font-weight: 800; display: grid; place-items: center;
}
.step h4 { margin: 0 0 3px; font-size: 16px; }
.step p { margin: 0; font-size: 13px; color: var(--muted); }

/* testimonials / proof scroller */
.scroller { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.scroller::-webkit-scrollbar { display: none; }
.tcard { flex: 0 0 82%; scroll-snap-align: start; background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); }
.tcard .who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; font-size: 20px; }
.tcard .name { font-weight: 700; font-size: 14px; }
.tcard .loc { font-size: 12px; color: var(--muted); }
.tcard p { font-size: 13px; margin: 0 0 8px; }
.badge-amt { color: var(--green-dark); font-weight: 800; font-size: 14px; }
.stars { color: var(--gold); font-size: 13px; }

/* proof list rows */
.proof-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.proof-row .amt { margin-left: auto; color: var(--green-dark); font-weight: 800; }
.proof-row .meta { font-size: 12px; color: var(--muted); }

/* ---------- Auth ---------- */
.auth-wrap { padding: 26px 20px 40px; }
.auth-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 24px 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-control, input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fafbfa;
  transition: border-color .15s, background .15s;
}
.form-control:focus, input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--green); background: #fff;
}
.field-error { color: var(--red); font-size: 12px; margin-top: 5px; }
.form-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.form-switch a { color: var(--green-dark); font-weight: 700; }

/* ---------- Profile / balance ---------- */
.balance-card {
  background: linear-gradient(135deg, #35a11e, #1f6b0f);
  color: #fff; border-radius: 18px; padding: 22px; box-shadow: var(--shadow);
}
.balance-card .lbl { font-size: 12px; letter-spacing: 1px; opacity: .85; text-transform: uppercase; }
.balance-card .amt { font-size: 40px; font-weight: 800; margin: 4px 0 2px; }
.balance-card .sub { opacity: .85; font-size: 13px; }
.balance-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

.mini-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 14px 0; }
.mini-stat { background: #fff; border-radius: 12px; padding: 14px 8px; text-align: center; box-shadow: var(--shadow-sm); }
.mini-stat b { font-size: 18px; color: var(--green-dark); display: block; }
.mini-stat span { font-size: 11px; color: var(--muted); }

/* menu list */
.menu-list { background: #fff; border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: none; }
.menu-item .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--green-soft); display: grid; place-items: center; font-size: 18px; }
.menu-item .txt { flex: 1; }
.menu-item .txt b { font-size: 15px; display: block; }
.menu-item .txt span { font-size: 12px; color: var(--muted); }
.menu-item .chev { color: #c7ccc7; font-size: 20px; }

/* ---------- Task / video lists ---------- */
.list-item {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.list-item .ic { flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--green-soft); display: grid; place-items: center; font-size: 24px; }
.list-item .body { flex: 1; min-width: 0; }
.list-item .body h4 { margin: 0 0 2px; font-size: 15px; }
.list-item .body p { margin: 0; font-size: 12px; color: var(--muted); }
.list-item .reward { color: var(--green-dark); font-weight: 800; font-size: 15px; white-space: nowrap; }
.pill-done { background: var(--green-soft); color: var(--green-dark); font-weight: 700; font-size: 12px; padding: 7px 12px; border-radius: 999px; }
.pill-locked { background: #f0f0f0; color: var(--muted); font-weight: 700; font-size: 12px; padding: 7px 12px; border-radius: 999px; }
.list-item-locked { opacity: .65; }

.tier-banner {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-size: 13px;
  margin: 10px 0 6px;
}
.tier-banner .tier-emoji { font-size: 16px; }
.tier-free { background: #eef2ee; color: #3d4f3d; }
.tier-silver { background: linear-gradient(135deg, #e8ecef, #d4d8dc); color: #3a4248; }
.tier-gold { background: linear-gradient(135deg, #fff3c4, #ffd93b); color: #5a3d00; }

.video-card { background: #fff; border-radius: 14px; overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: #000; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video-thumb .play span { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; font-size: 22px; color: var(--green-dark); }
.video-thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 6px; }
.video-meta { padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.video-meta .body { flex: 1; }
.video-meta h4 { margin: 0; font-size: 14px; }
.video-meta .ch { font-size: 12px; color: var(--muted); }

.lock-banner { background: #fff7e6; border: 1px solid #ffe2a8; color: #8a5a00; border-radius: 12px; padding: 14px; font-size: 13px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }

/* ---------- progress ---------- */
.progress { height: 12px; background: #e8ece8; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-2)); border-radius: 999px; }

.milestone { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* referral box */
.ref-box { display: flex; gap: 8px; margin-top: 12px; }
.ref-box input { flex: 1; font-size: 12px; }
.count-badge { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }

/* ---------- messages ---------- */
.messages { padding: 0 16px; margin-top: 12px; }
.msg { padding: 12px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.msg.success { background: #e6f7ec; color: #1c7a43; }
.msg.error { background: #fdeaea; color: #b4232a; }
.msg.info { background: #e8f1fe; color: #1a5fc4; }
.msg.warning { background: #fff4e0; color: #8a5a00; }

/* ---------- bottom nav ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.tabbar a { text-align: center; color: #98a29a; font-size: 10px; font-weight: 600; }
.tabbar a .ic { font-size: 21px; display: block; line-height: 1.1; }
.tabbar a.active { color: var(--green-dark); }
.tabbar a.center-btn { position: relative; }
.tabbar a.center-btn .ic {
  width: 48px; height: 48px; margin: -18px auto 2px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #fff; border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(40,199,111,.4); font-size: 24px;
}

/* footer (marketing pages) */
.footer { background: #12321a; color: #cfe6d4; padding: 26px 20px 30px; border-top-left-radius: 22px; border-top-right-radius: 22px; margin-top: 20px; }
.footer .brand { color: #fff; margin-bottom: 10px; }
.footer .links { display: flex; flex-wrap: wrap; gap: 12px 18px; font-size: 13px; margin: 14px 0; }
.footer .links a { color: #b9d6c0; }
.footer .fine { font-size: 11px; color: #7fa389; margin-top: 12px; line-height: 1.5; }

/* faq accordion */
.faq-item { background: #fff; border-radius: 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-q { padding: 15px 16px; font-weight: 700; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.faq-q .plus { color: var(--green); font-size: 20px; transition: transform .2s; }
.faq-a { padding: 0 16px; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; font-size: 13px; color: var(--muted); }
.faq-item.open .faq-a { max-height: 400px; padding: 0 16px 15px; }
.faq-item.open .plus { transform: rotate(45deg); }

/* prose (privacy/about) */
.prose h2 { font-size: 18px; margin: 22px 0 8px; }
.prose h3 { font-size: 15px; margin: 16px 0 6px; }
.prose p, .prose li { font-size: 13.5px; color: #3a453d; }
.prose ul { padding-left: 18px; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 44px; margin-bottom: 8px; }

.divider { height: 1px; background: var(--line); margin: 18px 0; }
