:root {
  --bg: #04060b;
  --panel: rgba(10, 15, 28, .82);
  --panel-2: #0c1424;
  --line: #18233d;
  --line-2: #22335a;
  --txt: #dbe6ff;
  --mut: #7c8bb3;
  --acc: #00e5ff;
  --acc-2: #39ff9c;
  --warn: #ffb020;
  --err: #ff4d6d;
  --r: 16px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* No scroll anchoring: when the balance box appears below CLAIM, Chrome would scroll the page
   and move the button out from under the user's finger mid-tap (the tap gets lost). */
html, body { overflow-anchor: none; }
body {
  margin: 0; min-height: 100vh; color: var(--txt); font: 16px/1.5 var(--sans);
  background:
    radial-gradient(900px 480px at 50% -120px, rgba(0, 229, 255, .16), transparent 70%),
    radial-gradient(700px 400px at 100% 30%, rgba(57, 255, 156, .06), transparent 70%),
    var(--bg);
  overflow-x: hidden;
}
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(0, 229, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, .06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}
.mono { font-family: var(--mono); }
.mut { color: var(--mut); }
a { color: var(--acc); }
button { font: inherit; }
[hidden] { display: none !important; }

.announce {
  position: relative; z-index: 2; text-align: center; font-size: 13px; padding: 8px 14px;
  background: linear-gradient(90deg, rgba(0, 229, 255, .14), rgba(57, 255, 156, .14));
  border-bottom: 1px solid var(--line-2); color: var(--txt);
}

/* header */
.top {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  max-width: 640px; margin: 0 auto; padding: 16px 18px 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--txt); }
.logo {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-weight: 800; font-size: 14px;
  background: #05080f; border: 1.5px solid var(--acc); color: var(--acc);
  box-shadow: 0 0 18px rgba(0, 229, 255, .35), inset 0 0 12px rgba(0, 229, 255, .15);
}
.brand-t { display: flex; flex-direction: column; line-height: 1.1; }
.brand-t b { font-size: 16px; letter-spacing: .2px; }
.brand-t small { font-size: 11px; color: var(--mut); }
.status {
  display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; letter-spacing: 1px; color: var(--acc-2);
  border: 1px solid rgba(57, 255, 156, .3); border-radius: 999px; padding: 5px 10px; background: rgba(57, 255, 156, .06);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc-2); box-shadow: 0 0 8px var(--acc-2); animation: blink 1.6s infinite; }
.status.off { color: var(--warn); border-color: rgba(255, 176, 32, .35); background: rgba(255, 176, 32, .06); }
.status.off i { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
@keyframes blink { 50% { opacity: .25; } }

/* layout */
.wrap { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 0 16px 40px; }
.hero { text-align: center; padding: 30px 6px 20px; }
.kicker { margin: 0 0 10px; font-size: 11.5px; color: var(--acc); letter-spacing: .3px; }
.hero h1 { margin: 0; font-size: clamp(34px, 9vw, 52px); line-height: 1.02; letter-spacing: -1.2px; font-weight: 700; }
.hero h1 em {
  font-style: normal; background: linear-gradient(90deg, var(--acc), var(--acc-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { margin: 12px auto 0; max-width: 470px; color: var(--mut); font-size: 15px; }

/* main card */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 16px 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 229, 255, .04) inset;
}
.card.pulse { animation: pulse .7s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(57, 255, 156, .45); } 100% { box-shadow: 0 0 0 18px rgba(57, 255, 156, 0); } }
.corner { position: absolute; width: 18px; height: 18px; border-color: var(--acc); border-style: solid; opacity: .8; }
.corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: var(--r); }
.corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: var(--r); }

.step { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px dashed var(--line); }
.step.last { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.lbl { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--mut); letter-spacing: .8px; text-transform: uppercase; margin-bottom: 9px; }
.lbl .n { color: var(--acc); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; font-size: 10.5px; }

input[type=email] {
  width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: #070c18; color: var(--txt); font: 16px var(--mono); outline: none; transition: border-color .15s, box-shadow .15s;
}
input[type=email]:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(0, 229, 255, .15); }
.email-saved {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px;
  background: rgba(57, 255, 156, .05); border: 1px solid rgba(57, 255, 156, .25); font-size: 14.5px;
}
.ok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc-2); box-shadow: 0 0 8px var(--acc-2); flex: none; }
.email-saved .mono { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { background: none; border: 0; color: var(--acc); cursor: pointer; padding: 4px 2px; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.hint { margin: 8px 0 0; font-size: 12.5px; color: var(--mut); }
.hint a { text-decoration: none; }

/* coins */
.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.coin {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  height: 74px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--txt);
  cursor: pointer; transition: transform .1s, border-color .15s, box-shadow .15s, background .15s; padding: 6px 4px;
}
.coin b { font-size: 12.5px; letter-spacing: .3px; }
.coin small { position: absolute; top: 4px; right: 6px; font-size: 9px; color: var(--warn); text-transform: uppercase; }
.coin:hover { border-color: var(--line-2); }
.coin:active { transform: scale(.96); }
.coin.on { border-color: var(--acc); background: rgba(0, 229, 255, .07); box-shadow: 0 0 0 1px var(--acc) inset, 0 0 18px rgba(0, 229, 255, .22); }
.coin.dry { opacity: .45; }
.coin.sk { cursor: default; background: linear-gradient(90deg, var(--panel-2), #111c33, var(--panel-2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

.ci { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; }
.ci img { width: 100%; height: 100%; }
.ci.txt { border-radius: 50%; background: #13203b; color: var(--acc); font: 700 9px var(--mono); border: 1px solid var(--line-2); }

/* reward + claim */
.reward { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; min-height: 44px; }
.reward .ci { width: 36px; height: 36px; }
.reward b { display: block; font-size: 19px; color: var(--acc-2); letter-spacing: .2px; word-break: break-all; }
.reward small { color: var(--mut); font-size: 12.5px; }
.ts { display: flex; justify-content: center; min-height: 0; margin-bottom: 10px; }
.ts:empty { margin: 0; }

.claim {
  position: relative; width: 100%; height: 62px; border: 0; border-radius: 14px; cursor: pointer;
  font-size: 18px; font-weight: 800; letter-spacing: 1.5px; color: #021015; overflow: hidden;
  background: linear-gradient(90deg, var(--acc), var(--acc-2));
  box-shadow: 0 10px 34px rgba(0, 229, 255, .28), 0 0 0 1px rgba(255, 255, 255, .15) inset;
  transition: transform .08s, filter .15s, box-shadow .15s;
}
.claim.ready::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shine 2.4s infinite;
}
@keyframes shine { 60%, 100% { left: 130%; } }
.claim:active:not(:disabled) { transform: scale(.985); }
.claim:disabled { cursor: not-allowed; background: #121b30; color: var(--mut); box-shadow: 0 0 0 1px var(--line-2) inset; font-size: 15px; }
.claim.small { height: 48px; font-size: 15px; }
.step.last { position: relative; }
.burst {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%); pointer-events: none; white-space: nowrap;
  color: var(--acc-2); font-weight: 800; font-size: 17px; text-shadow: 0 0 14px rgba(57, 255, 156, .7); animation: up 1.4s ease-out forwards;
}
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } 15% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -70px); } }

/* balance */
.bal { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #070c18; border: 1px solid var(--line); }
.bal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--mut); }
.bal-top b { color: var(--txt); font-size: 14px; word-break: break-all; text-align: right; }
.bar { height: 6px; border-radius: 6px; background: #121b30; margin: 9px 0 0; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--acc), var(--acc-2)); transition: width .5s ease; }
.bal .hint { font-size: 11.5px; }
.others { margin-top: 10px; }
.others summary { cursor: pointer; font-size: 12px; color: var(--mut); padding: 6px 2px; letter-spacing: .5px; }
.others ul { list-style: none; margin: 4px 0 0; padding: 0; }
.others li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 13px; }
.others li .ci { width: 20px; height: 20px; }
.others li span { flex: 1; word-break: break-all; }

/* stats / how / feed */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.stats div { text-align: center; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.stats b { display: block; font-size: 20px; color: var(--acc); }
.stats span { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: 1px; }

.h2 { font-size: 12.5px; color: var(--mut); text-transform: uppercase; letter-spacing: 1.2px; margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.how li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 14px; }
.how li b { color: var(--acc); font-size: 12px; padding-top: 2px; }

.live { width: 8px; height: 8px; border-radius: 50%; background: var(--err); box-shadow: 0 0 8px var(--err); animation: blink 1.2s infinite; }
.feed ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.feed li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.feed li:first-child { border-top: 0; }
.feed li .ci { width: 22px; height: 22px; grid-column: 1; grid-row: 1 / 3; }
.feed li b { grid-column: 2; grid-row: 1; font-size: 13px; color: var(--acc-2); overflow-wrap: anywhere; }
.feed li span { grid-column: 2; grid-row: 2; font-size: 11.5px; }
.feed li small { grid-column: 3; grid-row: 1 / 3; font-size: 11px; white-space: nowrap; }
.feed li.empty { display: block; color: var(--mut); text-align: center; padding: 16px; font-size: 12.5px; }

.promo {
  display: flex; flex-direction: column; gap: 3px; margin-top: 22px; padding: 16px 18px; border-radius: var(--r); text-decoration: none; color: var(--txt);
  border: 1px solid var(--line-2); background: linear-gradient(120deg, rgba(0, 229, 255, .08), rgba(57, 255, 156, .05) 60%, transparent);
}
.promo .kick { font-size: 10.5px; color: var(--acc); letter-spacing: .6px; }
.promo b { font-size: 17px; }
.promo span:last-child { font-size: 13.5px; color: var(--mut); }

.foot {
  position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 18px 16px 34px; display: flex; flex-wrap: wrap;
  gap: 10px 16px; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--mut); border-top: 1px solid var(--line);
}
.foot a { color: var(--mut); }
.langs { display: flex; gap: 4px; }
.langs button { background: none; border: 1px solid var(--line); color: var(--mut); border-radius: 6px; padding: 3px 7px; font: 11px var(--mono); cursor: pointer; }
.langs button.on { color: var(--acc); border-color: var(--acc); }

/* overlay + toasts */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(2, 4, 8, .86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ov-card { max-width: 380px; text-align: center; padding: 26px 22px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line-2); }
.ov-ic { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 50%; border: 2px solid var(--warn); color: var(--warn); font-weight: 800; font-size: 22px; }
.ov-card h3 { margin: 0 0 8px; }
.ov-card p { margin: 0 0 18px; color: var(--mut); font-size: 14px; }

.toasts { position: fixed; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast {
  max-width: 440px; width: fit-content; padding: 11px 16px; border-radius: 12px; font-size: 14px; background: #0f1830; border: 1px solid var(--line-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.toast.in { opacity: 1; transform: none; }
.toast.ok { border-color: rgba(57, 255, 156, .45); color: var(--acc-2); font-family: var(--mono); }
.toast.paid { border-color: var(--acc-2); background: linear-gradient(90deg, rgba(0, 229, 255, .18), rgba(57, 255, 156, .18)); font-weight: 600; }
.toast.err { border-color: rgba(255, 77, 109, .5); }
.toast.warn { border-color: rgba(255, 176, 32, .5); }

@media (min-width: 560px) {
  .card { padding: 22px 22px 22px; }
  .coins { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
