:root {
  color-scheme: light;
  --ink: #13201d;
  --green: #9ff3cf;
  --gold: #f8c45c;
  --orange: #ff6b4a;
  --paper: #f7fbf8;
  --muted: #60706b;
  --line: rgba(19, 32, 29, 0.1);
  font-family: Outfit, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(159,243,207,.16), transparent 38%),
    linear-gradient(300deg, rgba(255,107,74,.1), transparent 45%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
.app-shell {
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 92px;
  background:
    radial-gradient(circle at 18% 8%, rgba(159, 243, 207, .28), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(248, 196, 92, .24), transparent 30%),
    linear-gradient(180deg, #07110f 0, #10231d 330px, #e8f2ec 331px, var(--paper) 100%);
}
.screen { display: none; padding: 16px; }
.screen.active { display: block; animation: rise .24s ease both; }
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 22px;
  color: white;
  background: #13201d;
  box-shadow: 0 24px 70px rgba(19, 32, 29, .22);
}
.hero:before, .hero:after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(40px);
}
.hero:before { right: -42px; top: -42px; background: rgba(255, 107, 74, .36); }
.hero:after { left: -36px; bottom: -68px; background: rgba(159, 243, 207, .25); }
.hero > * { position: relative; z-index: 1; }
.hero-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--green);
  color: var(--ink);
  font-weight: 900;
}
h1 {
  max-width: 260px;
  margin: 16px 0 0;
  font-size: 42px;
  line-height: .92;
  letter-spacing: 0;
}
h2 { margin: 0; font-size: 26px; line-height: 1.05; }
h3 { margin: 0; font-size: 18px; }
p { margin: 0; }
.muted { color: var(--muted); }
.hero .muted { color: rgba(255,255,255,.7); }
.balance-pill {
  min-width: 112px;
  border-radius: 18px;
  padding: 10px 12px;
  background: rgba(255,255,255,.12);
  color: white;
  text-align: right;
}
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.55);
}
.amount { font-weight: 900; font-size: 22px; }
.hero-grid, .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.hero-grid { grid-template-columns: repeat(2, 1fr); }
.tile, .card {
  border-radius: 22px;
  padding: 16px;
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
  border: 1px solid rgba(15, 23, 42, .05);
}
.card {
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover, .video-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .08);
}
.tile.gold { background: var(--gold); color: var(--ink); }
.tile strong, .card strong { display: block; font-size: 24px; line-height: 1; }
.hero .tile strong { color: var(--ink); }
.tile span, .card span { font-size: 11px; font-weight: 900; text-transform: uppercase; color: var(--muted); }
.gold span { color: #614915; }
.section-head {
  margin: 24px 0 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.video-list, .stack { display: grid; gap: 12px; }
.video-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 10px;
  text-align: left;
  border-radius: 24px;
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}
.video-card img {
  width: 92px;
  height: 116px;
  object-fit: cover;
  border-radius: 18px;
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.share-button {
  min-height: 58px;
  display: grid;
  gap: 4px;
  place-items: center;
  border-radius: 16px;
  padding: 8px 6px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.brand-icon, .share-native-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
}
.brand-icon:before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.share-native-icon {
  background: #13201d;
  font-size: 18px;
  font-weight: 900;
}
.brand-icon.whatsapp { background: #25d366; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons/icons/whatsapp.svg"); }
.brand-icon.messenger { background: #0084ff; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons/icons/messenger.svg"); }
.brand-icon.telegram { background: #229ed9; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons/icons/telegram.svg"); }
.brand-icon.facebook { background: #1877f2; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons/icons/facebook.svg"); }
.brand-icon.x { background: #111; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons/icons/x.svg"); }
.sponsor-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  background: linear-gradient(135deg, #fff9e9, #ffffff 58%, #ecfff6);
  border-color: rgba(248, 196, 92, .58);
  box-shadow: 0 12px 32px rgba(135, 98, 26, .08);
}
.sponsor-card.compact {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
}
.sponsor-card h3 { margin-top: 4px; }
.sponsor-card strong {
  color: #a77510;
  font-size: 20px;
  white-space: nowrap;
}
.sponsor-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #13201d;
  color: var(--green);
  font-size: 24px;
  font-weight: 900;
}
.sponsor-icon.large {
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  border-radius: 21px;
}
.withdraw-sponsor { margin-top: 12px; }
.sponsor-modal {
  position: relative;
  text-align: center;
}
.sponsor-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 14px;
  font-size: 22px;
}
.sponsor-action {
  width: 100%;
  display: grid;
  place-items: center;
  margin-top: 12px;
  text-decoration: none;
}
.invite-nudge .field {
  margin-top: 12px;
}
.modal-share {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}
.progress-note {
  background: #eef9f2;
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 12px;
  font-weight: 900;
}
.progress-card, .trust-strip {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(18,49,44,.08);
  border-radius: 22px;
  padding: 18px;
  margin-top: 16px;
  box-shadow: 0 18px 50px rgba(18,49,44,.08);
}
.mini-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.mini-progress-grid span, .trust-list span {
  display: grid;
  gap: 3px;
  background: #f7f8f6;
  border-radius: 16px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}
.mini-progress-grid b, .trust-list b {
  color: var(--ink);
  font-size: 18px;
}
.progress-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.trust-strip {
  background: linear-gradient(135deg, #f7fff9, #fff9ec);
}
.trust-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.trust-list span {
  grid-template-columns: 1fr auto;
  align-items: center;
}
.trust-list em {
  color: #b6791f;
  font-style: normal;
  font-weight: 1000;
}
.video-card .meta {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.primary, .secondary, .danger {
  min-height: 48px;
  border-radius: 18px;
  padding: 0 16px;
  font-weight: 900;
}
.primary { background: var(--orange); color: white; }
.secondary { background: var(--green); color: var(--ink); }
.danger { background: #ef4444; color: white; }
.nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 10;
  width: min(488px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(19, 32, 29, .94);
  color: rgba(255,255,255,.6);
  box-shadow: 0 22px 60px rgba(7, 17, 15, .35);
}
.nav button {
  display: grid;
  gap: 4px;
  justify-items: center;
  border-radius: 18px;
  padding: 8px 4px;
  background: transparent;
  color: inherit;
  font-size: 11px;
  font-weight: 900;
}
.nav button.active { background: rgba(255,255,255,.12); color: white; }
.proof {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
}
.proof img { width: 84px; height: 84px; object-fit: cover; border-radius: 18px; }
.leaderboard-row, .timeline-row {
  display: grid;
  grid-template-columns: auto 56px 1fr auto;
  gap: 12px;
  align-items: center;
}
.leaderboard-row img {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  object-fit: cover;
}
.leader-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--green);
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}
.leaderboard-row > strong {
  color: #c18b1b;
  font-size: 18px;
}
.timeline-row {
  grid-template-columns: 1fr auto;
}
.timeline-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.quick-link {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--ink);
}
pre {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 240px;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 16px;
  background: #0f1c19;
  color: #d8fff0;
}
.form { display: grid; gap: 10px; }
.field {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  display: none;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 999px;
  background: #13201d;
  color: white;
  font-weight: 800;
  z-index: 20;
}
.toast.show { display: block; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(2, 6, 23, .58);
  backdrop-filter: blur(10px);
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(480px, 100%);
  border-radius: 28px;
  padding: 22px;
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(2, 6, 23, .3);
}

.admin-body { background: #eef4f1; }
.admin-shell { max-width: 1180px; margin: 0 auto; padding: 24px; }
.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
}
.admin-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}
.admin-nav button {
  min-height: 44px;
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
  padding: 0 14px;
}
.admin-nav button.active { background: var(--ink); color: white; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 18px; overflow: hidden; }
th, td { padding: 12px; border-bottom: 1px solid #e5ece8; text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); }
td input, td select { width: 100%; min-width: 120px; }
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login .card { width: min(420px, 100%); }

@media (max-width: 760px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-nav { grid-template-columns: repeat(2, 1fr); }
  .admin-top { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .nav { width: calc(100vw - 12px); gap: 4px; padding: 6px; }
  .nav button { font-size: 10px; padding: 7px 2px; }
  h1 { font-size: 38px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sponsor-card { grid-template-columns: 42px 1fr; }
  .sponsor-card strong { grid-column: 2; font-size: 18px; }
  .sponsor-icon { width: 42px; height: 42px; border-radius: 15px; }
  .mini-progress-grid, .progress-actions, .modal-share { grid-template-columns: 1fr; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
