/* =====================================================================
   1000xGEM × Pump.fun Trading Challenge
   ===================================================================== */
:root {
  --bg: #000;
  --fg: #fff;
  --muted: #a3a8b3;
  --dim: #6f7480;
  --gold: #f5b914;
  --gold-2: #ffd75e;
  --gold-dark: #b57a00;
  --blue: #2f7df9;
  --blue-hover: #4a8ffb;
  --red: #ff5a5f;
  --line: rgba(255, 255, 255, 0.14);
  --card: #0d0d0f;
  --radius: 14px;
  --font-latin: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-cjk: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-latin), var(--font-cjk);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
html[lang^="zh"] body { font-family: var(--font-cjk), var(--font-latin); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }

.gold { color: var(--gold); text-decoration: none; }
.gold:hover { text-decoration: underline; }
.req { color: var(--red); margin-left: 2px; }

/* ---------- state visibility ---------- */
.only-before, .only-live, .only-ended { display: none !important; }
body[data-state="before"] .only-before,
body[data-state="live"]   .only-live,
body[data-state="ended"]  .only-ended { display: block !important; }
/* inline spans inside countdown label */
body[data-state="before"] span.only-before,
body[data-state="live"]   span.only-live { display: inline !important; }

/* ---------- layout ---------- */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: clamp(200px, 32vw, 460px);
  overflow: hidden;
  background: #0b1a17;
}
.hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 82%, #000 100%);
  pointer-events: none;
}
.lang-switch {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
}
.lang-switch__btn {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.75);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.lang-switch__btn.is-active { background: #fff; color: #000; }

/* ---------- intro ---------- */
.intro { text-align: center; padding-top: 28px; }
.intro__title {
  font-size: clamp(30px, 6.5vw, 46px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.intro__tagline {
  margin-top: 22px;
  font-size: clamp(17px, 3.6vw, 20px);
  font-weight: 700;
}
.intro__dates {
  margin-top: 6px;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.intro__ended-badge {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.countdown { margin-top: 26px; }
.countdown__label { color: var(--muted); font-size: 13px; font-weight: 600; }
.countdown__timer {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: clamp(18px, 6vw, 40px);
  margin-top: 6px;
}
.countdown__unit { display: flex; align-items: baseline; gap: 6px; }
.countdown__num {
  font-family: var(--font-latin);
  font-size: clamp(38px, 9vw, 54px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.countdown__suffix { color: var(--muted); font-size: 13px; font-weight: 600; }
.intro__cta { margin-top: 26px; min-width: 170px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 12px;
  border: 0;
  background: #1f2430;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); }
.btn--primary:hover { background: var(--blue-hover); }
.btn--block { display: block; width: 100%; padding: 15px; font-size: 21px; font-weight: 600; }
.btn--small { padding: 8px 16px; font-size: 13px; border-radius: 9px; background: var(--blue); white-space: nowrap; }
.btn--small:hover { background: var(--blue-hover); }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- prizes / podium ---------- */
.prizes { margin-top: 36px; }
.podium {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  gap: 10px;
  align-items: end;
}
.podium__card {
  position: relative;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd865 0%, #f5b914 45%, #c58500 100%);
  box-shadow: 0 10px 30px rgba(245,185,20,0.18), inset 0 1px 0 rgba(255,255,255,0.35);
  padding: 22px 10px 0;
  text-align: center;
  overflow: hidden;
}
.podium__card--1 { padding-top: 26px; }
.podium__card--2, .podium__card--3 { padding-top: 40px; }
.podium__rank {
  margin-top: 14px;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 100%);
  color: #fff;
  font-family: var(--font-latin);
  font-weight: 900;
  font-size: clamp(20px, 5vw, 28px);
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.podium__card--1 .podium__rank { font-size: clamp(26px, 6vw, 36px); }
.podium__cash {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #1a1200;
  font-family: var(--font-latin);
  font-weight: 800;
  font-size: clamp(13px, 3vw, 16px);
}
.coin {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #ffca28 55%, #b8860b);
  box-shadow: 0 2px 4px rgba(0,0,0,0.35), inset 0 0 0 2px rgba(120,80,0,0.35);
  color: #5a3d00;
  font-size: 15px;
  font-weight: 900;
}

/* fanned NFT stack */
.nft-stack {
  position: relative;
  height: clamp(74px, 17vw, 110px);
  width: clamp(74px, 17vw, 110px);
  margin: 0 auto;
}
.nft-stack img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(54px, 12.5vw, 80px);
  height: clamp(54px, 12.5vw, 80px);
  object-fit: cover;
  border-radius: 8px;
  border: 2.5px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  transform-origin: 50% 110%;
}
.nft-stack--1 img { transform: translate(-50%,-50%) rotate(0deg); }
.nft-stack--2 img:nth-child(1) { transform: translate(-50%,-50%) rotate(-10deg); }
.nft-stack--2 img:nth-child(2) { transform: translate(-50%,-50%) rotate(8deg); }
.nft-stack--3 img:nth-child(1) { transform: translate(-50%,-50%) rotate(-14deg); }
.nft-stack--3 img:nth-child(2) { transform: translate(-50%,-50%) rotate(0deg); }
.nft-stack--3 img:nth-child(3) { transform: translate(-50%,-50%) rotate(14deg); }
.nft-stack__count {
  position: absolute;
  right: -10px;
  top: -6px;
  color: #1a1200;
  font-family: var(--font-latin);
  font-weight: 900;
  font-size: clamp(18px, 4.5vw, 26px);
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

/* ---------- leaderboards ---------- */
.boards { margin-top: 24px; }
.boards__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 0;
}
.board__title {
  font-size: clamp(16px, 3.8vw, 21px);
  font-weight: 800;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  min-height: 56px;
  display: flex;
  align-items: flex-end;
  line-height: 1.25;
}
.board__list { margin: 0; }
.board__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}
.board__medal { font-size: 20px; width: 24px; text-align: center; flex: none; }
.board__avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #000;
}
.board__avatar img { width: 100%; height: 100%; object-fit: cover; }
.board__name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.board__name.is-placeholder { color: var(--muted); font-weight: 500; }
.board__value { margin-left: auto; color: var(--gold); font-family: var(--font-latin); font-size: 12px; font-weight: 700; flex: none; }
.boards__note { margin-top: 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }

/* ---------- section titles ---------- */
.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 56px 0 28px;
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 800;
  text-align: center;
}
.section-title::before, .section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: #fff;
}

/* ---------- how to enter ---------- */
.step { display: flex; gap: 14px; margin-bottom: 26px; }
.step__num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-latin);
  font-weight: 800;
  font-size: 15px;
  margin-top: 2px;
}
.step__body { flex: 1; min-width: 0; }
.step__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.step__title { display: block; font-size: 18px; font-weight: 700; line-height: 1.35; }
.step__sub { margin-top: 2px; color: var(--gold); font-size: 14px; }
.step__sub a { color: inherit; text-decoration: none; }
.step__sub a:hover { text-decoration: underline; }
.input {
  width: 100%;
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fff;
  color: #111;
  font-size: 15px;
  outline: none;
}
.input::placeholder { color: #9a9ea8; }
.input:focus { box-shadow: 0 0 0 3px rgba(47,125,249,0.45); }
.input.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,90,95,0.35); }
.hint { margin-top: 8px; color: var(--dim); font-size: 12px; line-height: 1.5; }
.field-error { margin-top: 8px; color: var(--red); font-size: 12.5px; font-weight: 600; }
.field-error--center { text-align: center; margin-top: 12px; }

.success {
  text-align: center;
  padding: 20px 8px 8px;
}
.success__head { display: flex; align-items: center; justify-content: center; gap: 12px; }
.success__check {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: #000;
  display: grid; place-items: center;
}
.success__head h3 { font-size: clamp(24px, 5.5vw, 30px); font-weight: 800; }
.success__line { margin-top: 16px; color: var(--gold); font-size: 16px; font-weight: 600; word-break: break-all; }
.success__line + .success__line { margin-top: 6px; }
.success__dates { margin-top: 22px; font-size: 16px; font-weight: 600; }
.success__note { margin-top: 12px; font-size: 18px; font-weight: 600; line-height: 1.5; }

/* ---------- rules ---------- */
.rule { margin-bottom: 20px; font-size: 14.5px; line-height: 1.6; }
.rule h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 2px; }
.rule p + p, .rule ul + p { margin-top: 10px; }
.rule ul { margin-top: 8px; }
.rule li { padding-left: 4px; }
.rule li::before { content: "·"; margin-right: 6px; }
.rule__prizes li::before { content: none; }
.rule__prizes { margin-top: 10px !important; }

/* ---------- follow ---------- */
.follow__links { display: flex; justify-content: center; gap: 32px; }
.social {
  width: 62px; height: 62px;
  border-radius: 14px;
  display: grid; place-items: center;
  text-decoration: none;
  transition: transform 0.15s;
}
.social:hover { transform: translateY(-2px); }
.social--x { background: #fff; color: #000; }
.social--tg { background: #fff; color: #2aabee; border-radius: 50%; }
.follow__hint { margin-top: 14px; text-align: center; color: var(--dim); font-size: 12px; }

/* ---------- footer ---------- */
.footer { margin-top: 64px; text-align: center; }
.footer__brands { display: flex; justify-content: center; align-items: center; gap: 10px; }
.footer__logo { height: 26px; width: auto; border-radius: 4px; }
.footer__x { color: var(--muted); font-size: 12px; }
.pill {
  position: relative;
  display: inline-block;
  width: 30px; height: 14px;
  border-radius: 999px;
  transform: rotate(-35deg);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.pill__a, .pill__b { position: absolute; top: 0; bottom: 0; width: 50%; }
.pill__a { left: 0; background: #4ade80; }
.pill__b { right: 0; background: #f4f4f4; }
.footer__presented { margin-top: 12px; font-size: 13.5px; font-weight: 600; }
.footer__copy { margin-top: 30px; color: var(--muted); font-size: 11px; }
.footer__risk { margin-top: 2px; color: var(--muted); font-size: 11px; }

/* ---------- responsive tweaks ---------- */
@media (max-width: 380px) {
  .board__medal { font-size: 16px; width: 18px; }
  .board__avatar { width: 26px; height: 26px; }
  .board__name { font-size: 12px; }
}
@media (min-width: 720px) {
  .page { padding: 0 24px 64px; }
  .boards__grid { column-gap: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.success__val { margin-left: 4px; }

/* ---------- v2 additions ---------- */
.countdown__unit--sec .countdown__num { color: var(--gold); }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  user-select: none;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  display: grid; place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.check__box::after {
  content: "";
  width: 6px; height: 11px;
  border: solid #000;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px,-1px);
  opacity: 0;
}
.check input:checked + .check__box { background: var(--gold); border-color: var(--gold); }
.check input:checked + .check__box::after { opacity: 1; }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 3px rgba(47,125,249,0.45); }
.check.is-invalid .check__box { border-color: var(--red); }
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success__link { margin-top: 8px; font-size: 14px; }
.success__link a { color: var(--muted); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.25); }
.success__link a:hover { color: #fff; }
.board__row.is-live .board__name { color: #fff; }
