/* ═══════════ PONGI HUB — Free Key site ═══════════ */
:root {
  --bg: #0b0913;
  --bg-2: #110e1e;
  --card: #17132a;
  --card-2: #1e1936;
  --line: #2a2447;
  --text: #eceaf5;
  --muted: #9d97b8;
  --purple: #7c3aed;
  --purple-2: #a78bfa;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --font-display: "Orbitron", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 800px at 80% -10%, #241a4a 0%, transparent 55%),
              radial-gradient(900px 700px at -10% 40%, #1c1440 0%, transparent 50%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 400px at 50% 0%, rgba(124, 58, 237, .14), transparent 70%);
}

/* ── full-screen loading overlay (boot + Work.Ink transition) ── */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 800px at 50% -10%, #241a4a 0%, transparent 60%), var(--bg);
  transition: opacity .35s ease, visibility .35s ease;
}
.loader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  animation: loaderPulse 1.6s ease-in-out infinite;
}
.loader-logo {
  width: 72px; height: 72px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(135deg, var(--purple), #a855f7);
  display: grid; place-items: center;
  box-shadow: 0 12px 34px rgba(124, 58, 237, .5);
}
.loader-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.loader-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(167, 139, 250, .25);
  border-top-color: var(--purple-2);
  animation: spin .8s linear infinite;
}
.loader-text {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .28em; color: var(--muted);
}
@keyframes loaderPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hidden { display: none !important; }
/* the JS toggles some elements via the hidden ATTRIBUTE (element.hidden = …)
 * — a display rule like .task-status.info{display:flex} would override the
 * UA's [hidden]{display:none} (higher specificity), leaving hidden elements
 * visible. This guard restores it for every element. */
[hidden] { display: none !important; }

/* ── top bar ── */
.topbar-wrap {
  position: relative; z-index: 20;
  background: rgba(17, 14, 30, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(124, 58, 237, .30);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, var(--purple), #a855f7);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(124, 58, 237, .45);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-name { font-size: 18px; letter-spacing: .12em; color: var(--muted); }
.brand-name b { color: var(--text); }
.discord-link {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
  background: #5865f2; padding: 8px 16px; border-radius: 10px; transition: transform .12s ease, filter .12s ease;
}
.discord-link:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* ── layout ── */
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; box-shadow: var(--shadow);
}
/* landing + steps cards: FIXED box, ~half the column width (compact, centered
 * with the premium upsell on the right). Buttons/labels/text swaps (widget →
 * Start, status lines appearing) must never move the card — content is
 * vertically centered inside a stable min-height and grows the box only when
 * it truly overflows. space-evenly spreads the content so the card feels
 * filled instead of floating in dead space. */
#view-land, #view-steps {
  max-width: 380px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  min-height: 400px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-evenly;
}
#view-land { text-align: center; }

/* ── step-title change animation only (no view-load entrance motion) ──
 * The start/steps views render instantly — no rise/fade on load. The only
 * animation left is the gentle fade when the step label CHANGES. */
@keyframes popIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.pop { animation: popIn .3s ease both; }

/* ── two columns: key/start content LEFT, premium RIGHT — together, the
 * whole pair centered in the middle of the page (no big gap between them) ── */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 380px) 300px;
  gap: 22px;
  align-items: start;
  justify-content: center;
}
.cols-main { min-width: 0; }

/* when the human-verification challenge is present the background glow
 * brightens slightly — visual only, the card itself never moves */
body.land-expanded .bg-glow {
  background: radial-gradient(700px 480px at 50% 0%, rgba(124, 58, 237, .22), transparent 70%);
}
.card.center { text-align: center; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .18em;
  color: var(--purple-2); background: rgba(124, 58, 237, .14); border: 1px solid rgba(124, 58, 237, .4);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.badge.green { color: var(--green); background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .4); }

.bypass-warn {
  margin: 0 0 18px; padding: 12px 16px; border-radius: 12px;
  color: var(--red); background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .4);
  font-size: 14px; font-weight: 600; text-align: center;
}

h1 { font-size: 34px; letter-spacing: -.02em; margin-bottom: 10px; font-family: var(--font-display); }
h2 { font-size: 20px; letter-spacing: -.01em; font-family: var(--font-display); }
h3 { font-size: 17px; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* ── buttons ── */
.btn {
  font: inherit; font-weight: 700; border: none; cursor: pointer; border-radius: 12px;
  padding: 11px 22px;
  transition: filter .12s ease, opacity .12s ease;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, var(--purple), #9333ea); color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, .4);
}
/* the Start button going to Work.Ink: solid gray (app.js adds .going while
 * the browser transitions to the offer page). NO bounce — buttons are static. */
.btn.primary.going {
  background: #3a3550; /* flat gray, kills the purple gradient */
  box-shadow: none;
  opacity: 1;
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn.ghost {
  background: transparent; color: var(--text); border: 1px solid var(--line);
}
.btn.ghost:hover:not(:disabled) { border-color: var(--purple); color: var(--purple-2); }
.btn.big { padding: 14px 34px; font-size: 16px; margin-top: 20px; }
.btn.small { padding: 7px 14px; font-size: 13px; }

/* ── premium upsell (right column) ── */
.premium {
  padding: 26px 24px; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .14), rgba(88, 28, 135, .22)), var(--card);
  border: 1px solid rgba(167, 139, 250, .35); box-shadow: var(--shadow);
  position: sticky; top: 20px;
}
.premium .badge { margin-bottom: 0; }
.badge.gold { color: #fcd34d; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .45); }
.premium h2 { font-size: 20px; margin-bottom: 0; }
.premium-cta {
  background: linear-gradient(135deg, #fbbf24, #d97706); color: #241303;
  padding: 13px 28px; border-radius: 12px; font-weight: 800; text-decoration: none; font-size: 15px;
  box-shadow: 0 8px 24px rgba(217, 119, 6, .35); transition: transform .1s ease, filter .12s ease;
  width: 100%;
}
.premium-cta:hover { filter: brightness(1.08); }

/* ── Cloudflare Turnstile (human verification) ── */
.turnstile-wrap { display: flex; justify-content: center; margin-top: 18px; min-height: 65px; }
.spin-inline {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  vertical-align: -2px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .8s linear infinite;
}

/* ── steps bar ── */
.steps { display: flex; align-items: center; justify-content: center; margin: 10px 0 4px; }
.step-node {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 800; border: 2px solid var(--line); color: var(--muted);
  background: var(--card-2); flex: 0 0 auto; transition: all .2s ease;
}
.step-node.done { border-color: var(--purple); background: rgba(124, 58, 237, .18); color: var(--purple-2); }
.step-node.current { border-color: var(--purple); background: var(--purple); color: #fff; box-shadow: 0 0 0 5px rgba(124, 58, 237, .25), 0 0 18px rgba(124, 58, 237, .6); animation: pulse 1.8s infinite; }
.step-node.locked { opacity: .55; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(124,58,237,.22), 0 0 14px rgba(124,58,237,.5); } 50% { box-shadow: 0 0 0 7px rgba(124,58,237,.14), 0 0 22px rgba(124,58,237,.7); } }
.step-link { width: 44px; height: 2px; background: var(--line); border-radius: 2px; flex: 0 0 auto; }
.step-link.done { background: linear-gradient(90deg, var(--purple), var(--purple-2)); }

.step-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 12px; }
.step-count { color: var(--purple-2); font-weight: 700; }
.progress-track { height: 8px; background: var(--card-2); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, var(--purple), var(--purple-2)); transition: width .4s ease; }

/* ── task card ── */
.task-card { margin-top: 26px; text-align: center; }
.task-status { margin-top: 16px; font-weight: 600; }
.task-status.ok { color: var(--green); }
.task-status.err { color: var(--red); }
.task-status.info { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--purple-2); }
.spinner {
  width: 18px; height: 18px; flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(124, 58, 237, .22);
  border-top-color: var(--purple-2);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


.dev-note { margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3); color: var(--amber); font-size: 13px; }

/* ── key view ── */
.key-box {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 18px; margin: 8px 0 16px;
}
#key-value { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 20px; letter-spacing: .06em; color: var(--purple-2); font-weight: 700; }
#key-expiry { margin-bottom: 8px; }
.steps-list { text-align: left; margin: 14px 0 0 18px; color: var(--muted); font-size: 14px; }
.steps-list li { margin: 6px 0; }
.steps-list b { color: var(--text); }

/* ── info grid ── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.card.info { padding: 24px 22px; box-shadow: none; }
.verify-row { display: flex; gap: 10px; margin-top: 12px; }
.input {
  flex: 1; font: inherit; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); outline: none; transition: border-color .15s ease;
}
.input:focus { border-color: var(--purple); }
.input::placeholder { color: #6b6588; }
.verify-result { margin-top: 12px; font-size: 14px; }
.verify-result.ok { color: var(--green); }
.verify-result.err { color: var(--red); }
details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text); }
details p, details:not([open]) summary + * { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
details[open] summary { color: var(--purple-2); }

/* ── toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 22px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); z-index: 50;
}

.footer { text-align: center; color: #575172; font-size: 13px; padding: 30px 20px 50px; }

/* ── responsive ── */
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .premium { position: static; }
}
@media (max-width: 640px) {
  .wrap { padding: 14px 14px 50px; }
  .card { padding: 26px 18px; }
  #view-land, #view-steps { min-height: 420px; }
  h1 { font-size: 26px; }
  .info-grid { grid-template-columns: 1fr; }
  .step-link { width: 22px; }
  .step-node { width: 30px; height: 30px; font-size: 12px; }
  #key-value { font-size: 15px; }
  .premium { padding: 20px 18px; }
}
