/* CoinMountain — night-alpine design system */
:root {
  --ink: #0A0E1A;
  --ink-raised: #111726;
  --ink-border: #232C44;
  --snow: #F2F5FA;
  --snow-dim: #9AA6BF;
  --gold: #F0B429;
  --blue: #5B8DEF;
  --green: #3ECF8E;
  --red: #F26D6D;
  --display: "Unbounded", sans-serif;
  --body: "Space Grotesk", sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--snow);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: var(--body); cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 22px 24px;
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  color: var(--snow); letter-spacing: 0.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark .mark { width: 30px; height: 23px; color: var(--snow); }
.wm-accent { color: var(--gold); }
.site-nav { display: flex; gap: 26px; }
.site-nav a { color: var(--snow-dim); font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover { color: var(--snow); text-decoration: none; }

/* ---------- hero ---------- */
.hero { max-width: 780px; margin: 0 auto; padding: 44px 24px 0; text-align: center; }
.stats-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink-raised); border: 1px solid var(--ink-border);
  border-radius: 999px; padding: 7px 18px; font-size: 0.85rem; color: var(--snow-dim);
}
.stats-pill .sep { opacity: 0.4; }
.stat.online { color: var(--green); display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.gold-text { color: var(--gold); }

h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(1.7rem, 4.6vw, 2.9rem); line-height: 1.18;
  margin: 26px 0 16px; letter-spacing: -0.01em;
}
.who {
  font-size: clamp(2.7rem, 9.5vw, 6rem); line-height: 1.02;
  letter-spacing: -0.02em; margin: 30px 0 18px;
}
.hero-tag {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem); margin-bottom: 16px;
}
.hero-sub { color: var(--snow-dim); max-width: 600px; margin: 0 auto 30px; font-size: 1.02rem; }

.claim-bar {
  display: flex; gap: 10px; max-width: 640px; margin: 0 auto;
  background: var(--ink-raised); border: 1px solid var(--ink-border);
  border-radius: var(--radius); padding: 8px;
}
.claim-bar input {
  flex: 1; min-width: 0; background: transparent; border: none; color: var(--snow);
  font-family: var(--body); font-size: 0.95rem; padding: 10px 12px;
}
.claim-bar input::placeholder { color: #5B6580; }
.claim-bar input:focus { outline: none; }
.claim-bar:focus-within { border-color: var(--gold); }
.btn-gold {
  background: var(--gold); color: #201503; border: none;
  font-weight: 700; font-size: 0.95rem; padding: 12px 22px;
  border-radius: 10px; white-space: nowrap; transition: transform 0.12s ease, background 0.12s ease;
}
.btn-gold:hover { background: #FFC53D; transform: translateY(-1px); }
.btn-gold:disabled { opacity: 0.55; cursor: wait; transform: none; }
.btn-gold.wide { width: 100%; margin-top: 12px; }
.claim-hint { color: #5B6580; font-size: 0.83rem; margin-top: 12px; }

/* ---------- mountain ---------- */
.mountain { position: relative; max-width: 1080px; margin: 150px auto 0; padding: 0 24px; }
.range { display: block; width: 100%; height: auto; }
.stars circle { fill: var(--snow); opacity: 0.5; }
@media (prefers-reduced-motion: no-preference) {
  .stars circle { animation: twinkle 4s ease-in-out infinite; }
  .stars circle:nth-child(2n) { animation-delay: 1.3s; }
  .stars circle:nth-child(3n) { animation-delay: 2.6s; }
  @keyframes twinkle { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.12; } }
}
.podium { position: absolute; inset: 0 24px; }
.summit-slot { position: absolute; transform: translate(-50%, -100%); text-align: center; width: 170px; }
.slot-1 { left: 50%; top: 20%; }
.slot-2 { left: 25%; top: 42%; }
.slot-3 { left: 75%; top: 50.5%; }
.summit-slot a { display: block; color: inherit; }
.summit-slot a:hover { text-decoration: none; }
.summit-avatar {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto;
  border: 2.5px solid var(--ink-border); background: var(--ink-raised);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: var(--snow-dim);
  overflow: hidden; transition: transform 0.15s ease;
}
.summit-avatar img { width: 100%; height: 100%; object-fit: cover; }
.summit-slot a:hover .summit-avatar { transform: scale(1.07); }
.slot-1 .summit-avatar { width: 72px; height: 72px; border-color: var(--gold); box-shadow: 0 0 34px rgba(240, 180, 41, 0.35); }
.summit-crown { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; filter: drop-shadow(0 2px 6px rgba(240,180,41,0.5)); }
.summit-name {
  margin-top: 8px; font-weight: 700; font-size: 0.88rem; color: var(--snow);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.summit-bid {
  display: inline-block; margin-top: 3px; font-size: 0.8rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--ink);
  background: var(--snow-dim); border-radius: 6px; padding: 1px 8px;
}
.slot-1 .summit-bid { background: var(--gold); color: #201503; }
.summit-empty {
  border: 1.5px dashed #3A4666; border-radius: 12px; padding: 12px 10px;
  color: var(--snow-dim); font-size: 0.83rem; background: rgba(10, 14, 26, 0.55);
}

/* ---------- board ---------- */
.board { max-width: 1080px; margin: 34px auto 0; padding: 0 24px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--ink-raised); color: var(--snow-dim); border: 1px solid var(--ink-border);
  border-radius: 999px; padding: 6px 14px; font-size: 0.85rem; font-weight: 500;
}
.chip:hover { color: var(--snow); }
.chip.active { background: var(--snow); color: var(--ink); border-color: var(--snow); }

.coin-list { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.coin-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--ink-raised); border: 1px solid var(--ink-border);
  border-radius: var(--radius); padding: 14px 18px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.coin-row:hover { border-color: #3A4666; transform: translateY(-1px); }
.coin-row.king { border-color: var(--gold); background: linear-gradient(100deg, rgba(240,180,41,0.10), var(--ink-raised) 55%); }
.rank-badge {
  min-width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums;
  background: var(--ink); color: var(--snow-dim); border: 1px solid var(--ink-border);
}
.king .rank-badge { background: var(--gold); color: #201503; border-color: var(--gold); }
.row-avatar {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: var(--ink); border: 1px solid var(--ink-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: var(--snow-dim); overflow: hidden;
}
.row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.row-main { flex: 1; min-width: 0; }
.row-name { font-weight: 700; font-size: 1.02rem; display: flex; align-items: baseline; gap: 8px; }
.row-name a { color: var(--snow); }
.row-symbol { color: var(--snow-dim); font-size: 0.85rem; font-weight: 500; }
.row-meta { color: #5B6580; font-size: 0.83rem; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: center; }
.row-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.mini-tag { font-size: 0.72rem; color: var(--snow-dim); background: var(--ink); border-radius: 5px; padding: 2px 8px; }
.row-bid { text-align: right; flex-shrink: 0; }
.bid-amount { font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.king .bid-amount { color: var(--gold); }
.btn-outbid {
  margin-top: 4px; background: transparent; border: 1px solid var(--ink-border);
  color: var(--snow-dim); border-radius: 8px; padding: 5px 14px; font-size: 0.82rem; font-weight: 600;
  transition: all 0.12s ease;
}
.btn-outbid:hover { border-color: var(--gold); color: var(--gold); }
.empty-board { text-align: center; padding: 50px 20px; color: var(--snow-dim); }
.empty-title { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--snow); margin-bottom: 8px; }

/* ---------- activity ---------- */
.activity { max-width: 1080px; margin: 40px auto 0; padding: 0 24px; }
.section-label {
  font-size: 0.85rem; font-weight: 600; color: var(--snow-dim);
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.activity-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.activity-card {
  flex-shrink: 0; background: var(--ink-raised); border: 1px solid var(--ink-border);
  border-radius: 10px; padding: 10px 14px; font-size: 0.85rem; color: var(--snow-dim);
  display: flex; align-items: center; gap: 8px;
}
.activity-card b { color: var(--snow); }
.activity-card .plus { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.site-footer {
  max-width: 1080px; margin: 56px auto 0; padding: 26px 24px 40px;
  border-top: 1px solid var(--ink-border); color: #5B6580; font-size: 0.83rem;
}

/* ---------- modal ---------- */
.modal {
  margin: auto;
  background: var(--ink-raised); color: var(--snow);
  border: 1px solid var(--ink-border); border-radius: 18px;
  padding: 28px; width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow-y: auto;
}
.modal::backdrop { background: rgba(4, 6, 12, 0.78); backdrop-filter: blur(3px); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: none; color: var(--snow-dim); font-size: 1rem; padding: 6px;
}
.modal-close:hover { color: var(--snow); }

.coin-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.coin-preview .row-avatar { width: 54px; height: 54px; }
.preview-name { font-weight: 700; font-size: 1.1rem; }
.preview-meta { color: var(--snow-dim); font-size: 0.85rem; }
.bid-context {
  background: var(--ink); border: 1px solid var(--ink-border); border-radius: 10px;
  padding: 12px 14px; font-size: 0.9rem; color: var(--snow-dim); margin-bottom: 16px;
}
.bid-context b { color: var(--gold); font-variant-numeric: tabular-nums; }

.field-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; }
.muted { color: var(--snow-dim); font-weight: 400; font-size: 0.82rem; }
.tag-pick { margin-bottom: 18px; }
.tag-options { display: flex; gap: 7px; flex-wrap: wrap; }
.tag-options .chip { font-size: 0.8rem; padding: 5px 12px; }
.tag-options .chip.active { background: var(--blue); color: var(--snow); border-color: var(--blue); }

.pay-box, .sig-box { margin-bottom: 18px; }
.address-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink); border: 1px solid var(--ink-border); border-radius: 10px; padding: 10px 12px;
}
.address-row code {
  flex: 1; font-size: 0.78rem; word-break: break-all; color: var(--green);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.btn-ghost {
  background: transparent; border: 1px solid var(--ink-border); color: var(--snow-dim);
  border-radius: 8px; padding: 6px 12px; font-size: 0.8rem; font-weight: 600; flex-shrink: 0;
}
.btn-ghost:hover { color: var(--snow); border-color: var(--snow-dim); }
.pay-note { color: #5B6580; font-size: 0.8rem; margin-top: 8px; }
.sig-box input {
  width: 100%; background: var(--ink); border: 1px solid var(--ink-border);
  border-radius: 10px; padding: 11px 12px; color: var(--snow);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8rem;
}
.sig-box input:focus { outline: none; border-color: var(--gold); }
.verify-status { margin-top: 10px; font-size: 0.87rem; min-height: 1.3em; }
.verify-status.err { color: var(--red); }

#stepDone { text-align: center; padding: 12px 0; }
.done-crown { font-size: 3rem; margin-bottom: 10px; }
#stepDone h3 { font-family: var(--display); font-weight: 700; font-size: 1.25rem; margin-bottom: 10px; }
#stepDone p { color: var(--snow-dim); }

/* ---------- rules page ---------- */
.prose { max-width: 680px; margin: 0 auto; padding: 30px 24px 60px; }
.prose h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); text-align: left; }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--snow-dim); margin-bottom: 10px; }
.prose ul { padding-left: 20px; }
.prose b, .prose strong { color: var(--snow); }
.prose code { color: var(--green); font-size: 0.85em; word-break: break-all; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .claim-bar { flex-direction: column; }
  .btn-gold { padding: 13px 22px; }
  .summit-slot { width: 120px; }
  .slot-2, .slot-3 { display: none; }        /* mountain shows only the king on small screens */
  .slot-1 { top: 26%; }
  .coin-row { flex-wrap: wrap; gap: 10px 12px; padding: 13px 14px; }
  .row-main { flex-basis: calc(100% - 120px); }
  .row-bid { margin-left: auto; display: flex; align-items: center; gap: 12px; }
  .bid-amount { font-size: 1.1rem; }
  .site-nav { gap: 16px; }
}
